1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
<!DOCTYPE form SYSTEM "gnue-forms.dtd"> |
|
2 |
|
|
3 |
<form tabbed="top" title="Clientes" height="18" width="84"> |
<form tabbed="top" title="Clientes" height="18" width="84"> |
4 |
<!-- <maintoolbar enabled=""/> --> |
<!-- <maintoolbar enabled=""/> --> |
34 |
<cfield name="alien_entity.id"/> |
<cfield name="alien_entity.id"/> |
35 |
<cfield name="_persona_data.alien_entity"/> |
<cfield name="_persona_data.alien_entity"/> |
36 |
</eq> |
</eq> |
37 |
|
|
38 |
|
<eq> |
39 |
|
<cfield name="_entity_uid_data.entity_uid_type"/> |
40 |
|
<cfield name="_entity_uid_type_data._table"/> |
41 |
|
</eq> |
42 |
|
<eq> |
43 |
|
<cfield name="_entity_uid_data.entity"/> |
44 |
|
<cfield name="_entity_data._table"/> |
45 |
|
</eq> |
46 |
|
<eq> |
47 |
|
<cfield name="_entity_data.entity_type"/> |
48 |
|
<cfield name="entity_type_uid_conf.entity_type"/> |
49 |
|
</eq> |
50 |
|
<eq> |
51 |
|
<cfield name="entity_type_uid_conf.entity_uid_type"/> |
52 |
|
<cfield name="_entity_uid_type_data._table"/> |
53 |
|
</eq> |
54 |
|
|
55 |
<eq> |
<eq> |
56 |
<cfield name="persona.id"/> |
<cfield name="persona.id"/> |
57 |
<cfield name="_client_data.persona"/> |
<cfield name="_client_data.persona"/> |
68 |
<null> |
<null> |
69 |
<cfield name="_client_data._end_t"/> |
<cfield name="_client_data._end_t"/> |
70 |
</null> |
</null> |
71 |
|
<null> |
72 |
|
<cfield name="_entity_uid_data._end_t"/> |
73 |
|
</null> |
74 |
|
<null> |
75 |
|
<cfield name="_entity_uid_type_data._end_t"/> |
76 |
|
</null> |
77 |
</and> |
</and> |
78 |
</condition> |
</condition> |
79 |
</datasource> |
</datasource> |
281 |
|
|
282 |
<trigger name="commitTrigger" type="NAMED"> |
<trigger name="commitTrigger" type="NAMED"> |
283 |
if not str(clientBlock.priceTypeEntry): |
if not str(clientBlock.priceTypeEntry): |
284 |
clientBlock.priceTypeEntry = "1" |
clientBlock.priceTypeEntry = "1" |
285 |
if clientBlock.getCurrentRecord().isInserted(): |
if clientBlock.getCurrentRecord().isInserted(): |
286 |
creditLimit1Block.newRecord() |
# entity_type 7 es cliente |
287 |
creditLimit1Block.movementTypeEntry = 1 |
clientBlock.clientEntityTypeEntry = 7 |
288 |
creditLimit1Block.creditLimitEntry = "0.0" |
creditLimit1Block.newRecord() |
289 |
clientUID_CUIT_Block.newRecord() |
creditLimit1Block.movementTypeEntry = 1 |
290 |
clientUID_CUIT_Block.uid_CUIT_TypeEntry = 1 |
creditLimit1Block.creditLimitEntry = "0.0" |
291 |
clientUID_IB_Block.newRecord() |
clientUID_CUIT_Block.newRecord() |
292 |
clientUID_IB_Block.uid_IB_TypeEntry = 2 |
clientUID_CUIT_Block.uid_CUIT_TypeEntry = 1 |
293 |
clientTaxProfileBlock.newRecord() |
clientUID_IB_Block.newRecord() |
294 |
clientBlock.commit() |
clientUID_IB_Block.uid_IB_TypeEntry = 2 |
295 |
clientBlock.jumpRecord(2) |
clientTaxProfileBlock.newRecord() |
296 |
tmpId = str(clientBlock.clientIdEntry) |
clientBlock.commit() |
297 |
clientBlock.processRollback() |
clientBlock.jumpRecord(2) |
298 |
clientBlock.initQuery() |
tmpId = str(clientBlock.clientIdEntry) |
299 |
clientBlock.clientIdEntry = tmpId |
clientBlock.processRollback() |
300 |
clientBlock.processQuery() |
clientBlock.initQuery() |
301 |
|
clientBlock.clientIdEntry = tmpId |
302 |
|
clientBlock.processQuery() |
303 |
else: |
else: |
304 |
clientBlock.commit() |
clientBlock.commit() |
305 |
</trigger> |
</trigger> |
306 |
|
|
307 |
<trigger name="clientDeleteTrigger" type="NAMED"> |
<trigger name="clientDeleteTrigger" type="NAMED"> |
349 |
clientTaxProfileBlock.processRollback(1) |
clientTaxProfileBlock.processRollback(1) |
350 |
</trigger> |
</trigger> |
351 |
|
|
352 |
<trigger name="printTrigger" type="NAMED"> |
<trigger name="printTrigger" type="NAMED"><![CDATA[ |
353 |
import os |
import tempfile |
354 |
os.system("grcvs -D file -d ~/tmp/client.html --filter html ../report/client.grd") |
import os |
355 |
os.system("galeon -w ~/tmp/client.html") |
|
356 |
</trigger> |
try: |
357 |
|
# gnue version <= 0.4 |
358 |
|
from gnue.forms.GFEvent import GFEvent |
359 |
|
except ImportError: |
360 |
|
# gnue version >= 0.5 |
361 |
|
from gnue.common.events.Event import Event as GFEvent |
362 |
|
|
363 |
|
# busy clock |
364 |
|
self._object.dispatchEvent(GFEvent('beginWAIT')) |
365 |
|
file = tempfile.mktemp('.client.html') |
366 |
|
os.system("grcvs -D file -d %s --filter html ../report/client.grd" % file) |
367 |
|
os.system(gConfig('PrintCommand') % (file)) |
368 |
|
os.unlink(file) |
369 |
|
|
370 |
|
self._object.dispatchEvent(GFEvent('endWAIT')) |
371 |
|
|
372 |
|
|
373 |
|
|
374 |
|
]]></trigger> |
375 |
|
|
376 |
<trigger type="NAMED" name="searchTrigger"> |
<trigger type="NAMED" name="searchTrigger"> |
377 |
clientResultBlock.processRollback() |
try: |
378 |
clientResultBlock.initQuery() |
from gnue.forms.GFEvent import GFEvent |
379 |
clientResultBlock.nameListEntry = ("%s" % clientSearchBlock.searchNameEntry)+"%" |
except ImportError: |
380 |
clientResultBlock.processQuery() |
from gnue.common.events.Event import Event as GFEvent |
381 |
|
|
382 |
|
setStatusText('buscando...') |
383 |
|
|
384 |
|
self._object.dispatchEvent(GFEvent('beginWAIT')) |
385 |
|
|
386 |
|
clientResultBlock.processRollback() |
387 |
|
clientResultBlock.initQuery() |
388 |
|
if str(clientSearchBlock.searchCodeEntry): |
389 |
|
clientResultBlock.codeListEntry = str(clientSearchBlock.searchCodeEntry)+'%' |
390 |
|
if str(clientSearchBlock.searchNameEntry): |
391 |
|
clientResultBlock.nameListEntry = '%s%%' % clientSearchBlock.searchNameEntry |
392 |
|
clientResultBlock.processQuery() |
393 |
|
|
394 |
|
setStatusText('Ok') |
395 |
|
self._object.dispatchEvent(GFEvent('endWAIT')) |
396 |
|
|
397 |
|
if clientResultBlock.isEmpty(): |
398 |
|
clientSearchBlock.notificationEntry = ' no se encontraron registros' |
399 |
|
else: |
400 |
|
clientSearchBlock.notificationEntry ='%6d registros encontrados' % clientResultBlock.getRecordCount() |
401 |
|
|
402 |
</trigger> |
</trigger> |
403 |
|
|
404 |
<page name="Clientes"> |
<page name="Clientes"> |
411 |
</trigger> |
</trigger> |
412 |
|
|
413 |
<block name="clientSearchBlock" datasource="searchDataSource" transparentBlock="" restrictInsert=""> |
<block name="clientSearchBlock" datasource="searchDataSource" transparentBlock="" restrictInsert=""> |
414 |
<label text="Nombre o Razón Social a buscar" |
<label text="Datos a buscar:" x="1" y="1"/> |
415 |
x="1" y="1"/> |
<label text="nombre o razón social" x="1" y="2" /> |
416 |
<entry name="searchNameEntry" |
<label text=" código" x="1" y="3"/> |
417 |
x="1" y="2" width="35"> |
<entry name="searchNameEntry" x="24" y="2" width="55"/> |
418 |
</entry> |
<entry name="searchCodeEntry" x="24" y="3" width="35"/> |
419 |
<button x="36" y="2" trigger="searchTrigger" width="9" label="Buscar" |
<entry style="label" name="notificationEntry" x="1" y="19" width="67"/> |
420 |
name="searchBtn" height="1"/> |
<button x="70" y="3" trigger="searchTrigger" width="9" label="Buscar" name="searchBtn" height="1"/> |
421 |
<button x="46" y="2" trigger="printTrigger" width="10" label="Imprimir" |
<button x="69" y="19" trigger="printTrigger" width="10" label="Imprimir" name="printBtn" height="1"/> |
|
name="printBtn" height="1"/> |
|
422 |
</block> |
</block> |
423 |
<block name="clientResultBlock" datasource="clientResultDataSource"> |
<block name="clientResultBlock" datasource="clientResultDataSource"> |
424 |
<entry name="clientIdREntry" field="entity.id" hidden="" x="1" y="1" width="20" /> |
<entry name="clientIdREntry" field="entity.id" hidden="" x="1" y="1" width="20" /> |
425 |
<label text="Resultado" x="1" y="3"/> |
<label text="Resultado" x="1" y="4"/> |
426 |
<entry name="nameListEntry" field="_entity_data.name" |
<entry name="codeListEntry" field="_entity_uid_data.uid" x="1" y="5" width="20" rows="14"/> |
427 |
x="1" y="4" width="40" rows="12"/> |
<entry name="nameListEntry" field="_entity_data.name" x="21" y="5" width="58" rows="14"/> |
428 |
<scrollbar page="12" |
<scrollbar page="12" x="80" y="5" width="1" height="14"/> |
|
x="42" y="4" width="1" height="12"/> |
|
429 |
</block> |
</block> |
430 |
|
|
431 |
</page> |
</page> |
458 |
<block name="clientBlock" datasource="clientDataSource" restrictInsert="y"> |
<block name="clientBlock" datasource="clientDataSource" restrictInsert="y"> |
459 |
<entry name="clientIdEntry" field="entity.id" hidden="" |
<entry name="clientIdEntry" field="entity.id" hidden="" |
460 |
x="1" y="1" width="20"/> |
x="1" y="1" width="20"/> |
461 |
|
<entry name="clientEntityTypeEntry" field="_entity_data.entity_type" hidden="" |
462 |
|
x="1" y="1" width="20"/> |
463 |
<label text="Nombre o Razón Social" |
<label text="Nombre o Razón Social" |
464 |
x="1" y="1"/> |
x="1" y="1"/> |
465 |
<entry name="nameEntry" field="_entity_data.name" |
<entry name="nameEntry" field="_entity_data.name" |
516 |
name="clientDeleteBtn" height="1"/> |
name="clientDeleteBtn" height="1"/> |
517 |
<button x="21" y="17" trigger="clientRollbackTrigger" width="9" label="Cancelar" |
<button x="21" y="17" trigger="clientRollbackTrigger" width="9" label="Cancelar" |
518 |
name="clientRollbackBtn" height="1"/> |
name="clientRollbackBtn" height="1"/> |
519 |
<button x="31" y="17" width="9" label="Nuevo" |
<button x="31" y="17" width="9" trigger="newTrigger" label="Nuevo" |
520 |
name="newButton" height="1"> |
name="newButton" height="1"> |
521 |
<trigger name="newTrigger" type="NAMED"> |
<trigger name="newTrigger" type="NAMED"> |
522 |
clientBlock.newRecord () |
#clientBlock.newRecord () |
523 |
setFocus (clientBlock.nameEntry) |
#setFocus (clientBlock.nameEntry) |
524 |
|
changed = filter(lambda t: not t.isSaved(), self._object._blockList) |
525 |
|
res = 0 |
526 |
|
if len(changed) > 0: |
527 |
|
res = self.genericBox('Hay cambios pendientes \n¿ Qué desea hacer ?',['Grabar','Deshacer', 'Cancelar']) |
528 |
|
if res == 1: |
529 |
|
self.callTrigger(commitTrigger) |
530 |
|
elif res == 2: |
531 |
|
rollback(clientBlock) |
532 |
|
if res in (1,2): |
533 |
|
clientBlock.newRecord() |
534 |
|
setFocus(clientBlock.nameEntry) |
535 |
</trigger> |
</trigger> |
536 |
</button> |
</button> |
537 |
</block> |
</block> |
607 |
</box> |
</box> |
608 |
</page> |
</page> |
609 |
|
|
610 |
<page name="Límites de crédito"> |
<page name="Límites crédito"> |
611 |
<trigger type="Pre-Focusout" src="askForChangesTrigger"/> |
<trigger type="Pre-Focusout" src="askForChangesTrigger"/> |
612 |
<box label="Límites de Crédito" |
<box label="Límites de Crédito" |
613 |
x="0" y="0" height="5" width="64"> |
x="0" y="0" height="5" width="64"> |