Openbravo Issue Tracking System - Retail Modules
View Issue Details
0030771Retail ModulesWeb POSpublic2015-09-04 21:432015-12-24 04:55
Orekaria 
jorge-garcia 
urgentmajoralways
closedfixed 
5
 
RR16Q1RR16Q1 
Orekaria
No
0030771: CalculateTaxes should not be executed when the receipt is being closed
CalculateTaxes should not be executed when the receipt is being closed

Taxes calculation should be executed before the receipt is being closed
Open the pointofsale-model.js
Verify that receipt.prepareToSend, executes the calculateTaxes flow
Create a RecalculateReceipt method that wraps applydiscounts, calculateGross and calculateTaxes
No tags attached.
related to defect 0030809 closed jorge-garcia CalculateGross functionality may be called several times in parallel 
related to defect 0034600 closed ranjith_qualiantech_com in Error While Importing, some properties in the JSON order are empty: taxlines/tax 
blocks defect 0030856 closed Retail Some null fileds json order causes an error. Line net is null, ObposAppCashup is null, Line Taxes are null, Taxes are null 
blocks defect 0030857 closed Retail Differents orders from web POS with same document No 
blocks defect 0030501 closed marvintm Wrong tax calculation the pricelist does not include taxes. 
blocks defect 0030904 closed jorge-garcia Taxes and total not updated when a line is removed with the old discount flow 
causes defect 0032699 closed shivum039 Firm quotation doesn't work when creating a order from a quotation 
Issue History
2015-09-04 21:43OrekariaNew Issue
2015-09-04 21:43OrekariaAssigned To => Retail
2015-09-04 21:43OrekariaTriggers an Emergency Pack => No
2015-09-09 18:53OrekariaRelationship addedrelated to 0030809
2015-09-10 12:43OrekariaNote Added: 0080315
2015-09-15 16:03OrekariaNote Added: 0080407
2015-09-15 16:03OrekariaNote Edited: 0080407bug_revision_view_page.php?bugnote_id=0080407#r9439
2015-09-18 13:14OrekariaRelationship addedblocks 0030856
2015-09-18 13:14OrekariaRelationship addedblocks 0030857
2015-09-18 13:16OrekariaProposed Solution updated
2015-09-18 13:16OrekariaPrioritynormal => urgent
2015-09-18 13:16OrekariaTarget VersionRR15Q4 => RR16Q1
2015-09-19 11:14OrekariaRelationship addedblocks 0030501
2015-09-19 13:05hgbotCheckin
2015-09-19 13:05hgbotNote Added: 0080510
2015-09-28 13:58egoitzResolution time => 1445032800
2015-10-05 12:42OrekariaStatusnew => acknowledged
2015-11-23 09:09jorge-garciaAssigned ToRetail => jorge-garcia
2015-12-04 13:54OrekariaStatusacknowledged => scheduled
2015-12-14 18:17OrekariaRelationship addedblocks 0030904
2015-12-14 18:18hgbotCheckin
2015-12-14 18:18hgbotNote Added: 0082736
2015-12-15 15:15hgbotCheckin
2015-12-15 15:15hgbotNote Added: 0082769
2015-12-15 15:15hgbotStatusscheduled => resolved
2015-12-15 15:15hgbotResolutionopen => fixed
2015-12-15 15:15hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/ed7f8734ef3bb2cd7eb6b310facea36835c6d9cb [^]
2015-12-15 15:15hgbotCheckin
2015-12-15 15:15hgbotNote Added: 0082770
2015-12-15 15:15hgbotCheckin
2015-12-15 15:15hgbotNote Added: 0082771
2015-12-15 15:16hgbotCheckin
2015-12-15 15:16hgbotNote Added: 0082772
2015-12-15 16:40OrekariaReview Assigned To => guilleaer
2015-12-17 15:29OrekariaNote Added: 0082833
2015-12-17 15:29OrekariaStatusresolved => new
2015-12-17 15:29OrekariaResolutionfixed => open
2015-12-17 15:29OrekariaStatusnew => scheduled
2015-12-23 13:04hgbotCheckin
2015-12-23 13:04hgbotNote Added: 0082960
2015-12-23 13:04hgbotCheckin
2015-12-23 13:04hgbotNote Added: 0082961
2015-12-23 13:04hgbotStatusscheduled => resolved
2015-12-23 13:04hgbotResolutionopen => fixed
2015-12-23 13:04hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/ed7f8734ef3bb2cd7eb6b310facea36835c6d9cb [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/5beee319e35816dbb28b801266bffe238d9ccb33 [^]
2015-12-24 04:55OrekariaReview Assigned Toguilleaer => Orekaria
2015-12-24 04:55OrekariaStatusresolved => closed
2015-12-24 04:55OrekariaFixed in Version => RR16Q1
2016-04-21 18:05dmitry_mezentsevRelationship addedcauses 0032699
2016-11-22 20:09malsasuaRelationship addedrelated to 0034600

Notes
(0080315)
Orekaria   
2015-09-10 12:43   
Tests failing in first refactor:

ret-test:

I26806_CashupTotalNotShown
CashUpWithTotalPaidCredit
CashUpWithPartialPaidCredit
CashUpWithTotalPaidCredit
SALa020_CreateReturn
SALa020_CreateReturn
I28322_WrongInvoiceWhenPayingLayawayWithCreditII
I28322_WrongInvoiceWhenPayingLayawayWithCreditI
I28272_HookPreOrderSaveNotCancelling.test1

ret-modules:

CreateSaleTrainingMode
(0080407)
Orekaria   
2015-09-15 16:03   
2nd

DiscPromByPrice.class, //
 I25515_ReceiptAfterRemovedLineFailsToBeSaved.class, //
 I28100_DiscountsNotAppliedToReturnLinesII.class, //
 I28164_DiscountsRemovedWhenReturnPresentII.class, //
 I28322_WrongInvoiceWhenPayingLayawayWithCreditI.class, //
 I28322_WrongInvoiceWhenPayingLayawayWithCreditII.class, //
 I28728_UndoButtonRemovesInformation.class, //
 I30658_VerifyUserCashpUp.class, //
 QuotationnoAfterQuotationLogoutLogin.class, //

(0080510)
hgbot   
2015-09-19 13:05   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 736fc10bcdceaac80b8dc3964f32c83dfdc685be
Author: Rafa Alonso <ral <at> openbravo.com>
Date: Sat Sep 12 18:18:43 2015 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/736fc10bcdceaac80b8dc3964f32c83dfdc685be [^]

Related to issue 30771: Add a new verifycation for the 'net' line amounts before the receipt is closed

---
M web/org.openbravo.retail.posterminal/js/data/dataordersave.js
---
(0082736)
hgbot   
2015-12-14 18:18   
Repository: tools/automation/pi-mobile
Changeset: 2f76c35026f6586e1aeba0721db588e3738afc7d
Author: Christian Goni <christian.goni <at> openbravo.com>
Date: Fri Dec 11 09:42:40 2015 +0100
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/2f76c35026f6586e1aeba0721db588e3738afc7d [^]

Related to Issue 30904, issue 30771: Taxes and total not updated when a line is removed with the old discount flow

This test is expected to pass when the 30771 is finished

---
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/discountsandpromotions/I30904_TaxesAndTotalNotUpdated.java
---
(0082769)
hgbot   
2015-12-15 15:15   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: ed7f8734ef3bb2cd7eb6b310facea36835c6d9cb
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Tue Dec 15 13:23:54 2015 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/ed7f8734ef3bb2cd7eb6b310facea36835c6d9cb [^]

Fixed issue 30771: CalculateTaxes should not be executed when the receipt
is being closed

The problem was that, while the recipt is being closed, the recipt could change
in the process.

The proposed solution is to change the places and the way the POS calculates
the promotions, taxes and the gross of the receipt.

With these objective, it's created the function calculateReceipt. The extra
calculateTaxes, applyPromotions and calculateGross functions have been deleted
from some files.

---
M web/org.openbravo.retail.posterminal/js/components/modalmultiorders.js
M web/org.openbravo.retail.posterminal/js/components/modalpaidreceipts.js
M web/org.openbravo.retail.posterminal/js/data/dataordersave.js
M web/org.openbravo.retail.posterminal/js/model/discounts.js
M web/org.openbravo.retail.posterminal/js/model/executor.js
M web/org.openbravo.retail.posterminal/js/model/order.js
M web/org.openbravo.retail.posterminal/js/pointofsale/model/pointofsale-model.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/editline.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/modals/modalcreditsales.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/pointofsale.js
---
(0082770)
hgbot   
2015-12-15 15:15   
Repository: erp/pmods/org.openbravo.retail.discounts
Changeset: 6568ad45001abbb8a123691b6315c62f577f56d4
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Thu Dec 10 15:47:36 2015 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts/rev/6568ad45001abbb8a123691b6315c62f577f56d4 [^]

Related to issue 30771: CalculateTaxes should not be executed when the receipt
is being closed

ApplyDiscounts has been replaced by a calculateReceipt function

---
M web/org.openbravo.retail.discounts/js/promotion-pack.js
---
(0082771)
hgbot   
2015-12-15 15:15   
Repository: erp/pmods/org.openbravo.retail.returns
Changeset: d1b1ad873e30ee3e90c4b99f9a190dad5d47186a
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Thu Nov 26 18:00:48 2015 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.returns/rev/d1b1ad873e30ee3e90c4b99f9a190dad5d47186a [^]

Related to issue 30771: CalculateTaxes should not be executed when the receipt
is being closed

CalculateGross has been replaced by a calculateReceipt function

---
M web/org.openbravo.retail.returns/js/modalReturnLines.js
---
(0082772)
hgbot   
2015-12-15 15:16   
Repository: tools/automation/pi-mobile
Changeset: c9181f298bb3f5cd1ecea5f6f7b0a4a1b1aba72e
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Tue Dec 15 11:06:45 2015 +0100
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/c9181f298bb3f5cd1ecea5f6f7b0a4a1b1aba72e [^]

Related to issue 30771: CalculateTaxes should not be executed when the receipt
is being closed

Some changes are necessary to have the same ticket in the client and the order
from the backend

---
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/returns/I31326_VerifyCorrectPaidReturnValues.java
---
(0082833)
Orekaria   
2015-12-17 15:29   
The SPMSaleAndReloadSharedPayments test is failing

Error:
deaa604bd23a43b5d3c897d9a290ea9a_WebPOS.js 2522:19 toNumber: Argument cannot be converted toNumber; {"ind":1,"form":0,"mant":[1,4,5],"exp":-1}; line: toNumber (http://192.168.1.33:8080/openbravo/web/js/gen/deaa604bd23a43b5d3c897d9a290ea9a_WebPOS.js:10292:14 [^]) (*,+)

When in the order.js
  455: pricenet: OB.DEC.toNumber(line.get('discountedNetPrice')),

If this line is set to
  pricenet: line.get('discountedNetPrice'),

the registers are not saved in the database
(0082960)
hgbot   
2015-12-23 13:04   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: d01d21eb16186a3363226779d1270d6da90f3632
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Wed Dec 16 11:55:54 2015 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/d01d21eb16186a3363226779d1270d6da90f3632 [^]

Related to issue 30771: Changes in discounts.js

---
M web/org.openbravo.retail.posterminal/js/model/discounts.js
---
(0082961)
hgbot   
2015-12-23 13:04   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 5beee319e35816dbb28b801266bffe238d9ccb33
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Tue Dec 22 12:15:04 2015 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/5beee319e35816dbb28b801266bffe238d9ccb33 [^]

Fixed issue 30771: CalculateTaxes should not be executed when the receipt is
being closed

If you create a ticket with a pricelist with the taxes not included and you
reload the POS before you pay it, when you try to pay it after the reload a
javascript error is show.

The problem is that the receipt save a value as big decimal, and when is
retrieve from the local database the value is no longer a number, it's an
object.

The solution is to save the value of discountedprice as a number instead
of big decimal.

---
M web/org.openbravo.retail.posterminal/js/data/dataordertaxes.js
---