154 |
|
|
155 |
<!-- Origen de datos que contiene el numero de la proxima factura --> |
<!-- Origen de datos que contiene el numero de la proxima factura --> |
156 |
<datasource name="branchDocumentDataSource" database="papo" |
<datasource name="branchDocumentDataSource" database="papo" |
157 |
table="branch_document, _branch_document_data" prequery=""> |
table="branch_document, _branch_document_data" historytable="_branch_document_data" prequery=""> |
158 |
<condition> |
<condition> |
159 |
<and> |
<and> |
160 |
<eq> |
<eq> |
303 |
# pleasePrint ('serviceInvoice', { 'id': str(ownDocumentBlock.idEntry) }) |
# pleasePrint ('serviceInvoice', { 'id': str(ownDocumentBlock.idEntry) }) |
304 |
# BUG: select the correct type of invoice? |
# BUG: select the correct type of invoice? |
305 |
# pleasePrint (self, 'p1', '1', 'serviceInvoice-discriminated', [ 'id='+str(ownDocumentBlock.idEntry) ]) |
# pleasePrint (self, 'p1', '1', 'serviceInvoice-discriminated', [ 'id='+str(ownDocumentBlock.idEntry) ]) |
306 |
|
|
307 |
pleasePrint (self, 'p1', '1', 'serviceInvoice', [ 'id='+str(ownDocumentBlock.idEntry) ]) |
pleasePrint (self, 'p1', '1', 'serviceInvoice', [ 'id='+str(ownDocumentBlock.idEntry) ]) |
308 |
callTrigger('rollbackTrigger') |
callTrigger('rollbackTrigger') |
309 |
]]></trigger> |
]]></trigger> |
329 |
block.processRollback () |
block.processRollback () |
330 |
|
|
331 |
ownDocumentBlock.newRecord () |
ownDocumentBlock.newRecord () |
332 |
|
branchDocumentBlock.initQuery() |
333 |
|
branchDocumentBlock.processQuery() |
334 |
|
|
335 |
dateBlock.dateEntry= ownDocumentDataSource.getTimeStamp () |
dateBlock.dateEntry= ownDocumentDataSource.getTimeStamp () |
336 |
totalBlock.totalEntry= "" |
totalBlock.totalEntry= "" |
337 |
paymentBlock.cashEntry= "" |
paymentBlock.cashEntry= "" |
342 |
from hack import a2f |
from hack import a2f |
343 |
|
|
344 |
|
|
|
# copy the date |
|
|
ownDocumentBlock.dateEntry= dateBlock.dateEntry |
|
|
ownDocumentBlock.numberEntry= branchDocumentBlock.documentNumberEntry |
|
|
branchDocumentBlock.documentNumberEntry.atomicModify (lambda x: x+1) |
|
|
|
|
345 |
currentCredit= a2f (calculatedValuesDataSource.creditLimitAmount) - \ |
currentCredit= a2f (calculatedValuesDataSource.creditLimitAmount) - \ |
346 |
a2f (ownDocumentBlock.clientRecipientBox.debtEntry) |
a2f (ownDocumentBlock.clientRecipientBox.debtEntry) |
347 |
|
|
348 |
if a2f (paymentBlock.ctaCteEntry)>currentCredit: |
if a2f (paymentBlock.ctaCteEntry) > currentCredit: |
349 |
genericBox ("Está excedido el Límite de Crédito",["Ok"]) |
genericBox ("Está excedido el Límite de Crédito",["Ok"]) |
350 |
else: |
else: |
351 |
if ownItemBlock.getRecordCount ()>0 and len (ownItemBlock.serviceEntry)>0: |
if ownItemBlock.getRecordCount () > 0 and len (ownItemBlock.serviceEntry) > 0: |
352 |
|
# copy the date |
353 |
|
ownDocumentBlock.dateEntry= str(dateBlock.dateEntry) |
354 |
|
ownDocumentBlock.numberEntry= str(branchDocumentBlock.documentNumberEntry) |
355 |
|
branchDocumentBlock.documentNumberEntry.atomicModify (lambda x: int(x)+1) |
356 |
|
|
357 |
# el form no esta vacio |
# el form no esta vacio |
358 |
if len(ownDocumentBlock.dateEntry)==0: |
if len(ownDocumentBlock.dateEntry)==0: |
359 |
ownDocumentBlock.dateEntry= ownDocumentDataSource.getTimeStamp () |
ownDocumentBlock.dateEntry= ownDocumentDataSource.getTimeStamp () |
595 |
x="1" y="1"/> |
x="1" y="1"/> |
596 |
<entry name="dateEntry" field="date" style="label" readonly="" typecast="date" |
<entry name="dateEntry" field="date" style="label" readonly="" typecast="date" |
597 |
x="7" y="1" width="10"/> |
x="7" y="1" width="10"/> |
598 |
<button name="fixDateButton" label="Corregir" trigger="fixDateTrigger" |
<!-- <button name="fixDateButton" label="Corregir" trigger="fixDateTrigger" --> |
599 |
x="18" y="1" width="10" height="1"/> |
<!-- x="18" y="1" width="10" height="1"/> --> |
600 |
</block> |
</block> |
601 |
|
|
602 |
<!-- # de factura --> |
<!-- # de factura --> |
604 |
<label name="dateLabel" text="Número de Factura:" |
<label name="dateLabel" text="Número de Factura:" |
605 |
x="32" y="1"/> |
x="32" y="1"/> |
606 |
<entry name="documentNumberEntry" field="_branch_document_data.number" style="label" |
<entry name="documentNumberEntry" field="_branch_document_data.number" style="label" |
607 |
|
x="55" y="1" width="15"/> |
608 |
|
<entry name="documentTypeEntry" field="_branch_document_data.document_type" hidden="" |
609 |
|
x="50" y="1" width="15"/> |
610 |
|
<entry name="branchEntry" field="_branch_document_data.branch" hidden="" |
611 |
x="50" y="1" width="15"/> |
x="50" y="1" width="15"/> |
612 |
|
|
613 |
<button name="fixInvoiceNoButton" label="Corregir" trigger="fixInvoiceNoTrigger" |
<button name="fixInvoiceNoButton" label="Corregir" trigger="fixInvoiceNoTrigger" |
614 |
x="66" y="1" width="10" height="1"/> |
x="66" y="1" width="10" height="1"/> |
615 |
</block> |
</block> |