77 |
<!-- Origen de datos que srive para calcular el total facturado --> |
<!-- Origen de datos que srive para calcular el total facturado --> |
78 |
|
|
79 |
<datasource name="productInvoiceDataSource" database="papo" |
<datasource name="productInvoiceDataSource" database="papo" |
80 |
table="_entity_data, own_document, own_item, own_product_item, _price_data, own_item_tax" |
table="_entity_data, own_document, own_item, own_product_item, own_item_tax" |
81 |
order_by="own_product_item.id"> |
order_by="own_product_item.id"> |
82 |
<condition> |
<condition> |
83 |
<and> |
<and> |
95 |
<cfield name="own_product_item.own_item"/> |
<cfield name="own_product_item.own_item"/> |
96 |
</eq> |
</eq> |
97 |
<eq> |
<eq> |
|
<cfield name="own_product_item.price"/> |
|
|
<cfield name="_price_data.id"/> |
|
|
</eq> |
|
|
<eq> |
|
98 |
<cfield name="own_item.id"/> |
<cfield name="own_item.id"/> |
99 |
<cfield name="own_item_tax.own_item"/> |
<cfield name="own_item_tax.own_item"/> |
100 |
</eq> |
</eq> |
260 |
|
|
261 |
while productInvoiceResultSet.current.getField("own_document.id") == currOwnDoc and more: |
while productInvoiceResultSet.current.getField("own_document.id") == currOwnDoc and more: |
262 |
lQty = hack.a2f(productInvoiceResultSet.current.getField("own_product_item.qty")) |
lQty = hack.a2f(productInvoiceResultSet.current.getField("own_product_item.qty")) |
263 |
lUnitPrice = hack.a2f(productInvoiceResultSet.current.getField("_price_data.unit_price")) |
lUnitPrice = hack.a2f(productInvoiceResultSet.current.getField("own_product_item.unit_price")) |
264 |
lBonus = hack.a2f(productInvoiceResultSet.current.getField("own_item.bonus")) |
lBonus = hack.a2f(productInvoiceResultSet.current.getField("own_item.bonus")) |
265 |
lDiscount = hack.a2f(productInvoiceResultSet.current.getField("own_item.discount")) |
lDiscount = hack.a2f(productInvoiceResultSet.current.getField("own_item.discount")) |
266 |
item = lQty * lUnitPrice - lBonus - lDiscount |
item = lQty * lUnitPrice - lBonus - lDiscount |