details: https://code.openbravo.com/erp/devel/pi/rev/ece49150e4a5 changeset: 16240:ece49150e4a5 user: Sandra Huguet <sandra.huguet <at> openbravo.com> date: Mon Apr 23 17:37:21 2012 +0200 summary: Fixed bug 12916 Recalculate line.no when complete a purchase invoice Recalculate line number when complete a purchase invoice in C_INVOICE_POST.
details: https://code.openbravo.com/erp/devel/pi/rev/3ef120570704 changeset: 16241:3ef120570704 user: Mikel Irurita <mikel.irurita <at> openbravo.com> date: Fri Apr 27 13:00:31 2012 +0200 summary: Related to issue 12916: code review, indentation diffstat: src-db/database/model/functions/C_INVOICE_POST.xml | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diffs (36 lines): diff -r 842e751a4665 -r 3ef120570704 src-db/database/model/functions/C_INVOICE_POST.xml --- a/src-db/database/model/functions/C_INVOICE_POST.xml Wed Apr 25 17:04:24 2012 +0200 +++ b/src-db/database/model/functions/C_INVOICE_POST.xml Fri Apr 27 13:00:31 2012 +0200 @@ -59,6 +59,7 @@ Cur_LastContact RECORD; Cur_lineqty RECORD; Cur_InvoiceTax RECORD; + Cur_TaxMAct RECORD; -- Record Info v_Client_ID VARCHAR2(32); @@ -1223,6 +1224,7 @@ v_ActualBaseAmt NUMBER; v_FirstLine BOOLEAN; v_C_InvoiceTax_ID VARCHAR2(32); + BEGIN v_ResultStr:='DeleteOldTaxes'; DELETE FROM C_INVOICELINETAX @@ -1230,6 +1232,16 @@ DELETE FROM C_INVOICETAX WHERE C_Invoice_ID=v_Record_ID AND Recalculate = 'Y'; + -- Update line if recalculate='N' + FOR Cur_TaxMAct IN + ( SELECT C_INVOICETAX_ID FROM C_INVOICETAX + WHERE C_Invoice_ID=v_Record_ID + AND Recalculate = 'N' + ) + LOOP + v_LineNo:=v_LineNo+10; + UPDATE C_INVOICETAX SET line=v_LineNo WHERE C_INVOICETAX_ID=Cur_TaxMAct.C_INVOICETAX_ID; + END LOOP; -- For all Tax Rates v_ResultStr:='InsertNewTaxes'; FOR Cur_Tax IN ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Openbravo-commits mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openbravo-commits
