283 |
</trigger> |
</trigger> |
284 |
|
|
285 |
<!-- Este trigger clacula el total de la Nota de devolución valorizado --> |
<!-- Este trigger clacula el total de la Nota de devolución valorizado --> |
286 |
<trigger name="totalCalcTrigger" type="NAMED"> |
<!-- <trigger name="totalCalcTrigger" type="NAMED"> --> |
287 |
import hack |
<!-- import hack --> |
288 |
|
|
289 |
lQty = hack.a2f(ownItemBlock.qtyEntry) |
<!-- lQty = hack.a2f(ownItemBlock.qtyEntry) --> |
290 |
lBonus = hack.a2f(ownItemBlock.bonusEntry) |
<!-- lBonus = hack.a2f(ownItemBlock.bonusEntry) --> |
291 |
lDiscount = hack.a2f(ownItemBlock.discountEntry) |
<!-- lDiscount = hack.a2f(ownItemBlock.discountEntry) --> |
292 |
lUnitPrice = hack.a2f(ownItemBlock.unitPriceEntry) |
<!-- lUnitPrice = hack.a2f(ownItemBlock.unitPriceEntry) --> |
293 |
|
|
294 |
lItemPrice = (lQty * lUnitPrice) - lBonus - lDiscount |
<!-- lItemPrice = (lQty * lUnitPrice) - lBonus - lDiscount --> |
295 |
|
|
296 |
sourceCode = str(tmpValuesDataSource.taxSourceCode) |
<!-- sourceCode = str(tmpValuesDataSource.taxSourceCode) --> |
297 |
ownIVACond = hack.a2f(tmpValuesDataSource.ownIVACond) |
<!-- ownIVACond = hack.a2f(tmpValuesDataSource.ownIVACond) --> |
298 |
alienIVACond = hack.a2f(tmpValuesDataSource.alienIVACond) |
<!-- alienIVACond = hack.a2f(tmpValuesDataSource.alienIVACond) --> |
299 |
amount = lItemPrice |
<!-- amount = lItemPrice --> |
300 |
taxPercent = hack.a2f(ownItemBlock.ivaEntry) |
<!-- taxPercent = hack.a2f(ownItemBlock.ivaEntry) --> |
301 |
|
|
302 |
exec(sourceCode) |
<!-- exec(sourceCode) --> |
303 |
ownItemBlock.taxAmountEntry = hack.a2f(graft(ownIVACond,alienIVACond,amount,taxPercent)) |
<!-- ownItemBlock.taxAmountEntry = hack.a2f(graft(ownIVACond,alienIVACond,amount,taxPercent)) --> |
304 |
ownItemBlock.itemNetoEntry = lItemPrice |
<!-- ownItemBlock.itemNetoEntry = lItemPrice --> |
305 |
ownItemBlock.itemTotalEntry = lItemPrice + hack.a2f(ownItemBlock.taxAmountEntry) |
<!-- ownItemBlock.itemTotalEntry = lItemPrice + hack.a2f(ownItemBlock.taxAmountEntry) --> |
306 |
|
|
307 |
lTNeto = 0 |
<!-- lTNeto = 0 --> |
308 |
lTTax = 0 |
<!-- lTTax = 0 --> |
309 |
|
|
310 |
lRecords = ownItemDataSource.getRecords() |
<!-- lRecords = ownItemDataSource.getRecords() --> |
311 |
for index in range(len(lRecords)): |
<!-- for index in range(len(lRecords)): --> |
312 |
lRecord = lRecords[index] |
<!-- lRecord = lRecords[index] --> |
313 |
lQty = hack.a2f(lRecord.getField("own_product_item.qty")) |
<!-- lQty = hack.a2f(lRecord.getField("own_product_item.qty")) --> |
314 |
lBonus = hack.a2f(lRecord.getField("own_item.bonus")) |
<!-- lBonus = hack.a2f(lRecord.getField("own_item.bonus")) --> |
315 |
lDiscount = hack.a2f(lRecord.getField("own_item.discount")) |
<!-- lDiscount = hack.a2f(lRecord.getField("own_item.discount")) --> |
316 |
lUnitPrice = hack.a2f(lRecord.getField("own_product_item.unit_price")) |
<!-- lUnitPrice = hack.a2f(lRecord.getField("own_product_item.unit_price")) --> |
317 |
|
|
318 |
lItemPrice = (lQty * lUnitPrice) - lBonus - lDiscount |
<!-- lItemPrice = (lQty * lUnitPrice) - lBonus - lDiscount --> |
319 |
lTNeto += lItemPrice |
<!-- lTNeto += lItemPrice --> |
320 |
lTTax += hack.a2f(lRecord.getField("own_item_tax.amount")) |
<!-- lTTax += hack.a2f(lRecord.getField("own_item_tax.amount")) --> |
321 |
|
|
322 |
totalBlock.netoEntry = str(lTNeto) |
<!-- totalBlock.netoEntry = str(lTNeto) --> |
323 |
totalBlock.ivaEntry = str(lTTax) |
<!-- totalBlock.ivaEntry = str(lTTax) --> |
324 |
totalBlock.totalEntry = str(lTNeto+lTTax) |
<!-- totalBlock.totalEntry = str(lTNeto+lTTax) --> |
325 |
</trigger> |
<!-- </trigger> --> |
326 |
|
|
327 |
|
|
328 |
<page name="Devolución para Clientes"> |
<page name="Devolución para Clientes"> |
552 |
ownItemBlock.prodCodeSEntry = "" |
ownItemBlock.prodCodeSEntry = "" |
553 |
ownItemBlock.prodNameSEntry = "" |
ownItemBlock.prodNameSEntry = "" |
554 |
ownItemBlock.qtyEntry = 0.00 |
ownItemBlock.qtyEntry = 0.00 |
555 |
ownItemBlock.unitPriceEntry = 0.00 |
# ownItemBlock.unitPriceEntry = 0.00 |
556 |
ownItemBlock.priceEntry = "0" |
# ownItemBlock.priceEntry = "0" |
557 |
ownItemBlock.taxAmountEntry = 0 |
# ownItemBlock.taxAmountEntry = 0 |
558 |
ownItemBlock.ivaEntry = 0 |
# ownItemBlock.ivaEntry = 0 |
559 |
ownItemBlock.discountEntry = 0.00 |
# ownItemBlock.discountEntry = 0.00 |
560 |
ownItemBlock.bonusEntry = 0.00 |
# ownItemBlock.bonusEntry = 0.00 |
561 |
ownItemBlock.itemTotalEntry = 0.00 |
# ownItemBlock.itemTotalEntry = 0.00 |
562 |
|
|
563 |
# ownItemBlock.deleteRecord () |
# ownItemBlock.deleteRecord () |
564 |
callTrigger('totalCalcTrigger') |
#callTrigger('totalCalcTrigger') |
565 |
</trigger> |
</trigger> |
566 |
|
|
567 |
<trigger name="prodSearchTrigger" type="NAMED"> |
<trigger name="prodSearchTrigger" type="NAMED"> |
651 |
ownItemBlock.ivaEntry = hack.a2f(prodResultBlock.prodIVATaxEntry) |
ownItemBlock.ivaEntry = hack.a2f(prodResultBlock.prodIVATaxEntry) |
652 |
ownItemBlock.unitPriceEntry = str(prodResultBlock.prodUnitPriceEntry) |
ownItemBlock.unitPriceEntry = str(prodResultBlock.prodUnitPriceEntry) |
653 |
|
|
654 |
callTrigger('totalCalcTrigger') |
#callTrigger('totalCalcTrigger') |
655 |
</trigger> |
</trigger> |
656 |
<!-- ****** Fin búsqueda ************ --> |
<!-- ****** Fin búsqueda ************ --> |
657 |
|
|
679 |
<label name="qtyLbl" text="Cantidad" x="45" y="10"/> |
<label name="qtyLbl" text="Cantidad" x="45" y="10"/> |
680 |
<!-- mdione's bookmark --> |
<!-- mdione's bookmark --> |
681 |
<entry field="own_product_item.qty" name="qtyEntry" rows="10" typecast="number" displaymask="%0.3f" width="11" x="45" y="11"> |
<entry field="own_product_item.qty" name="qtyEntry" rows="10" typecast="number" displaymask="%0.3f" width="11" x="45" y="11"> |
682 |
<trigger name="qtyEntryPreFocusout" type="PRE-FOCUSOUT" src="totalCalcTrigger" /> |
|
683 |
</entry> |
</entry> |
684 |
|
|
|
<label name="priceLbl" text="Precio" x="56" y="10"/> |
|
|
<entry x="56" y="11" name="unitPriceEntry" field="own_product_item.unit_price" width="10" rows="10" typecast="number" displaymask="%0.2f"> |
|
|
<trigger name="unitPriceEntryPreFocusout" type="PRE-FOCUSOUT" src="totalCalcTrigger" /> |
|
|
</entry> |
|
685 |
<entry x="1" y="14" readonly="" field="own_product_item.price" name="priceEntry" width="10" rows="5" hidden=""/> |
<entry x="1" y="14" readonly="" field="own_product_item.price" name="priceEntry" width="10" rows="5" hidden=""/> |
686 |
<entry x="1" y="14" readonly="" field="own_item_tax.tax" name="taxTypeEntry" width="10" rows="5" default="1" hidden="" typecast="number" displaymask="%0.2f"/> |
|
|
<entry x="1" y="14" readonly="" field="own_item_tax.amount" name="taxAmountEntry" width="10" rows="5" hidden="" typecast="number" displaymask="%0.2f"/> |
|
|
|
|
|
|
|
|
<label name="ivaLbl" text="IVA" x="66" y="10"/> |
|
|
<!--entry name="ivaEntry" displaymask="%0.0f" |
|
|
rows="10" width="3" x="66" y="11" default="0"--> |
|
|
<entry name="ivaEntry" displaymask="%0.0f" |
|
|
rows="10" width="3" x="66" y="11"> |
|
|
<trigger name="ivaEntryPreFocusout" type="PRE-FOCUSOUT" src="totalCalcTrigger" /> |
|
|
</entry> |
|
|
<label name="discountLbl" text="Dto." x="70" y="10"/> |
|
|
<!--entry field="own_item.discount" name="discountEntry" default="0.00" typecast="number" displaymask="%0.2f" |
|
|
rows="10" width="6" x="69" y="11"--> |
|
|
<entry field="own_item.discount" name="discountEntry" typecast="number" displaymask="%0.2f" |
|
|
rows="10" width="6" x="69" y="11"> |
|
|
<trigger name="discountEntryPreFocusout" type="PRE-FOCUSOUT" src="totalCalcTrigger" /> |
|
|
</entry> |
|
|
<!-- <label name="bonusLbl" text="Bonif." x="79" y="10"/> --> |
|
|
<!--entry field="own_item.bonus" name="bonusEntry" style="label" default="0.00" typecast="number" displaymask="%0.2f" |
|
|
rows="10" width="10" x="79" y="11" hidden=""/--> |
|
|
<entry field="own_item.bonus" name="bonusEntry" style="label" typecast="number" displaymask="%0.2f" |
|
|
rows="10" width="10" x="79" y="11" hidden=""/> |
|
|
<label name="itemNetolLbl" text="Neto" x="76" y="10"/> |
|
|
<!-- entry name="itemNetoEntry" style="label" default="0.00" typecast="number" displaymask="%0.2f" |
|
|
rows="10" width="10" x="76" y="11"/--> |
|
|
<entry name="itemNetoEntry" style="label" typecast="number" displaymask="%0.2f" |
|
|
rows="10" width="10" x="76" y="11"/> |
|
|
<label name="itemTotalLbl" text="Total" x="85" y="10"/> |
|
|
<!-- entry name="itemTotalEntry" style="label" default="0.00" typecast="number" displaymask="%0.2f" |
|
|
rows="10" width="10" x="85" y="11"--> |
|
|
<entry name="itemTotalEntry" style="label" typecast="number" displaymask="%0.2f" |
|
|
rows="10" width="10" x="85" y="11"> |
|
|
</entry> |
|
687 |
<button name="prodDeleteButton" trigger="prodDeleteTrigger" label="Borrar" width="7" height="10" x="95" y="11"/> |
<button name="prodDeleteButton" trigger="prodDeleteTrigger" label="Borrar" width="7" height="10" x="95" y="11"/> |
688 |
<scrollbar page="5" x="103" y="11" width="1" height="10"/> |
<scrollbar page="5" x="103" y="11" width="1" height="10"/> |
689 |
|
|
694 |
|
|
695 |
</block> |
</block> |
696 |
<!-- Datasource que sirve para almacenar el resultado de la búsqueda --> |
<!-- Datasource que sirve para almacenar el resultado de la búsqueda --> |
697 |
<block datasource="tmpValuesDataSource" name="totalBlock" restrictInsert=""> |
<!-- <block datasource="tmpValuesDataSource" name="totalBlock" restrictInsert=""> --> |
698 |
<label text="Neto " x="55" y="21"/> |
<!-- <label text="Neto " x="55" y="21"/> --> |
699 |
<entry name="netoEntry" style="label" readonly="" x="55" y="22" width="12" typecast="number" displaymask="%0.2f" |
<!-- <entry name="netoEntry" style="label" readonly="" x="55" y="22" width="12" typecast="number" displaymask="%0.2f" --> |
700 |
default="0.00"/> |
<!-- default="0.00"/> --> |
701 |
<label text="IVA " x="66" y="21"/> |
<!-- <label text="IVA " x="66" y="21"/> --> |
702 |
<entry name="ivaEntry" style="label" readonly="" x="66" y="22" width="12" typecast="number" displaymask="%0.2f" |
<!-- <entry name="ivaEntry" style="label" readonly="" x="66" y="22" width="12" typecast="number" displaymask="%0.2f" --> |
703 |
default="0.00"/> |
<!-- default="0.00"/> --> |
704 |
<label text="Total " x="82" y="21"/> |
<!-- <label text="Total " x="82" y="21"/> --> |
705 |
<entry name="totalEntry" style="label" readonly="" x="82" y="22" width="12" typecast="number" displaymask="%0.2f" |
<!-- <entry name="totalEntry" style="label" readonly="" x="82" y="22" width="12" typecast="number" displaymask="%0.2f" --> |
706 |
default="0.00"/> |
<!-- default="0.00"/> --> |
707 |
</block> |
<!-- </block> --> |
708 |
<neb:Sub neb:src="setStock.nebc" ownDocumentId="ownDocumentBlock.idEntry" storehouseEntityId="ownStorehouseBlock.ownStorehouseIdEntry" stockAddTrigger="stockAddTrigger" stockSubstractTrigger="stockSubstractTrigger"/> |
<neb:Sub neb:src="setStock.nebc" ownDocumentId="ownDocumentBlock.idEntry" storehouseEntityId="ownStorehouseBlock.ownStorehouseIdEntry" stockAddTrigger="stockAddTrigger" stockSubstractTrigger="stockSubstractTrigger"/> |
709 |
|
|
710 |
<block name="ownOrganizationBlock" datasource="ownOrganizationDataSource"> |
<block name="ownOrganizationBlock" datasource="ownOrganizationDataSource"> |