3 |
|
|
4 |
<form title="Recibos" height="17" width="76"> |
<form title="Recibos" height="17" width="76"> |
5 |
|
|
6 |
<datasource name="clientDataSource" database="papo" |
<datasource name="clientSearchDataSource" database="papo" |
7 |
table="entity, _entity_data, alien_entity, _alien_entity_data, persona, _persona_data, client, _client_data, |
table="_entity_data, _alien_entity_data, _persona_data, _client_data, |
8 |
_price_type_data"> |
_price_type_data, entity_type_uid_conf, _entity_uid_type_data, |
9 |
|
_entity_uid_data" order_by="_entity_data.name"> |
10 |
<condition> |
<condition> |
11 |
<and> |
<and> |
12 |
<eq> |
<eq> |
|
<cfield name="entity.id"/> |
|
13 |
<cfield name="_entity_data._table"/> |
<cfield name="_entity_data._table"/> |
14 |
|
<cfield name="_alien_entity_data.entity"/> |
15 |
</eq> |
</eq> |
16 |
<eq> |
<eq> |
|
<cfield name="alien_entity.id"/> |
|
17 |
<cfield name="_alien_entity_data._table"/> |
<cfield name="_alien_entity_data._table"/> |
18 |
|
<cfield name="_persona_data.alien_entity"/> |
19 |
</eq> |
</eq> |
20 |
<eq> |
<eq> |
|
<cfield name="persona.id"/> |
|
21 |
<cfield name="_persona_data._table"/> |
<cfield name="_persona_data._table"/> |
22 |
|
<cfield name="_client_data.persona"/> |
23 |
</eq> |
</eq> |
24 |
<eq> |
<eq> |
25 |
<cfield name="client.id"/> |
<cfield name="_price_type_data._table"/> |
26 |
<cfield name="_client_data._table"/> |
<cfield name="_client_data.price_type"/> |
27 |
</eq> |
</eq> |
28 |
<eq> |
<eq> |
29 |
<cfield name="entity.id"/> |
<cfield name="_entity_data._table"/> |
30 |
<cfield name="_alien_entity_data.entity"/> |
<cfield name="_entity_uid_data.entity"/> |
31 |
</eq> |
</eq> |
32 |
<eq> |
<eq> |
33 |
<cfield name="alien_entity.id"/> |
<cfield name="_entity_uid_data.entity_uid_type"/> |
34 |
<cfield name="_persona_data.alien_entity"/> |
<cfield name="_entity_uid_type_data._table"/> |
35 |
</eq> |
</eq> |
36 |
<eq> |
<eq> |
37 |
<cfield name="persona.id"/> |
<cfield name="_entity_type_data._table"/> |
38 |
<cfield name="_client_data.persona"/> |
<cfield name="entity_type_uid_conf.entity_type"/> |
39 |
</eq> |
</eq> |
40 |
<eq> |
<eq> |
41 |
<cfield name="_price_type_data._table"/> |
<cfield name="entity_type_uid_conf.entity_type"/> |
42 |
<cfield name="_client_data.price_type"/> |
<cconst value="8"/> <!-- Es el id del entity_type correspondiente a cliente --> |
43 |
|
</eq> |
44 |
|
<eq> |
45 |
|
<cfield name="_entity_uid_type_data._table"/> |
46 |
|
<cfield name="entity_type_uid_conf.entity_uid_type"/> |
47 |
</eq> |
</eq> |
48 |
<null> |
<null> |
49 |
<cfield name="_entity_data._end_t"/> |
<cfield name="_entity_data._end_t"/> |
60 |
<null> |
<null> |
61 |
<cfield name="_price_type_data._end_t"/> |
<cfield name="_price_type_data._end_t"/> |
62 |
</null> |
</null> |
63 |
|
<null> |
64 |
|
<cfield name="_entity_uid_data._end_t"/> |
65 |
|
</null> |
66 |
|
<null> |
67 |
|
<cfield name="_entity_type_data._end_t"/> |
68 |
|
</null> |
69 |
|
<null> |
70 |
|
<cfield name="_entity_uid_type_data._end_t"/> |
71 |
|
</null> |
72 |
</and> |
</and> |
73 |
</condition> |
</condition> |
74 |
</datasource> |
</datasource> |
75 |
|
|
76 |
|
|
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" |
224 |
|
|
225 |
<trigger type="NAMED" name="showInvoiceToPayTrigger"><![CDATA[ |
<trigger type="NAMED" name="showInvoiceToPayTrigger"><![CDATA[ |
226 |
|
|
227 |
|
callTrigger('startWaitingModeTrigger') |
228 |
tmpInvToPayedBlock.processRollback() |
tmpInvToPayedBlock.processRollback() |
229 |
invoiceToPayedBlock.processRollback() |
invoiceToPayedBlock.processRollback() |
230 |
proceedingBlock.processRollback() |
proceedingBlock.processRollback() |
344 |
invoiceToPayedBlock.newRecord() |
invoiceToPayedBlock.newRecord() |
345 |
|
|
346 |
invoiceToPayedBlock.invoiceBox.totalEntry = str(total) |
invoiceToPayedBlock.invoiceBox.totalEntry = str(total) |
347 |
|
callTrigger('endWaitingModeTrigger') |
348 |
|
|
349 |
]]></trigger> |
]]></trigger> |
350 |
|
|
410 |
invoiceToPayedBlock.invoiceBox.totalEntry = str(total) |
invoiceToPayedBlock.invoiceBox.totalEntry = str(total) |
411 |
|
|
412 |
]]></trigger> |
]]></trigger> |
413 |
|
|
414 |
|
<trigger name="clientSearchTrigger" type="NAMED"><![CDATA[ |
415 |
|
codeToSearch = str(ownDocumentBlock.clientRecipientBox.clientCodeEntry) |
416 |
|
nameToSearch = str(ownDocumentBlock.clientRecipientBox.clientNameEntry) |
417 |
|
|
418 |
|
ownDocumentBlock.clientRecipientBox.clientCodeEntry = codeToSearch |
419 |
|
ownDocumentBlock.clientRecipientBox.clientNameEntry = nameToSearch |
420 |
|
|
421 |
|
callTrigger('startWaitingModeTrigger') |
422 |
|
clientResultBlock.initQuery() |
423 |
|
clientResultBlock.uidEntry = codeToSearch+"%" |
424 |
|
clientResultBlock.nameEntry = nameToSearch+"%" |
425 |
|
clientResultBlock.processQuery() |
426 |
|
callTrigger('endWaitingModeTrigger') |
427 |
|
recordCount = clientResultBlock.getRecordCount() |
428 |
|
if recordCount > 1: |
429 |
|
|
430 |
|
def callback (returnValue): |
431 |
|
global block |
432 |
|
if returnValue >= 0: |
433 |
|
clientResultBlock.jumpRecord(returnValue) |
434 |
|
ownDocumentBlock.clientRecipientBox.clientCodeEntry = str(clientResultBlock.uidEntry) |
435 |
|
ownDocumentBlock.clientRecipientBox.clientNameEntry = str(clientResultBlock.nameEntry) |
436 |
|
ownDocumentBlock.clientRecipientBox.clientEntry = str(clientResultBlock.idEntry) |
437 |
|
|
438 |
|
runForm ('clientSelect.gfd', {'data': clientResultBlock, 'callback': callback}) |
439 |
|
elif recordCount == 1: |
440 |
|
clientResultBlock.jumpRecord(0) |
441 |
|
ownDocumentBlock.clientRecipientBox.clientCodeEntry = str(clientResultBlock.uidEntry) |
442 |
|
ownDocumentBlock.clientRecipientBox.clientNameEntry = str(clientResultBlock.nameEntry) |
443 |
|
ownDocumentBlock.clientRecipientBox.clientEntry = str(clientResultBlock.idEntry) |
444 |
|
]]></trigger> |
445 |
|
|
446 |
|
<trigger name="startWaitingModeTrigger" type="NAMED"><![CDATA[ |
447 |
|
setStatusText("Procesando ...") |
448 |
|
try: |
449 |
|
# gnue version <= 0.4 |
450 |
|
from gnue.forms.GFEvent import GFEvent |
451 |
|
except ImportError: |
452 |
|
# gnue version >= 0.5 |
453 |
|
from gnue.common.events.Event import Event as GFEvent |
454 |
|
|
455 |
|
# busy clock |
456 |
|
self._object.dispatchEvent(GFEvent('beginWAIT')) |
457 |
|
]]></trigger> |
458 |
|
|
459 |
|
<trigger name="endWaitingModeTrigger" type="NAMED"><![CDATA[ |
460 |
|
try: |
461 |
|
# gnue version <= 0.4 |
462 |
|
from gnue.forms.GFEvent import GFEvent |
463 |
|
except ImportError: |
464 |
|
# gnue version >= 0.5 |
465 |
|
from gnue.common.events.Event import Event as GFEvent |
466 |
|
|
467 |
|
self._object.dispatchEvent(GFEvent('endWAIT')) |
468 |
|
setStatusText("Listo") |
469 |
|
]]></trigger> |
470 |
|
|
471 |
<page name="Emision de Recibos"> |
<page name="Emision de Recibos"> |
472 |
|
|
473 |
|
<!-- Bloque para la búsqueda de clientes --> |
474 |
|
<block name="clientResultBlock" datasource="clientSearchDataSource"> |
475 |
|
<entry name="idEntry" field="_entity_data.id" hidden="" x="1" y="1" width="12"/> |
476 |
|
<entry name="uidTypeEntry" field="_entity_uid_data.entity_uid_type" hidden="" x="1" y="1" width="12"/> |
477 |
|
<entry name="uidEntry" field="_entity_uid_data.uid" hidden="" x="1" y="1" width="12"/> |
478 |
|
<entry name="nameEntry" field="_entity_data.name" hidden="" x="1" y="1" width="20"/> |
479 |
|
</block> |
480 |
|
|
481 |
<block datasource="ownDocumentDataSource" name="ownDocumentBlock"> |
<block datasource="ownDocumentDataSource" name="ownDocumentBlock"> |
482 |
<entry field="id" hidden="" name="idEntry" x="1" y="1"/> |
<entry field="id" hidden="" name="idEntry" x="1" y="1"/> |
483 |
<entry field="own_document_type" hidden="" name="typeEntry" x="1" y="1"/> |
<entry field="own_document_type" hidden="" name="typeEntry" x="1" y="1"/> |
484 |
<box height="5" label="Datos del Cliente" name="clientRecipientBox" width="74" x="0" y="1"> |
<box height="7" label="Datos del Cliente" name="clientRecipientBox" width="74" x="0" y="1"> |
485 |
<label name="clientLbl" text="Cliente" x="1" y="1" /> |
<label name="clientLbl" text="Cliente" x="1" y="1" /> |
486 |
<entry x="1" y="2" field="recipient" name="clientEntry" |
|
487 |
width="40" style="dropdown" foreign_key="clientDataSource._entity_data._table" |
<entry x="1" y="2" field="recipient" name="clientEntry" width="30" hidden=""/> |
488 |
foreign_key_description="_entity_data.name"/> |
<entry x="1" y="2" name="clientCodeEntry" width="20"/> |
489 |
|
<entry x="21" y="2" name="clientNameEntry" width="35"/> |
490 |
|
<button name="clientSearchButton" trigger="clientSearchTrigger" label="Buscar" |
491 |
|
width="7" height="1" x="56" y="2"/> |
492 |
|
|
493 |
<label name="dateLbl" rows="1" text="Fecha" x="1" y="7" /> |
<label name="dateLbl" rows="1" text="Fecha" x="1" y="7" /> |
494 |
<entry field="date" name="dateEntry" style="label" readonly="" typecast="date" |
<entry field="date" name="dateEntry" style="label" readonly="" typecast="date" |
495 |
rows="1" width="24" x="7" y="7"/> |
rows="1" width="24" x="7" y="7"/> |
496 |
<button name="showInvoicesButton" trigger="showInvoiceToPayTrigger" |
<button name="showInvoicesButton" trigger="showInvoiceToPayTrigger" |
497 |
label="Facturas Pendientes" width="20" height="1" x="42" y="2"/> |
label="Facturas Pendientes" width="20" height="1" x="28" y="4"/> |
498 |
</box> |
</box> |
499 |
</block> |
</block> |
500 |
|
|
519 |
<entry name="numberEntry" field="number" style="label" rows="8" |
<entry name="numberEntry" field="number" style="label" rows="8" |
520 |
x="1" y="2" width="10" readonly=""/> |
x="1" y="2" width="10" readonly=""/> |
521 |
<entry name="dateEntry" field="date" style="label" rows="8" |
<entry name="dateEntry" field="date" style="label" rows="8" |
522 |
x="13" y="2" width="11" readonly=""/> |
x="11" y="2" width="11" readonly=""/> |
523 |
<entry name="amountEntry" field="amount" style="label" rows="8" typecast="number" displaymask="%0.2f" |
<entry name="amountEntry" field="amount" style="label" rows="8" typecast="number" displaymask="%0.2f" |
524 |
x="23" y="2" width="10" readonly=""/> |
x="23" y="2" width="10" readonly=""/> |
525 |
<entry name="payedEntry" field="payed" style="label" rows="8" typecast="number" displaymask="%0.2f" |
<entry name="payedEntry" field="payed" style="label" rows="8" typecast="number" displaymask="%0.2f" |