Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0009487 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
backport | [Openbravo ERP] 07. Sales management | critical | always | 2009-06-11 18:48 | 2009-06-17 09:40 | |||
Reporter | networkb | View Status | public | |||||
Assigned To | rafaroda | |||||||
Priority | immediate | Resolution | fixed | Fixed in Version | 2.40MP6 | |||
Status | closed | Fix in branch | 2.40 | Fixed in SCM revision | 9b9784371aa4 | |||
Projection | none | ETA | none | Target Version | ||||
OS | Linux 64 bit | Database | Oracle | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | 2.40MP4 | SCM revision | ||||||
Merge Request Status | ||||||||
Review Assigned To | ||||||||
OBNetwork customer | OBPS | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0009487: Is not possible to complete a invoice using a different currency if it has not conversion to the date obtained of payment terms | |||||||
Description | Is not possible to complete a invoice using a different currency if it has not conversion to the date obtained of payment terms. | |||||||
Steps To Reproduce | -Create a price list with a currency different than the standard. -This currency has a conversion rate with the standard to the date of today but the conversion is not available in the future (i.e. in one or two months) -Create a sales invoice with the price list created before. -select payment terms "two month" -Create a line. -Complete the invoice line and you get a error. -If you reactivate the invoice and change the payment terms to immediate the invoice is completed properly. | |||||||
Proposed Solution | * The problem is in C_BP_SOCREDITUSED_REFRESH function which updates the credit used by the business partner. * This function is called both from C_INVOICE_POST and C_SETTLEMENT_POST. * In order to make the amount conversion, the date taken by this function is the debt payment planned (due) date, which is wrong because customers burn credit in the moment that the document (invoice or settlement) is completed, not when the payment is done (that can happen far in the future or even never happen). * The date to be taken by this function is the one that generates the debt payment: if it is an invoice, take the invoice date; if it is a settlement, take the settlement transaction date (if it does not come from an invoice, otherwise take the date invoiced). For this, a new column DOCDATE needs to be added to C_DEBT_PAYMENT_V view. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
||||||||
|
![]() |
|
(0017355) hgbot (developer) 2009-06-16 16:45 |
Repository: erp/stable/2.40 Changeset: 9b9784371aa4a593b2459f3460888c5e4727fb0f Author: Rafa Roda Palacios <rafael.roda <at> openbravo.com> Date: Tue Jun 16 16:42:15 2009 +0200 URL: http://code.openbravo.com/erp/stable/2.40/rev/9b9784371aa4a593b2459f3460888c5e4727fb0f [^] Fixes issue 0009487 Now conversion rate date is properly taken in C_BP_SOCREDITUSED_REFRESH function. --- M src-db/database/model/functions/C_BP_SOCREDITUSED_REFRESH.xml M src-db/database/model/views/C_DEBT_PAYMENT_V.xml --- |
(0017356) rafaroda (viewer) 2009-06-16 16:45 |
Steps to test this fix: 1) Create a sales price list in Russian Rubles (RUB). 2) Create a price list version. 3) Create some prices for some products (in Rubles). 4) Create a new customer business partner and give him an address. 5) In customer tab give him: * The price list created in Rubles. * Form of Payment: Bank Deposit * Payment Terms: One month * Credit Limit: 100 (please notice that this limit is give in the base currency of the Entity, not the currency of customer's price list). 6) Create a conversion rate from RUB to your base currency with dates today until tomorrow and with multiplier 0.5 (1 RUB = 0.5 your Entity base currency) 7) Create a conversion rate from your base currency to RUB with dates today until tomorrow and with multiplier 2 (1 Entity base currency = 2 RUB) 8) Create new AR sales invoice for your new customer for date today: price list is in RUB and payment terms is One month. 9) Create a line with Line Net Amount = 100 (RUB) and Tax 16%. 10) Create a Payment line in this same invoice with Due Date = today + 1 month and Amount 20 with currency your base currency 11) Go back to invoice header and complete this invoice. 12) Go back to Payment tab and check that a new payment has been created for due date today + 1 month with Amount = 76 (RUB): 76 RUB = 116 RUB - 40 RUB (2 x 20 your base currency which comes from first payment in step 10). 13) Go to business partner customer's tab and check that Credit Used read-only field is 58 (in your Entity base currency): 116 (RUB) * 0.5 14) Create a new Settlement with transaction date today and currency your base currency. 15) Click on Create Lines From, select your business partner and click on Search. 16) Select the 76 RUB line and click on OK. 17) Go to Created Payments tab and create a new one with: * Business Partner your customer * Due Date = today + 1 month * Amount = 76 with currency RUB 18) Go back to header and click on process: check that Canceled/Not Charged and Created Amount read-only fields equal 38 (in your base currency) 19) Create a new Bank Statement with transaction date today. 20) Click on Create Lines From, select your customer, leave Account drop-down blank and click on Search. 21) Select line of 76 RUB and click on OK. 22) Check that Ending Balance read-only field equals 38 (in your base currency). 23) Click on Process button: your customer has paid you, let's check that his credit used has decreased. 24) Go to business partner customer's tab and check that Credit Used read-only field is 20 (in your Entity base currency) which corresponds to the remaining payment. |
![]() |
|||
Date Modified | Username | Field | Change |
2009-06-15 18:41 | rafaroda | Type | defect => backport |
2009-06-15 18:41 | rafaroda | fix_in_branch | => 2.40 |
2009-06-16 16:45 | hgbot | Checkin | |
2009-06-16 16:45 | hgbot | Note Added: 0017355 | |
2009-06-16 16:45 | hgbot | Status | scheduled => resolved |
2009-06-16 16:45 | hgbot | Resolution | open => fixed |
2009-06-16 16:45 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/stable/2.40/rev/9b9784371aa4a593b2459f3460888c5e4727fb0f [^] |
2009-06-16 16:45 | rafaroda | Note Added: 0017356 | |
2009-06-16 22:52 | psarobe | Status | resolved => closed |
2009-06-17 09:40 | psarobe | Fixed in Version | => 2.40MP6 |
Copyright © 2000 - 2009 MantisBT Group |