Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0013999Openbravo ERP09. Financial managementpublic2010-07-19 15:472010-10-22 12:12
networkb 
dalsasua 
immediatemajoralways
closedfixed 
20Community Appliance
2.50MP19 
2.50MP232.50MP23 
Core
No
0013999: invoice post does not work when exists debt payment with same amount in negative that invoice debt payment
In purchase invoice, when exists a debt payment with the same amount in negative that invoice debt payment and distinct isreceipt, the two debt payments are included in settlement, but when this settlement is processed, error is returned:

Error:
The amounts of the Canceled not charge and Generated amount do not match
Financial Management || Receivables & Payables || Transactions || Bank Statement || Header
. create bank statement

Financial Management || Receivables & Payables || Transactions || Bank Statement || Line
. create a new line:
     run process create debt payment:
       business partner: McGiver Supplies
       amount: 100
       due date: 10/07/2010
       receipt is checked

run process bank statement

. Procurement Management || Transactions || Purchase Invoice || Header
 . create new invoice:
    business partner: mcGiver
    Transaction document: AP Invoice

. Procurement Management || Transactions || Purchase Invoice || Lines
 . create new line:
   product boots
   qty 100
   Net Unit Price 1
   Net List Price 1
   Tax: Exempt

. run process invoice
No tags attached.
Issue History
2010-07-19 15:47networkbNew Issue
2010-07-19 15:47networkbAssigned To => dalsasua
2010-07-26 08:19sathiyanAssigned Todalsasua => sathiyan
2010-07-26 10:59psarobeNote Added: 0029549
2010-07-26 10:59psarobeStatusnew => feedback
2010-07-26 11:19networkbStatusfeedback => new
2010-07-26 11:19networkbSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=614#r614
2010-07-26 11:59sathiyanStatusnew => scheduled
2010-07-26 11:59sathiyanfix_in_branch => pi
2010-07-28 07:08hgbotCheckin
2010-07-28 07:08hgbotNote Added: 0029626
2010-07-28 07:08hgbotStatusscheduled => resolved
2010-07-28 07:08hgbotResolutionopen => fixed
2010-07-28 07:08hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/acce63739f67f538fbe80d91927bd224f27a84a5 [^]
2010-07-28 12:29hudsonbotCheckin
2010-07-28 12:29hudsonbotNote Added: 0029638
2010-07-29 09:01sureshbabuNote Added: 0029655
2010-07-29 09:01sureshbabuStatusresolved => closed
2010-07-30 00:00anonymoussf_bug_id0 => 3036808
2010-10-13 10:18hgbotCheckin
2010-10-13 10:18hgbotNote Added: 0031793
2010-10-13 10:18hgbotStatusclosed => resolved
2010-10-13 10:18hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/acce63739f67f538fbe80d91927bd224f27a84a5 [^] => http://code.openbravo.com/erp/devel/pi/rev/48933d28a14f62a490e714bd453d43af9473352f [^]
2010-10-13 10:23dalsasuaNote Added: 0031795
2010-10-13 10:23dalsasuaStatusresolved => new
2010-10-13 10:23dalsasuaResolutionfixed => open
2010-10-13 10:24dalsasuaStatusnew => scheduled
2010-10-13 10:24dalsasuaNote Added: 0031796
2010-10-13 10:24dalsasuaAssigned Tosathiyan => dalsasua
2010-10-13 19:49psarobePriorityhigh => immediate
2010-10-13 19:49psarobeTarget Version2.50MP21 => 2.50MP23
2010-10-13 19:49psarobefix_in_branchpi =>
2010-10-13 19:49psarobeNote Added: 0031830
2010-10-13 23:38hudsonbotCheckin
2010-10-13 23:38hudsonbotNote Added: 0031838
2010-10-14 08:38hgbotCheckin
2010-10-14 08:38hgbotNote Added: 0031843
2010-10-14 08:38hgbotStatusscheduled => resolved
2010-10-14 08:38hgbotResolutionopen => fixed
2010-10-14 08:38hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/48933d28a14f62a490e714bd453d43af9473352f [^] => http://code.openbravo.com/erp/devel/pi/rev/a8dc1c241ec418e2cdf499567501ace4b23d717a [^]
2010-10-14 22:29hudsonbotCheckin
2010-10-14 22:29hudsonbotNote Added: 0031864
2010-10-22 06:31sureshbabuNote Added: 0032090
2010-10-22 12:12psarobeNote Added: 0032107
2010-10-22 12:12psarobeStatusresolved => closed
2010-10-22 12:12psarobeFixed in Version => 2.50MP23

Notes
(0029549)
psarobe   
2010-07-26 10:59   
Hi,

I cannot reproduce the issue. Works perfect for me. Maybe you got confused with the steps

Can you please try it again?

Thanks
(0029626)
hgbot   
2010-07-28 07:08   
Repository: erp/devel/pi
Changeset: acce63739f67f538fbe80d91927bd224f27a84a5
Author: Sathiyan Sivaprakasam <sathiyan.sivaprakasam <at> openbravo.com>
Date: Wed Jul 28 10:37:35 2010 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/acce63739f67f538fbe80d91927bd224f27a84a5 [^]

Fixes Issue 13999: invoice post does not work when exists debt payment

---
M src-db/database/model/functions/C_INVOICE_POST.xml
---
(0029638)
hudsonbot   
2010-07-28 12:29   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/acce63739f67 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/0f307f2c6481 [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.17929.obx [^]
(0029655)
sureshbabu   
2010-07-29 09:01   
Verified, followed the steps mentioned in the defect its working perfect now
(0031793)
hgbot   
2010-10-13 10:18   
Repository: erp/devel/pi
Changeset: 48933d28a14f62a490e714bd453d43af9473352f
Author: David Alsasua <david.alsasua <at> openbravo.com>
Date: Fri Oct 08 16:27:42 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/48933d28a14f62a490e714bd453d43af9473352f [^]

Fixes issue 13999: invoice post does not work when exists debt payment

---
M src-db/database/model/functions/C_INVOICE_POST.xml
---
(0031795)
dalsasua   
2010-10-13 10:23   
This issue is re-opened, as the fix caused the regression 0014791
(0031796)
dalsasua   
2010-10-13 10:24   
Rollbacked fix
(0031830)
psarobe   
2010-10-13 19:49   
Change the target version and the priority since this issue was supposed to be already fixed. It has to be in MP23
(0031838)
hudsonbot   
2010-10-13 23:38   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/48933d28a14f [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/c531f0a7334b [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.18531.obx [^]
(0031843)
hgbot   
2010-10-14 08:38   
Repository: erp/devel/pi
Changeset: a8dc1c241ec418e2cdf499567501ace4b23d717a
Author: David Alsasua <david.alsasua <at> openbravo.com>
Date: Wed Oct 13 13:14:01 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/a8dc1c241ec418e2cdf499567501ace4b23d717a [^]

Fixes issue 13999: invoice post does not work

---
M src-db/database/model/functions/C_INVOICE_POST.xml
---
(0031864)
hudsonbot   
2010-10-14 22:29   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/a8dc1c241ec4 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/d7ad2f964c30 [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.18536.obx [^]
(0032090)
sureshbabu   
2010-10-22 06:31   
@David, still i am finding the same issue when i try to process the settlement document after including both the payments.

Right now i am getting error as "Error: The amounts of the Canceled not charge and Generated amount do not match"

Note: Tested in both the contexts (Oracle, postgres) @ live.builds.com
(0032107)
psarobe   
2010-10-22 12:12   
Tested it is working fine.

Hi Suresh, What you are trying to do it is correct that is not allowed. I see that you are doing is apart from the steps to reproduce but let me explain to you why it is correct the behaviour you are experience.
You have a, for example, -100€ payment (receipt/sales) and also a payment (purchase) of 100.
Take into account that -100 payment (receipt) is the same as 100 payment (purchase). So finally what you are basically doing is trying to cancel:
100 €
100 €
That comes out into 200€ and not in 0€ so that the reason why you cannot cancel both against nothing