Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0003699Openbravo ERP03. Procurement managementpublic2008-05-06 02:192008-06-12 09:44
cromero 
cromero 
normalminoralways
closedfixed 
5
 
2.35MP4 
No
Core
No
0003699: Copy From Settlement does not work
Related to bug:
0002938

It fails during execution due to empty not null columns on insertion.

The solution, in my opinion:

CopyFromSettlement_data.xsql

28,7 → 28,7
ON THE MAIN SELECT INCLUDE:
status_initial as status,


77,8 → 77,8
NOT THIS:
INSERT INTO C_DEBT_PAYMENT ( C_DEBT_PAYMENT_ID, AD_CLIENT_ID,
AD_ORG_ID,CREATEDBY, UPDATEDBY, ISRECEIPT,
C_SETTLEMENT_GENERATE_ID,DESCRIPTION, C_BPARTNER_ID, C_CURRENCY_ID,
C_BANKACCOUNT_ID,C_CASHBOOK_ID,
PAYMENTRULE, AMOUNT, WRITEOFFAMT, DATEPLANNED,
ISMANUAL,GLITEMAMT,C_GLITEM_ID, ISDIRECTPOSTING, ISPAID,ISVALID)
VALUES
(TO_NUMBER(?),TO_NUMBER(?),TO_NUMBER(?),TO_NUMBER(?),TO_NUMBER(?),?,TO_NUMB
ER(?),?,TO_NUMBER(?),TO_NUMBER(?),TO_NUMBER(?),TO_NUMBER(?),?,TO_NUMBER(?),
TO_NUMBER(?),TO_DATE(?),?,0,TO_NUMBER(?),?,'N','N')

BUT THIS:
INSERT INTO C_DEBT_PAYMENT ( C_DEBT_PAYMENT_ID, AD_CLIENT_ID,
AD_ORG_ID,CREATEDBY, UPDATEDBY, ISRECEIPT,
C_SETTLEMENT_GENERATE_ID,DESCRIPTION, C_BPARTNER_ID, C_CURRENCY_ID,
C_BANKACCOUNT_ID,C_CASHBOOK_ID,
PAYMENTRULE, AMOUNT, WRITEOFFAMT, DATEPLANNED,
ISMANUAL,GLITEMAMT,C_GLITEM_ID, ISDIRECTPOSTING, ISPAID,ISVALID, STATUS,
STATUS_INITIAL)
VALUES
(TO_NUMBER(?),TO_NUMBER(?),TO_NUMBER(?),TO_NUMBER(?),TO_NUMBER(?),?,TO_NUMB
ER(?),?,TO_NUMBER(?),TO_NUMBER(?),TO_NUMBER(?),TO_NUMBER(?),?,TO_NUMBER(?),
TO_NUMBER(?),TO_DATE(?),?,0,TO_NUMBER(?),?,'N','N',?,?)
]]>
</Sql>
<Parameter name="cDebtPeymentId"/>

INCLUDE TWO MORE PARAMETERS
100,6 → 100,8
<Parameter name="status"/>
<Parameter name="status"/>



CopyFromSettlement.java
122,7 → 122,9
NOT THIS:
CopyFromSettlementData.insertDebtPayment(conn,this, strDebtPayment,
to[0].client, to[0].org, vars.getUser(), data[i].isreceipt, strSettlement,
data[i].description, strCBPartnerId, data[i].cCurrencyId,
data[i].cBankaccountId, data[i].cCashbookId, data[i].paymentrule,
strImporte, data[i].writeoffamt, strDate, data[i].ismanual,
data[i].cGlitemId, data[i].isdirectposting);
BUT THIS:
CopyFromSettlementData.insertDebtPayment(conn,this, strDebtPayment,
to[0].client, to[0].org, vars.getUser(), data[i].isreceipt, strSettlement,
data[i].description, strCBPartnerId, data[i].cCurrencyId,
data[i].cBankaccountId, data[i].cCashbookId, data[i].paymentrule,
strImporte, data[i].writeoffamt, strDate, data[i].ismanual,
data[i].cGlitemId, data[i].isdirectposting, data[i].status);
No tags attached.
blocks defect 0002938 closed cromero Copy From Settlement does not work 
Issue History

Notes
(0007288)
user71   
2005-06-01 00:00   
(edited on: 2008-06-12 09:44)
This bug was originally reported in SourceForge bug tracker and then migrated to Mantis.

You can see the original bug report in:
https://sourceforge.net/support/tracker.php?aid=1958373 [^]
(0004148)
cromero   
2008-05-06 18:19   
(edited on: 2008-06-12 09:27)
Logged In: YES
user_id=1500614
Originator: YES

Fixed in the 2.3x branch in revision 3990