1 (edited by nmatec 06/08/2010 07:46:09 am)

Topic: Confusion in understanding how data stored ?

firstly :
i want to enter anew sales order >> deliver >> invoice >> pay   for this order .
these are the tables used to store data about sales orders
( "sales_orders" , "sales_orders_details" , "debtor_trans" , "debtor_trans_details" , "audit_trial" , "comments" , "refs" , "stock_moves" ).
"sales_order"and "sales_order_details" tables stores all kinds of orders as "sales quotation" , "sales order" , "direct delivery" and "direct invoice"
------------------------------------------------------------------------------------------
"debtor_trans" and "debtor_trans_details" tables stores all transaction about sales order like (delivery , invoice , payment).
------------------------------------------------------------------------------------------
if i use "direct invoice" Form it will stores as normal sales order in "sales_order" and "sales_order_details" tables   // that's very good - no problem
but
see this case (i entered 3 direct invoices   "1" with a value $1000 , "2" with a value $2000 , "3" with a value $3000 )
in "debtor_trans"  table
i fount that there are two transactions (deliver with type "13"  and invoice with type "10") stored for each one of these three "direct invoices"
but the problem is when i added the third "direct invoice" with id "3" anew transaction added to first direct invoice has id "1" in this "debtor_trans" table with type "12" that means "payment" with the third value $3000 like this table

debtor_trans
-------------------------------------------------
trans_no      type      ov_amount      alloc     
-------------------------------------------------
1                 10         1000               1000
-------------------------------------------------
1                 12         3000               3000
-------------------------------------------------
1                 13         1000                0
===========================
2                 10         2000               2000
-------------------------------------------------
2                 13         2000               0
===========================
3                 10         3000               3000
-------------------------------------------------
3                 13         3000               0
===========================

what is the problem ????
why there is no payment stored for sales orders "1","2" and after adding the "3" the payment of it allocated to "1" sales order ???

Re: Confusion in understanding how data stored ?

Allocation is done only against invoice/credit note. Sales delivery does not generate any debt for your customer, so there is no allocation done nor required against it.
Janusz

Re: Confusion in understanding how data stored ?

ok , i know that .
but if you enter a " direct invoice " you will find data in debtor_trans table as i showed you before
i know that these allocation of direct invoice has no effect of customer payment and  credit notes
but why data stored as shown , i don't know
thank you