5 |
<!-- <maintoolbar enabled=""/> --> |
<!-- <maintoolbar enabled=""/> --> |
6 |
<datasource name="focusDataSource" cache="1"/> |
<datasource name="focusDataSource" cache="1"/> |
7 |
<datasource name="searchDataSource" cache="1"/> |
<datasource name="searchDataSource" cache="1"/> |
8 |
<datasource name="providerResultDataSource" database="papo" |
<datasource name="providerResultDataSource" database="papo" |
9 |
table="_entity_data, _alien_entity_data, _persona_data, _provider_data, _entity_uid_data" |
table="_entity_data, _alien_entity_data, _persona_data, _provider_data, _entity_uid_data" |
10 |
order_by="_entity_data.name"> |
order_by="_entity_data.name"> |
11 |
<condition> |
<condition> |
27 |
<cfield name="_entity_uid_data.entity"/> |
<cfield name="_entity_uid_data.entity"/> |
28 |
</eq> |
</eq> |
29 |
<!-- modified database --> |
<!-- modified database --> |
30 |
|
|
31 |
<!-- <eq> --> |
<!-- <eq> --> |
32 |
<!-- <cfield name="_entity_data.entity_type"/> --> |
<!-- <cfield name="_entity_data.entity_type"/> --> |
33 |
<!-- <cfield name="entity_type_uid_conf.entity_type"/> --> |
<!-- <cfield name="entity_type_uid_conf.entity_type"/> --> |
42 |
<cfield name="_entity_uid_data.entity_uid_type"/> |
<cfield name="_entity_uid_data.entity_uid_type"/> |
43 |
<cfield name="entity_type_uid_conf.entity_uid_type"/> |
<cfield name="entity_type_uid_conf.entity_uid_type"/> |
44 |
</eq> |
</eq> |
45 |
|
|
46 |
<null> |
<null> |
47 |
<cfield name="_entity_data._end_t"/> |
<cfield name="_entity_data._end_t"/> |
48 |
</null> |
</null> |
62 |
</condition> |
</condition> |
63 |
</datasource> |
</datasource> |
64 |
<!-- abm --> |
<!-- abm --> |
65 |
<datasource name="providerDataSource" database="papo" |
<datasource name="providerDataSource" database="papo" |
66 |
table="entity, _entity_data, alien_entity, _alien_entity_data, persona, _persona_data, provider, _provider_data, entity_type_uid_conf" |
table="entity, _entity_data, alien_entity, _alien_entity_data, persona, _persona_data, provider, _provider_data, entity_type_uid_conf" |
67 |
historytable="_entity_data, _alien_entity_data, _persona_data, _provider_data"> |
historytable="_entity_data, _alien_entity_data, _persona_data, _provider_data"> |
68 |
<condition> |
<condition> |
113 |
|
|
114 |
<!-- parte de multi entities --> |
<!-- parte de multi entities --> |
115 |
|
|
116 |
|
|
117 |
<datasource name="entityTypesDataSource" database="papo" |
<datasource name="entityTypesDataSource" database="papo" |
118 |
detaillink="_entity_types_data.entity" master="providerDataSource" |
detaillink="_entity_types_data.entity" master="providerDataSource" |
119 |
masterlink="entity.id" table="entity_types, _entity_types_data" historytable="_entity_types_data"> |
masterlink="entity.id" table="entity_types, _entity_types_data" historytable="_entity_types_data"> |
293 |
<!-- /modified database --> |
<!-- /modified database --> |
294 |
|
|
295 |
|
|
296 |
<datasource name="printProviderDataSource" database="papo" |
<datasource name="printProviderDataSource" database="papo" |
297 |
table="_entity_data, _alien_entity_data, _persona_data, _provider_data, entity_type_uid_conf, _entity_uid_data" |
table="_entity_data, _alien_entity_data, _persona_data, _provider_data, entity_type_uid_conf, _entity_uid_data" |
298 |
order_by="_entity_data.name"> |
order_by="_entity_data.name"> |
299 |
<condition> |
<condition> |
320 |
<!-- <cfield name="_entity_data.entity_type"/> --> |
<!-- <cfield name="_entity_data.entity_type"/> --> |
321 |
<!-- <cfield name="entity_type_uid_conf.entity_type"/> --> |
<!-- <cfield name="entity_type_uid_conf.entity_type"/> --> |
322 |
<!-- </eq> --> |
<!-- </eq> --> |
323 |
|
|
324 |
<eq> |
<eq> |
325 |
<cconst value="8"/> |
<cconst value="8"/> |
326 |
<cfield name="entity_type_uid_conf.entity_type"/> |
<cfield name="entity_type_uid_conf.entity_type"/> |
391 |
</datasource> |
</datasource> |
392 |
|
|
393 |
<datasource database="papo" name="addressTypeResultDataSource" |
<datasource database="papo" name="addressTypeResultDataSource" |
394 |
table="address_type, _address_type_data" historytable="_address_type_data"> |
table="address_type, _address_type_data" historytable="_address_type_data"> |
395 |
<condition> |
<condition> |
396 |
<and> |
<and> |
397 |
<eq> |
<eq> |
423 |
</datasource> |
</datasource> |
424 |
|
|
425 |
<datasource database="papo" name="categoryTypeResultDataSource" |
<datasource database="papo" name="categoryTypeResultDataSource" |
426 |
table="category_type, _category_type_data, _category_entity_type_data" historytable="_category_type_data"> |
table="category_type, _category_type_data, _category_entity_type_data" historytable="_category_type_data"> |
427 |
<condition> |
<condition> |
428 |
<and> |
<and> |
429 |
<eq> |
<eq> |
448 |
</and> |
</and> |
449 |
</condition> |
</condition> |
450 |
</datasource> |
</datasource> |
451 |
|
|
452 |
<datasource database="papo" name="categoryAtributeResultDataSource" |
<datasource database="papo" name="categoryAtributeResultDataSource" |
453 |
table="category_attribute, _category_attribute_data" historytable="_category_attribute_data"> |
table="category_attribute, _category_attribute_data" historytable="_category_attribute_data"> |
454 |
<condition> |
<condition> |
455 |
<and> |
<and> |
456 |
<eq> |
<eq> |
477 |
if not str(providerTaxProfileBlock.taxProfileEntry): |
if not str(providerTaxProfileBlock.taxProfileEntry): |
478 |
message+= 'Debe ingresar un categoría de IVA\n' |
message+= 'Debe ingresar un categoría de IVA\n' |
479 |
isOk= 0 |
isOk= 0 |
480 |
|
|
481 |
if isOk: |
if isOk: |
482 |
if providerBlock.getCurrentRecord().isInserted(): |
if providerBlock.getCurrentRecord().isInserted(): |
483 |
creditLimit1Block.newRecord() |
creditLimit1Block.newRecord() |
564 |
|
|
565 |
<trigger name="uidRollbackTrigger" type="NAMED"> |
<trigger name="uidRollbackTrigger" type="NAMED"> |
566 |
from hack import rollback |
from hack import rollback |
567 |
|
|
568 |
rollback(providerUID_IB_Block) |
rollback(providerUID_IB_Block) |
569 |
rollback(providerUID_CUIT_Block) |
rollback(providerUID_CUIT_Block) |
570 |
rollback(providerTaxProfileBlock) |
rollback(providerTaxProfileBlock) |
577 |
import gnue.common.GConditions as GConditions |
import gnue.common.GConditions as GConditions |
578 |
import string |
import string |
579 |
import hack |
import hack |
580 |
|
import printing |
|
def printField (field,size,justif='l'): |
|
|
if str(field).strip() == "None": |
|
|
field = "" |
|
|
if justif.lower() == 'l': |
|
|
return str(field).ljust(size) |
|
|
elif justif.lower() == 'r': |
|
|
return str(field).rjust(size) |
|
|
else: |
|
|
return str(field).center(size) |
|
|
|
|
|
def printTitle (field,size): |
|
|
return str(field).center(size) |
|
581 |
|
|
|
|
|
582 |
table = [] |
table = [] |
583 |
line = "\n\nListado de Provideres\n\n\n" |
table.append (printing.printDate ()) |
584 |
|
line = "\n\nListado de Proveedores\n\n\n" |
585 |
table.append(line) |
table.append(line) |
586 |
|
|
587 |
line = "| " + printTitle("Codigo",14) + " | " |
line = "| " + printing.printTitle("Codigo",14) + " | " |
588 |
line += printTitle("Nombre",20) + " | " |
line += printing.printTitle("Nombre",20) + " | " |
589 |
line += printTitle("Direccion",20) + " | " |
line += printing.printTitle("Direccion",20) + " | " |
590 |
line += printTitle("Telefono",20) + " |" |
line += printing.printTitle("Telefono",20) + " |" |
591 |
lineLen = len(line) |
lineLen = len(line) |
592 |
table.append(line) |
table.append(line) |
593 |
|
|
627 |
addressResulSet = printAddressDataSource.createResultSet(addressCondition) |
addressResulSet = printAddressDataSource.createResultSet(addressCondition) |
628 |
anAddress = addressResulSet.firstRecord() |
anAddress = addressResulSet.firstRecord() |
629 |
addresses = [] |
addresses = [] |
630 |
|
|
631 |
while anAddress: |
while anAddress: |
632 |
addresses.append(addressResulSet.current.getField("address")) |
addresses.append(addressResulSet.current.getField("address")) |
633 |
# para que no me de error si el campo esta vacio |
# para que no me de error si el campo esta vacio |
634 |
anAddress = addressResulSet.nextRecord() |
anAddress = addressResulSet.nextRecord() |
635 |
|
|
636 |
# ahora telefono es una direccion de address_type = '2' |
# ahora telefono es una direccion de address_type = '2' |
637 |
|
|
638 |
addressCondition = GConditions.GCondition() |
addressCondition = GConditions.GCondition() |
651 |
telephones.append(telephoneResulSet.current.getField("address") ) |
telephones.append(telephoneResulSet.current.getField("address") ) |
652 |
# para que no me de error si el campo esta vacio |
# para que no me de error si el campo esta vacio |
653 |
anTelephone = telephoneResulSet.nextRecord() |
anTelephone = telephoneResulSet.nextRecord() |
654 |
|
|
655 |
line = "| " +printField(providerResulSet.current.getField("_entity_uid_data.uid"),14)+ " | " |
line = "| " +printing.printField(providerResulSet.current.getField("_entity_uid_data.uid"),14)+ " | " |
656 |
line += printField(providerResulSet.current.getField("_entity_data.name"),20) + " | " |
line += printing.printField(providerResulSet.current.getField("_entity_data.name"),20) + " | " |
657 |
if addresses: |
if addresses: |
658 |
line += printField(addresses.pop(),20) + " | " |
line += printing.printField(addresses.pop(),20) + " | " |
659 |
else: |
else: |
660 |
line += printField(" ",20) + " | " |
line += printing.printField(" ",20) + " | " |
661 |
if telephones: |
if telephones: |
662 |
line += printField(telephones.pop(),20) + " |" |
line += printing.printField(telephones.pop(),20) + " |" |
663 |
else: |
else: |
664 |
line += printField(" ",20) + " | " |
line += printing.printField(" ",20) + " | " |
665 |
table.append(line) |
table.append(line) |
666 |
|
|
667 |
while addresses or telephones: |
while addresses or telephones: |
668 |
line = "| " + printField(" ",14) + " | " |
line = "| " + printing.printField(" ",14) + " | " |
669 |
line += printField(" ",20) + " | " |
line += printing.printField(" ",20) + " | " |
670 |
if addresses: |
if addresses: |
671 |
line += printField(addresses.pop(),20) + " | " |
line += printing.printField(addresses.pop(),20) + " | " |
672 |
else: |
else: |
673 |
line += printField(" ",20) + " | " |
line += printing.printField(" ",20) + " | " |
674 |
|
|
675 |
if telephones: |
if telephones: |
676 |
line += printField(telephones.pop(),20) + " | " |
line += printing.printField(telephones.pop(),20) + " | " |
677 |
else: |
else: |
678 |
line += printField(" ",20) + " |" |
line += printing.printField(" ",20) + " |" |
679 |
|
|
680 |
table.append(line) |
table.append(line) |
681 |
|
|
684 |
|
|
685 |
callTrigger('endWaitingModeTrigger') |
callTrigger('endWaitingModeTrigger') |
686 |
|
|
687 |
hack.previewPrint(table) |
printing.previewPrint(table) |
688 |
|
|
689 |
]]></trigger> |
]]></trigger> |
690 |
|
|
691 |
<!-- /impresion --> |
<!-- /impresion --> |
754 |
addressTypeResultBlock.processQuery() |
addressTypeResultBlock.processQuery() |
755 |
addressBlock.addressTypeNameEntry= str(addressTypeResultBlock.addressTypeResultNameEntry) |
addressBlock.addressTypeNameEntry= str(addressTypeResultBlock.addressTypeResultNameEntry) |
756 |
addressBlock.nextRecord() |
addressBlock.nextRecord() |
757 |
]]></trigger> |
]]></trigger> |
758 |
|
|
759 |
|
|
760 |
<!-- new_schema_begin --> |
<!-- new_schema_begin --> |
812 |
categoryAtributeResultBlock.processQuery() |
categoryAtributeResultBlock.processQuery() |
813 |
attributeBlock.categoryAtributeNameEntry= str(categoryAtributeResultBlock.categoryAtributeResultNameEntry) |
attributeBlock.categoryAtributeNameEntry= str(categoryAtributeResultBlock.categoryAtributeResultNameEntry) |
814 |
categoryTypeResultBlock.categoryTypeResultIdEntry = str(categoryAtributeResultBlock.categoryAtributeResultTypeIdEntry) |
categoryTypeResultBlock.categoryTypeResultIdEntry = str(categoryAtributeResultBlock.categoryAtributeResultTypeIdEntry) |
815 |
attributeBlock.categoryTypeIdEntry= str(categoryAtributeResultBlock.categoryAtributeResultTypeIdEntry) |
attributeBlock.categoryTypeIdEntry= str(categoryAtributeResultBlock.categoryAtributeResultTypeIdEntry) |
816 |
categoryTypeResultBlock.processQuery() |
categoryTypeResultBlock.processQuery() |
817 |
attributeBlock.categoryTypeNameEntry= str(categoryTypeResultBlock.categoryTypeResultNameEntry) |
attributeBlock.categoryTypeNameEntry= str(categoryTypeResultBlock.categoryTypeResultNameEntry) |
818 |
attributeBlock.nextRecord() |
attributeBlock.nextRecord() |
819 |
]]></trigger> |
]]></trigger> |
820 |
|
|
821 |
<!-- pantallites de busquede category--> |
<!-- pantallites de busquede category--> |
822 |
|
|
823 |
<trigger type="NAMED" name="callCategoryTypeTrigger"><![CDATA[ |
<trigger type="NAMED" name="callCategoryTypeTrigger"><![CDATA[ |
824 |
try: |
try: |
859 |
form._object.dispatchEvent(GFEvent('endWAIT')) |
form._object.dispatchEvent(GFEvent('endWAIT')) |
860 |
]]></trigger> |
]]></trigger> |
861 |
|
|
862 |
<!-- pantallites de busquede category_attribute--> |
<!-- pantallites de busquede category_attribute--> |
863 |
|
|
864 |
<trigger type="NAMED" name="callCategoryAtributeTrigger"><![CDATA[ |
<trigger type="NAMED" name="callCategoryAtributeTrigger"><![CDATA[ |
865 |
try: |
try: |
994 |
width="35" style="dropdown" foreign_key="taxProfileDataSource._table" |
width="35" style="dropdown" foreign_key="taxProfileDataSource._table" |
995 |
foreign_key_description="profile" /> |
foreign_key_description="profile" /> |
996 |
</block> |
</block> |
997 |
|
|
998 |
<block name="buttonBlock" datasource="focusDataSource" |
<block name="buttonBlock" datasource="focusDataSource" |
999 |
restrictInsert="y" transparentBlock="y"> |
restrictInsert="y" transparentBlock="y"> |
1000 |
<button x="1" y="17" trigger="commitTrigger" width="9" label="Aceptar" |
<button x="1" y="17" trigger="commitTrigger" width="9" label="Aceptar" |
1004 |
<button x="21" y="17" trigger="providerRollbackTrigger" width="9" label="Cancelar" |
<button x="21" y="17" trigger="providerRollbackTrigger" width="9" label="Cancelar" |
1005 |
name="providerRollbackBtn" height="1"/> |
name="providerRollbackBtn" height="1"/> |
1006 |
</block> |
</block> |
1007 |
|
|
1008 |
<!-- modified database --> |
<!-- modified database --> |
1009 |
<!-- entity types --> |
<!-- entity types --> |
1010 |
<block name="entityTypesBlock" datasource="entityTypesDataSource" > |
<block name="entityTypesBlock" datasource="entityTypesDataSource" > |
1011 |
<entry name="clientEntityTypeEntry" field="_entity_types_data.entity_type" |
<entry name="clientEntityTypeEntry" field="_entity_types_data.entity_type" |
1012 |
x="40" y="4" width="4" hidden=""/> |
x="40" y="4" width="4" hidden=""/> |
1013 |
<entry name="clientEntityEntry" field="_entity_types_data.entity" |
<entry name="clientEntityEntry" field="_entity_types_data.entity" |
1014 |
x="40" y="4" width="4" hidden=""/> |
x="40" y="4" width="4" hidden=""/> |
1015 |
</block> |
</block> |
1016 |
|
|
1017 |
</box> |
</box> |
1018 |
</page> |
</page> |
1019 |
<!-- /modified database --> |
<!-- /modified database --> |
1080 |
<!-- </block> --> |
<!-- </block> --> |
1081 |
<!-- </box> --> |
<!-- </box> --> |
1082 |
<!-- </page> --> |
<!-- </page> --> |
1083 |
|
|
1084 |
<page name="Límites de crédito"> |
<page name="Límites de crédito"> |
1085 |
<trigger type="Pre-Focusout" src="askForChangesTrigger"/> |
<trigger type="Pre-Focusout" src="askForChangesTrigger"/> |
1086 |
<box label="Límites de Crédito" |
<box label="Límites de Crédito" |
1120 |
<entry name="name" field="_entity_data.name" readonly="" |
<entry name="name" field="_entity_data.name" readonly="" |
1121 |
x="1" y="2" width="40"/> |
x="1" y="2" width="40"/> |
1122 |
</block> |
</block> |
1123 |
</box> |
</box> |
1124 |
<box label="" |
<box label="" |
1125 |
x="0" y="5" height="15" width="64"> |
x="0" y="5" height="15" width="64"> |
1126 |
<block name="providerUID_CUIT_Block" datasource="entityUID_CUIT_DataSource"> |
<block name="providerUID_CUIT_Block" datasource="entityUID_CUIT_DataSource"> |