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_invoice_item, own_item_tax" |
table="_entity_data, own_document, own_item, own_product_item, own_item_tax" |
81 |
order_by="own_product_invoice_item.id"> |
order_by="own_product_item.id"> |
82 |
<condition> |
<condition> |
83 |
<and> |
<and> |
84 |
<eq> |
<eq> |
92 |
</eq> |
</eq> |
93 |
<eq> |
<eq> |
94 |
<cfield name="own_item.id"/> |
<cfield name="own_item.id"/> |
95 |
<cfield name="own_product_invoice_item.own_item"/> |
<cfield name="own_product_item.own_item"/> |
96 |
</eq> |
</eq> |
97 |
<eq> |
<eq> |
98 |
<cfield name="own_item.id"/> |
<cfield name="own_item.id"/> |
190 |
|
|
191 |
<datasource name="ownItemDataSource" database="papo" detaillink="own_item.own_document" |
<datasource name="ownItemDataSource" database="papo" detaillink="own_item.own_document" |
192 |
master="ownDocumentDataSource" masterlink="id" |
master="ownDocumentDataSource" masterlink="id" |
193 |
table="own_item, own_product_invoice_item, own_item_tax"> |
table="own_item, own_product_item, own_item_tax"> |
194 |
<condition> |
<condition> |
195 |
<and> |
<and> |
196 |
<eq> |
<eq> |
197 |
<cfield name="own_item.id"/> |
<cfield name="own_item.id"/> |
198 |
<cfield name="own_product_invoice_item.own_item"/> |
<cfield name="own_product_item.own_item"/> |
199 |
</eq> |
</eq> |
200 |
<eq> |
<eq> |
201 |
<cfield name="own_item.id"/> |
<cfield name="own_item.id"/> |
269 |
tmpInvToPayedBlock.dateEntry = str(productInvoiceResultSet.current.getField("own_document.date")) |
tmpInvToPayedBlock.dateEntry = str(productInvoiceResultSet.current.getField("own_document.date")) |
270 |
|
|
271 |
while productInvoiceResultSet.current.getField("own_document.id") == currOwnDoc and more: |
while productInvoiceResultSet.current.getField("own_document.id") == currOwnDoc and more: |
272 |
lQty = hack.a2f(productInvoiceResultSet.current.getField("own_product_invoice_item.qty")) |
lQty = hack.a2f(productInvoiceResultSet.current.getField("own_product_item.qty")) |
273 |
lUnitPrice = hack.a2f(productInvoiceResultSet.current.getField("own_product_invoice_item.unit_price")) |
lUnitPrice = hack.a2f(productInvoiceResultSet.current.getField("own_product_item.unit_price")) |
274 |
lBonus = hack.a2f(productInvoiceResultSet.current.getField("own_item.bonus")) |
lBonus = hack.a2f(productInvoiceResultSet.current.getField("own_item.bonus")) |
275 |
lDiscount = hack.a2f(productInvoiceResultSet.current.getField("own_item.discount")) |
lDiscount = hack.a2f(productInvoiceResultSet.current.getField("own_item.discount")) |
276 |
item = lQty * lUnitPrice - lBonus - lDiscount |
item = lQty * lUnitPrice - lBonus - lDiscount |