269 |
</trigger> |
</trigger> |
270 |
|
|
271 |
<trigger name="commitTrigger" type="NAMED"> |
<trigger name="commitTrigger" type="NAMED"> |
272 |
if not str(alienDocumentBlock.numberEntry): |
if not alienDocumentBlock.getCurrentRecord().isInserted(): |
273 |
|
genericBox("No se puede grabar modificaciones",["Ok"]) |
274 |
|
elif not str(alienDocumentBlock.numberEntry): |
275 |
genericBox("Falta el número del comprobante",["Ok"]) |
genericBox("Falta el número del comprobante",["Ok"]) |
276 |
elif not str(alienDocumentBlock.dateEntry): |
elif not str(alienDocumentBlock.dateEntry): |
277 |
genericBox("Falta la fecha del comprobante",["Ok"]) |
genericBox("Falta la fecha del comprobante",["Ok"]) |
318 |
</trigger> |
</trigger> |
319 |
|
|
320 |
<trigger name="rollbackTrigger" type="NAMED"> |
<trigger name="rollbackTrigger" type="NAMED"> |
321 |
|
alienItemBlock.productEntry.allowedValues() |
322 |
proceedingBlock.processRollback() |
proceedingBlock.processRollback() |
323 |
alienDocumentBlock.processRollback() |
alienDocumentBlock.processRollback() |
324 |
alienItemBlock.processRollback() |
alienItemBlock.processRollback() |
361 |
|
|
362 |
<trigger name="totalCalcTrigger" type="NAMED"> |
<trigger name="totalCalcTrigger" type="NAMED"> |
363 |
import hack |
import hack |
364 |
|
|
365 |
|
alienItemBlock.taxAmountEntry = hack.a2f(alienItemBlock.unitPriceEntry) * \ |
366 |
|
hack.a2f(alienItemBlock.qtyEntry) * (hack.a2f(alienItemBlock.taxPercentEntry)/100) |
367 |
|
|
368 |
sum = 0 |
sum = 0 |
369 |
lRecords = alienItemDataSource.getRecords() |
lRecords = alienItemDataSource.getRecords() |
370 |
for index in range(len(lRecords)): |
for index in range(len(lRecords)): |
374 |
lDiscount = hack.a2f(lRecord.getField("alien_item.discount")) |
lDiscount = hack.a2f(lRecord.getField("alien_item.discount")) |
375 |
lUnitPrice = hack.a2f(lRecord.getField("alien_product_item.unit_price")) |
lUnitPrice = hack.a2f(lRecord.getField("alien_product_item.unit_price")) |
376 |
lTax = hack.a2f(lRecord.getField("alien_item_tax.amount")) |
lTax = hack.a2f(lRecord.getField("alien_item_tax.amount")) |
377 |
sum = sum + (lQty * lUnitPrice * (1+lTax/100)) - lBonus - lDiscount |
sum += lQty * lUnitPrice + lTax - lBonus - lDiscount |
378 |
totalBlock.totalEntry = str(sum) |
totalBlock.totalEntry = str(sum) |
379 |
payBlock.cashEntry = str(sum) |
payBlock.cashEntry = str(sum) |
380 |
payBlock.ctaCteEntry = "" |
payBlock.ctaCteEntry = "" |
562 |
<entry field="date" name="dateEntry" typecast="date" |
<entry field="date" name="dateEntry" typecast="date" |
563 |
rows="1" width="22" x="22" y="7"/> |
rows="1" width="22" x="22" y="7"/> |
564 |
|
|
565 |
<button x="44" y="7" trigger="toDayTrigger" width="3" label="." |
<button x="44" y="7" trigger="toDayTrigger" width="4" label="hoy" |
566 |
name="dateBtn" height="1"/> |
name="dateBtn" height="1"/> |
567 |
|
|
568 |
<label name="guideNumberLbl" text="Número de guía" x="48" y="6" /> |
<label name="guideNumberLbl" text="Número de guía" x="48" y="6" /> |
591 |
default="1"> |
default="1"> |
592 |
<trigger type="PRE-FOCUSOUT" src="totalCalcTrigger" /> |
<trigger type="PRE-FOCUSOUT" src="totalCalcTrigger" /> |
593 |
</entry> |
</entry> |
594 |
|
|
595 |
<label name="productLbl" text="Producto" x="15" y="1"/> |
<label name="productLbl" text="Producto" x="15" y="1"/> |
596 |
<button x="32" y="1" trigger="productTrigger" width="3" label="..." |
<button x="32" y="1" trigger="productTrigger" width="3" label="..." |
597 |
name="productBtn" height="1"/> |
name="productBtn" height="1"/> |
607 |
<trigger type="PRE-FOCUSOUT" src="totalCalcTrigger" /> |
<trigger type="PRE-FOCUSOUT" src="totalCalcTrigger" /> |
608 |
</entry> |
</entry> |
609 |
<label name="taxLbl" text="IVA" x="47" y="1" /> |
<label name="taxLbl" text="IVA" x="47" y="1" /> |
610 |
<entry x="47" y="2" readonly="" field="alien_item_tax.amount" name="taxAmountEntry" width="5" rows="5" default="21"/> |
<entry x="47" y="2" readonly="" field="alien_item_tax.amount" name="taxAmountEntry" width="5" rows="5" hidden=""/> |
611 |
|
<entry x="47" y="2" name="taxPercentEntry" width="5" rows="5" default="21"> |
612 |
|
<trigger name="taxPercentEntryPreFocusout" type="PRE-FOCUSOUT" src="totalCalcTrigger"/> |
613 |
|
</entry> |
614 |
<entry x="47" y="2" readonly="" field="alien_item_tax.tax" name="taxTypeEntry" width="5" rows="5" default="1" hidden=""/> |
<entry x="47" y="2" readonly="" field="alien_item_tax.tax" name="taxTypeEntry" width="5" rows="5" default="1" hidden=""/> |
615 |
<label name="discountLbl" text="Descuento" x="53" y="1"/> |
<label name="discountLbl" text="Descuento" x="53" y="1"/> |
616 |
<entry field="alien_item.discount" name="discountEntry" value="0" typecast="number" |
<entry field="alien_item.discount" name="discountEntry" value="0" typecast="number" |