details: /erp/devel/pi/rev/8e9fc50c9bd5
changeset: 6451:8e9fc50c9bd5
user: Harikrishnan Raja <harikrishnan.raja <at> openbravo.com>
date: Thu Feb 18 12:19:28 2010 +0530
summary: Fixes Issue 12274: The copy lines process on the sales invoice does
not manage well the organization.
diffstat:
src/org/openbravo/erpCommon/ad_actionButton/CopyFromInvoice.java | 5 ++-
src/org/openbravo/erpCommon/ad_actionButton/CopyFromInvoice_data.xsql | 13
+++++++++-
2 files changed, 15 insertions(+), 3 deletions(-)
diffs (47 lines):
diff -r 53e2c2b7a0aa -r 8e9fc50c9bd5
src/org/openbravo/erpCommon/ad_actionButton/CopyFromInvoice.java
--- a/src/org/openbravo/erpCommon/ad_actionButton/CopyFromInvoice.java Wed Feb
17 16:57:18 2010 +0100
+++ b/src/org/openbravo/erpCommon/ad_actionButton/CopyFromInvoice.java Thu Feb
18 12:19:28 2010 +0530
@@ -79,12 +79,13 @@
CopyFromInvoiceData[] data = CopyFromInvoiceData.select(conn, this,
strInvoice, Utility
.getContext(this, vars, "#User_Client", windowId),
Utility.getContext(this, vars,
"#User_Org", windowId));
+ CopyFromInvoiceData[] dataInvoice =
CopyFromInvoiceData.selectInvoice(conn, this, strKey);
if (data != null && data.length != 0) {
for (i = 0; i < data.length; i++) {
String strSequence = SequenceIdData.getUUID();
try {
- CopyFromInvoiceData.insert(conn, this, strSequence, strKey,
vars.getClient(), vars
- .getOrg(), vars.getUser(), data[i].cInvoicelineId);
+ CopyFromInvoiceData.insert(conn, this, strSequence, strKey,
dataInvoice[0].adClientId,
+ dataInvoice[0].adOrgId, vars.getUser(),
data[i].cInvoicelineId);
} catch (ServletException ex) {
myError = Utility.translateError(this, vars, vars.getLanguage(),
ex.getMessage());
releaseRollbackConnection(conn);
diff -r 53e2c2b7a0aa -r 8e9fc50c9bd5
src/org/openbravo/erpCommon/ad_actionButton/CopyFromInvoice_data.xsql
--- a/src/org/openbravo/erpCommon/ad_actionButton/CopyFromInvoice_data.xsql
Wed Feb 17 16:57:18 2010 +0100
+++ b/src/org/openbravo/erpCommon/ad_actionButton/CopyFromInvoice_data.xsql
Thu Feb 18 12:19:28 2010 +0530
@@ -27,7 +27,7 @@
<SqlMethodComment></SqlMethodComment>
<Sql>
<![CDATA[
- SELECT C_InvoiceLine_ID FROM C_InvoiceLine
+ SELECT C_InvoiceLine_ID, '' AS AD_ORG_ID, '' AS AD_CLIENT_ID FROM
C_InvoiceLine
WHERE C_Invoice_ID = ?
AND AD_CLIENT_ID IN ('1')
AND AD_ORG_ID IN ('1')
@@ -65,4 +65,15 @@
<Parameter name="cInvoicelineId"/>
<Parameter name="cInvoicelineId"/>
</SqlMethod>
+ <SqlMethod name="selectInvoice" type="preparedStatement" connection="true"
return="multiple">
+ <SqlMethodComment></SqlMethodComment>
+ <Sql>
+ <![CDATA[
+ SELECT AD_ORG_ID,AD_CLIENT_ID FROM C_Invoice
+ WHERE C_Invoice_ID = ?
+ AND ISACTIVE = 'Y'
+ ]]>
+ </Sql>
+ <Parameter name="cInvoiceId"/>
+ </SqlMethod>
</SqlClass>
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits