1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
<?xml version="1.0" encoding="ISO-8859-1"?> |
2 |
<!DOCTYPE form SYSTEM "gnue-forms.dtd"> |
<!DOCTYPE form SYSTEM "gnue-forms.dtd"> |
3 |
|
|
4 |
<form width="84" height="17" title="Carga de Ordenes de Pago a Proveedores"> |
<form width="72" height="13" title="Carga de Ordenes de Pago a Proveedores"> |
5 |
|
|
6 |
<datasource name="tmpSearchDataSource" cache="1"/> |
<datasource name="tmpSearchDataSource" cache="1"/> |
7 |
|
|
8 |
<datasource name="tmpInvToPayedDataSource" cache="1"/> |
<datasource name="tmpInvToPayDataSource" cache="1"/> |
9 |
|
|
10 |
|
<datasource name="invoiceToPayDataSource" cache="1"/> |
11 |
|
|
12 |
<datasource name="providerDataSource" database="papo" |
<datasource name="providerDataSource" database="papo" |
13 |
table="entity, _entity_data, alien_entity, _alien_entity_data, persona, _persona_data, provider, _provider_data" |
table="entity, _entity_data, alien_entity, _alien_entity_data, persona, _persona_data, provider, _provider_data" |
80 |
</eq> |
</eq> |
81 |
<eq> |
<eq> |
82 |
<cfield name="alien_document.id"/> |
<cfield name="alien_document.id"/> |
83 |
<cfield name="alien_item.own_document"/> |
<cfield name="alien_item.alien_document"/> |
84 |
</eq> |
</eq> |
85 |
<eq> |
<eq> |
86 |
<cfield name="alien_item.id"/> |
<cfield name="alien_item.id"/> |
99 |
</datasource> |
</datasource> |
100 |
|
|
101 |
<datasource name="productInvoiceDataSource" database="papo" |
<datasource name="productInvoiceDataSource" database="papo" |
102 |
table="_entity_data, alien_document, alien_item, alien_product_item, _price_data, alien_item_tax" |
table="_entity_data, alien_document, alien_item, alien_product_item, alien_item_tax" |
103 |
order_by="alien_product_item.id"> |
order_by="alien_product_item.id"> |
104 |
<condition> |
<condition> |
105 |
<and> |
<and> |
117 |
<cfield name="alien_product_item.alien_item"/> |
<cfield name="alien_product_item.alien_item"/> |
118 |
</eq> |
</eq> |
119 |
<eq> |
<eq> |
|
<cfield name="alien_product_item.price"/> |
|
|
<cfield name="_price_data.id"/> |
|
|
</eq> |
|
|
<eq> |
|
120 |
<cfield name="alien_item.id"/> |
<cfield name="alien_item.id"/> |
121 |
<cfield name="alien_item_tax.alien_item"/> |
<cfield name="alien_item_tax.alien_item"/> |
122 |
</eq> |
</eq> |
134 |
<eq> |
<eq> |
135 |
<!-- Aqui se refiere al cliente --> |
<!-- Aqui se refiere al cliente --> |
136 |
<cfield name="_entity_data._table"/> |
<cfield name="_entity_data._table"/> |
137 |
<cfield name="alien_document.sending"/> |
<cfield name="alien_document.sender"/> |
138 |
</eq> |
</eq> |
139 |
<eq> |
<eq> |
140 |
<cfield name="alien_document.id"/> |
<cfield name="alien_document.id"/> |
144 |
</condition> |
</condition> |
145 |
</datasource> |
</datasource> |
146 |
|
|
147 |
|
<datasource database="papo" name="alienDocumentDataSource" table="alien_document" |
148 |
|
order_by="date" /> |
149 |
|
|
150 |
|
<datasource name="proceedingDataSource" database="papo" table="proceeding"/> |
151 |
|
|
152 |
|
<datasource name="alienDocumentProceedingDataSource" database="papo" table="alien_document_proceeding"/> |
153 |
|
|
154 |
|
<datasource name="currencyMovementDataSource" database="papo" |
155 |
|
table="movement, currency_movement"> |
156 |
|
<condition> |
157 |
|
<eq> |
158 |
|
<cfield name="movement.id"/> |
159 |
|
<cfield name="currency_movement.movement"/> |
160 |
|
</eq> |
161 |
|
</condition> |
162 |
|
</datasource> |
163 |
|
|
164 |
<trigger name="cancelTrigger" type="NAMED"> |
<trigger name="cancelTrigger" type="NAMED"> |
165 |
alienDocumentSearchBlock.processRollback() |
alienDocumentSearchBlock.processRollback() |
166 |
|
invoiceToPayBlock.processRollback() |
167 |
</trigger> |
</trigger> |
168 |
|
|
169 |
<trigger name="searchTrigger" type="NAMED"><![CDATA[ |
<trigger name="searchTrigger" type="NAMED"><![CDATA[ |
170 |
|
|
171 |
total = 0.0 |
total = 0.0 |
172 |
|
print "hasta aca" |
173 |
if str(alienDocumentSearchBlock.providerSearchBox.providerSEntry): |
if str(alienDocumentSearchBlock.providerSearchBox.providerSEntry): |
174 |
import gnue.common.GConditions as GConditions |
import gnue.common.GConditions as GConditions |
175 |
import hack |
import hack |
201 |
|
|
202 |
while productInvoiceResultSet.current.getField("alien_document.id") == currAlienDoc and more: |
while productInvoiceResultSet.current.getField("alien_document.id") == currAlienDoc and more: |
203 |
lQty = hack.a2f(productInvoiceResultSet.current.getField("alien_product_item.qty")) |
lQty = hack.a2f(productInvoiceResultSet.current.getField("alien_product_item.qty")) |
204 |
lUnitPrice = hack.a2f(productInvoiceResultSet.current.getField("_price_data.unit_price")) |
lUnitPrice = hack.a2f(productInvoiceResultSet.current.getField("alien_product_item.unit_price")) |
205 |
lBonus = hack.a2f(productInvoiceResultSet.current.getField("alien_item.bonus")) |
lBonus = hack.a2f(productInvoiceResultSet.current.getField("alien_item.bonus")) |
206 |
lDiscount = hack.a2f(productInvoiceResultSet.current.getField("alien_item.discount")) |
lDiscount = hack.a2f(productInvoiceResultSet.current.getField("alien_item.discount")) |
207 |
item = lQty * lUnitPrice - lBonus - lDiscount |
item = lQty * lUnitPrice - lBonus - lDiscount |
232 |
tmpInvToPayedBlock.idEntry = str(serviceInvoiceResultSet.current.getField("alien_document.id")) |
tmpInvToPayedBlock.idEntry = str(serviceInvoiceResultSet.current.getField("alien_document.id")) |
233 |
|
|
234 |
while serviceInvoiceResultSet.current.getField("alien_document.id") == currAlienDoc and more: |
while serviceInvoiceResultSet.current.getField("alien_document.id") == currAlienDoc and more: |
235 |
lQty = hack.a2f(serviceInvoiceResultSet.current.getField("alien_product_item.qty")) |
lQty = hack.a2f(serviceInvoiceResultSet.current.getField("alien_service_item.qty")) |
236 |
lUnitPrice = hack.a2f(serviceInvoiceResultSet.current.getField("alien_product.unit_price")) |
lUnitPrice = hack.a2f(serviceInvoiceResultSet.current.getField("alien_service_item.unit_price")) |
237 |
lBonus = hack.a2f(serviceInvoiceResultSet.current.getField("alien_item.bonus")) |
lBonus = hack.a2f(serviceInvoiceResultSet.current.getField("alien_item.bonus")) |
238 |
lDiscount = hack.a2f(serviceInvoiceResultSet.current.getField("alien_item.discount")) |
lDiscount = hack.a2f(serviceInvoiceResultSet.current.getField("alien_item.discount")) |
239 |
item = lQty * lUnitPrice - lBonus - lDiscount |
item = lQty * lUnitPrice - lBonus - lDiscount |
285 |
|
|
286 |
]]></trigger> |
]]></trigger> |
287 |
|
|
|
<trigger type="On-Startup"><![CDATA[ |
|
|
alienDocumentSearchBlock.providerBox.dateEntry = alienDocumentDataSource.getTimeStamp() |
|
|
]]></trigger> |
|
|
|
|
288 |
<trigger type="NAMED" name="totalTrigger"><![CDATA[ |
<trigger type="NAMED" name="totalTrigger"><![CDATA[ |
289 |
|
|
290 |
import hack |
import hack |
299 |
|
|
300 |
]]></trigger> |
]]></trigger> |
301 |
|
|
302 |
|
<trigger type="NAMED" name="acceptTrigger"><![CDATA[ |
303 |
|
import hack |
304 |
|
|
305 |
|
proceedingBlock.processRollback() |
306 |
|
currencyMovementBlock.processRollback() |
307 |
|
alienDocumentProceedingBlock.processRollback() |
308 |
|
|
309 |
|
alienDocumentBlock.idEntry.autofillBySequence('alien_document_id_seq') |
310 |
|
alienDocumentBlock.typeEntry = "3" |
311 |
|
|
312 |
|
proceedingBlock.idEntry.autofillBySequence('proceeding_id_seq') |
313 |
|
proceedingBlock.dateEntry = proceedingDataSource.getTimeStamp() |
314 |
|
|
315 |
|
currencyMovementBlock.proceedingEntry = str(proceedingBlock.idEntry) |
316 |
|
currencyMovementBlock.movementTypeEntry = "" # Revisar com queda esto |
317 |
|
currencyMovementBlock.currencyTypeEntry = "1" |
318 |
|
currencyMovementBlock.amountEntry = str(invoiceToPayBlock.invoiceBox.totalEntry) |
319 |
|
|
320 |
|
alienDocumentProceedingBlock.proceedingEntry = str(proceedingBlock.idEntry) |
321 |
|
alienDocumentProceedingBlock.alienDocumentEntry = str(alienDocumentBlock.idEntry) |
322 |
|
alienDocumentProceedingBlock.amountEntry = str(invoiceToPayedBlock.invoiceBox.totalEntry) |
323 |
|
|
324 |
|
rc = invoiceToPayBlock.getRecordCount() |
325 |
|
for recNum in range(rc): |
326 |
|
invoiceToPayBlock.jumpRecord(recNum) |
327 |
|
if hack.a2f(invoiceToPayBlock.invoiceBox.payEntry) > 0: |
328 |
|
alienDocumentProceedingBlock.newRecord() |
329 |
|
alienDocumentProceedingBlock.proceedingEntry = str(proceedingBlock.idEntry) |
330 |
|
alienDocumentProceedingBlock.alienDocumentEntry = str(invoiceToPayBlock.invoiceBox.idEntry) |
331 |
|
alienDocumentProceedingBlock.amountEntry = str(invoiceToPayBlock.invoiceBox.payEntry) |
332 |
|
|
333 |
|
alienDocumentBlock.commit() |
334 |
|
callTrigger('cancelTrigger') |
335 |
|
alienDocumentBlock.clientRecipientBox.dateEntry = alienDocumentDataSource.getTimeStamp() |
336 |
|
|
337 |
|
]]></trigger> |
338 |
|
|
339 |
<page name="Búsqueda de Facturas de Proveedor"> |
<page name="Búsqueda de Facturas de Proveedor"> |
340 |
|
|
341 |
<box height="5" label="Facturas del Proveedor" |
<block datasource="tmpSearchDataSource" name="alienDocumentSearchBlock" restrictInsert=""> |
|
name="providerBox" width="70" x="0" y="0"> |
|
342 |
|
|
343 |
<block datasource="tmpSearchDataSource" name="alienDocumentSearchBlock" restrictInsert=""> |
<box height="4" label="Proveedores" |
344 |
|
name="providerSearchBox" width="70" x="1" y="0"> |
345 |
|
|
346 |
<entry field="alien_document_type" hidden="" name="typeEntry" x="1" y="1"/> |
<entry field="alien_document_type" hidden="" name="typeEntry" x="1" y="1"/> |
347 |
|
|
348 |
<label name="providerLbl" text="Proveedor" x="1" y="1" /> |
<entry x="1" y="1" field="alien_document.sender" name="providerSEntry" |
|
<entry x="1" y="2" field="alien_document.sender" name="providerSEntry" |
|
349 |
width="40" style="dropdown" foreign_key="providerDataSource.entity.id" |
width="40" style="dropdown" foreign_key="providerDataSource.entity.id" |
350 |
foreign_key_description="_entity_data.name" > |
foreign_key_description="_entity_data.name" > |
351 |
</entry> |
</entry> |
352 |
|
|
353 |
<button x="50" y="1" trigger="searchTrigger" width="16" label="Buscar" |
<button x="50" y="1" trigger="searchTrigger" width="16" label="Buscar" |
354 |
name="searchBtn" height="1"/> |
name="searchBtn" height="1"/> |
355 |
<button x="50" y="2" trigger="cancelTrigger" width="16" label="Cancelar" |
</box> |
356 |
name="cancelBtn" height="1"/> |
</block> |
|
</block> |
|
|
</box> |
|
357 |
|
|
358 |
<block name="tmpInvToPayedBlock" datasource="tmpInvToPayedDataSource"> |
<block name="tmpInvToPayedBlock" datasource="tmpInvToPayDataSource"> |
359 |
<entry name="idEntry" field="id" hidden="" x="1" y="1" width="1" /> |
<entry name="idEntry" field="id" hidden="" x="1" y="1" width="1" /> |
360 |
<entry name="dateEntry" field="date" hidden="" x="1" y="1" width="1"/> |
<entry name="dateEntry" field="date" hidden="" x="1" y="1" width="1"/> |
361 |
<entry name="amountEntry" field="amount" hidden="" x="1" y="1" width="1"/> |
<entry name="amountEntry" field="amount" hidden="" x="1" y="1" width="1"/> |
362 |
<entry name="payedEntry" field="payed" hidden="" x="1" y="1" width="1"/> |
<entry name="payedEntry" field="payed" hidden="" x="1" y="1" width="1"/> |
363 |
</block> |
</block> |
364 |
|
|
365 |
<block name="invoiceToPayedBlock" datasource="invoiceToPayDataSource"> |
<block name="invoiceToPayBlock" datasource="invoiceToPayDataSource"> |
366 |
<box height="12" label="Facturas Pendientes de Pago" name="invoiceBox" |
<box height="12" label="Facturas A Pagar" name="invoiceBox" |
367 |
width="70" x="0" y="8"> |
width="70" x="1" y="4"> |
368 |
<label name="dateLbl" text="Fecha" x="1" y="1"/> |
<label name="dateLbl" text="Fecha" x="1" y="1"/> |
369 |
<label name="amountLbl" text="Monto" x="13" y="1"/> |
<label name="amountLbl" text="Monto" x="13" y="1"/> |
370 |
<label name="payedLbl" text="Pagado" x="24" y="1"/> |
<label name="payedLbl" text="Pagado" x="24" y="1"/> |
392 |
</box> |
</box> |
393 |
</block> |
</block> |
394 |
|
|
395 |
|
<block name="proceedingBlock" datasource="proceedingDataSource"> |
396 |
|
<entry name="idEntry" field="id" hidden="" x="1" y="1" width="12"/> |
397 |
|
<entry name="dateEntry" field="date" hidden="" x="1" y="1" width="12"/> |
398 |
|
</block> |
399 |
|
<block name="alienDocumentProceedingBlock" datasource="alienDocumentProceedingDataSource"> |
400 |
|
<entry name="proceedingEntry" field="proceeding" hidden="" x="1" y="1" width="12"/> |
401 |
|
<entry name="alienDocumentEntry" field="alien_document" hidden="" |
402 |
|
x="1" y="1" width="12"/> |
403 |
|
<entry name="amountEntry" field="amount" hidden="" x="1" y="1" width="12"/> |
404 |
|
</block> |
405 |
|
<block name="currencyMovementBlock" datasource="currencyMovementDataSource"> |
406 |
|
<entry name="proceedingEntry" field="movement.proceeding" hidden="" |
407 |
|
x="1" y="1" width="12"/> |
408 |
|
<entry name="movementTypeEntry" field="movement.movement_type" hidden="" |
409 |
|
x="1" y="1" width="12"/> |
410 |
|
<entry name="amountEntry" field="movement.amount" hidden="" x="1" y="1" width="12"/> |
411 |
|
<entry name="currencyTypeEntry" field="currency_movement.currency_type" hidden="" |
412 |
|
x="1" y="1" width="12"/> |
413 |
|
</block> |
414 |
</page> |
</page> |
415 |
|
|
416 |
|
|