To be honest, i try to service my customer as good as i can....
and sending an invoice to the US in Thai baht gives us many problems
because not accepted by that customer.

legally allowed? a tough question....legal in which country?

We do all our accounting in Baht but send invoices to the customer in
their local currency....and convert them back to Thai baht when the
payment comes in

in this case everybody happy....because the local government requires us
to change the thai invoice according the incoming payment anyway...

Let me emphasize that all these conversion activities do not affect the
system when the sending and receiving party have the same currency or
have their currency not set in the party record.


On Fri, 2008-09-05 at 11:23 +0530, Jacopo Cappellato wrote:
> Hi Hans,
> 
> just out of curiosity: is it legal/allowed to distribute the same  
> invoice in different currencies?
> 
> Cheers,
> 
> Jacopo
> 
> 
> On Sep 5, 2008, at 11:11 AM, [EMAIL PROTECTED] wrote:
> 
> > Author: hansbak
> > Date: Thu Sep  4 22:41:52 2008
> > New Revision: 692339
> >
> > URL: http://svn.apache.org/viewvc?rev=692339&view=rev
> > Log:
> > show invoice in foreign currency properly
> >
> > Modified:
> >    ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/actions/ 
> > ConvertInvoiceCurrency.groovy
> >    ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml
> >
> > Modified: ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/ 
> > actions/ConvertInvoiceCurrency.groovy
> > URL: 
> > http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/actions/ConvertInvoiceCurrency.groovy?rev=692339&r1=692338&r2=692339&view=diff
> > = 
> > = 
> > = 
> > = 
> > = 
> > = 
> > = 
> > = 
> > ======================================================================
> > --- ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/actions/ 
> > ConvertInvoiceCurrency.groovy (original)
> > +++ ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/actions/ 
> > ConvertInvoiceCurrency.groovy Thu Sep  4 22:41:52 2008
> > @@ -38,7 +38,8 @@
> >   } else {
> >     otherCurrency = delegator.findByPrimaryKey("Party", ["partyId" :  
> > fromPartyId]).preferredCurrencyUomId;
> >   }
> > -  if (otherCurrency && currencyUomId && ! 
> > otherCurrency.equals(currencyUomId)) {
> > +  // check if conversion required
> > +  if (currencyUomId && otherCurrency != currencyUomId && ! 
> > otherCurrency.equals(currencyUomId)) {
> >     result = dispatcher.runSync("convertUom", [uomId : currencyUomId,
> >                                                uomIdTo :  
> > otherCurrency,
> >                                                originalValue : new  
> > Double("1.00"),
> > @@ -49,4 +50,7 @@
> >         context.amountToApply =  
> > org 
> > .ofbiz 
> > .accounting 
> > .invoice 
> > .InvoiceWorker 
> > .getInvoiceNotApplied(delegator,invoiceId).multiply(new  
> > BigDecimal(result.convertedValue.toString())).setScale(decimals,  
> > rounding);
> >         context.currencyUomId = otherCurrency;
> >     }
> > +  } else {
> > +      context.total =  
> > (org 
> > .ofbiz 
> > .accounting 
> > .invoice.InvoiceWorker.getInvoiceTotalBd(delegator,invoiceId));
> > +      context.amountToApply =  
> > org 
> > .ofbiz 
> > .accounting 
> > .invoice.InvoiceWorker.getInvoiceNotApplied(delegator,invoiceId);
> >   }
> >
> > Modified: ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml
> > URL: 
> > http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml?rev=692339&r1=692338&r2=692339&view=diff
> > = 
> > = 
> > = 
> > = 
> > = 
> > = 
> > = 
> > = 
> > ======================================================================
> > --- ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml  
> > (original)
> > +++ ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml Thu  
> > Sep  4 22:41:52 2008
> > @@ -468,12 +468,13 @@
> >                     <condition-list combine="and">
> >                         <condition-expr field-name="partyId"  
> > operator="equals" env-name="myCompanyId"/>
> >                         <condition-list combine="or">
> > -                            <condition-expr field-name="statusId"  
> > operator="equals" value="APPROVED"/>
> > -                            <condition-expr field-name="statusId"  
> > operator="equals" value="SEND"/>
> > -                            <condition-expr field-name="statusId"  
> > operator="equals" value="READY"/>
> > -                            <condition-expr field-name="statusId"  
> > operator="equals" value="PAID"/>
> > +                            <condition-expr field-name="statusId"  
> > operator="equals" value="INVOICE_APPROVED"/>
> > +                            <condition-expr field-name="statusId"  
> > operator="equals" value="INVOICE_SEND"/>
> > +                            <condition-expr field-name="statusId"  
> > operator="equals" value="INVOICE_READY"/>
> > +                            <condition-expr field-name="statusId"  
> > operator="equals" value="INVOICE_PAID"/>
> >                         </condition-list>
> >                     </condition-list>
> > +                    <order-by field-name="invoiceDate DESC"/>
> >                 </entity-condition>
> >             </actions>
> >             <widgets>
> >
> >
> 
-- 
Antwebsystems.com: Quality OFBiz services for competitive prices

Reply via email to