details:   https://code.openbravo.com/erp/devel/pi/rev/435d6c2196c8
changeset: 13128:435d6c2196c8
user:      Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
date:      Fri Jul 08 10:36:52 2011 +0200
summary:   Fixed issue 17892: Update invoice's description appending info about 
the credit used for paying it (if any)

diffstat:

 modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MESSAGE.xml 
                           |  11 ++++++++++
 
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/ProcessInvoice.java
 |  11 ++++++++++
 2 files changed, 22 insertions(+), 0 deletions(-)

diffs (40 lines):

diff -r e1f306aeada8 -r 435d6c2196c8 
modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MESSAGE.xml
--- 
a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MESSAGE.xml
    Thu Jul 07 21:39:34 2011 +0200
+++ 
b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MESSAGE.xml
    Fri Jul 08 10:36:52 2011 +0200
@@ -759,4 +759,15 @@
 <!--FF80818130D0918F0130D10749340156-->  
<AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--FF80818130D0918F0130D10749340156--></AD_MESSAGE>
 
+<!--FF8081813108A518013108B682CF000E--><AD_MESSAGE>
+<!--FF8081813108A518013108B682CF000E-->  
<AD_MESSAGE_ID><![CDATA[FF8081813108A518013108B682CF000E]]></AD_MESSAGE_ID>
+<!--FF8081813108A518013108B682CF000E-->  
<AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FF8081813108A518013108B682CF000E-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FF8081813108A518013108B682CF000E-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FF8081813108A518013108B682CF000E-->  
<VALUE><![CDATA[APRM_InvoiceDescUsedCredit]]></VALUE>
+<!--FF8081813108A518013108B682CF000E-->  <MSGTEXT><![CDATA[Invoice paid using 
credit: %s]]></MSGTEXT>
+<!--FF8081813108A518013108B682CF000E-->  <MSGTYPE><![CDATA[I]]></MSGTYPE>
+<!--FF8081813108A518013108B682CF000E-->  
<AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--FF8081813108A518013108B682CF000E--></AD_MESSAGE>
+
 </data>
diff -r e1f306aeada8 -r 435d6c2196c8 
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/ProcessInvoice.java
--- 
a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/ProcessInvoice.java
 Thu Jul 07 21:39:34 2011 +0200
+++ 
b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/ProcessInvoice.java
 Fri Jul 08 10:36:52 2011 +0200
@@ -219,6 +219,17 @@
               }
               if (process)
                 FIN_AddPayment.processPayment(vars, this, "P", newPayment);
+
+              // Update Invoice's description
+              final StringBuffer invDesc = new StringBuffer();
+              if (invoice.getDescription() != null) {
+                invDesc.append(invoice.getDescription());
+                invDesc.append("\n");
+              }
+              invDesc.append(String.format(
+                  Utility.messageBD(this, "APRM_InvoiceDescUsedCredit", 
vars.getLanguage()),
+                  creditPayment.getIdentifier()));
+              invoice.setDescription(invDesc.toString());
             }
           }
         } catch (final Exception e) {

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to