111 |
</datasource> |
</datasource> |
112 |
|
|
113 |
<datasource name="providerSearchDataSource" database="papo" |
<datasource name="providerSearchDataSource" database="papo" |
114 |
table="_entity_data, _alien_entity_data, _persona_data, _provider_data, entity_type_uid_conf, |
table="_entity_data, _alien_entity_data, _persona_data, _persona_tax_profile_data, _tax_profile_data, |
115 |
|
_provider_data, entity_type_uid_conf, |
116 |
_entity_uid_data" order_by="_entity_data.name"> |
_entity_uid_data" order_by="_entity_data.name"> |
117 |
<condition> |
<condition> |
118 |
<and> |
<and> |
133 |
<cfield name="_entity_uid_data.entity"/> |
<cfield name="_entity_uid_data.entity"/> |
134 |
</eq> |
</eq> |
135 |
<eq> |
<eq> |
136 |
|
<cfield name="_entity_data._table"/> |
137 |
|
<cfield name="_persona_tax_profile_data.persona"/> |
138 |
|
</eq> |
139 |
|
<eq> |
140 |
|
<cfield name="_tax_profile_data._table"/> |
141 |
|
<cfield name="_persona_tax_profile_data.tax_profile"/> |
142 |
|
</eq> |
143 |
|
<eq> |
144 |
|
<cconst value="1"/> <!-- Corresponde al tipo de impuesto IVA --> |
145 |
|
<cfield name="_tax_profile_data.tax"/> |
146 |
|
</eq> |
147 |
|
<eq> |
148 |
<cconst value="8"/> |
<cconst value="8"/> |
149 |
<cfield name="entity_type_uid_conf.entity_type"/> |
<cfield name="entity_type_uid_conf.entity_type"/> |
150 |
</eq> |
</eq> |
629 |
</datasource> |
</datasource> |
630 |
|
|
631 |
<datasource database="papo" name="resultAlienDocumentDataSource" table="alien_document" |
<datasource database="papo" name="resultAlienDocumentDataSource" table="alien_document" |
632 |
order_by="date" /> |
order_by="date"> |
633 |
|
<condition> |
634 |
|
<or> |
635 |
|
<eq> |
636 |
|
<cfield name="alien_document.alien_document_type"/> |
637 |
|
<cconst value="2"/> |
638 |
|
</eq> |
639 |
|
<eq> |
640 |
|
<cfield name="alien_document.alien_document_type"/> |
641 |
|
<cconst value="10"/> |
642 |
|
</eq> |
643 |
|
<eq> |
644 |
|
<cfield name="alien_document.alien_document_type"/> |
645 |
|
<cconst value="11"/> |
646 |
|
</eq> |
647 |
|
</or> |
648 |
|
</condition> |
649 |
|
</datasource> |
650 |
|
|
651 |
<datasource database="papo" name="alienDocumentDataSource" table="alien_document" |
<datasource database="papo" name="alienDocumentDataSource" table="alien_document" |
652 |
order_by="date"> |
order_by="date"> |
653 |
<condition> |
<condition> |
654 |
<eq> |
<or> |
655 |
<cfield name="alien_document.alien_document_type"/> |
<eq> |
656 |
<cconst value="2"/> |
<cfield name="alien_document.alien_document_type"/> |
657 |
</eq> |
<cconst value="2"/> |
658 |
|
</eq> |
659 |
|
<eq> |
660 |
|
<cfield name="alien_document.alien_document_type"/> |
661 |
|
<cconst value="10"/> |
662 |
|
</eq> |
663 |
|
<eq> |
664 |
|
<cfield name="alien_document.alien_document_type"/> |
665 |
|
<cconst value="11"/> |
666 |
|
</eq> |
667 |
|
</or> |
668 |
</condition> |
</condition> |
669 |
</datasource> |
</datasource> |
670 |
|
|
671 |
<datasource database="papo" name="alienDocumentShowDataSource" table="alien_document" |
<datasource database="papo" name="alienDocumentShowDataSource" table="alien_document" |
672 |
order_by="date"> |
order_by="date"> |
673 |
<condition> |
<condition> |
674 |
<eq> |
<or> |
675 |
<cfield name="alien_document.alien_document_type"/> |
<eq> |
676 |
<cconst value="2"/> |
<cfield name="alien_document.alien_document_type"/> |
677 |
</eq> |
<cconst value="2"/> |
678 |
|
</eq> |
679 |
|
<eq> |
680 |
|
<cfield name="alien_document.alien_document_type"/> |
681 |
|
<cconst value="10"/> |
682 |
|
</eq> |
683 |
|
<eq> |
684 |
|
<cfield name="alien_document.alien_document_type"/> |
685 |
|
<cconst value="11"/> |
686 |
|
</eq> |
687 |
|
</or> |
688 |
</condition> |
</condition> |
689 |
</datasource> |
</datasource> |
690 |
|
|
798 |
</condition> |
</condition> |
799 |
</datasource> |
</datasource> |
800 |
|
|
801 |
<!-- <trigger name="onStartUpTrigger" type="ON-STARTUP"><![CDATA[ --> |
<trigger name="setInvoiceType" type="NAMED"><![CDATA[ |
802 |
<!-- setParameter('invoiceDate','value') --> |
invoiceType = str(alienDocumentBlock.invoiceTypeEntry).strip().lower() |
803 |
<!-- print getParameter('invoiceDate') --> |
if invoiceType == 'a': |
804 |
<!-- ]]></trigger> --> |
alienDocumentBlock.typeEntry = '4' |
805 |
|
elif invoiceType == 'b': |
806 |
|
alienDocumentBlock.typeEntry = '8' |
807 |
|
elif invoiceType == 'c': |
808 |
|
alienDocumentBlock.typeEntry = '9' |
809 |
|
else: |
810 |
|
alienDocumentBlock.typeEntry = '' |
811 |
|
]]></trigger> |
812 |
|
|
813 |
|
<trigger name="invoiceTypeValidation" type="NAMED"><![CDATA[ |
814 |
|
if str(alienDocumentBlock.invoiceTypeEntry).strip().lower() not in ('a','b','c'): |
815 |
|
genericBox('El tipo de factura es incorrecto',['Aceptar']) |
816 |
|
alienDocumentBlock.invoiceTypeEntry = "" |
817 |
|
else: |
818 |
|
alienDocumentBlock.invoiceTypeEntry = str(alienDocumentBlock.invoiceTypeEntry).strip().upper() |
819 |
|
callTrigger('setInvoiceType') |
820 |
|
]]></trigger> |
821 |
|
|
822 |
<trigger name="startWaitingModeTrigger" type="NAMED"><![CDATA[ |
<trigger name="startWaitingModeTrigger" type="NAMED"><![CDATA[ |
823 |
setStatusText("Procesando ...") |
setStatusText("Procesando ...") |
852 |
if not alienDocumentBlock.getCurrentRecord().isInserted(): |
if not alienDocumentBlock.getCurrentRecord().isInserted(): |
853 |
genericBox("No se puede grabar modificaciones",["Aceptar"]) |
genericBox("No se puede grabar modificaciones",["Aceptar"]) |
854 |
elif not str(alienDocumentBlock.numberEntry): |
elif not str(alienDocumentBlock.numberEntry): |
855 |
genericBox("Falta el número del comprobante",["Aceptar"]) |
genericBox("Falta el número de la factura",["Aceptar"]) |
856 |
elif not str(alienDocumentBlock.dateEntry): |
elif not str(alienDocumentBlock.dateEntry): |
857 |
genericBox("Falta la fecha del comprobante",["Aceptar"]) |
genericBox("Falta la fecha de la factura",["Aceptar"]) |
858 |
|
elif not str(alienDocumentBlock.invoiceTypeEntry): |
859 |
|
genericBox("Falta el tipo de factura",["Aceptar"]) |
860 |
else: |
else: |
861 |
if alienItemBlock.getRecordCount() > 0 and len(alienItemBlock.qtyEntry) > 0 and len(alienItemBlock.productEntry) > 0: |
if alienItemBlock.getRecordCount() > 0 and len(alienItemBlock.qtyEntry) > 0 and len(alienItemBlock.productEntry) > 0: |
862 |
proceedingBlock.processRollback() |
proceedingBlock.processRollback() |
864 |
proceedingBlock.dateEntry = proceedingDataSource.getTimeStamp() |
proceedingBlock.dateEntry = proceedingDataSource.getTimeStamp() |
865 |
|
|
866 |
alienDocumentBlock.idEntry.autofillBySequence('alien_document_id_seq') |
alienDocumentBlock.idEntry.autofillBySequence('alien_document_id_seq') |
867 |
alienDocumentBlock.typeEntry = "2" |
#typeValue = str(alienDocumentBlock.invoiceTypeEntry).strip().lower() |
868 |
|
#if typeValue == 'a': |
869 |
|
# alienDocumentBlock.typeEntry = "2" |
870 |
|
#elif typeValue == 'b': |
871 |
|
# alienDocumentBlock.typeEntry = "10" |
872 |
|
#elif typeValue == 'c': |
873 |
|
# alienDocumentBlock.typeEntry = "11" |
874 |
|
|
875 |
alienDocumentProceedingBlock.processRollback() |
alienDocumentProceedingBlock.processRollback() |
876 |
alienDocumentProceedingBlock.proceedingEntry = str(proceedingBlock.idEntry) |
alienDocumentProceedingBlock.proceedingEntry = str(proceedingBlock.idEntry) |
877 |
alienDocumentProceedingBlock.alienDocumentEntry = str(alienDocumentBlock.idEntry) |
alienDocumentProceedingBlock.alienDocumentEntry = str(alienDocumentBlock.idEntry) |
944 |
self.exit() |
self.exit() |
945 |
</trigger> |
</trigger> |
946 |
|
|
947 |
|
<trigger name="bringInvoiceTypeShowTrigger" type="NAMED"> |
948 |
|
typeInvoice = int(str(alienDocumentShowBlock.typeEntry)) |
949 |
|
result = "" |
950 |
|
if typeInvoice == 2: |
951 |
|
result = "A" |
952 |
|
elif typeInvoice == 10: |
953 |
|
result = "B" |
954 |
|
elif typeInvoice == 11: |
955 |
|
result = "C" |
956 |
|
alienDocumentShowBlock.invoiceTypeEntry = result |
957 |
|
|
958 |
|
</trigger> |
959 |
|
|
960 |
<trigger name="totalCalcShowTrigger" type="NAMED"> |
<trigger name="totalCalcShowTrigger" type="NAMED"> |
961 |
import hack |
import hack |
962 |
|
|
1043 |
<trigger name="searchTrigger" type="NAMED"> |
<trigger name="searchTrigger" type="NAMED"> |
1044 |
resultBlock.processRollback() |
resultBlock.processRollback() |
1045 |
resultBlock.initQuery() |
resultBlock.initQuery() |
1046 |
resultBlock.typeREntry = "2" |
#resultBlock.typeREntry = "2" |
1047 |
resultBlock.providerREntry = str(alienDocumentSearchBlock.providerSEntry) |
resultBlock.providerREntry = str(alienDocumentSearchBlock.providerSEntry) |
1048 |
resultBlock.transportREntry = str(alienDocumentSearchBlock.transportSEntry) |
resultBlock.transportREntry = str(alienDocumentSearchBlock.transportSEntry) |
1049 |
resultBlock.salesPersonREntry = str(alienDocumentSearchBlock.salesPersonSEntry) |
resultBlock.salesPersonREntry = str(alienDocumentSearchBlock.salesPersonSEntry) |
1113 |
alienDocumentSearchBlock.providerNameSEntry = str(providerResultBlock.providerNameEntry) |
alienDocumentSearchBlock.providerNameSEntry = str(providerResultBlock.providerNameEntry) |
1114 |
alienDocumentSearchBlock.providerSEntry = str(providerResultBlock.idEntry) |
alienDocumentSearchBlock.providerSEntry = str(providerResultBlock.idEntry) |
1115 |
else: |
else: |
1116 |
|
import hack |
1117 |
|
|
1118 |
alienDocumentBlock.providerCodeSEntry = str(providerResultBlock.providerCodeEntry) |
alienDocumentBlock.providerCodeSEntry = str(providerResultBlock.providerCodeEntry) |
1119 |
alienDocumentBlock.providerNameSEntry = str(providerResultBlock.providerNameEntry) |
alienDocumentBlock.providerNameSEntry = str(providerResultBlock.providerNameEntry) |
1120 |
alienDocumentBlock.providerEntry = str(providerResultBlock.idEntry) |
alienDocumentBlock.providerEntry = str(providerResultBlock.idEntry) |
1121 |
|
clientIvaTaxProfle = 1 # hay que corregir y averiguar la condicion correcta |
1122 |
|
providerIvaTaxProfile = int(str(providerResultBlock.providerIvaTaxProfileEntry)) |
1123 |
|
alienDocumentBlock.invoiceTypeEntry = hack.calcInvoiceType(clientIvaTaxProfle, providerIvaTaxProfile) |
1124 |
|
callTrigger('invoiceTypeValidation') |
1125 |
</trigger> |
</trigger> |
1126 |
|
|
1127 |
<trigger name="transportSearchPage1Trigger" type="NAMED"> |
<trigger name="transportSearchPage1Trigger" type="NAMED"> |
1392 |
<!-- Página de Consulta/borrado de facturas --> |
<!-- Página de Consulta/borrado de facturas --> |
1393 |
<page name="Factura de Proveedor (Consulta/borrado)"> |
<page name="Factura de Proveedor (Consulta/borrado)"> |
1394 |
<trigger type="PRE-FOCUSIN" src="resultFocusOutTrigger" /> |
<trigger type="PRE-FOCUSIN" src="resultFocusOutTrigger" /> |
1395 |
|
<trigger type="PRE-FOCUSIN" src="bringInvoiceTypeShowTrigger" /> |
1396 |
<trigger type="PRE-FOCUSIN" src="totalCalcShowTrigger" /> |
<trigger type="PRE-FOCUSIN" src="totalCalcShowTrigger" /> |
1397 |
<box height="12" label="Factura de Productos de Proveedor" |
<box height="12" label="Factura de Productos de Proveedor" |
1398 |
name="invoiceHeaderBox" width="107" x="0" y="0"> |
name="invoiceHeaderBox" width="107" x="0" y="0"> |
1448 |
<entry field="date" name="dateEntry" typecast="date" |
<entry field="date" name="dateEntry" typecast="date" |
1449 |
rows="1" width="22" x="22" y="9" style="label"/> |
rows="1" width="22" x="22" y="9" style="label"/> |
1450 |
|
|
1451 |
<label name="guideNumberLbl" text="Número de guía" x="48" y="8" /> |
<label name="invoiceTypeLbl" text="Tipo" x="48" y="8" /> |
1452 |
<entry field="guide_number" name="guideNumerEntry" width="20" x="48" y="9" style="label"/> |
<entry name="invoiceTypeEntry" width="4" x="48" y="9" readonly="t" style="label"/> |
1453 |
|
|
1454 |
|
<label name="guideNumberLbl" text="Número de guía" x="53" y="8" /> |
1455 |
|
<entry field="guide_number" name="guideNumerEntry" width="20" x="53" y="9" style="label"/> |
1456 |
|
|
1457 |
<label name="bundlesLbl" text="Bultos" x="69" y="8" /> |
<label name="bundlesLbl" text="Bultos" x="74" y="8" /> |
1458 |
<entry field="bundles" name="bundlesEntry" width="10" x="69" y="9" style="label"/> |
<entry field="bundles" name="bundlesEntry" width="10" x="74" y="9" style="label"/> |
1459 |
|
|
1460 |
</block> |
</block> |
1461 |
</box> |
</box> |
1537 |
<button x="51" y="24" trigger="deleteTrigger" width="10" label="Borrar" |
<button x="51" y="24" trigger="deleteTrigger" width="10" label="Borrar" |
1538 |
name="deleteBtn" height="1"/> |
name="deleteBtn" height="1"/> |
1539 |
|
|
1540 |
<!-- <button x="100" y="100" trigger="okTrigger" width="10" label="Ok" --> |
<!-- <button x="100" y="100" trigger="okTrigger" width="10" label='Aceptar' --> |
1541 |
<!-- name="deleteBtn" height="1"/> --> |
<!-- name="deleteBtn" height="1"/> --> |
1542 |
|
|
1543 |
</block> |
</block> |
1545 |
|
|
1546 |
<!-- Página de carga de facturas --> |
<!-- Página de carga de facturas --> |
1547 |
<page name="Factura de Proveedor (Alta)"> |
<page name="Factura de Proveedor (Alta)"> |
1548 |
<!-- <trigger type="PRE-FOCUSIN" src="totalCalcTrigger" /> --> |
<!-- <trigger type="PRE-FOCUSIN" name="preFocusInPage3"> --> |
1549 |
|
<!-- </trigger> --> |
1550 |
<box height="12" label="Factura de Productos de Proveedor" |
<box height="12" label="Factura de Productos de Proveedor" |
1551 |
name="invoiceHeaderBox" width="107" x="0" y="0"> |
name="invoiceHeaderBox" width="107" x="0" y="0"> |
1552 |
|
|
1647 |
<button x="44" y="9" trigger="toDayTrigger" width="4" label="hoy" |
<button x="44" y="9" trigger="toDayTrigger" width="4" label="hoy" |
1648 |
name="dateBtn" height="1"/> |
name="dateBtn" height="1"/> |
1649 |
|
|
1650 |
<label name="guideNumberLbl" text="Número de guía" x="48" y="8" /> |
<label name="invoiceTypeLbl" text="Tipo" x="48" y="8" /> |
1651 |
<entry field="guide_number" name="guideNumerEntry" width="20" x="48" y="9"/> |
<entry name="invoiceTypeEntry" width="4" x="48" y="9"> |
1652 |
|
<trigger type="PRE-FOCUSOUT" src="invoiceTypeValidation"/> |
1653 |
|
</entry> |
1654 |
|
|
1655 |
|
<label name="guideNumberLbl" text="Número de guía" x="53" y="8" /> |
1656 |
|
<entry field="guide_number" name="guideNumerEntry" width="20" x="53" y="9"/> |
1657 |
|
|
1658 |
<label name="bundlesLbl" text="Bultos" x="69" y="8" /> |
<label name="bundlesLbl" text="Bultos" x="74" y="8" /> |
1659 |
<entry field="bundles" name="bundlesEntry" width="10" x="69" y="9"/> |
<entry field="bundles" name="bundlesEntry" width="10" x="74" y="9"/> |
1660 |
|
|
1661 |
</block> |
</block> |
1662 |
</box> |
</box> |
1805 |
<entry name="idEntry" field="_entity_data.id" hidden="" x="1" y="1" width="12"/> |
<entry name="idEntry" field="_entity_data.id" hidden="" x="1" y="1" width="12"/> |
1806 |
<entry name="providerCodeEntry" field="_entity_uid_data.uid" x="1" y="1" width="12" hidden=""/> |
<entry name="providerCodeEntry" field="_entity_uid_data.uid" x="1" y="1" width="12" hidden=""/> |
1807 |
<entry name="providerNameEntry" field="_entity_data.name" x="1" y="1" width="12" hidden=""/> |
<entry name="providerNameEntry" field="_entity_data.name" x="1" y="1" width="12" hidden=""/> |
1808 |
|
<entry name="providerIvaTaxProfileEntry" field="_persona_tax_profile_data.tax_profile" x="1" y="1" width="12" hidden=""/> |
1809 |
</block> |
</block> |
1810 |
<block name="transportResultBlock" datasource="providerSearchDataSource"> |
<block name="transportResultBlock" datasource="providerSearchDataSource"> |
1811 |
<entry name="idEntry" field="_entity_data.id" hidden="" x="1" y="1" width="12"/> |
<entry name="idEntry" field="_entity_data.id" hidden="" x="1" y="1" width="12"/> |