143 |
<and> |
<and> |
144 |
<or> |
<or> |
145 |
<eq> |
<eq> |
146 |
<cfield name="own_document.own_document_type"/> |
<cfield name="alien_document.alien_document_type"/> |
147 |
<cconst value="2"/> |
<cconst value="2"/> |
148 |
</eq> |
</eq> |
149 |
<eq> |
<eq> |
150 |
<cfield name="own_document.own_document_type"/> |
<cfield name="alien_document.alien_document_type"/> |
151 |
<cconst value="5"/> |
<cconst value="5"/> |
152 |
</eq> |
</eq> |
153 |
</or> |
</or> |
181 |
<trigger name="searchTrigger" type="NAMED"><![CDATA[ |
<trigger name="searchTrigger" type="NAMED"><![CDATA[ |
182 |
|
|
183 |
tmpInvToPayedBlock.processRollback() |
tmpInvToPayedBlock.processRollback() |
|
invTaxTotDataSource.processRollback() |
|
184 |
invoiceToPayBlock.processRollback() |
invoiceToPayBlock.processRollback() |
185 |
|
|
186 |
total = 0.0 |
total = 0.0 |
231 |
invoiceTotal += hack.a2f(odt_rs.current.getField("alien_document_tax.amount")) |
invoiceTotal += hack.a2f(odt_rs.current.getField("alien_document_tax.amount")) |
232 |
odt_more = odt_rs.nextRecord() |
odt_more = odt_rs.nextRecord() |
233 |
|
|
234 |
|
print "Prod ",alienDocumentSearchBlock.providerSearchBox.providerSEntry, " ", invoiceTotal |
235 |
|
|
236 |
tmpInvToPayedBlock.dateEntry = str(productInvoiceResultSet.current.getField("alien_document.date")) |
tmpInvToPayedBlock.dateEntry = str(productInvoiceResultSet.current.getField("alien_document.date")) |
237 |
tmpInvToPayedBlock.amountEntry = str(invoiceTotal) |
tmpInvToPayedBlock.amountEntry = str(invoiceTotal) |
238 |
tmpInvToPayedBlock.payedEntry = "0.0" |
tmpInvToPayedBlock.payedEntry = "0.0" |
248 |
tmpInvToPayedBlock.idEntry = str(serviceInvoiceResultSet.current.getField("alien_document.id")) |
tmpInvToPayedBlock.idEntry = str(serviceInvoiceResultSet.current.getField("alien_document.id")) |
249 |
|
|
250 |
while serviceInvoiceResultSet.current.getField("alien_document.id") == currAlienDoc and more: |
while serviceInvoiceResultSet.current.getField("alien_document.id") == currAlienDoc and more: |
251 |
lQty = hack.a2f(serviceInvoiceResultSet.current.getField("alien_service_item.qty")) |
lUnitPrice = hack.a2f(serviceInvoiceResultSet.current.getField("alien_service_item.amount")) |
|
lUnitPrice = hack.a2f(serviceInvoiceResultSet.current.getField("alien_service_item.unit_price")) |
|
252 |
lBonus = hack.a2f(serviceInvoiceResultSet.current.getField("alien_item.bonus")) |
lBonus = hack.a2f(serviceInvoiceResultSet.current.getField("alien_item.bonus")) |
253 |
lDiscount = hack.a2f(serviceInvoiceResultSet.current.getField("alien_item.discount")) |
lDiscount = hack.a2f(serviceInvoiceResultSet.current.getField("alien_item.discount")) |
254 |
item = lQty * lUnitPrice - lBonus - lDiscount |
item = lUnitPrice - lBonus - lDiscount |
255 |
itemTaxTotal = 0 |
itemTaxTotal = 0 |
256 |
currItem = serviceInvoiceResultSet.current.getField("alien_item.id") |
currItem = serviceInvoiceResultSet.current.getField("alien_item.id") |
257 |
while serviceInvoiceResultSet.current.getField("alien_item.id") == currItem and more: |
while serviceInvoiceResultSet.current.getField("alien_item.id") == currItem and more: |
264 |
invoiceTotal += hack.a2f(odt_rs.current.getField("alien_document_tax.amount")) |
invoiceTotal += hack.a2f(odt_rs.current.getField("alien_document_tax.amount")) |
265 |
odt_more = odt_rs.nextRecord() |
odt_more = odt_rs.nextRecord() |
266 |
|
|
267 |
|
print "Serv ",alienDocumentSearchBlock.providerSearchBox.providerSEntry, " ", invoiceTotal |
268 |
tmpInvToPayedBlock.dateEntry = str(serviceInvoiceResultSet.current.getField("alien_document.date")) |
tmpInvToPayedBlock.dateEntry = str(serviceInvoiceResultSet.current.getField("alien_document.date")) |
269 |
tmpInvToPayedBlock.amountEntry = str(invoiceTotal) |
tmpInvToPayedBlock.amountEntry = str(invoiceTotal) |
270 |
tmpInvToPayedBlock.payedEntry = "0.0" |
tmpInvToPayedBlock.payedEntry = "0.0" |
277 |
rc = tmpInvToPayedBlock.getRecordCount() |
rc = tmpInvToPayedBlock.getRecordCount() |
278 |
for recNum in range(rc): |
for recNum in range(rc): |
279 |
tmpInvToPayedBlock.jumpRecord(recNum) |
tmpInvToPayedBlock.jumpRecord(recNum) |
280 |
|
print tmpInvToPayedBlock.idEntry, " ", rs.current.getField("alien_document_proceeding.alien_document") |
281 |
if tmpInvToPayedBlock.idEntry == rs.current.getField("alien_document_proceeding.alien_document"): |
if tmpInvToPayedBlock.idEntry == rs.current.getField("alien_document_proceeding.alien_document"): |
282 |
|
print "\t ",rs.current.getField("alien_document_proceeding.amount") |
283 |
tmpInvToPayedBlock.payedEntry = str( |
tmpInvToPayedBlock.payedEntry = str( |
284 |
hack.a2f(tmpInvToPayedBlock.payedEntry) + \ |
hack.a2f(tmpInvToPayedBlock.payedEntry) + \ |
285 |
hack.a2f(rs.current.getField("alien_document_proceeding.amount") ) ) |
hack.a2f(rs.current.getField("alien_document_proceeding.amount") ) ) |