Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0039415Openbravo ERP07. Sales managementpublic2018-10-05 12:062018-12-11 20:22
ngarcia 
AtulOpenbravo 
urgentmajoralways
closedfixed 
5
 
3.0PR19Q1 
Sandrahuguet
Advanced Payables and Receivables Mngmt
No
0039415: Payment Plan should not be removed from a sales invoice of 0 that includes a prepaid order
Payment Plan should not be removed from a sales invoice of 0 that includes a prepaid order
As group admin role:
   Create a sales order, set it's Invoice Terms as Immediate, add a product to it, book it and add payment
   Create a sales invoice header
   Add the previously created order
   Add a new line with the same product as the previous line and set the same quantity but negative (in order to get an invoice of 0 amount)
   Check you cannot pay the pending amount against the invoice and if you post the invoice the difference will be posted to Customer Receivables account and it will never be balanced
No tags attached.
related to defect 0038769 closed AtulOpenbravo "Suspense balancing" account used when invoice's total is zero and negative prepayment exists 
Issue History
2018-10-05 12:06ngarciaNew Issue
2018-10-05 12:06ngarciaAssigned To => Triage Finance
2018-10-05 12:06ngarciaModules => Advanced Payables and Receivables Mngmt
2018-10-05 12:06ngarciaResolution time => 1540504800
2018-10-05 12:06ngarciaTriggers an Emergency Pack => No
2018-10-05 12:06ngarciaIssue Monitored: networkb
2018-10-05 12:08ngarciaRelationship addedrelated to 0038769
2018-10-05 15:24SandrahuguetAssigned ToTriage Finance => markmm82
2018-10-08 10:55SandrahuguetAssigned Tomarkmm82 => AtulOpenbravo
2018-10-09 05:39AtulOpenbravoStatusnew => scheduled
2018-10-09 12:41SandrahuguetSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=17747#r17747
2018-10-09 12:44SandrahuguetCategoryZ. Others => 07. Sales management
2018-11-07 06:06AtulOpenbravoNote Added: 0107771
2018-11-07 06:25AtulOpenbravoNote Added: 0107772
2018-11-12 17:45hgbotCheckin
2018-11-12 17:45hgbotNote Added: 0107863
2018-11-12 17:45hgbotStatusscheduled => resolved
2018-11-12 17:45hgbotResolutionopen => fixed
2018-11-12 17:45hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/649b56723e39ce0611d1bb54cf8f66435a5d7479 [^]
2018-11-12 17:45hgbotCheckin
2018-11-12 17:45hgbotNote Added: 0107864
2018-11-12 17:45SandrahuguetReview Assigned To => Sandrahuguet
2018-11-12 17:45SandrahuguetNote Added: 0107865
2018-11-12 17:45SandrahuguetStatusresolved => closed
2018-11-12 17:45SandrahuguetFixed in Version => 3.0PR19Q1
2018-12-11 20:22hudsonbotCheckin
2018-12-11 20:22hudsonbotNote Added: 0108460
2018-12-11 20:22hudsonbotCheckin
2018-12-11 20:22hudsonbotNote Added: 0108461

Notes
(0107771)
AtulOpenbravo   
2018-11-07 06:06   
Test Plan

- Login as F&B International Group admin role.
- Create a sales order in F&B US Inc, set it's Invoice Terms as Immediate, add a product to it, book it and add partial payment to it.
Business Partner = Heathly Food Supermarket, Product = Cherry Cola, Quantity = 100, Unit Price = 1, Tax = Exempt, Grand Total = 100. Add payment against order with amount 30.
- Post the payment, posting is as below
Bank Account Debit 30
Customer Prepayments Credit 30

- Create a sales invoice header with same business partner.
- Add the previously created order.
- Add a new line with the same product as the previous line and set the same quantity but negative (in order to get an invoice of 0 amount)
- Process Invoice and Post it.
- Posting is as below:-

Revenue - Product Debit 100.00
Customer Prepayments Debit 30.00
Revenue - Product Credit 100.00
Accounts Receivable Credit 30.00

- Using Add Payment button make a payment against the Sales Invoice, it will have a negative value = -30.
- Post the Payment. Posting is as below:
Account Receivable Debit 30.
Bank Account Credit 30.
(0107772)
AtulOpenbravo   
2018-11-07 06:25   
Test Plan

- Login as F&B International Group admin role.
- Create a purchase order in F&B US Inc, add a product to it, book it and add partial payment to it.
Business Partner = Be Soft Drinker, Inc., Product = Cherry Cola, Quantity = 100, Unit Price = 1, Tax = Exempt, Grand Total = 100. Add payment against order with amount 40.
- Post the payment, posting is as below
Vendor Prepayment Debit 40
Bank Account 40

- Create a purchase invoice header with same business partner.
- Add the previously created order.
- Add a new line with the same product as the previous line and set the same quantity but negative (in order to get an invoice of 0 amount)
- Process Invoice and Post it.
- Posting is as below:-

Product Expense Debit 100.00
Account Payable Debit 40.00
Product Expense Credit 100.00
Vendor Prepayment Credit 40.00

- Using Add Payment button make a payment against the Purchase Invoice, it will have a negative value = -40.
- Post the Payment. Posting is as below:
Bank Account Debit 40.00
Account Payable Credit 40.00
(0107863)
hgbot   
2018-11-12 17:45   
Repository: erp/devel/pi
Changeset: 649b56723e39ce0611d1bb54cf8f66435a5d7479
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Wed Nov 07 07:45:34 2018 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/649b56723e39ce0611d1bb54cf8f66435a5d7479 [^]

Fixes Issue 39415:Payment Plan should not be removed
from a invoice of 0 that includes a prepaid order

** When invoice has grandtotal zero and has prepayment
linked with its associated order then consider this
criteria for creating schedule & its details for
such invoices.
** Handle divide by zero in FIN_AddPayment.java

---
M modules/org.openbravo.advpaymentmngt/src-db/database/model/functions/APRM_GEN_PAYMENTSCHEDULE_INV.xml
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_AddPayment.java
---
(0107864)
hgbot   
2018-11-12 17:45   
Repository: erp/devel/pi
Changeset: 03d8fd2a8cca4ac087c16ff5ed34de6fe5f3ea15
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Mon Nov 12 13:00:12 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/03d8fd2a8cca4ac087c16ff5ed34de6fe5f3ea15 [^]

related to issue 39415 prepaymentamt is wrong calculated
prepayment amout is wrong calculated when two order lines
are added in to the invoice.

---
M src-db/database/model/functions/C_INVOICE_POST.xml
---
(0107865)
Sandrahuguet   
2018-11-12 17:45   
Code review + testing OK
(0108460)
hudsonbot   
2018-12-11 20:22   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/470e3cd384c5 [^]
Maturity status: Test
(0108461)
hudsonbot   
2018-12-11 20:22   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/470e3cd384c5 [^]
Maturity status: Test