3 |
<form xmlns:neb="http://luca.org.ar/dtd/neb" |
<form xmlns:neb="http://luca.org.ar/dtd/neb" |
4 |
xmlns:lam="http://luca.org.ar/dtd/lam" |
xmlns:lam="http://luca.org.ar/dtd/lam" |
5 |
tabbed="top" title="Proveedores" height="20" width="84"> |
tabbed="top" title="Proveedores" height="20" width="84"> |
6 |
<!-- <maintoolbar enabled=""/> --> |
<neb:Sub neb:src="alien_entity.nebc" |
7 |
<datasource name="focusDataSource" cache="1"/> |
entity_type = "8" |
8 |
<datasource name="searchDataSource" cache="1"/> |
entity_table = "provider" |
9 |
<datasource name="providerResultDataSource" database="papo" |
entity_name = "Proveedor" |
10 |
table="_entity_data, _alien_entity_data, _persona_data, _provider_data, _entity_uid_data" |
/> |
|
order_by="_entity_data.name"> |
|
|
<condition> |
|
|
<and> |
|
|
<eq> |
|
|
<cfield name="_entity_data._table"/> |
|
|
<cfield name="_alien_entity_data.entity"/> |
|
|
</eq> |
|
|
<eq> |
|
|
<cfield name="_alien_entity_data._table"/> |
|
|
<cfield name="_persona_data.alien_entity"/> |
|
|
</eq> |
|
|
<eq> |
|
|
<cfield name="_persona_data._table"/> |
|
|
<cfield name="_provider_data.persona"/> |
|
|
</eq> |
|
|
<eq> |
|
|
<cfield name="_entity_data._table"/> |
|
|
<cfield name="_entity_uid_data.entity"/> |
|
|
</eq> |
|
|
<eq> |
|
|
<cconst value="8"/> |
|
|
<cfield name="entity_type_uid_conf.entity_type"/> |
|
|
</eq> |
|
|
<eq> |
|
|
<cfield name="_entity_uid_data.entity_uid_type"/> |
|
|
<cfield name="entity_type_uid_conf.entity_uid_type"/> |
|
|
</eq> |
|
|
|
|
|
<null> |
|
|
<cfield name="_entity_data._end_t"/> |
|
|
</null> |
|
|
<null> |
|
|
<cfield name="_alien_entity_data._end_t"/> |
|
|
</null> |
|
|
<null> |
|
|
<cfield name="_persona_data._end_t"/> |
|
|
</null> |
|
|
<null> |
|
|
<cfield name="_provider_data._end_t"/> |
|
|
</null> |
|
|
<null> |
|
|
<cfield name="_entity_uid_data._end_t"/> |
|
|
</null> |
|
|
</and> |
|
|
</condition> |
|
|
</datasource> |
|
|
<!-- abm --> |
|
|
<datasource name="providerDataSource" database="papo" |
|
|
table="entity, _entity_data, alien_entity, _alien_entity_data, persona, _persona_data, provider, _provider_data" |
|
|
historytable="_entity_data, _alien_entity_data, _persona_data, _provider_data"> |
|
|
<condition> |
|
|
<and> |
|
|
<eq> |
|
|
<cfield name="entity.id"/> |
|
|
<cfield name="_entity_data._table"/> |
|
|
</eq> |
|
|
<eq> |
|
|
<cfield name="alien_entity.id"/> |
|
|
<cfield name="_alien_entity_data._table"/> |
|
|
</eq> |
|
|
<eq> |
|
|
<cfield name="persona.id"/> |
|
|
<cfield name="_persona_data._table"/> |
|
|
</eq> |
|
|
<eq> |
|
|
<cfield name="provider.id"/> |
|
|
<cfield name="_provider_data._table"/> |
|
|
</eq> |
|
|
<eq> |
|
|
<cfield name="entity.id"/> |
|
|
<cfield name="_alien_entity_data.entity"/> |
|
|
</eq> |
|
|
<eq> |
|
|
<cfield name="alien_entity.id"/> |
|
|
<cfield name="_persona_data.alien_entity"/> |
|
|
</eq> |
|
|
<eq> |
|
|
<cfield name="persona.id"/> |
|
|
<cfield name="_provider_data.persona"/> |
|
|
</eq> |
|
|
<null> |
|
|
<cfield name="_entity_data._end_t"/> |
|
|
</null> |
|
|
<null> |
|
|
<cfield name="_alien_entity_data._end_t"/> |
|
|
</null> |
|
|
<null> |
|
|
<cfield name="_persona_data._end_t"/> |
|
|
</null> |
|
|
<null> |
|
|
<cfield name="_provider_data._end_t"/> |
|
|
</null> |
|
|
</and> |
|
|
</condition> |
|
|
</datasource> |
|
|
<!-- parte de multi entities --> |
|
|
<datasource name="entityTypesDataSource" database="papo" |
|
|
detaillink="_entity_types_data.entity" master="providerDataSource" |
|
|
masterlink="entity.id" table="entity_types, _entity_types_data" historytable="_entity_types_data"> |
|
|
<condition> |
|
|
<and> |
|
|
<eq> |
|
|
<cfield name="entity_types.id"/> |
|
|
<cfield name="_entity_types_data._table"/> |
|
|
</eq> |
|
|
<null> |
|
|
<cfield name="_entity_types_data._end_t"/> |
|
|
</null> |
|
|
</and> |
|
|
</condition> |
|
|
</datasource> |
|
|
|
|
|
<!-- limite de credito --> |
|
|
|
|
|
<datasource name="creditLimit1DataSource" database="papo" |
|
|
detaillink="_credit_limit_data.entity" master="providerDataSource" |
|
|
masterlink="entity.id" table="credit_limit, _credit_limit_data" historytable="_credit_limit_data"> |
|
|
<condition> |
|
|
<and> |
|
|
<eq> |
|
|
<cfield name="credit_limit.id"/> |
|
|
<cfield name="_credit_limit_data._table"/> |
|
|
</eq> |
|
|
<eq> |
|
|
<cfield name="_credit_limit_data.movement_type"/> |
|
|
<cconst value="1"/> |
|
|
</eq> |
|
|
<null> |
|
|
<cfield name="_credit_limit_data._end_t"/> |
|
|
</null> |
|
|
</and> |
|
|
</condition> |
|
|
</datasource> |
|
|
|
|
|
<datasource name="movementTypeDataSource" database="papo" table="_movement_type_data"> |
|
|
<condition> |
|
|
<null> |
|
|
<cfield name="_movement_type_data._end_t"/> |
|
|
</null> |
|
|
</condition> |
|
|
</datasource> |
|
|
|
|
|
<datasource name="entityUID_Code_DataSource" database="papo" |
|
|
detaillink="_entity_uid_data.entity" master="providerDataSource" |
|
|
masterlink="entity.id" table="entity_uid, _entity_uid_data" historytable="_entity_uid_data"> |
|
|
<condition> |
|
|
<and> |
|
|
<eq> |
|
|
<cfield name="entity_uid.id"/> |
|
|
<cfield name="_entity_uid_data._table"/> |
|
|
</eq> |
|
|
<eq> |
|
|
<cfield name="_entity_uid_data.entity_uid_type"/> |
|
|
<cconst value="3"/> |
|
|
</eq> |
|
|
<null> |
|
|
<cfield name="_entity_uid_data._end_t"/> |
|
|
</null> |
|
|
</and> |
|
|
</condition> |
|
|
</datasource> |
|
|
|
|
|
<datasource name="entityUID_CUIT_DataSource" database="papo" |
|
|
detaillink="_entity_uid_data.entity" master="providerDataSource" |
|
|
masterlink="entity.id" table="entity_uid, _entity_uid_data" historytable="_entity_uid_data"> |
|
|
<condition> |
|
|
<and> |
|
|
<eq> |
|
|
<cfield name="entity_uid.id"/> |
|
|
<cfield name="_entity_uid_data._table"/> |
|
|
</eq> |
|
|
<eq> |
|
|
<cfield name="_entity_uid_data.entity_uid_type"/> |
|
|
<cconst value="1"/> |
|
|
</eq> |
|
|
<null> |
|
|
<cfield name="_entity_uid_data._end_t"/> |
|
|
</null> |
|
|
</and> |
|
|
</condition> |
|
|
</datasource> |
|
|
|
|
|
<datasource name="entityUID_IB_DataSource" database="papo" |
|
|
detaillink="_entity_uid_data.entity" master="providerDataSource" |
|
|
masterlink="entity.id" table="entity_uid, _entity_uid_data" historytable="_entity_uid_data"> |
|
|
<condition> |
|
|
<and> |
|
|
<eq> |
|
|
<cfield name="entity_uid.id"/> |
|
|
<cfield name="_entity_uid_data._table"/> |
|
|
</eq> |
|
|
<eq> |
|
|
<cfield name="_entity_uid_data.entity_uid_type"/> |
|
|
<cconst value="2"/> |
|
|
</eq> |
|
|
<null> |
|
|
<cfield name="_entity_uid_data._end_t"/> |
|
|
</null> |
|
|
</and> |
|
|
</condition> |
|
|
</datasource> |
|
|
|
|
|
<datasource name="entityUIDTypeDataSource" database="papo" table="_entity_uid_type_data"> |
|
|
<condition> |
|
|
<null> |
|
|
<cfield name="_entity_uid_type_data._end_t"/> |
|
|
</null> |
|
|
</condition> |
|
|
</datasource> |
|
|
|
|
|
<!-- <datasource name="providerTaxProfileDataSource" database="papo" --> |
|
|
<!-- detaillink="_persona_tax_profile_data.persona" master="providerDataSource" --> |
|
|
<!-- masterlink="entity.id" table="persona_tax_profile, _persona_tax_profile_data" historytable="_persona_tax_profile_data"> --> |
|
|
<!-- <condition> --> |
|
|
<!-- <and> --> |
|
|
<!-- <eq> --> |
|
|
<!-- <cfield name="persona_tax_profile.id"/> --> |
|
|
<!-- <cfield name="_persona_tax_profile_data._table"/> --> |
|
|
<!-- </eq> --> |
|
|
<!-- <null> --> |
|
|
<!-- <cfield name="_persona_tax_profile_data._end_t"/> --> |
|
|
<!-- </null> --> |
|
|
<!-- </and> --> |
|
|
<!-- </condition> --> |
|
|
<!-- </datasource> --> |
|
|
|
|
|
<!-- <datasource name="taxProfileDataSource" database="papo" table="_tax_profile_data"> --> |
|
|
<!-- <condition> --> |
|
|
<!-- <and> --> |
|
|
<!-- <eq> --> |
|
|
<!-- <cfield name="_tax_profile_data.tax"/> --> |
|
|
<!-- <cconst value="1"/> --> |
|
|
<!-- </eq> --> |
|
|
<!-- <null> --> |
|
|
<!-- <cfield name="_tax_profile_data._end_t"/> --> |
|
|
<!-- </null> --> |
|
|
<!-- </and> --> |
|
|
<!-- </condition> --> |
|
|
<!-- </datasource> --> |
|
|
|
|
|
|
|
|
<datasource name="printProviderDataSource" database="papo" |
|
|
table="_entity_data, _alien_entity_data, _persona_data, _provider_data, entity_type_uid_conf, _entity_uid_data" |
|
|
order_by="_entity_data.name"> |
|
|
<condition> |
|
|
<and> |
|
|
<eq> |
|
|
<cfield name="_entity_data._table"/> |
|
|
<cfield name="_alien_entity_data.entity"/> |
|
|
</eq> |
|
|
<eq> |
|
|
<cfield name="_alien_entity_data._table"/> |
|
|
<cfield name="_persona_data.alien_entity"/> |
|
|
</eq> |
|
|
<eq> |
|
|
<cfield name="_persona_data._table"/> |
|
|
<cfield name="_provider_data.persona"/> |
|
|
</eq> |
|
|
<eq> |
|
|
<cfield name="_entity_data._table"/> |
|
|
<cfield name="_entity_uid_data.entity"/> |
|
|
</eq> |
|
|
<eq> |
|
|
<cconst value="8"/> |
|
|
<cfield name="entity_type_uid_conf.entity_type"/> |
|
|
</eq> |
|
|
<eq> |
|
|
<cfield name="_entity_uid_data.entity_uid_type"/> |
|
|
<cfield name="entity_type_uid_conf.entity_uid_type"/> |
|
|
</eq> |
|
|
<null> |
|
|
<cfield name="_entity_data._end_t"/> |
|
|
</null> |
|
|
<null> |
|
|
<cfield name="_alien_entity_data._end_t"/> |
|
|
</null> |
|
|
<null> |
|
|
<cfield name="_persona_data._end_t"/> |
|
|
</null> |
|
|
<null> |
|
|
<cfield name="_provider_data._end_t"/> |
|
|
</null> |
|
|
<null> |
|
|
<cfield name="_entity_uid_data._end_t"/> |
|
|
</null> |
|
|
</and> |
|
|
</condition> |
|
|
</datasource> |
|
|
|
|
|
<datasource name="printAddressDataSource" |
|
|
database="papo" table="_address_data"> |
|
|
<condition> |
|
|
<and> |
|
|
<null> |
|
|
<cfield name="_address_data._end_t"/> |
|
|
</null> |
|
|
</and> |
|
|
</condition> |
|
|
</datasource> |
|
|
|
|
|
<!-- address --> |
|
|
<datasource name="addressDataSource" |
|
|
database="papo" table="address, _address_data" historytable="_address_data" |
|
|
master="providerDataSource" masterlink="entity.id" detaillink="_address_data.entity"> |
|
|
<condition> |
|
|
<and> |
|
|
<eq> |
|
|
<cfield name="address.id"/> |
|
|
<cfield name="_address_data._table"/> |
|
|
</eq> |
|
|
<null> |
|
|
<cfield name="_address_data._end_t"/> |
|
|
</null> |
|
|
</and> |
|
|
</condition> |
|
|
</datasource> |
|
|
|
|
|
<datasource database="papo" name="addressTypeResultDataSource" |
|
|
table="address_type, _address_type_data" historytable="_address_type_data"> |
|
|
<condition> |
|
|
<and> |
|
|
<eq> |
|
|
<cfield name="address_type.id"/> |
|
|
<cfield name="_address_type_data._table"/> |
|
|
</eq> |
|
|
<null> |
|
|
<cfield name="_address_type_data._end_t"/> |
|
|
</null> |
|
|
</and> |
|
|
</condition> |
|
|
</datasource> |
|
|
|
|
|
<!-- categorias --> |
|
|
<!-- <datasource name="attributeDataSource" --> |
|
|
<!-- database="papo" table="entity_attribute, _entity_attribute_data" historytable="_entity_attribute_data" --> |
|
|
<!-- master="providerDataSource" masterlink="entity.id" detaillink="_entity_attribute_data.entity"> --> |
|
|
<!-- <condition> --> |
|
|
<!-- <and> --> |
|
|
<!-- <eq> --> |
|
|
<!-- <cfield name="entity_attribute.id"/> --> |
|
|
<!-- <cfield name="_entity_attribute_data._table"/> --> |
|
|
<!-- </eq> --> |
|
|
<!-- <null> --> |
|
|
<!-- <cfield name="_entity_attribute_data._end_t"/> --> |
|
|
<!-- </null> --> |
|
|
<!-- </and> --> |
|
|
<!-- </condition> --> |
|
|
<!-- </datasource> --> |
|
|
<!-- <datasource database="papo" name="categoryTypeResultDataSource" --> |
|
|
<!-- table="category_type, _category_type_data, _category_entity_type_data" historytable="_category_type_data"> --> |
|
|
<!-- <condition> --> |
|
|
<!-- <and> --> |
|
|
<!-- <eq> --> |
|
|
<!-- <cfield name="category_type.id"/> --> |
|
|
<!-- <cfield name="_category_type_data._table"/> --> |
|
|
<!-- </eq> --> |
|
|
<!-- <eq> --> |
|
|
<!-- <cconst value="8"/> --> |
|
|
<!-- <cfield name="_category_entity_type_data.entity_type"/> --> |
|
|
<!-- </eq> --> |
|
|
<!-- <eq> --> |
|
|
<!-- <cfield name="category_type.id"/> --> |
|
|
<!-- <cfield name="_category_entity_type_data.category_type"/> --> |
|
|
<!-- </eq> --> |
|
|
<!-- <null> --> |
|
|
<!-- <cfield name="_category_type_data._end_t"/> --> |
|
|
<!-- </null> --> |
|
|
<!-- <null> --> |
|
|
<!-- <cfield name="_category_entity_type_data._end_t"/> --> |
|
|
<!-- </null> --> |
|
|
<!-- </and> --> |
|
|
<!-- </condition> --> |
|
|
<!-- </datasource> --> |
|
|
|
|
|
<!-- <datasource database="papo" name="categoryAtributeResultDataSource" --> |
|
|
<!-- table="category_attribute, _category_attribute_data" historytable="_category_attribute_data"> --> |
|
|
<!-- <condition> --> |
|
|
<!-- <and> --> |
|
|
<!-- <eq> --> |
|
|
<!-- <cfield name="category_attribute.id"/> --> |
|
|
<!-- <cfield name="_category_attribute_data._table"/> --> |
|
|
<!-- </eq> --> |
|
|
<!-- <null> --> |
|
|
<!-- <cfield name="_category_attribute_data._end_t"/> --> |
|
|
<!-- </null> --> |
|
|
<!-- </and> --> |
|
|
<!-- </condition> --> |
|
|
<!-- </datasource> --> |
|
|
<!-- categorias --> |
|
|
|
|
|
<!-- TRIGGERS--> |
|
|
|
|
|
<trigger type="NAMED" name="providerPageFocusInTrigger"><![CDATA[ |
|
|
import hack |
|
|
if hack.emptyEntry(providerBlock.providerIdEntry): |
|
|
callTrigger ('account_planForId') |
|
|
]]></trigger> |
|
|
|
|
|
<!-- abm --> |
|
|
<trigger name="commitTrigger" type="NAMED"> |
|
|
isOk= 1 |
|
|
message= '' |
|
|
# mandatory fields |
|
|
if not str(providerBlock.nameEntry): |
|
|
message+= 'Debe ingresar un nombre\n' |
|
|
isOk= 0 |
|
|
if not str(providerTaxProfileBlock.taxProfileEntry): |
|
|
message+= 'Debe ingresar un categoría de IVA\n' |
|
|
isOk= 0 |
|
|
|
|
|
if isOk: |
|
|
if providerBlock.getCurrentRecord().isInserted(): |
|
|
if not creditLimit1Block.getCurrentRecord().isInserted(): |
|
|
creditLimit1Block.newRecord() |
|
|
creditLimit1Block.movementTypeEntry = 1 |
|
|
# creditLimit1Block.creditLimitEntry = "0.0" |
|
|
if not providerUID_CUIT_Block.getCurrentRecord().isInserted(): |
|
|
providerUID_CUIT_Block.newRecord() |
|
|
providerUID_CUIT_Block.uid_CUIT_TypeEntry = 1 |
|
|
if not providerUID_IB_Block.getCurrentRecord().isInserted(): |
|
|
providerUID_IB_Block.newRecord() |
|
|
providerUID_IB_Block.uid_IB_TypeEntry = 2 |
|
|
if not providerCodeBlock.getCurrentRecord().isInserted(): |
|
|
providerCodeBlock.newRecord() |
|
|
# 3 es Codigo |
|
|
providerCodeBlock.providerCodeType = 3 |
|
|
#providerTaxProfileBlock.newRecord() |
|
|
|
|
|
|
|
|
#providerBlock.entityTypeEntry = "8" |
|
|
try: |
|
|
postChangeAdvance = 0 |
|
|
providerBlock.postChanges() |
|
|
# someone explain this... |
|
|
providerBlock.jumpRecord(2) |
|
|
# ver nota en provider.gdf |
|
|
tmpId = str(providerBlock.providerIdEntry) |
|
|
providerBlock.clear() |
|
|
providerBlock.initQuery() |
|
|
providerBlock.providerIdEntry = tmpId |
|
|
providerBlock.processQuery() |
|
|
# modified database |
|
|
entityTypesBlock.providerEntityEntry = str(providerBlock.providerIdEntry) |
|
|
entityTypesBlock.providerEntityTypeEntry = 8 |
|
|
#entityTypesBlock.postChanges() |
|
|
# le doy de alta a las 4 direcciones basicas |
|
|
addressBlock.addressTypeIdEntry = 1 |
|
|
addressBlock.nextRecord() |
|
|
addressBlock.addressTypeIdEntry = 2 |
|
|
addressBlock.nextRecord() |
|
|
addressBlock.addressTypeIdEntry = 3 |
|
|
addressBlock.nextRecord() |
|
|
addressBlock.addressTypeIdEntry = 4 |
|
|
postChangeAdvance = 1 |
|
|
providerBlock.postChanges() |
|
|
commitConnection() |
|
|
except DBError, err: |
|
|
rollbackConnection() |
|
|
message = "Hay problemas para grabar " |
|
|
if postChangeAdvance == 0: |
|
|
message += "los datos del proveedor" |
|
|
elif postChangeAdvance == 1: |
|
|
message += "las direcciones" |
|
|
genericBox(message+"\n"+str(err),['Aceptar']) |
|
|
else: |
|
|
try: |
|
|
providerBlock.postChanges() |
|
|
commitConnection() |
|
|
except DBError, err: |
|
|
rollbackConnection() |
|
|
genericBox("Hay problemas para grabar los datos del proveedor\n"+str(err),['Aceptar']) |
|
|
else: |
|
|
form.genericBox (message+'Los datos no han sido grabados', ['Aceptar']) |
|
|
</trigger> |
|
|
|
|
|
<trigger name="providerDeleteTrigger" type="NAMED"> |
|
|
try: |
|
|
providerBlock.deleteRecord() |
|
|
providerBlock.postChanges() |
|
|
commitConnection() |
|
|
except DBError, err: |
|
|
rollbackConnection() |
|
|
genericBox("Hay problemas para borrar los datos del providere\n"+str(err),['Aceptar']) |
|
|
for block in [ providerBlock, providerCodeBlock, providerTaxProfileBlock, creditLimit1Block ]: |
|
|
block.clear() |
|
|
</trigger> |
|
|
|
|
|
<trigger name="providerRollbackTrigger" type="NAMED"> |
|
|
import hack |
|
|
creditLimit1Block.reset() |
|
|
providerUID_IB_Block.reset() |
|
|
providerUID_CUIT_Block.reset() |
|
|
providerTaxProfileBlock.reset() |
|
|
providerBlock.reset() |
|
|
callTrigger ('providerPageFocusInTrigger') |
|
|
</trigger> |
|
|
|
|
|
<trigger name="askForChangesTrigger" type="NAMED"> |
|
|
import hack |
|
|
hack.confirmPageChanges(self, 'commitTrigger', providerBlock) |
|
|
</trigger> |
|
|
|
|
|
<!-- modified database --> |
|
|
<!-- <trigger name="telephoneDeleteTrigger" type="NAMED"> --> |
|
|
<!-- telephoneBlock.deleteRecord() --> |
|
|
<!-- telephoneBlock.commit() --> |
|
|
<!-- </trigger> --> |
|
|
|
|
|
<!-- <trigger name="telephoneRollbackTrigger" type="NAMED"> --> |
|
|
<!-- import hack --> |
|
|
<!-- telephoneBlock.reset() --> |
|
|
<!-- </trigger> --> |
|
|
<!-- /modified database --> |
|
|
|
|
|
<trigger name="addressDeleteTrigger" type="NAMED"> |
|
|
try: |
|
|
addressBlock.deleteRecord() |
|
|
providerBlock.postChanges() |
|
|
commitConnection() |
|
|
except DBError, err: |
|
|
rollbackConnection() |
|
|
genericBox("Hay problemas para borrar las direcciones del proveedor\n"+str(err),['Aceptar']) |
|
|
for block in [ providerBlock, providerCodeBlock, providerTaxProfileBlock, creditLimit1Block ]: |
|
|
block.clear() |
|
|
</trigger> |
|
|
|
|
|
<trigger name="addressRollbackTrigger" type="NAMED"> |
|
|
import hack |
|
|
addressBlock.reset() |
|
|
callTrigger('addressTypeNameSearchTrigger') |
|
|
</trigger> |
|
|
<!-- /modified database --> |
|
|
|
|
|
|
|
|
<!-- impresión --> |
|
|
|
|
|
<trigger name="printTrigger" type="NAMED"><![CDATA[ |
|
|
callTrigger('startWaitingModeTrigger') |
|
|
import gnue.common.GConditions as GConditions |
|
|
import string |
|
|
import os |
|
|
import tempfile |
|
|
import hack |
|
|
import printing |
|
|
|
|
|
table = [] |
|
|
line = "<html><body><table><tbody>\n" |
|
|
line += "<tr><td valign='top'>Código</td>" |
|
|
line += "<td valign='top'>Nombre</td>" |
|
|
line += "<td valign='top'>Dirección</td>" |
|
|
line += "<td valign='top'>Teléfono</td></tr>\n" |
|
|
line += "<tr><td valign='top' colspan='4'>-------------------------------------------------------------------------------</td></tr>" |
|
|
table.append(line) |
|
|
|
|
|
if str(providerSearchBlock.searchCodeEntry) or str(providerSearchBlock.searchNameEntry): |
|
|
providerCondition = GConditions.GConditions() |
|
|
tmpAnd = GConditions.GCand(providerCondition) |
|
|
if str(providerSearchBlock.searchCodeEntry): |
|
|
eq1 = GConditions.GClike(tmpAnd) |
|
|
GConditions.GCField(eq1,"_entity_uid_data.uid") |
|
|
GConditions.GCConst(eq1,str(providerSearchBlock.searchCodeEntry)+'%') |
|
|
if str(providerSearchBlock.searchNameEntry): |
|
|
eq2 = GConditions.GClike(tmpAnd) |
|
|
GConditions.GCField(eq2,"_entity_data.name") |
|
|
GConditions.GCConst(eq2,str(providerSearchBlock.searchNameEntry)+'%') |
|
|
providerResulSet = printProviderDataSource.createResultSet(providerCondition) |
|
|
else: |
|
|
providerResulSet = printProviderDataSource.createResultSet() |
|
|
|
|
|
more = providerResulSet.firstRecord(); |
|
|
|
|
|
while more: |
|
|
#agregar condicion de busquedq de direccion |
|
|
|
|
|
addressCondition = GConditions.GCondition() |
|
|
tmpAnd = GConditions.GCand(addressCondition) |
|
|
eq1 = GConditions.GCeq(tmpAnd) |
|
|
GConditions.GCField(eq1,"_address_data.entity") |
|
|
GConditions.GCConst(eq1,str(providerResulSet.current.getField("_entity_data._table"))) |
|
|
eq2 = GConditions.GCeq(tmpAnd) |
|
|
GConditions.GCField(eq2,"_address_data.address_type") |
|
|
GConditions.GCConst(eq2,"1") |
|
|
|
|
|
addressResulSet = printAddressDataSource.createResultSet(addressCondition) |
|
|
anAddress = addressResulSet.firstRecord() |
|
|
addresses = [] |
|
|
|
|
|
while anAddress: |
|
|
addresses.append(addressResulSet.current.getField("address")) |
|
|
anAddress = addressResulSet.nextRecord() |
|
|
# ahora telefono es una direccion de address_type = '2' |
|
|
|
|
|
addressCondition = GConditions.GCondition() |
|
|
tmpAnd = GConditions.GCand(addressCondition) |
|
|
eq1 = GConditions.GCeq(tmpAnd) |
|
|
GConditions.GCField(eq1,"_address_data.entity") |
|
|
GConditions.GCConst(eq1,str(providerResulSet.current.getField("_entity_data._table"))) |
|
|
eq2 = GConditions.GCeq(tmpAnd) |
|
|
GConditions.GCField(eq2,"_address_data.address_type") |
|
|
GConditions.GCConst(eq2,"2") |
|
|
telephoneResulSet = printAddressDataSource.createResultSet(addressCondition) |
|
|
anTelephone = telephoneResulSet.firstRecord() |
|
|
telephones = [] |
|
|
|
|
|
while anTelephone: |
|
|
telephones.append(telephoneResulSet.current.getField("address")) |
|
|
anTelephone = telephoneResulSet.nextRecord() |
|
|
|
|
|
line = "<tr><td valign='top'>" |
|
|
preValue = providerResulSet.current.getField("_entity_uid_data.uid") |
|
|
if preValue: |
|
|
line += preValue+"</td>" |
|
|
else: |
|
|
line += "</td>" |
|
|
|
|
|
line += "<td valign='top'>" |
|
|
preValue = providerResulSet.current.getField("_entity_data.name") |
|
|
if preValue: |
|
|
line += preValue+"</td>" |
|
|
else: |
|
|
line += "</td>" |
|
|
|
|
|
def fillHtmlCell(cellValue): |
|
|
if cellValue: |
|
|
preValue = cellValue.pop() |
|
|
if preValue: |
|
|
return "<td valign='top'>"+preValue+"</td>" |
|
|
else: |
|
|
return "<td valign='top'></td>" |
|
|
else: |
|
|
return "" |
|
|
|
|
|
line += fillHtmlCell(addresses) |
|
|
line += fillHtmlCell(telephones) |
|
|
line += "</tr>\n" |
|
|
|
|
|
table.append(line) |
|
|
|
|
|
while addresses or telephones: |
|
|
line = "<td valign='top'></td><td valign='top'></td>" |
|
|
line += fillHtmlCell(addresses) |
|
|
line += fillHtmlCell(telephones) |
|
|
line += "</tr>\n" |
|
|
table.append(line) |
|
|
|
|
|
|
|
|
line = "<tr><td valign='top'> </td></tr>" |
|
|
table.append(line) |
|
|
|
|
|
more = providerResulSet.nextRecord() |
|
|
|
|
|
table.append("</tbody></table></body></html>\n") |
|
|
callTrigger('endWaitingModeTrigger') |
|
|
htmlFileName= tempfile.mktemp (".html") |
|
|
txtFileName= tempfile.mktemp (".txt") |
|
|
if not os.path.isfile(htmlFileName): |
|
|
file = os.open(htmlFileName,os.O_CREAT,0644) |
|
|
os.close(file) |
|
|
if not os.path.isfile(txtFileName): |
|
|
file = os.open(txtFileName,os.O_CREAT,0644) |
|
|
os.close(file) |
|
|
|
|
|
htmlFile = os.open(htmlFileName,os.O_WRONLY,0644) |
|
|
txtFile = os.open(txtFileName,os.O_WRONLY,0644) |
|
|
|
|
|
for line in table: |
|
|
os.write(htmlFile,line) |
|
|
|
|
|
os.write(txtFile,printing.printDate ()) # Agrega la Fecha |
|
|
os.write(txtFile,"\n\nListado de Proveedores\n\n\n") # Agrega titulo |
|
|
os.system ("html2text "+htmlFileName+" >> "+txtFileName) |
|
|
os.remove(htmlFileName) |
|
|
os.close(txtFile) |
|
|
|
|
|
printing.previewPrintFromFile(txtFileName) |
|
|
|
|
|
os.remove(txtFileName) |
|
|
]]></trigger> |
|
|
|
|
|
<!-- /impresion --> |
|
|
|
|
|
<trigger name="startWaitingModeTrigger" type="NAMED"><![CDATA[ |
|
|
setStatusText("Procesando ...") |
|
|
try: |
|
|
# gnue version <= 0.4 |
|
|
from gnue.forms.GFEvent import GFEvent |
|
|
except ImportError: |
|
|
# gnue version >= 0.5 |
|
|
from gnue.common.events.Event import Event as GFEvent |
|
|
|
|
|
# busy clock |
|
|
self._object.dispatchEvent(GFEvent('beginWAIT')) |
|
|
]]></trigger> |
|
|
|
|
|
<trigger name="endWaitingModeTrigger" type="NAMED"><![CDATA[ |
|
|
try: |
|
|
# gnue version <= 0.4 |
|
|
from gnue.forms.GFEvent import GFEvent |
|
|
except ImportError: |
|
|
# gnue version >= 0.5 |
|
|
from gnue.common.events.Event import Event as GFEvent |
|
|
|
|
|
self._object.dispatchEvent(GFEvent('endWAIT')) |
|
|
setStatusText("Listo") |
|
|
]]></trigger> |
|
|
|
|
|
<trigger type="NAMED" name="searchTrigger"> |
|
|
try: |
|
|
from gnue.forms.GFEvent import GFEvent |
|
|
except ImportError: |
|
|
from gnue.common.events.Event import Event as GFEvent |
|
|
|
|
|
setStatusText('buscando...') |
|
|
|
|
|
self._object.dispatchEvent(GFEvent('beginWAIT')) |
|
|
|
|
|
providerResultBlock.clear() |
|
|
providerResultBlock.initQuery() |
|
|
if str(providerSearchBlock.searchCodeEntry): |
|
|
providerResultBlock.codeListEntry = str(providerSearchBlock.searchCodeEntry)+'%' |
|
|
if str(providerSearchBlock.searchNameEntry): |
|
|
providerResultBlock.nameListEntry = '%s%%' % providerSearchBlock.searchNameEntry |
|
|
providerResultBlock.processQuery() |
|
|
|
|
|
setStatusText('Aceptar') |
|
|
self._object.dispatchEvent(GFEvent('endWAIT')) |
|
|
|
|
|
if providerResultBlock.isEmpty(): |
|
|
providerSearchBlock.notificationEntry = ' no se encontraron registros' |
|
|
else: |
|
|
providerSearchBlock.notificationEntry ='%6d registros encontrados' % providerResultBlock.getRecordCount() |
|
|
</trigger> |
|
|
|
|
|
<!-- address --> |
|
|
<trigger name="addressTypeNameSearchTrigger" type="NAMED"><![CDATA[ |
|
|
print "trigger de busqueda de nombres" |
|
|
addressBlock.firstRecord() |
|
|
for index in range(addressBlock.getRecordCount()): |
|
|
if str(addressBlock.addressTypeIdEntry) != "": |
|
|
addressTypeResultBlock.clear() |
|
|
addressTypeResultBlock.initQuery() |
|
|
addressTypeResultBlock.addressTypeResultIdEntry= str(addressBlock.addressTypeIdEntry) |
|
|
addressTypeResultBlock.processQuery() |
|
|
addressBlock.addressTypeNameEntry= str(addressTypeResultBlock.addressTypeResultNameEntry) |
|
|
addressBlock.nextRecord() |
|
|
]]></trigger> |
|
|
|
|
|
|
|
|
<!-- new_schema_begin --> |
|
|
<trigger type="NAMED" name="callAddressTypeTrigger"><![CDATA[ |
|
|
try: |
|
|
# gnue version <= 0.4 |
|
|
from gnue.forms.GFEvent import GFEvent |
|
|
except ImportError: |
|
|
# gnue version >= 0.5 |
|
|
from gnue.common.events.Event import Event as GFEvent |
|
|
|
|
|
# busy clock |
|
|
form._object.dispatchEvent(GFEvent('beginWAIT')) |
|
|
setStatusText('buscando...') |
|
|
|
|
|
def setAddressType (recNo): |
|
|
if recNo>=0: |
|
|
addressTypeResultBlock.jumpRecord (recNo) |
|
|
addressBlock.addressTypeIdEntry= str(addressTypeResultBlock.addressTypeResultIdEntry) |
|
|
addressBlock.addressTypeNameEntry= str(addressTypeResultBlock.addressTypeResultNameEntry) |
|
|
|
|
|
# look for the name... |
|
|
addressTypeResultBlock.clear() |
|
|
addressTypeResultBlock.initQuery () |
|
|
addressTypeResultBlock.addressTypeResultNameEntry= str(addressBlock.addressTypeNameEntry)+'%' |
|
|
addressTypeResultBlock.processQuery () |
|
|
|
|
|
# are there too much results? |
|
|
resultCount= addressTypeResultBlock.getRecordCount () |
|
|
if resultCount>1: |
|
|
# do the select-man |
|
|
runForm ('addressTypeSelect.gfd', { |
|
|
'data':addressTypeResultBlock, |
|
|
'callback': setAddressType |
|
|
}) |
|
|
elif resultCount==1: |
|
|
setAddressType (0) |
|
|
|
|
|
setStatusText('Aceptar') |
|
|
form._object.dispatchEvent(GFEvent('endWAIT')) |
|
|
]]></trigger> |
|
|
<!-- new_schema_end --> |
|
|
|
|
|
<!-- categorias --> |
|
|
|
|
|
|
|
|
<!-- <trigger name="attributeNameSearchTrigger" type="NAMED"><![CDATA[ --> |
|
|
<!-- print "trigger de busqueda de nombres" --> |
|
|
<!-- attributeBlock.firstRecord() --> |
|
|
<!-- for index in range(attributeBlock.getRecordCount()): --> |
|
|
<!-- if str(attributeBlock.categoryAtributeIdEntry) != "": --> |
|
|
<!-- categoryAtributeResultBlock.clear() --> |
|
|
<!-- categoryAtributeResultBlock.initQuery() --> |
|
|
<!-- categoryTypeResultBlock.clear() --> |
|
|
<!-- categoryTypeResultBlock.initQuery() --> |
|
|
<!-- categoryAtributeResultBlock.categoryAtributeResultIdEntry= str(attributeBlock.categoryAtributeIdEntry) --> |
|
|
<!-- categoryAtributeResultBlock.processQuery() --> |
|
|
<!-- attributeBlock.categoryAtributeNameEntry= str(categoryAtributeResultBlock.categoryAtributeResultNameEntry) --> |
|
|
<!-- categoryTypeResultBlock.categoryTypeResultIdEntry = str(categoryAtributeResultBlock.categoryAtributeResultTypeIdEntry) --> |
|
|
<!-- attributeBlock.categoryTypeIdEntry= str(categoryAtributeResultBlock.categoryAtributeResultTypeIdEntry) --> |
|
|
<!-- categoryTypeResultBlock.processQuery() --> |
|
|
<!-- attributeBlock.categoryTypeNameEntry= str(categoryTypeResultBlock.categoryTypeResultNameEntry) --> |
|
|
<!-- attributeBlock.nextRecord() --> |
|
|
<!-- ]]></trigger> --> |
|
|
|
|
|
<!-- ### pantallites de busquede category ### --> |
|
|
|
|
|
<!-- <trigger type="NAMED" name="callCategoryTypeTrigger"><![CDATA[ --> |
|
|
<!-- try: --> |
|
|
<!-- # gnue version <= 0.4 --> |
|
|
<!-- from gnue.forms.GFEvent import GFEvent --> |
|
|
<!-- except ImportError: --> |
|
|
<!-- # gnue version >= 0.5 --> |
|
|
<!-- from gnue.common.events.Event import Event as GFEvent --> |
|
|
|
|
|
<!-- # busy clock --> |
|
|
<!-- form._object.dispatchEvent(GFEvent('beginWAIT')) --> |
|
|
<!-- setStatusText('buscando...') --> |
|
|
|
|
|
<!-- def setCategoryType (recNo): --> |
|
|
<!-- if recNo>=0: --> |
|
|
<!-- categoryTypeResultBlock.jumpRecord (recNo) --> |
|
|
<!-- attributeBlock.categoryTypeIdEntry= str(categoryTypeResultBlock.categoryTypeResultIdEntry) --> |
|
|
<!-- attributeBlock.categoryTypeNameEntry= str(categoryTypeResultBlock.categoryTypeResultNameEntry) --> |
|
|
|
|
|
<!-- # look for the name... --> |
|
|
<!-- categoryTypeResultBlock.clear() --> |
|
|
<!-- categoryTypeResultBlock.initQuery () --> |
|
|
<!-- categoryTypeResultBlock.categoryTypeResultNameEntry= str(attributeBlock.categoryTypeNameEntry)+'%' --> |
|
|
<!-- categoryTypeResultBlock.processQuery () --> |
|
|
|
|
|
<!-- # are there too much results? --> |
|
|
<!-- resultCount= categoryTypeResultBlock.getRecordCount () --> |
|
|
<!-- if resultCount>1: --> |
|
|
<!-- # do the select-man --> |
|
|
<!-- runForm ('categoryTypeSelect.gfd', { --> |
|
|
<!-- 'data':categoryTypeResultBlock, --> |
|
|
<!-- 'callback': setCategoryType --> |
|
|
<!-- }) --> |
|
|
<!-- elif resultCount==1: --> |
|
|
<!-- setCategoryType (0) --> |
|
|
|
|
|
<!-- setStatusText('Aceptar') --> |
|
|
<!-- form._object.dispatchEvent(GFEvent('endWAIT')) --> |
|
|
<!-- ]]></trigger> --> |
|
|
|
|
|
<!-- ### pantallites de busquede category_attribute ### --> |
|
|
|
|
|
<!-- <trigger type="NAMED" name="callCategoryAtributeTrigger"><![CDATA[ --> |
|
|
<!-- try: --> |
|
|
<!-- # gnue version <= 0.4 --> |
|
|
<!-- from gnue.forms.GFEvent import GFEvent --> |
|
|
<!-- except ImportError: --> |
|
|
<!-- # gnue version >= 0.5 --> |
|
|
<!-- from gnue.common.events.Event import Event as GFEvent --> |
|
|
|
|
|
<!-- # busy clock --> |
|
|
<!-- form._object.dispatchEvent(GFEvent('beginWAIT')) --> |
|
|
<!-- setStatusText('buscando...') --> |
|
|
|
|
|
<!-- def setCategoryAtribute (recNo): --> |
|
|
<!-- if recNo>=0: --> |
|
|
<!-- categoryAtributeResultBlock.jumpRecord (recNo) --> |
|
|
<!-- attributeBlock.categoryAtributeIdEntry= str(categoryAtributeResultBlock.categoryAtributeResultIdEntry) --> |
|
|
<!-- attributeBlock.categoryAtributeNameEntry= str(categoryAtributeResultBlock.categoryAtributeResultNameEntry) --> |
|
|
|
|
|
<!-- # look for the name... --> |
|
|
<!-- categoryAtributeResultBlock.clear() --> |
|
|
<!-- categoryAtributeResultBlock.initQuery () --> |
|
|
<!-- categoryAtributeResultBlock.categoryAtributeResultNameEntry= str(attributeBlock.categoryAtributeNameEntry)+'%' --> |
|
|
<!-- categoryAtributeResultBlock.categoryAtributeResultTypeIdEntry= str(attributeBlock.categoryTypeIdEntry) --> |
|
|
<!-- categoryAtributeResultBlock.processQuery () --> |
|
|
|
|
|
<!-- # are there too much results? --> |
|
|
<!-- resultCount= categoryAtributeResultBlock.getRecordCount () --> |
|
|
<!-- if resultCount>1: --> |
|
|
<!-- # do the select-man --> |
|
|
<!-- runForm ('categoryAtributeSelect.gfd', { --> |
|
|
<!-- 'data':categoryAtributeResultBlock, --> |
|
|
<!-- 'callback': setCategoryAtribute --> |
|
|
<!-- }) --> |
|
|
<!-- elif resultCount==1: --> |
|
|
<!-- setCategoryAtribute (0) --> |
|
|
|
|
|
<!-- setStatusText('Aceptar') --> |
|
|
<!-- form._object.dispatchEvent(GFEvent('endWAIT')) --> |
|
|
<!-- ]]></trigger> --> |
|
|
|
|
|
<!-- <trigger name="categoryDeleteTrigger" type="NAMED"><![CDATA[ --> |
|
|
<!-- attributeBlock.deleteRecord() --> |
|
|
<!-- attributeBlock.commit() --> |
|
|
<!-- ]]></trigger> --> |
|
|
<!-- <trigger name="categoryRollbackTrigger" type="NAMED"><![CDATA[ --> |
|
|
<!-- import hack --> |
|
|
<!-- attributeBlock.reset() --> |
|
|
<!-- ]]></trigger> --> |
|
|
<!-- /categorias --> |
|
|
|
|
|
<!-- PAGES --> |
|
|
|
|
|
<page name="Búsqueda"> |
|
|
<trigger type="Pre-Focusout"> |
|
|
providerBlock.clear() |
|
|
if providerResultBlock.getRecordCount() > 0 and not providerResultBlock.getCurrentRecord().isEmpty(): |
|
|
providerBlock.initQuery() |
|
|
providerBlock.providerIdEntry = ("%s" % providerResultBlock.providerIdREntry) |
|
|
providerBlock.processQuery() |
|
|
</trigger> |
|
|
|
|
|
<block name="providerSearchBlock" datasource="searchDataSource" transparentBlock="" restrictInsert=""> |
|
|
<label text="Datos a buscar:" x="1" y="1"/> |
|
|
<label text="Nombre o razón social" x="1" y="2" /> |
|
|
<label text=" Código" x="1" y="3" /> |
|
|
<entry name="searchNameEntry" x="22" y="2" width="55" /> |
|
|
<entry name="searchCodeEntry" x="22" y="3" width="35" /> |
|
|
<entry style="label" name="notificationEntry" x="1" y="19" width="67"/> |
|
|
<button x="58" y="3" trigger="searchTrigger" width="9" label="Buscar" |
|
|
name="searchBtn" height="1"/> |
|
|
<button x="69" y="3" trigger="printTrigger" width="10" label="Imprimir" |
|
|
name="printBtn" height="1"/> |
|
|
</block> |
|
|
|
|
|
<block name="providerResultBlock" datasource="providerResultDataSource"> |
|
|
<entry name="providerIdREntry" field="_entity_data._table" hidden="" x="1" y="1" width="20" /> |
|
|
<label text="Resultado" x="1" y="4" /> |
|
|
<entry name="codeListEntry" field="_entity_uid_data.uid" x="1" y="5" width="20" rows="14"/> |
|
|
<entry name="nameListEntry" field="_entity_data.name" x="21" y="5" width="58" rows="14"/> |
|
|
<scrollbar page="12" x="80" y="5" width="1" height="14"/> |
|
|
</block> |
|
|
</page> |
|
|
|
|
|
<page name="Gestión"> |
|
|
<trigger type="Pre-Focusout" src="askForChangesTrigger"/> |
|
|
<trigger type="Pre-Focusin" src="providerPageFocusInTrigger"/> |
|
|
<box label="Datos" |
|
|
x="0" y="0" height="22" width="82"> |
|
|
<block name="providerCodeBlock" datasource="entityUID_Code_DataSource" |
|
|
restrictInsert="y" transparentBlock="y"> |
|
|
<lam:box lam:boxtype="h"> |
|
|
<label text="Código de proveedor"/> |
|
|
</lam:box> |
|
|
|
|
|
<!-- 3 es Codigo interno --> |
|
|
<entry name="providerCodeType" field="_entity_uid_data.entity_uid_type" default="3" |
|
|
x="1" y="1" hidden="y"/> |
|
|
<lam:box lam:boxtype="h"> |
|
|
<entry name="providerCodeEntry" field="_entity_uid_data.uid" width="12"/> |
|
|
</lam:box> |
|
|
</block> |
|
|
|
|
|
<block name="providerBlock" datasource="providerDataSource" |
|
|
restrictInsert="y" transparentBlock="y"> |
|
|
<button x="42" y="2" width="9" label="Nuevo" trigger="newTrigger" |
|
|
name="newButton" height="1"> |
|
|
<trigger name="newTrigger" type="NAMED"><![CDATA[ |
|
|
from hack import confirmRollback |
|
|
|
|
|
confirmRollback (self, providerBlock, 'commitTrigger', providerBlock.nameEntry) |
|
|
]]></trigger> |
|
|
</button> |
|
|
<entry name="providerIdEntry" field="entity.id" hidden="" |
|
|
x="1" y="1" width="20"/> |
|
|
<lam:box lam:boxtype="h"> |
|
|
<label text="Nombre o Razón Social"/> |
|
|
</lam:box> |
|
|
<lam:box lam:boxtype="h"> |
|
|
<entry name="nameEntry" field="_entity_data.name" width="40"/> |
|
|
</lam:box> |
|
|
<!-- modified database --> |
|
|
<!-- <entry name="entityTypeEntry" field="_entity_data.entity_type" --> |
|
|
<!-- x="1" y="1" width="40" hidden=""/> --> |
|
|
<!-- /modified database --> |
|
|
<lam:box lam:boxtype="h"> |
|
|
<neb:Sub neb:src="inlineSearch.nebc" label="Cuenta contable" |
|
|
table="account_plan" target_field="_entity_data.account_plan" target_block="providerBlock" |
|
|
code_field="code" code_width="16" object_select_form="accountPlanSelect.gfd" object_form="accountPlan.gfd"/> |
|
|
<lam:box width="1"/> |
|
|
</lam:box> |
|
|
|
|
|
<label text="Observaciones" |
|
|
x="1" y="7"/> |
|
|
<entry name="obs" field="_entity_data.observations" |
|
|
x="1" y="8" width="25" height="5"/> |
|
|
</block> |
|
|
|
|
|
<block name="creditLimit1Block" datasource="creditLimit1DataSource"> |
|
|
<entry name="movementTypeEntry" field="_credit_limit_data.movement_type" hidden="" |
|
|
x="1" y="15" width="14"/> |
|
|
<label text="Límite de Crédito:" |
|
|
x="1" y="15"/> |
|
|
<entry name="creditLimitEntry" field="_credit_limit_data.credit_limit" typecast="number" |
|
|
displaymask="%0.2f" x="20" y="15" width="14"/> |
|
|
<label text="Categoría en IVA" x="35" y="7"/> |
|
|
</block> |
|
|
<neb:Sub neb:src="taxProfile.nebc" |
|
|
datasourceMater="providerDataSource" |
|
|
datasourceMasterlink="entity.id" |
|
|
entityTaxProfileBlock="providerTaxProfileBlock" |
|
|
taxProfileEntry="taxProfileEntry" entryX="35" entryY="8"/> |
|
|
<!-- <block name="providerTaxProfileBlock" datasource="providerTaxProfileDataSource" --> |
|
|
<!-- restrictInsert="y" transparentBlock="y"> --> |
|
|
<!-- <label text="Categoría en IVA" --> |
|
|
<!-- x="35" y="7"/> --> |
|
|
<!-- <entry x="1" y="1" field="_entity_uid_data.entity_uid_type" --> |
|
|
<!-- name="uid_CUIT_TypeEntry" hidden=""/> --> |
|
|
<!-- <entry x="35" y="8" field="_persona_tax_profile_data.tax_profile" --> |
|
|
<!-- name="taxProfileEntry" --> |
|
|
<!-- width="35" style="dropdown" foreign_key="taxProfileDataSource._table" --> |
|
|
<!-- foreign_key_description="profile" /> --> |
|
|
<!-- </block> --> |
|
|
|
|
|
<block name="providerUID_CUIT_Block" datasource="entityUID_CUIT_DataSource"> |
|
|
<label text="Número de CUIT" |
|
|
x="35" y="9"/> |
|
|
<entry x="1" y="1" field="_entity_uid_data.entity_uid_type" |
|
|
name="uid_CUIT_TypeEntry" hidden=""/> |
|
|
<entry name="uidEntry" field="_entity_uid_data.uid" |
|
|
x="35" y="10" width="24"> |
|
|
<trigger type="PRE-FOCUSOUT"><![CDATA[ |
|
|
from cuit import validate |
|
|
|
|
|
if not validate (str(providerUID_CUIT_Block.uidEntry)): |
|
|
form.genericBox ('El CUIT es inválido', ['Aceptar']) |
|
|
]]></trigger> |
|
|
</entry> |
|
|
</block> |
|
|
<block name="providerUID_IB_Block" datasource="entityUID_IB_DataSource"> |
|
|
<label text="Número de Ingresos Brutos" |
|
|
x="35" y="11"/> |
|
|
<entry x="35" y="11" field="_entity_uid_data.entity_uid_type" |
|
|
name="uid_IB_TypeEntry" hidden=""/> |
|
|
<entry name="uidEntry" field="_entity_uid_data.uid" |
|
|
x="35" y="12" width="24"/> |
|
|
</block> |
|
|
|
|
|
<block name="buttonBlock" datasource="focusDataSource" |
|
|
restrictInsert="y" transparentBlock="y"> |
|
|
<button x="1" y="17" trigger="commitTrigger" width="9" label="Aceptar" |
|
|
name="providerCommitBtn" height="1"/> |
|
|
<button x="11" y="17" trigger="providerDeleteTrigger" width="9" label="Borrar" |
|
|
name="providerDeleteBtn" height="1"/> |
|
|
<button x="21" y="17" trigger="providerRollbackTrigger" width="9" label="Cancelar" |
|
|
name="providerRollbackBtn" height="1"/> |
|
|
</block> |
|
|
<!-- entity types --> |
|
|
<block name="entityTypesBlock" datasource="entityTypesDataSource" > |
|
|
<entry name="providerEntityTypeEntry" field="_entity_types_data.entity_type" |
|
|
x="40" y="4" width="4" hidden=""/> |
|
|
<entry name="providerEntityEntry" field="_entity_types_data.entity" |
|
|
x="40" y="4" width="4" hidden=""/> |
|
|
</block> |
|
|
|
|
|
</box> |
|
|
</page> |
|
|
<!-- /modified database --> |
|
|
|
|
|
|
|
|
<!-- modified database --> |
|
|
<!-- <page name="Direcciones"> --> |
|
|
<!-- <trigger type="Pre-Focusout" src="askForChangesTrigger"/> --> |
|
|
<!-- <box label="Direcciones" --> |
|
|
<!-- x="0" y="0" height="5" width="64"> --> |
|
|
<!-- <block name="addressProviderBlock" datasource="providerDataSource"> --> |
|
|
<!-- <label text="Nombre o Razón Social" --> |
|
|
<!-- x="1" y="1"/> --> |
|
|
<!-- <entry name="name" field="_entity_data.name" readonly="" --> |
|
|
<!-- x="1" y="2" width="40"> --> |
|
|
<!-- </entry> --> |
|
|
<!-- </block> --> |
|
|
<!-- </box> --> |
|
|
<!-- <box label="Direcciones" --> |
|
|
<!-- x="0" y="5" height="15" width="64"> --> |
|
|
<!-- <block name="addressBlock" datasource="addressDataSource"> --> |
|
|
<!-- <label text="Direcciones" --> |
|
|
<!-- x="1" y="1"/> --> |
|
|
<!-- <entry name="address" field="_address_data.address" rows="4" --> |
|
|
<!-- x="1" y="2" width="39"/> --> |
|
|
<!-- <scrollbar page="4" --> |
|
|
<!-- x="41" y="2" width="1" height="4"/> --> |
|
|
<!-- <button x="1" y="12" trigger="commitTrigger" width="9" label="Aceptar" --> |
|
|
<!-- name="addressCommitBtn" height="1"/> --> |
|
|
<!-- <button x="11" y="12" trigger="addressDeleteTrigger" width="9" label="Borrar" --> |
|
|
<!-- name="addressDeleteBtn" height="1"/> --> |
|
|
<!-- <button x="21" y="12" trigger="addressRollbackTrigger" width="9" label="Cancelar" --> |
|
|
<!-- name="addressRollbackBtn" height="1"/> --> |
|
|
<!-- </block> --> |
|
|
<!-- </box> --> |
|
|
<!-- </page> --> |
|
|
|
|
|
<!-- <page name="Teléfonos"> --> |
|
|
<!-- <trigger type="Pre-Focusout" src="askForChangesTrigger"/> --> |
|
|
<!-- <box label="Teléfonos" --> |
|
|
<!-- x="0" y="0" height="5" width="64"> --> |
|
|
<!-- <block name="providerTelephoneBlock" datasource="providerDataSource"> --> |
|
|
<!-- <label text="Nombre o Razón Social" --> |
|
|
<!-- x="1" y="1"/> --> |
|
|
<!-- <entry name="name" field="_entity_data.name" readonly="" --> |
|
|
<!-- x="1" y="2" width="40"/> --> |
|
|
<!-- </block> --> |
|
|
<!-- </box> --> |
|
|
<!-- <box label="Teléfonos" --> |
|
|
<!-- x="0" y="5" height="15" width="64"> --> |
|
|
<!-- <block name="telephoneBlock" datasource="telephoneDataSource"> --> |
|
|
<!-- <label text="Teléfonos" --> |
|
|
<!-- x="1" y="1"/> --> |
|
|
<!-- <entry name="telephone" field="_telephone_data.telephone" rows="4" --> |
|
|
<!-- x="1" y="2" width="39"/> --> |
|
|
<!-- <scrollbar page="4" --> |
|
|
<!-- x="41" y="2" width="1" height="4"/> --> |
|
|
<!-- <button x="1" y="12" trigger="commitTrigger" width="9" label="Aceptar" --> |
|
|
<!-- name="telephoneCommitBtn" height="1"/> --> |
|
|
<!-- <button x="11" y="12" trigger="telephoneDeleteTrigger" width="9" label="Borrar" --> |
|
|
<!-- name="telephoneDeleteBtn" height="1"/> --> |
|
|
<!-- <button x="21" y="12" trigger="telephoneRollbackTrigger" width="9" label="Cancelar" --> |
|
|
<!-- name="telephoneRollbackBtn" height="1"/> --> |
|
|
<!-- </block> --> |
|
|
<!-- </box> --> |
|
|
<!-- </page> --> |
|
|
|
|
|
|
|
|
<!-- direcciones --> |
|
|
<page name="Direcciones"> |
|
|
<trigger type="Pre-Focusin" src="addressTypeNameSearchTrigger"/> |
|
|
<trigger type="Pre-Focusout" src="askForChangesTrigger"/> |
|
|
<box label="Direcciones" |
|
|
x="0" y="0" height="5" width="84"> |
|
|
<block name="addressProviderBlock" datasource="providerDataSource"> |
|
|
<label text="Nombre o Razón Social" |
|
|
x="1" y="1"/> |
|
|
<entry name="name" field="_entity_data.name" readonly="" |
|
|
x="1" y="2" width="40"> |
|
|
</entry> |
|
|
</block> |
|
|
</box> |
|
|
<box label="Direcciones" |
|
|
x="0" y="5" height="15" width="84"> |
|
|
<block name="addressBlock" datasource="addressDataSource"> |
|
|
<label text="type" x="1" y="1"/> |
|
|
<label text="valor" x="27" y="1"/> |
|
|
<label text="obsevacion" x="57" y="1"/> |
|
|
<entry name="addressTypeIdEntry" field="_address_data.address_type" rows="8" |
|
|
x="1" y="2" width="2" hidden="" /> |
|
|
<entry name="addressTypeNameEntry" rows="8" |
|
|
x="1" y="2" width="20"/> |
|
|
<entry name="addressValueEntry" field="_address_data.address" rows="8" |
|
|
x="30" y="2" width="30"/> |
|
|
<entry name="addressCommentEntry" field="_address_data.comment" rows="8" |
|
|
x="60" y="2" width="20"/> |
|
|
<scrollbar page="8" |
|
|
x="81" y="2" width="1" height="8"/> |
|
|
<button x="1" y="12" trigger="commitTrigger" width="9" label="Aceptar" |
|
|
name="addressCommitBtn" height="1"/> |
|
|
<button x="11" y="12" trigger="addressDeleteTrigger" width="9" label="Borrar" |
|
|
name="addressDeleteBtn" height="1"/> |
|
|
<button x="21" y="12" trigger="addressRollbackTrigger" width="9" label="Cancelar" |
|
|
name="addressRollbackBtn" height="1"/> |
|
|
<button x="22" y="2" trigger="callAddressTypeTrigger" width="7" label="Buscar" |
|
|
name="addressTypeBtn" height="8"/> |
|
|
</block> |
|
|
|
|
|
<block name="addressTypeResultBlock" datasource="addressTypeResultDataSource"> |
|
|
<entry name="addressTypeResultIdEntry" field="_address_type_data._table" |
|
|
x="75" y="4" width="2" hidden=""/> |
|
|
<entry name="addressTypeResultNameEntry" field="_address_type_data.name" |
|
|
x="78" y="4" width="20" hidden=""/> |
|
|
</block> |
|
|
</box> |
|
|
</page> |
|
|
<!-- categorias --> |
|
|
<!-- <page name="Categorias"> --> |
|
|
<!-- <trigger type="Pre-Focusin" src="attributeNameSearchTrigger"/> --> |
|
|
<!-- <box label="Direcciones" --> |
|
|
<!-- x="0" y="0" height="5" width="84"> --> |
|
|
<!-- <block name="categoryProviderBlock" datasource="providerDataSource"> --> |
|
|
<!-- <label text="Nombre o Razón Social" --> |
|
|
<!-- x="1" y="1"/> --> |
|
|
<!-- <entry name="categoryProviderName" field="_entity_data.name" readonly="" --> |
|
|
<!-- x="1" y="2" width="40"> --> |
|
|
<!-- </entry> --> |
|
|
<!-- </block> --> |
|
|
<!-- </box> --> |
|
|
<!-- <box label="Categorias" --> |
|
|
<!-- x="0" y="5" height="15" width="84"> --> |
|
|
<!-- <block name="attributeBlock" datasource="attributeDataSource"> --> |
|
|
<!-- <label text="category" x="1" y="1"/> --> |
|
|
<!-- <label text="attribute" x="30" y="1"/> --> |
|
|
<!-- <entry name="categoryTypeIdEntry" rows="8" --> |
|
|
<!-- x="1" y="2" hidden=""/> --> |
|
|
<!-- <entry name="categoryTypeNameEntry" rows="8" --> |
|
|
<!-- x="1" y="2" width="20"/> --> |
|
|
<!-- <entry name="categoryAtributeIdEntry" field="_entity_attribute_data.category_attribute" rows="8" --> |
|
|
<!-- x="23" y="2" hidden=""/> --> |
|
|
<!-- <entry name="categoryAtributeNameEntry" rows="8" --> |
|
|
<!-- x="30" y="2" width="20"/> --> |
|
|
<!-- <scrollbar page="8" --> |
|
|
<!-- x="60" y="2" width="1" height="8"/> --> |
|
|
<!-- <button x="1" y="12" trigger="commitTrigger" width="9" label="Aceptar" --> |
|
|
<!-- name="categoryCommitBtn" height="1"/> --> |
|
|
<!-- <button x="11" y="12" trigger="categoryDeleteTrigger" width="9" label="Borrar" --> |
|
|
<!-- name="categoryDeleteBtn" height="1"/> --> |
|
|
<!-- <button x="21" y="12" trigger="categoryRollbackTrigger" width="9" label="Cancelar" --> |
|
|
<!-- name="categoryRollbackBtn" height="1"/> --> |
|
|
<!-- <button x="22" y="2" trigger="callCategoryTypeTrigger" width="7" label="Buscar" --> |
|
|
<!-- name="categoryTypeBtn" height="8"/> --> |
|
|
<!-- <button x="51" y="2" trigger="callCategoryAtributeTrigger" width="7" label="Buscar" --> |
|
|
<!-- name="categoryAtributeBtn" height="8"/> --> |
|
|
<!-- </block> --> |
|
|
<!-- <block name="categoryTypeResultBlock" datasource="categoryTypeResultDataSource"> --> |
|
|
<!-- <entry name="categoryTypeResultIdEntry" field="_category_type_data._table" --> |
|
|
<!-- x="55" y="2" width="2" hidden=""/> --> |
|
|
<!-- <entry name="categoryTypeResultNameEntry" field="_category_type_data.name" --> |
|
|
<!-- x="58" y="2" width="20" hidden=""/> --> |
|
|
<!-- </block> --> |
|
|
<!-- <block name="categoryAtributeResultBlock" datasource="categoryAtributeResultDataSource"> --> |
|
|
<!-- <entry name="categoryAtributeResultIdEntry" field="_category_attribute_data._table" --> |
|
|
<!-- x="55" y="8" width="2" hidden=""/> --> |
|
|
<!-- <entry name="categoryAtributeResultTypeIdEntry" field="_category_attribute_data.category_type" --> |
|
|
<!-- x="58" y="8" width="2" hidden=""/> --> |
|
|
<!-- <entry name="categoryAtributeResultNameEntry" field="_category_attribute_data.name" --> |
|
|
<!-- x="61" y="8" width="20" hidden=""/> --> |
|
|
<!-- </block> --> |
|
|
<!-- </box> --> |
|
|
<!-- </page> --> |
|
|
<!-- /categorias --> |
|
|
|
|
11 |
</form> |
</form> |
12 |
|
|