Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0036745Openbravo ERP07. Sales managementpublic2017-08-29 20:112017-10-19 10:49
collazoandy4 
collazoandy4 
normalmajoralways
closedno change required 
5
 
 
Core
No
0036745: Purchase order schedule details is not updated when same purchase order line is invoiced twice and second invoice have a negativ
Purchase order schedule details is not updated when same purchase order line is invoiced twice and second invoice is changed to a a negative qty
Go to Payment Term and create a new record:
  Name: 30-60
  Offset month due: 2
  Add line with "percentage due" = 50 and "offset month due" = 1
Go to Business Partner window and relate this new payment term to "Bebidas Alegres" BP.

Register Purchase Order for Bebidas Alegres using "30-60" payment term. (order no 1000190)
  Add line for any product and qty=800, price = 1.00 and exempt VAT (Compras exentas).
  Add another line for different product and qty=200, price = 1.00 and exempt VAT.
  Process the Order and check total gross amount of the order is 1,000.00

Register a Purchase Invoice for Bebidas Alegres using "30-60" payment term. (invoice no 10000946)
  Run "Create lines from" and select line of 800 units line from the order.
  DO NOT process invoice.

Register another Purchase Invoice for Bebidas Alegres using "30-60" payment term. (invoice no 10000947)
  Run "Create lines from" and select line of 800 units once more from the order.
  Edit the line to set qty=-320 units.
  DO NOT process invoice

Process first invoice (invoice no 10000946).
  Run "Add payment" in this first invoice and realize that details are correct :
   Outstanding Amount = 400.00, (order no 1000190, invoice no 10000946)
   Outstanding Amount = 400.00, (order no 1000190, invoice no 10000946)
   Select the details and press DONE.
Check:
  A new Payment Out is created related to the order and the invoice.
  The Invoice is paid (Payment Complete = Yes) Go to the Payment Plan tab and realize that two records was created wit outstanding amount = 0.
  Go back to the order (order no 1000190). Refresh and go to Payment Out Plan, realize that payment plan has been updated
   Paid = 800
   Outstanding = 200.
   It is correct!!!

Process second invoice (invoice no 10000947).
  Run "Add payment" in this second invoice and realize that details are not correct the order is not related in the payment:
    Outstanding Amount = -160.00, (invoice no 10000947)
    Outstanding Amount = -160.00, (invoice no 10000947)
  Select the details and press DONE.
  Check:
    A new Payment Out is created related to the invoice and not to the order.
    The Invoice is paid (Payment Complete = Yes) Go to the Payment Plan tab and realize that two records was created with outstanding amount = 0.
    Go back to the order (order no 1000190). Refresh and go to Payment Out Plan, realize that payment plan has not been updated wich is incorrect the payment plan should be updated with the payment made to the second invoice.
No tags attached.
related to defect 00253123.0PR14Q3 closed eduardo_Argal Wrong payment detail distribution when negative order is invoiced using fractionated payment term 
related to defect 00269513.0PR14Q3 closed gorkaion Wrong payment distribution when creating partial invoices from a prepaid order 
related to defect 0033500 closed AtulOpenbravo Wrong payment schedule details when return to vendor document is invoiced using credit a memo invoice 
Issue History
2017-08-29 20:11collazoandy4New Issue
2017-08-29 20:11collazoandy4Assigned To => Triage Finance
2017-08-29 20:11collazoandy4Modules => Core
2017-08-29 20:11collazoandy4Triggers an Emergency Pack => No
2017-08-30 09:33psanjuanDescription Updatedbug_revision_view_page.php?rev_id=15759#r15759
2017-09-06 15:44collazoandy4Assigned ToTriage Finance => collazoandy4
2017-09-06 15:45collazoandy4Statusnew => scheduled
2017-09-12 03:03collazoandy4Note Added: 0098961
2017-09-12 09:40aferrazRelationship addedrelated to 0025312
2017-09-12 09:40aferrazRelationship addedrelated to 0026951
2017-09-12 09:41aferrazRelationship addedrelated to 0033500
2017-09-20 11:31aferrazSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=15947#r15947
2017-10-19 10:48psanjuanNote Added: 0099957
2017-10-19 10:49psanjuanStatusscheduled => closed
2017-10-19 10:49psanjuanResolutionopen => no change required

Notes
(0098961)
collazoandy4   
2017-09-12 03:03   
Test Plan I
  Create a Purchase Order for Bebidas Alegres, S.L. bp
    Create a new record in Lines tab:
      Product: Cerveza Ale 0,5L
      Ordered quantity: 10
      Net Unit Price: 1
      Tax: Compras exentas
    Book the order
  Create a new Purchase Invoice from previous order created and edit the invoice quantity to -5
    Pay the invoice and check a new payment out is created with:
      Invoiced Amount: -5
      Paid Amount: -5
  Check the order payment plan:
    Expected amount: 10
    Paid: -5
    Outstanding: 15
    Number of payment: 1
Test Plan II
  Register Purchase Order for Bebidas Alegres using "30-60" payment term. (order no 1000190)
   Add line for any product and qty=800, price = 1.00 and exempt VAT (Compras exentas).
   Add another line for different product and qty=200, price = 1.00 and exempt VAT.
   Process the Order, therefore total gross amount of the order is 1000.00
  Register a Purchase Invoice for Bebidas Alegres using "30-60" payment term. Dated on 10-08-2016. (invoice no 10000946)
   Run "Create lines from" and select line of 800 units line from the order. DO NOT process invoice
  Register another Purchase Invoice for Bebidas Alegres using "30-60" payment term. Dated on 10-08-2016. (invoice no 10000947)
   Run "Create lines from" and select line of 800 units once more from the order.
   Edit the line to set qty=-320 units. DO NOT process invoice
  Process first invoice (invoice no 10000946).
   Run "Add payment" in this first invoice and realize that details are correct :
     12-09-2016 Outstanding Amount = 400.00, (order no 1000190, invoice no 10000946)
     10-10-2016 Outstanding Amount = 400.00, (order no 1000190, invoice no 10000946)
   Select the details and press DONE.
   Notice:
    A new Payment Out is created related to the invoice and the invoice.
    The Invoice is paid (Payment Complete = Yes) Go to the Payment Plan tab and realize that two records was created wit outstanding amount = 0.
   Go back to the order (order no 1000190). Refresh and go to Payment Out Plan, realize that payment plan has been updated
    Paid = 800
    Outstanding = 200.
   It is correct!!!
  Process second invoice (invoice no 10000947).
   Run "Add payment" in this first invoice and realize that details are correct :
     12-09-2016 Outstanding Amount = -160.00, (order no 1000190, invoice no 10000947)
     10-10-2016 Outstanding Amount = -160.00, (order no 1000190, invoice no 10000947)
   Select the details and press DONE.
   Notice:
    A new Payment Out is created related to the invoice and the invoice.
    The Invoice is paid (Payment Complete = Yes) Go to the Payment Plan tab and realize that two records was created with outstanding amount = 0.
   Go back to the order (order no 1000190). Refresh and go to Payment Out Plan, realize that payment plan has been updated
    Paid = 480 => 800 (paid in the first invoice) - 320 (paid in the second invoice)
    Outstanding = 520 => 1000 (total of the order) - 480 (already paid)
   It is correct!!!
(0099957)
psanjuan   
2017-10-19 10:48   
Issue rejected as no need to fix.
It is correct that the order is not updated with the payment plan of the second invoice, negative invoice as the correct way of approaching this scenario, would be to create a return order from which get the information.