Openbravo Issue Tracking System - Modules
View Issue Details
0029812ModulesService Contract Managementpublic2015-05-07 15:502015-05-13 18:13
ngarcia 
vmromanos 
urgentmajoralways
closedfixed 
5
 
 
umartirena
0029812: Cannot launch Contract Billing Process if From Order is selected and the Invoicing Date - Month of the Period is not null
Cannot launch Contract Billing Process if From Order is selected and the Invoicing Date - Month of the Period is not null.

The problem is the v_invoicing_monthofperiod variable of the obscntr_get_dis_invoicing_day function has a char value and it is used in a condition with '<'

Definition in obscntr_get_dis_invoicing_day function:

v_invoicing_monthofperiod OBSCNTR_INVOICESCHEDULE.DIS_INVOICING_MONTHOFPERIOD%TYPE;

Definition in OBSCNTR_INVOICESCHEDULE table:

dis_invoicing_monthofperiod character varying(60),
As group admin role:
   Create a Contract Invoice Schedule
   Set the Invoice Frequency as Annual
   Select an Invoicing Date - Month of the period
   Create a Contract with that Contract Invoice Schedule
   Add a Invoice Plan Master
   Complete it (Generate Invoice Plan)
   Create a Sales Order, assign the previously created contract to it, Invoice Terms = Contract Billing and book it
   Launch the Contract Billing Process selecting the From Order option
   The following error message is shown:
      0: ERROR: operator does not exist: numeric < character varying
No tags attached.
Issue History
2015-05-07 15:50ngarciaNew Issue
2015-05-07 15:50ngarciaAssigned To => Triage Finance
2015-05-07 15:50ngarciaResolution time => 1433887200
2015-05-07 15:51ngarciaIssue Monitored: networkb
2015-05-07 16:27ngarciaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=8475#r8475
2015-05-12 16:31aferrazAssigned ToTriage Finance => aferraz
2015-05-12 16:56aferrazAssigned Toaferraz => vmromanos
2015-05-13 11:12vmromanosStatusnew => scheduled
2015-05-13 13:30vmromanosNote Added: 0077379
2015-05-13 18:12hgbotCheckin
2015-05-13 18:12hgbotNote Added: 0077413
2015-05-13 18:12hgbotStatusscheduled => resolved
2015-05-13 18:12hgbotResolutionopen => fixed
2015-05-13 18:12hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.contract.services/rev/2788ad41280f4bf1496d6d1299b2fe1166dd7e0c [^]
2015-05-13 18:13umartirenaReview Assigned To => umartirena
2015-05-13 18:13umartirenaNote Added: 0077414
2015-05-13 18:13umartirenaStatusresolved => closed

Notes
(0077379)
vmromanos   
2015-05-13 13:30   
Apply Service contract dataset to *

Create a Contract Invoice Schedule
 Org = *
 Name = Annual
 Inside regular services field group:
   Set the Invoice Frequency as Annual
   Set to false the checkboxes of the first column
   Set to 1 the * Day of month fields
   Set to 01 the * Month of Period
   Set to Current the * - Period field
 Leave the default values in the rest of the fields inside this window

Create a contract type
  Org = *
  Service Contract = Y

Test plan:
Create a new contract:
  org = FB España
  bp = Alimentos
  start date = today
  price list = tarifa de ventas
  payment terms = 30 days
  payment method = transferencia
  contract invoice schedule = Annual
  Duration = 3 Years
Create an invoice plan master line:
  start date = today
  product = Agua
  quantity 10
Complete and update the invoice plan


Create a new sales order:
  org = FB España
  bp = Alimentos
  contract = previously created
  invoice terms = contract billing
Add any line and book it

Go to contract billing process:
  start date = 01/01/2015
  end date = 01/01/2017
  From order = Y
  From contract = Y

Verify the process is launched successfully and that several invoice proposals have been created
(0077413)
hgbot   
2015-05-13 18:12   
Repository: erp/pmods/org.openbravo.contract.services
Changeset: 2788ad41280f4bf1496d6d1299b2fe1166dd7e0c
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Wed May 13 11:26:45 2015 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.contract.services/rev/2788ad41280f4bf1496d6d1299b2fe1166dd7e0c [^]

Fixed bug 29812: data type error in pl functions,
The v_invoicing_monthofperiod pl variable was declared as varchar instead of numeric, creating a problem when the variable was used.
The solution is to force this variable to be a NUMBER(2,0)

---
M src-db/database/model/functions/OBSCNTR_GET_DIS_INVOICE_DAY.xml
M src-db/database/model/functions/OBSCNTR_GET_DIS_INVOICING_DAY.xml
M src-db/database/sourcedata/AD_MODULE.xml
---
(0077414)
umartirena   
2015-05-13 18:13   
Code Review + Testing OK