182 |
<datasource database="papo" name="ownDocumentDataSource" table="own_document" |
<datasource database="papo" name="ownDocumentDataSource" table="own_document" |
183 |
order_by="date" /> |
order_by="date" /> |
184 |
|
|
185 |
|
<!-- Origen de datos que contiene el numero de la proxima factura --> |
186 |
|
<datasource name="branchDocumentDataSource" database="papo" |
187 |
|
table="branch_document, _branch_document_data" historytable="_branch_document_data" prequery=""> |
188 |
|
<condition> |
189 |
|
<and> |
190 |
|
<eq> |
191 |
|
<cfield name="branch_document.id"/> |
192 |
|
<cfield name="_branch_document_data._table"/> |
193 |
|
</eq> |
194 |
|
<!-- numero para las facturas de servicios --> |
195 |
|
<eq> |
196 |
|
<cfield name="_branch_document_data.document_type"/> |
197 |
|
<cconst value="4"/> |
198 |
|
</eq> |
199 |
|
<!-- que este activo --> |
200 |
|
<null> |
201 |
|
<cfield name="_branch_document_data._end_t"/> |
202 |
|
</null> |
203 |
|
</and> |
204 |
|
</condition> |
205 |
|
</datasource> |
206 |
|
|
207 |
<!-- Origen de datos que sirve para consultar el limite de crédito --> |
<!-- Origen de datos que sirve para consultar el limite de crédito --> |
208 |
<!-- asignado al cliente que se le factura --> |
<!-- asignado al cliente que se le factura --> |
209 |
|
|
334 |
genericBox("Esta excedido el Límite de Crédito",["Ok"]) |
genericBox("Esta excedido el Límite de Crédito",["Ok"]) |
335 |
else: |
else: |
336 |
if ownItemBlock.getRecordCount() > 0 and len(ownItemBlock.productCNameEntry) > 0: |
if ownItemBlock.getRecordCount() > 0 and len(ownItemBlock.productCNameEntry) > 0: |
337 |
|
|
338 |
|
ownDocumentBlock.numberEntry= str(branchDocumentBlock.documentNumberEntry) |
339 |
|
branchDocumentBlock.documentNumberEntry.atomicModify (lambda x: int(x)+1) |
340 |
|
|
341 |
ownDocumentBlock.dateEntry = str(tmpBlock.tmpDateEntry ) |
ownDocumentBlock.dateEntry = str(tmpBlock.tmpDateEntry ) |
342 |
if len(ownDocumentBlock.dateEntry) == 0: |
if len(ownDocumentBlock.dateEntry) == 0: |
343 |
ownDocumentBlock.dateEntry = ownDocumentDataSource.getTimeStamp() |
ownDocumentBlock.dateEntry = ownDocumentDataSource.getTimeStamp() |
374 |
|
|
375 |
setFocus(ownDocumentBlock.clientRecipientBox.clientEntry) |
setFocus(ownDocumentBlock.clientRecipientBox.clientEntry) |
376 |
|
|
|
callTrigger('rollbackTrigger') |
|
|
ownDocumentBlock.newRecord() |
|
|
tmpBlock.tmpDateEntry = ownDocumentDataSource.getTimeStamp() |
|
|
totalBlock.netoEntry = "" |
|
|
totalBlock.ivaEntry = "" |
|
|
totalBlock.totalEntry = "" |
|
|
payBlock.cashEntry = "" |
|
|
payBlock.ctaCteEntry = "" |
|
377 |
</trigger> |
</trigger> |
378 |
|
|
379 |
<trigger name="rollbackTrigger" type="NAMED"> |
<trigger name="rollbackTrigger" type="NAMED"> |
380 |
proceedingBlock.processRollback() |
for block in form._object._blockList: |
381 |
ownDocumentBlock.processRollback() |
block.processRollback () |
382 |
priceTypeBlock.processRollback() |
|
383 |
tmpProdResultBlock.processRollback() |
ownDocumentBlock.newRecord() |
384 |
prodSearchBlock.processRollback() |
branchDocumentBlock.initQuery() |
385 |
prodResultBlock.processRollback() |
branchDocumentBlock.processQuery() |
386 |
ownItemBlock.processRollback() |
|
387 |
ownDocumentProceedingBlock.processRollback() |
|
|
currencyMovementBlock.processRollback() |
|
|
totalBlock.processRollback() |
|
|
ownItemToUpdBlock.processRollback() |
|
|
creditLimit1Block.processRollback() |
|
|
payBlock.processRollback() |
|
388 |
tmpBlock.tmpDateEntry = ownDocumentDataSource.getTimeStamp() |
tmpBlock.tmpDateEntry = ownDocumentDataSource.getTimeStamp() |
389 |
totalBlock.netoEntry = "" |
totalBlock.netoEntry = "" |
390 |
totalBlock.ivaEntry = "" |
totalBlock.ivaEntry = "" |
448 |
<entry field="id" hidden="" name="idEntry" x="1" y="1"/> |
<entry field="id" hidden="" name="idEntry" x="1" y="1"/> |
449 |
<entry field="own_document_type" hidden="" name="typeEntry" x="1" y="1"/> |
<entry field="own_document_type" hidden="" name="typeEntry" x="1" y="1"/> |
450 |
<box height="6" label="Datos del Cliente" |
<box height="6" label="Datos del Cliente" |
451 |
name="clientRecipientBox" width="65" x="0" y="1"> |
name="clientRecipientBox" width="65" x="0" y="2"> |
452 |
|
|
453 |
<label name="clientLbl" text="Cliente" x="1" y="1" /> |
<label name="clientLbl" text="Cliente" x="1" y="1" /> |
454 |
|
|
649 |
<!-- <button x="65" y="7" trigger="quitTrigger" width="14" label="Salir" --> |
<!-- <button x="65" y="7" trigger="quitTrigger" width="14" label="Salir" --> |
650 |
<!-- name="quitBtn" height="1"/> --> |
<!-- name="quitBtn" height="1"/> --> |
651 |
</block> |
</block> |
652 |
|
|
653 |
<block name="tmpBlock" datasource="tmpValuesDataSource" transparentBlock=""> |
<block name="tmpBlock" datasource="tmpValuesDataSource" transparentBlock=""> |
654 |
<label name="dateLbl" rows="1" text="Fecha" x="1" y="7" /> |
<label name="dateLbl" rows="1" text="Fecha" x="1" y="8" /> |
655 |
<entry name="tmpDateEntry" style="label" typecast="date" |
<entry name="tmpDateEntry" style="label" typecast="date" |
656 |
rows="1" width="24" x="7" y="7"/> |
rows="1" width="24" x="7" y="8"/> |
657 |
|
</block> |
658 |
|
|
659 |
|
<!-- # de factura --> |
660 |
|
<block name="branchDocumentBlock" datasource="branchDocumentDataSource"> |
661 |
|
<label name="dateLabel" text="Número de Factura:" |
662 |
|
x="32" y="1"/> |
663 |
|
<entry name="documentNumberEntry" field="_branch_document_data.number" style="label" |
664 |
|
x="55" y="1" width="15"/> |
665 |
|
<entry name="documentTypeEntry" field="_branch_document_data.document_type" hidden="" |
666 |
|
x="50" y="1" width="15"/> |
667 |
|
<entry name="branchEntry" field="_branch_document_data.branch" hidden="" |
668 |
|
x="50" y="1" width="15"/> |
669 |
|
|
670 |
|
<!-- <button name="fixInvoiceNoButton" label="Corregir" trigger="fixInvoiceNoTrigger" --> |
671 |
|
<!-- x="66" y="1" width="10" height="1"/> --> |
672 |
</block> |
</block> |
673 |
|
|
674 |
</box> |
</box> |
675 |
|
|
676 |
<!-- ******************************** --> |
<!-- ******************************** --> |