Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0022979Openbravo ERP09. Financial managementpublic2013-02-05 16:592013-05-02 19:06
dmiguelez 
dmiguelez 
highmajoralways
closedunable to reproduce 
20Community Appliance
 
 
Core
No
0022979: When Processing a Payment with WriteOff associated to an Order and an Invoice it does not split well the PaymentScheduleDetails
An Order is created with a Line that has taxes.
An Invoice is created from the previous Order
A Payment is made with WriteOff amount.
When processing it, the Payment Schedule Details are not split correctly.
Login as Openbravo/openbravo

1. Create a Sales Order
  - In Sales Order Window create a new record with:
    - Organization: F&B US
    - Business Partner: Healthy Food
    - Invoice Terms: Immediate
  - Create a new Line with the values:
    - Product: Cola
    - Ordered Quantity: 100
    - Tax: CA Sales Tax
  - Book it

2. Create a Sales Invoice
  - In Sales Invoice Window create a new record with the values:
    - Organization: F&B US
    - Business Partner: Healthy Food
  - Click on Create Lines From and select all the lines from the previously created Order.
  - In Lines edit the Tax and set it to Exempt.
  - Complete it.

3. Create a Payment
  - In the same Invoice Window, click on Add Payment.
  - Set the Actual Payment as 60.00
  - Click on WriteOff the difference and Process it.

To check the Payment Schedule Details is necessary to do so in the Database, is this Invoice is the last one created, this query might help:

select *
from fin_payment_scheduledetail
where fin_payment_schedule_invoice =
  (select fin_payment_schedule_id
   from fin_payment_schedule
   where c_invoice_id =
     (select c_invoice_id
      from c_invoice
      order by created desc
      limit 1))

It should be only two lines instead of three, and one of them with the writeoffamt as 14.02.
No tags attached.
Issue History
2013-02-05 16:59dmiguelezNew Issue
2013-02-05 16:59dmiguelezAssigned To => dmiguelez
2013-02-05 16:59dmiguelezModules => Core
2013-02-05 16:59dmiguelezTriggers an Emergency Pack => No
2013-05-02 19:06dmiguelezNote Added: 0058446
2013-05-02 19:06dmiguelezStatusnew => closed
2013-05-02 19:06dmiguelezResolutionopen => unable to reproduce

Notes
(0058446)
dmiguelez   
2013-05-02 19:06   
No longer reproducible.