Openbravo Issue Tracking System - Retail Modules
View Issue Details
0036907Retail ModulesWeb POSpublic2017-09-20 18:072017-11-14 17:34
ngarcia 
ranjith_qualiantech_com 
urgentmajoralways
closedfixed 
5
 
RR18Q1 
marvintm
No
0036907: Wrong sales invoice payment plan is created when paying a ticket using credit
Wrong sales invoice payment plan is created when paying a ticket using credit
As group admin role:
   Create a new record in Payment Terms:
      Overdue Payment Days Rule: 90
   Add two lines to it:
      1. Percentage Due: 33.33
         Overdue Payment Days Rule: 30
         Rest: N
      2. Percentage Due: 33.33
         Overdue Payment Days Rule: 60
         Rest: N
   Create a Business Partner, set it as Customer, add a price list and the previously created Payment Term
   Assign a credit limit of 10000 to it
   Set Allow Pay on Credit to 'Y' in POS Terminal Type window
   Set a product price in the business partner price list to 508.01

EXAMPLE 1:
In the POS:
   Change to previously created customer
   Add the product with a price of 508.01
   Add a payment of 300 to the ticket
   Use Credit for the rest (208.01)

In the backend:
   Check the created sales invoice has two payment plans (wrong):
      1. Due Date: 19-11-2017
         Expected Date: 38.64
         Received Amount: 0.00
         Outstanding Amount: 38.64

      2. Due Date: 19-12-2017
         Expected Date: 169.37
         Received Amount: 300
         Outstanding Amount: 169.37

   Reactivate and complete the invoice again
   Check three payment plans are created this time:
      1. Due Date: 20-10-2017
         Expected Date: 169.32
         Received Amount: 169.32
         Outstanding Amount: 0

      2. Due Date: 20-11-2017
         Expected Date: 169.32
         Received Amount: 130.68
         Outstanding Amount: 38.64

      3. Due Date: 19-12-2017
         Expected Date: 169.37
         Received Amount: 0
         Outstanding Amount: 169.37

EXAMPLE 2:
In the POS:
   Change to previously created customer
   Add the product with a price of 400
   Add a payment of 100 to the ticket
   Use Credit for the rest (300)
In the backend:
   Check the created sales invoice has three payment plans (see attachment wrongPaymentPlanExample2.png):
      1. Due Date: 15-11-2017
         Expected Amt: 33.32 (wrong, it should be 133.32)
         Received Amount: 0.00 (wrong, it should be 100)
         Outstanding Amount: 33.32

      2. Due Date: 15-12-2017
         Expected amt: 133.32
         Received Amount: 0
         Outstanding Amount: 133.32

      3. Due Date: 14-01-2017
         Expected Date: 133.36
         Received Amount: 100 (wrong, it should be 0)
         Outstanding Amount: 133.36
  Reactivate and complete the invoice again: the payment plans are regenerated with correct values. See attachment rightPaymentPlan2.png

  Go to Payment In window:
    . create new record to previous business partner, and selecting the correct financial account
    . click in "Add Details": previous invoice is displayed, but only one payment detail (see attachment wrongPaymentInDetails.png)
Three details should be displayed to this invoice (see attachment rightPaymentInDetails.png)
No tags attached.
related to design defect 0035571 closed ranjith_qualiantech_com wrong payment term in sales invoice created from WebPOS using credit 
related to defect 0037343 closed ranjith_qualiantech_com Schedule details should also be split when using split payment terms 
related to defect 0037571 closed ranjith_qualiantech_com Wrong Payment Plan for a sales invoice with split payment terms paid on credit 
png wrongInvoicePaymentPlanExample2.png (177,267) 2017-10-16 18:53
https://issues.openbravo.com/file_download.php?file_id=11186&type=bug
png

png rightInvoicePaymentPlanExample2.png (174,183) 2017-10-16 18:53
https://issues.openbravo.com/file_download.php?file_id=11187&type=bug
png

png wrongPaymentInDetailsExample2.png (176,701) 2017-10-16 18:54
https://issues.openbravo.com/file_download.php?file_id=11188&type=bug
png

png righPaymentInDetails.png (190,382) 2017-10-16 18:54
https://issues.openbravo.com/file_download.php?file_id=11189&type=bug
png
Issue History
2017-09-20 18:07ngarciaNew Issue
2017-09-20 18:07ngarciaAssigned To => Retail
2017-09-20 18:07ngarciaResolution time => 1507672800
2017-09-20 18:07ngarciaTriggers an Emergency Pack => No
2017-09-20 18:08ngarciaRelationship addedrelated to 0035571
2017-09-20 18:08ngarciaIssue Monitored: networkb
2017-09-21 16:03ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2017-09-21 16:03ranjith_qualiantech_comStatusnew => scheduled
2017-10-16 18:52malsasuaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=16111#r16111
2017-10-16 18:53malsasuaFile Added: wrongInvoicePaymentPlanExample2.png
2017-10-16 18:53malsasuaFile Added: rightInvoicePaymentPlanExample2.png
2017-10-16 18:54malsasuaFile Added: wrongPaymentInDetailsExample2.png
2017-10-16 18:54malsasuaFile Added: righPaymentInDetails.png
2017-10-24 09:24hgbotCheckin
2017-10-24 09:24hgbotNote Added: 0100009
2017-10-24 09:24hgbotStatusscheduled => resolved
2017-10-24 09:24hgbotResolutionopen => fixed
2017-10-24 09:24hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/3393f965bba2ec6aedaeeb5d8426b78ec614e605 [^]
2017-10-24 09:25hgbotCheckin
2017-10-24 09:25hgbotNote Added: 0100010
2017-10-26 18:59egoitzIssue Monitored: egoitz
2017-10-30 11:28marvintmReview Assigned To => marvintm
2017-10-30 11:28marvintmStatusresolved => closed
2017-10-30 11:28marvintmFixed in Version => RR18Q1
2017-11-13 15:23hgbotCheckin
2017-11-13 15:23hgbotNote Added: 0100491
2017-11-13 15:23hgbotStatusclosed => resolved
2017-11-13 15:23hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/3393f965bba2ec6aedaeeb5d8426b78ec614e605 [^] => http://code.openbravo.com/tools/automation/pi-mobile/rev/c927513c10e9ab0eda3463cf4e8a8edd5341a6d4 [^]
2017-11-14 17:34marvintmStatusresolved => closed
2017-11-23 12:40ranjith_qualiantech_comRelationship addedrelated to 0037343
2018-01-02 18:36ngarciaRelationship addedrelated to 0037571

Notes
(0100009)
hgbot   
2017-10-24 09:24   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 3393f965bba2ec6aedaeeb5d8426b78ec614e605
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Tue Oct 24 12:42:57 2017 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/3393f965bba2ec6aedaeeb5d8426b78ec614e605 [^]

Fixed issue 36907 : Updated OrderLoader to validate PaymentTermLine

* Create Payment Schedule based on Customer Payment Term and lines

---
M src/org/openbravo/retail/posterminal/OrderLoader.java
---
(0100010)
hgbot   
2017-10-24 09:25   
Repository: tools/automation/pi-mobile
Changeset: e61b84638494c43b82abc8351ac65ace875d71d9
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Tue Oct 24 12:43:04 2017 +0530
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/e61b84638494c43b82abc8351ac65ace875d71d9 [^]

Verifies issue 36907 : Added automated test 'I36907_VerifyReceiptWithPaymentTermLine'

Modified test 'I35571_VerifyReceiptWithMutiPaymentTerm'
Modified test 'I31471_PayLayawayAlreadyInvoiced'
Modified test 'I31600_VerfiyPaidOnCredit'

---
M src-test/org/openbravo/test/mobile/retail/pack/database/WebPOSDatabaseConstants.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/layaway/I31471_PayLayawayAlreadyInvoiced.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/system/I31600_VerfiyPaidOnCredit.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/system/I35571_VerifyReceiptWithMutiPaymentTerm.java
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/system/I36907_VerifyReceiptWithPaymentTermLine.java
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/system/I36907_VerifyReceiptWithPaymentTermLineII.java
---
(0100491)
hgbot   
2017-11-13 15:23   
Repository: tools/automation/pi-mobile
Changeset: c927513c10e9ab0eda3463cf4e8a8edd5341a6d4
Author: Rafael Queralta Pozo <rqueralta <at> nauta.cu>
Date: Thu Nov 09 11:24:07 2017 -0500
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/c927513c10e9ab0eda3463cf4e8a8edd5341a6d4 [^]

Related to Fixed issue 36907 : Updated OrderLoader to validate PaymentTermLine

---
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/system/I36907_VerifyReceiptWithPaymentTermLineII.java
---