You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Pierre Smits <pi...@gmail.com> on 2013/06/26 09:17:24 UTC

Re: svn commit: r1496721 - /ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml

Could this be the case in also other componenents in applications and
special purpose?

Could this also be the case in the issue called Ofbiz POS & WebPOS  as
described by Kushal Darjiin the user mailing list?


On Wed, Jun 26, 2013 at 5:15 AM, <ha...@apache.org> wrote:

> Author: hansbak
> Date: Wed Jun 26 03:15:41 2013
> New Revision: 1496721
>
> URL: http://svn.apache.org/r1496721
> Log:
> not possible anymore to change generic entity maps. message: Cannot modify
> an immutable entity object. Quantity in invoiceItem was modified, now
> copied to other variable
>
> Modified:
>
> ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml
>
> Modified:
> ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml
> URL:
> http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml?rev=1496721&r1=1496720&r2=1496721&view=diff
>
> ==============================================================================
> ---
> ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml
> (original)
> +++
> ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml
> Wed Jun 26 03:15:41 2013
> @@ -1927,13 +1927,14 @@ under the License.
>              <iterate list="invoiceItems" entry="invoiceItem">
>                  <set field="amountFromOrder" type="BigDecimal" value="0"/>
>                  <set field="amountFromInvoice" type="BigDecimal"
> value="0"/>
> -                <if-empty field="invoiceItem.quantity">
> -                    <set field="invoiceItem.quantity" value="1"/>
> -                </if-empty>
> +                <set field="quantity" type="BigDecimal" value="1"/>
> +                <if-not-empty field="invoiceItem.quantity">
> +                    <set field="quantity"
> from-field="invoiceItem.quantity"/>
> +                </if-not-empty>
>                  <!-- This InvoiceItem amount. -->
>                  <calculate field="amountFromInvoice"
>  decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
>                      <calcop operator="multiply">
> -                        <calcop operator="get"
> field="invoiceItem.quantity"/>
> +                        <calcop operator="get" field="quantity"/>
>                          <calcop operator="get"
> field="invoiceItem.amount"/>
>                      </calcop>
>                  </calculate>
> @@ -2051,12 +2052,13 @@ under the License.
>              <iterate list="invoiceItems" entry="invoiceItem">
>                  <set field="amountFromOrder" type="BigDecimal" value="0"/>
>                  <set field="amountFromInvoice" type="BigDecimal"
> value="0"/>
> -                <if-empty field="invoiceItem.quantity">
> -                    <set field="invoiceItem.quantity" value="1"/>
> -                </if-empty>
> +                <set field="quantity" type="BigDecimal" value="1"/>
> +                <if-not-empty field="invoiceItem.quantity">
> +                    <set field="quantity"
> from-field="invoiceItem.quantity"/>
> +                </if-not-empty>
>                  <calculate field="amountFromInvoice"
>  decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
>                      <calcop operator="multiply">
> -                        <calcop operator="get"
> field="invoiceItem.quantity"/>
> +                        <calcop operator="get" field="quantity"/>
>                          <calcop operator="get"
> field="invoiceItem.amount"/>
>                      </calcop>
>                  </calculate>
> @@ -2215,12 +2217,13 @@ under the License.
>              </entity-condition>
>              <iterate list="invoiceItems" entry="invoiceItem">
>                  <!-- TODO: handle serialized inventory -->
> -                <if-empty field="invoiceItem.quantity">
> -                    <set field="invoiceItem.quantity" type="BigDecimal"
> value="1"/>
> -                </if-empty>
> +                <set field="quantity" type="BigDecimal" value="1"/>
> +                <if-not-empty field="invoiceItem.quantity">
> +                    <set field="quantity"
> from-field="invoiceItem.quantity"/>
> +                </if-not-empty>
>                  <calculate field="origAmount"
> decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
>                      <calcop operator="multiply">
> -                        <calcop operator="get"
> field="invoiceItem.quantity"/>
> +                        <calcop operator="get" field="quantity"/>
>                          <calcop operator="get"
> field="invoiceItem.amount"/>
>                      </calcop>
>                  </calculate>
>
>
>


-- 
Pierre Smits

ApacheCon EU 2012 <http://www.apachecon.eu> - Sinsheim, Germany
Apache OFBiz <http://ofbiz.apache.org>

Re: svn commit: r1496721 - /ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/Gen eralLedgerServices.xml

Posted by Jacques Le Roux <ja...@les7arts.com>.
The POS works well here (locally I was able to order a product) I did not get into Kushal's details yet

Jacques

From: "Pierre Smits" <pi...@gmail.com>
> Could this be the case in also other componenents in applications and
> special purpose?
> 
> Could this also be the case in the issue called Ofbiz POS & WebPOS  as
> described by Kushal Darjiin the user mailing list?
> 
> 
> On Wed, Jun 26, 2013 at 5:15 AM, <ha...@apache.org> wrote:
> 
>> Author: hansbak
>> Date: Wed Jun 26 03:15:41 2013
>> New Revision: 1496721
>>
>> URL: http://svn.apache.org/r1496721
>> Log:
>> not possible anymore to change generic entity maps. message: Cannot modify
>> an immutable entity object. Quantity in invoiceItem was modified, now
>> copied to other variable
>>
>> Modified:
>>
>> ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml
>>
>> Modified:
>> ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml
>> URL:
>> http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml?rev=1496721&r1=1496720&r2=1496721&view=diff
>>
>> ==============================================================================
>> ---
>> ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml
>> (original)
>> +++
>> ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml
>> Wed Jun 26 03:15:41 2013
>> @@ -1927,13 +1927,14 @@ under the License.
>>              <iterate list="invoiceItems" entry="invoiceItem">
>>                  <set field="amountFromOrder" type="BigDecimal" value="0"/>
>>                  <set field="amountFromInvoice" type="BigDecimal"
>> value="0"/>
>> -                <if-empty field="invoiceItem.quantity">
>> -                    <set field="invoiceItem.quantity" value="1"/>
>> -                </if-empty>
>> +                <set field="quantity" type="BigDecimal" value="1"/>
>> +                <if-not-empty field="invoiceItem.quantity">
>> +                    <set field="quantity"
>> from-field="invoiceItem.quantity"/>
>> +                </if-not-empty>
>>                  <!-- This InvoiceItem amount. -->
>>                  <calculate field="amountFromInvoice"
>>  decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
>>                      <calcop operator="multiply">
>> -                        <calcop operator="get"
>> field="invoiceItem.quantity"/>
>> +                        <calcop operator="get" field="quantity"/>
>>                          <calcop operator="get"
>> field="invoiceItem.amount"/>
>>                      </calcop>
>>                  </calculate>
>> @@ -2051,12 +2052,13 @@ under the License.
>>              <iterate list="invoiceItems" entry="invoiceItem">
>>                  <set field="amountFromOrder" type="BigDecimal" value="0"/>
>>                  <set field="amountFromInvoice" type="BigDecimal"
>> value="0"/>
>> -                <if-empty field="invoiceItem.quantity">
>> -                    <set field="invoiceItem.quantity" value="1"/>
>> -                </if-empty>
>> +                <set field="quantity" type="BigDecimal" value="1"/>
>> +                <if-not-empty field="invoiceItem.quantity">
>> +                    <set field="quantity"
>> from-field="invoiceItem.quantity"/>
>> +                </if-not-empty>
>>                  <calculate field="amountFromInvoice"
>>  decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
>>                      <calcop operator="multiply">
>> -                        <calcop operator="get"
>> field="invoiceItem.quantity"/>
>> +                        <calcop operator="get" field="quantity"/>
>>                          <calcop operator="get"
>> field="invoiceItem.amount"/>
>>                      </calcop>
>>                  </calculate>
>> @@ -2215,12 +2217,13 @@ under the License.
>>              </entity-condition>
>>              <iterate list="invoiceItems" entry="invoiceItem">
>>                  <!-- TODO: handle serialized inventory -->
>> -                <if-empty field="invoiceItem.quantity">
>> -                    <set field="invoiceItem.quantity" type="BigDecimal"
>> value="1"/>
>> -                </if-empty>
>> +                <set field="quantity" type="BigDecimal" value="1"/>
>> +                <if-not-empty field="invoiceItem.quantity">
>> +                    <set field="quantity"
>> from-field="invoiceItem.quantity"/>
>> +                </if-not-empty>
>>                  <calculate field="origAmount"
>> decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
>>                      <calcop operator="multiply">
>> -                        <calcop operator="get"
>> field="invoiceItem.quantity"/>
>> +                        <calcop operator="get" field="quantity"/>
>>                          <calcop operator="get"
>> field="invoiceItem.amount"/>
>>                      </calcop>
>>                  </calculate>
>>
>>
>>
> 
> 
> -- 
> Pierre Smits
> 
> ApacheCon EU 2012 <http://www.apachecon.eu> - Sinsheim, Germany
> Apache OFBiz <http://ofbiz.apache.org>
>