2 |
|
|
3 |
<form xmlns:neb="http://luca.org.ar/dtd/neb" |
<form xmlns:neb="http://luca.org.ar/dtd/neb" |
4 |
xmlns:lam="http://luca.org.ar/dtd/lam" |
xmlns:lam="http://luca.org.ar/dtd/lam" |
5 |
width="107" height="24" title="Notas de Crédito a Clientes"> |
width="107" height="21" title="Notas de Crédito a Clientes"> |
6 |
<neb:Block> |
<neb:Block> |
7 |
use PAPO; |
use PAPO; |
8 |
my $uniqed=0; |
my $uniqed=0; |
9 |
</neb:Block> |
</neb:Block> |
|
<datasource name="tmpValuesDataSource" cache="1"/> |
|
|
<datasource name="prodSearchDataSource" cache="1"/> |
|
|
<datasource name="prodResultDataSource" cache="1"/> |
|
10 |
|
|
11 |
|
<neb:Sub neb:src="own_document.nebc" |
12 |
|
document_name="Nota de Crédito" |
13 |
<datasource name="ownOrganizationDataSource" database="papo" |
document_type_A="14" |
14 |
table="_entity_data, _own_entity_data, _organization_data, _persona_tax_profile_data, _tax_profile_data"> |
document_type_B="15" |
15 |
<condition> |
document_type_C="16" |
16 |
<and> |
stock_alta="stockAddTrigger" |
17 |
<!-- uniones del objeto n-1 --> |
stock_borrado="stockSubstractTrigger" |
18 |
<eq> |
/> |
|
<cfield name="_own_entity_data._table"/> |
|
|
<cfield name="_organization_data.own_entity"/> |
|
|
</eq> |
|
|
<eq> |
|
|
<cfield name="_entity_data._table"/> |
|
|
<cfield name="_own_entity_data.entity"/> |
|
|
</eq> |
|
|
<eq> |
|
|
<cfield name="_entity_data._table"/> |
|
|
<cfield name="_persona_tax_profile_data.persona"/> |
|
|
</eq> |
|
|
<eq> |
|
|
<cfield name="_tax_profile_data._table"/> |
|
|
<cfield name="_persona_tax_profile_data.tax_profile"/> |
|
|
</eq> |
|
|
<eq> |
|
|
<cfield name="_tax_profile_data.tax"/> |
|
|
<cconst value="1"/> <!-- IVA --> |
|
|
</eq> |
|
|
<!-- history tables = null n --> |
|
|
<null> |
|
|
<cfield name="_entity_data._end_t"/> |
|
|
</null> |
|
|
<null> |
|
|
<cfield name="_own_entity_data._end_t"/> |
|
|
</null> |
|
|
<null> |
|
|
<cfield name="_organization_data._end_t"/> |
|
|
</null> |
|
|
<null> |
|
|
<cfield name="_persona_tax_profile_data._end_t"/> |
|
|
</null> |
|
|
<null> |
|
|
<cfield name="_tax_profile_data._end_t"/> |
|
|
</null> |
|
|
<!--busco el 1 --> |
|
|
<eq> |
|
|
<cfield name="organization.id"/> |
|
|
<cconst value="1"/> |
|
|
</eq> |
|
|
</and> |
|
|
</condition> |
|
|
</datasource> |
|
|
|
|
|
<!-- Origen de datos que sirve para seleccionar el cliente al que se le --> |
|
|
<!-- va a confeccionar la Nota de Crédito --> |
|
|
<datasource name="clientDataSource" database="papo" |
|
|
table="_entity_data, _alien_entity_data, _persona_data, _client_data, |
|
|
_price_type_data, _persona_tax_profile_data, _tax_profile_data, _tax_data"> |
|
|
<condition> |
|
|
<and> |
|
|
<eq> |
|
|
<cfield name="_entity_data._table"/> |
|
|
<cfield name="_alien_entity_data.entity"/> |
|
|
</eq> |
|
|
<eq> |
|
|
<cfield name="_alien_entity_data._table"/> |
|
|
<cfield name="_persona_data.alien_entity"/> |
|
|
</eq> |
|
|
<eq> |
|
|
<cfield name="_persona_data._table"/> |
|
|
<cfield name="_client_data.persona"/> |
|
|
</eq> |
|
|
<eq> |
|
|
<cfield name="_price_type_data._table"/> |
|
|
<cfield name="_client_data.price_type"/> |
|
|
</eq> |
|
|
<eq> |
|
|
<cfield name="_entity_data._table"/> |
|
|
<cfield name="_persona_tax_profile_data.persona"/> |
|
|
</eq> |
|
|
<eq> |
|
|
<cfield name="_tax_profile_data._table"/> |
|
|
<cfield name="_persona_tax_profile_data.tax_profile"/> |
|
|
</eq> |
|
|
<eq> |
|
|
<cfield name="_tax_data._table"/> |
|
|
<cfield name="_tax_profile_data.tax"/> |
|
|
</eq> |
|
|
<eq> |
|
|
<cfield name="_tax_data._table"/> |
|
|
<cconst value="1"/> |
|
|
</eq> |
|
|
<null> |
|
|
<cfield name="_entity_data._end_t"/> |
|
|
</null> |
|
|
<null> |
|
|
<cfield name="_alien_entity_data._end_t"/> |
|
|
</null> |
|
|
<null> |
|
|
<cfield name="_persona_data._end_t"/> |
|
|
</null> |
|
|
<null> |
|
|
<cfield name="_client_data._end_t"/> |
|
|
</null> |
|
|
<null> |
|
|
<cfield name="_price_type_data._end_t"/> |
|
|
</null> |
|
|
<null> |
|
|
<cfield name="_persona_tax_profile_data._end_t"/> |
|
|
</null> |
|
|
<null> |
|
|
<cfield name="_tax_profile_data._end_t"/> |
|
|
</null> |
|
|
<null> |
|
|
<cfield name="_tax_data._end_t"/> |
|
|
</null> |
|
|
</and> |
|
|
</condition> |
|
|
</datasource> |
|
|
|
|
|
<datasource name="clientSearchDataSource" database="papo" |
|
|
table="_entity_data, _alien_entity_data, _persona_data, _client_data, entity_type_uid_conf, |
|
|
_entity_uid_data" order_by="_entity_data.name"> |
|
|
<condition> |
|
|
<and> |
|
|
<eq> |
|
|
<cfield name="_entity_data._table"/> |
|
|
<cfield name="_alien_entity_data.entity"/> |
|
|
</eq> |
|
|
<eq> |
|
|
<cfield name="_alien_entity_data._table"/> |
|
|
<cfield name="_persona_data.alien_entity"/> |
|
|
</eq> |
|
|
<eq> |
|
|
<cfield name="_persona_data._table"/> |
|
|
<cfield name="_client_data.persona"/> |
|
|
</eq> |
|
|
<eq> |
|
|
<cfield name="_entity_data._table"/> |
|
|
<cfield name="_entity_uid_data.entity"/> |
|
|
</eq> |
|
|
<eq> |
|
|
<cconst value="7"/> |
|
|
<cfield name="entity_type_uid_conf.entity_type"/> |
|
|
</eq> |
|
|
<eq> |
|
|
<cfield name="_entity_uid_data.entity_uid_type"/> |
|
|
<cfield name="entity_type_uid_conf.entity_uid_type"/> |
|
|
</eq> |
|
|
<null> |
|
|
<cfield name="_entity_data._end_t"/> |
|
|
</null> |
|
|
<null> |
|
|
<cfield name="_alien_entity_data._end_t"/> |
|
|
</null> |
|
|
<null> |
|
|
<cfield name="_persona_data._end_t"/> |
|
|
</null> |
|
|
<null> |
|
|
<cfield name="_client_data._end_t"/> |
|
|
</null> |
|
|
<null> |
|
|
<cfield name="_entity_uid_data._end_t"/> |
|
|
</null> |
|
|
</and> |
|
|
</condition> |
|
|
</datasource> |
|
|
|
|
|
|
|
|
<datasource name="priceDataSource" database="papo" table="_price_data" /> |
|
|
|
|
|
<!-- Origen de datos que contiene el encabezado de la nota de crédito --> |
|
|
|
|
|
<datasource database="papo" name="ownDocumentDataSource" table="own_document" |
|
|
order_by="date" /> |
|
|
|
|
|
|
|
|
<!-- Origen de datos que contiene los items de la nota de crédito --> |
|
|
|
|
|
<datasource name="ownItemDataSource" database="papo" detaillink="own_item.own_document" |
|
|
master="ownDocumentDataSource" masterlink="id" |
|
|
table="own_item, own_product_item "> |
|
|
<condition> |
|
|
<and> |
|
|
<eq> |
|
|
<cfield name="own_item.id"/> |
|
|
<cfield name="own_product_item.own_item"/> |
|
|
</eq> |
|
|
</and> |
|
|
</condition> |
|
|
</datasource> |
|
|
|
|
|
<!-- Origen de datos que sirve para dar de alta pagos con algun tipo de currency --> |
|
|
<datasource name="currencyMovementDataSource" database="papo" |
|
|
table="movement, currency_movement"> |
|
|
<condition> |
|
|
<eq> |
|
|
<cfield name="movement.id"/> |
|
|
<cfield name="currency_movement.movement"/> |
|
|
</eq> |
|
|
</condition> |
|
|
</datasource> |
|
|
|
|
|
<!-- Origen de datos que sirve para dar de alta pagos con cta. cte. --> |
|
|
<datasource name="movementDataSource" database="papo" table="movement"/> |
|
|
|
|
|
<!-- Origen de datos que sirve para dar de alta procedimientos de pago --> |
|
|
<datasource name="proceedingDataSource" database="papo" table="proceeding"/> |
|
|
|
|
|
<!-- Origen de datos que sirve para dar de alta pagos --> |
|
|
<datasource name="ownDocumentProceedingDataSource" database="papo" table="own_document_proceeding"/> |
|
|
|
|
|
<trigger name="recalcTotalTrigger" type="NAMED"><![CDATA[ |
|
|
import hack |
|
|
totalBlock.totalEntry = hack.a2f(totalBlock.netoEntry)+hack.a2f(totalBlock.ivaEntry) |
|
|
#payBlock.cashEntry = hack.a2f(totalBlock.totalEntry,2) |
|
|
]]></trigger> |
|
|
|
|
|
<trigger name="clientCallFormTrigger" type="NAMED"><![CDATA[ |
|
|
runForm('client.gfd') |
|
|
]]></trigger> |
|
|
|
|
|
<trigger name="prodCallFormTrigger" type="NAMED"><![CDATA[ |
|
|
runForm('product.gfd') |
|
|
]]></trigger> |
|
|
|
|
|
|
|
|
<trigger name="setCreditNoteType" type="NAMED"><![CDATA[ |
|
|
creditNoteType = str(ownDocumentBlock.creditNoteTypeEntry).strip().lower() |
|
|
if creditNoteType == 'a': |
|
|
ownDocumentBlock.typeEntry = '14' |
|
|
elif creditNoteType == 'b': |
|
|
ownDocumentBlock.typeEntry = '15' |
|
|
elif creditNoteType == 'c': |
|
|
ownDocumentBlock.typeEntry = '16' |
|
|
else: |
|
|
ownDocumentBlock.typeEntry = '' |
|
|
]]></trigger> |
|
|
|
|
|
<trigger name="creditNoteTypeValidation" type="NAMED"><![CDATA[ |
|
|
if str(ownDocumentBlock.creditNoteTypeEntry).strip().lower() not in ('a','b','c'): |
|
|
genericBox('El tipo de nota de crédito es incorrecto',['Aceptar']) |
|
|
ownDocumentBlock.creditNoteTypeEntry = "" |
|
|
else: |
|
|
ownDocumentBlock.creditNoteTypeEntry = str(ownDocumentBlock.creditNoteTypeEntry).strip().upper() |
|
|
callTrigger('setCreditNoteType') |
|
|
callTrigger('searchNextCreditNoteNumber') |
|
|
]]></trigger> |
|
|
|
|
|
<neb:Sub neb:src="wait.nebc"/> |
|
|
|
|
|
<trigger name="printTrigger" type="NAMED"><![CDATA[ |
|
|
import hack |
|
|
from gnue.common.GDataObjects import ConnectionError as DBError |
|
|
|
|
|
if not str(ownDocumentBlock.creditNoteTypeEntry): |
|
|
genericBox("Falta el tipo de nota de crédito",["Aceptar"]) |
|
|
else: |
|
|
if ownItemBlock.getRecordCount() > 0 and len(ownItemBlock.prodNameSEntry) > 0: |
|
|
callTrigger('startWaitingModeTrigger') |
|
|
try: |
|
|
callTrigger ('commitTrigger') |
|
|
# it's _such_ a pitty |
|
|
# pleasePrint ('serviceCreditNote', { 'id': str(ownDocumentBlock.idEntry) }) |
|
|
# report='productCreditNote-%s' % str(ownDocumentBlock.typeEntry) |
|
|
# hack.pleasePrint (self, str(ownDocumentBlock.typeEntry), report, [ 'id='+str(ownDocumentBlock.idEntry) ], |
|
|
# str (ownPosDocumentBlock.documentPrintCommand)) |
|
|
|
|
|
callTrigger('rollbackTrigger') |
|
|
except DBError, err: |
|
|
# something happened in the way to Heaven |
|
|
pass |
|
|
callTrigger('endWaitingModeTrigger') |
|
|
]]></trigger> |
|
|
|
|
|
<trigger name="commitTrigger" type="NAMED"> |
|
|
|
|
|
ownDocumentBlock.numberEntry= str(ownPosDocumentBlock.documentNumberEntry) |
|
|
ownDocumentBlock.ownPosEntityIdEntry = str(ownPosBlock.ownPosEntityIdEntry) |
|
|
ownDocumentBlock.dateEntry = str(tmpBlock.tmpDateEntry ) |
|
|
if len(ownDocumentBlock.dateEntry) == 0: |
|
|
ownDocumentBlock.dateEntry = ownDocumentDataSource.getTimeStamp() |
|
|
|
|
|
from gnue.common.GDataObjects import ConnectionError as DBError |
|
|
try: |
|
|
postChangeAdvance = 0 |
|
|
ownDocumentBlock.postChanges() |
|
|
postChangeAdvance = 1 |
|
|
ownPosDocumentBlock.documentNumberEntry.postAtomicModify (lambda x: int(x)+1) |
|
|
postChangeAdvance = 2 |
|
|
proceedingBlock.postChanges() |
|
|
|
|
|
proceedingBlock.clear() |
|
|
|
|
|
proceedingBlock.dateEntry = proceedingDataSource.getTimeStamp() |
|
|
|
|
|
ownDocumentProceedingBlock.clear() |
|
|
ownDocumentProceedingBlock.proceedingEntry = str(proceedingBlock.idEntry) |
|
|
ownDocumentProceedingBlock.ownDocumentEntry = str(ownDocumentBlock.idEntry) |
|
|
ownDocumentProceedingBlock.amountEntry = 0 |
|
|
|
|
|
postChangeAdvance = 3 |
|
|
ownDocumentProceedingBlock.postChanges() |
|
|
postChangeAdvance = 4 |
|
|
currencyMovementBlock.postChanges() |
|
|
postChangeAdvance = 5 |
|
|
if str(ownPosBlock.stockByInvoice) == "1": |
|
|
callTrigger('stockAddTrigger') |
|
|
callTrigger('taxFillTrigger') |
|
|
ownItemTaxBlock.postChanges() |
|
|
ownDocumentTaxTotalBlock.postChanges() |
|
|
commitConnection() |
|
|
except DBError, err: |
|
|
rollbackConnection() |
|
|
message = "Hay problemas para grabar " |
|
|
if postChangeAdvance == 0: |
|
|
message += "la Factura" |
|
|
elif postChangeAdvance == 1: |
|
|
message += "el número de la Factura" |
|
|
elif postChangeAdvance == 2: |
|
|
message += "el procedimiento General" |
|
|
elif postChangeAdvance == 3: |
|
|
message += "el procedimiento de la Factura" |
|
|
elif postChangeAdvance == 4: |
|
|
message += "las monedas de pago de la Factura" |
|
|
elif postChangeAdvance == 5: |
|
|
message += "el stock" |
|
|
genericBox(message+"\n"+str(err),['Aceptar']) |
|
|
raise |
|
|
|
|
|
</trigger> |
|
|
|
|
|
<trigger name="rollbackTrigger" type="NAMED"> |
|
|
tmpValuesDataSource.priceTypeId = None |
|
|
|
|
|
clear() |
|
|
|
|
|
tmpBlock.tmpDateEntry = ownDocumentDataSource.getTimeStamp() |
|
|
#setFocus(ownDocumentBlock.clientCodeEntry) |
|
|
</trigger> |
|
|
|
|
|
<trigger name="startUp" type="On-Startup"> |
|
|
tmpValuesDataSource.priceTypeId = None |
|
|
tmpValuesDataSource.onSwitch = "0" |
|
|
ownOrganizationBlock.clear() |
|
|
ownOrganizationBlock.initQuery() |
|
|
ownOrganizationBlock.processQuery() |
|
|
tmpValuesDataSource.ownOrganizationId = str(ownOrganizationBlock.ownOrganizationIdEntry) |
|
|
tmpValuesDataSource.ownIVACond = str(ownOrganizationBlock.condIVAEntry) |
|
|
tmpBlock.tmpDateEntry = ownDocumentDataSource.getTimeStamp() |
|
|
</trigger> |
|
|
|
|
|
<trigger name="quitTrigger" type="NAMED"> |
|
|
callTrigger('rollbackTrigger') |
|
|
exit() |
|
|
</trigger> |
|
|
|
|
|
<!-- Este trigger clacula el total de la nota de crédito --> |
|
|
<trigger name="totalCalcTrigger" type="NAMED"> |
|
|
import hack |
|
|
|
|
|
lQty = hack.a2f(ownItemBlock.qtyEntry,4) |
|
|
lBonus = hack.a2f(ownItemBlock.bonusEntry,4) |
|
|
lDiscount = hack.a2f(ownItemBlock.discountEntry,4) |
|
|
lUnitPrice = hack.a2f(ownItemBlock.unitPriceEntry,4) |
|
|
|
|
|
lItemPrice = round((lQty * lUnitPrice) - lBonus - lDiscount,2) |
|
|
|
|
|
###sourceCode = str(tmpValuesDataSource.taxSourceCode) |
|
|
#ownIVACond = hack.a2f(tmpValuesDataSource.ownIVACond) |
|
|
#alienIVACond = hack.a2f(tmpValuesDataSource.alienIVACond) |
|
|
#amount = lItemPrice |
|
|
#taxPercent = hack.a2f(ownItemBlock.ivaEntry,4) |
|
|
|
|
|
#exec(sourceCode) |
|
|
#ownItemBlock.taxAmountEntry = hack.a2f(graft(ownIVACond,alienIVACond,amount,taxPercent),4) |
|
|
#ownItemBlock.itemNetoEntry = lItemPrice |
|
|
#ownItemBlock.itemTotalEntry = round(lItemPrice + hack.a2f(ownItemBlock.taxAmountEntry,4),2) |
|
|
|
|
|
lTNeto = 0 |
|
|
lTTax = hack.a2f(totalBlock.ivaEntry,2) |
|
|
amount = lItemPrice |
|
|
taxPercent = hack.a2f(ownItemBlock.ivaEntry,2) |
|
|
#IVA |
|
|
if str(tmpValuesDataSource.IVAGraft) != "None": |
|
|
ivaSourceCode=str(tmpValuesDataSource.IVAGraft) |
|
|
exec(ivaSourceCode) |
|
|
lTTax -= hack.a2f(ownItemBlock.ivaAmountEntry,2) |
|
|
ownItemBlock.ivaAmountEntry = hack.a2f(graft(amount,taxPercent),4) |
|
|
lTTax += hack.a2f(ownItemBlock.ivaAmountEntry,2) |
|
|
if str(tmpValuesDataSource.IVARNIGraft) != "None": |
|
|
print "hay iva RNI" |
|
|
#if not ownItemIVARNIBlock.getCurrentRecord().isEmpty(): |
|
|
# ownItemIVARNIBlock.newRecord() |
|
|
ivaRNISourceCode=str(tmpValuesDataSource.IVARNIGraft) |
|
|
exec(ivaRNISourceCode) |
|
|
lTTax -= hack.a2f(ownItemBlock.ivaRNIAmountEntry,4) |
|
|
ownItemBlock.ivaRNIAmountEntry = hack.a2f(graft(amount,taxPercent),4) |
|
|
lTTax += hack.a2f(ownItemBlock.ivaRNIAmountEntry,4) |
|
|
ownItemBlock.itemNetoEntry = lItemPrice |
|
|
ownItemBlock.itemTotalEntry = lItemPrice + hack.a2f(ownItemBlock.ivaRNIAmountEntry,2)+hack.a2f(ownItemBlock.ivaAmountEntry,2) |
|
|
######### |
|
|
|
|
|
#sumo el total del documento |
|
|
lTNeto = 0 |
|
|
|
|
|
lRecords = ownItemDataSource.getRecords() |
|
|
for index in range(len(lRecords)): |
|
|
lRecord = lRecords[index] |
|
|
lQty = hack.a2f(lRecord.getField("own_product_item.qty"),4) |
|
|
#print "cantidad: ",lQty |
|
|
lBonus = hack.a2f(lRecord.getField("own_item.bonus"),4) |
|
|
lDiscount = hack.a2f(lRecord.getField("own_item.discount"),4) |
|
|
lUnitPrice = hack.a2f(lRecord.getField("own_product_item.unit_price"),4) |
|
|
lItemPrice = round((lQty * lUnitPrice) - lBonus - lDiscount,2) |
|
|
lTNeto += lItemPrice |
|
|
|
|
|
#lTTax = round(lTTax,2) |
|
|
ownDocumentBlock.netTotalEntry = str(round(lTNeto)) |
|
|
totalBlock.netoEntry = str(round(lTNeto)) |
|
|
ownDocumentBlock.taxTotalEntry = str(round(lTTax)) |
|
|
totalBlock.ivaEntry = str(round(lTTax)) |
|
|
totalBlock.totalEntry = str(round(lTNeto+lTTax)) |
|
|
</trigger> |
|
|
|
|
|
|
|
|
<page name="Nota de Crédito a Clientes"> |
|
|
<box height="9" label="Nota de Crédito de Productos a Clientes" |
|
|
name="creditNoteHeaderBox" width="105" x="0" y="0"> |
|
|
<!-- Estos bloques son para la gestion del pago de la nota de crédito --> |
|
|
<block name="proceedingBlock" datasource="proceedingDataSource" transparentBlock=""> |
|
|
<entry name="idEntry" field="id" hidden="" x="1" y="1" width="12"/> |
|
|
<entry name="dateEntry" field="date" hidden="" x="1" y="1" width="12"/> |
|
|
</block> |
|
|
|
|
|
|
|
|
<!-- Actualiza los datos del cliente --> |
|
|
<trigger type="NAMED" name="bringClientDataTrigger"><![CDATA[ |
|
|
|
|
|
rs = clientDataSource.createResultSet({'_entity_data.id':str(ownDocumentBlock.clientRecipientBox.clientEntry)}) |
|
|
if rs.firstRecord(): |
|
|
# Actualiza la Lista de precios asignada al cliente |
|
|
ownDocumentBlock.clientRecipientBox.priceTypeEntry = str(ownDocumentBlock.clientRecipientBox.clientEntry) |
|
|
|
|
|
ownDocumentBlock.clientRecipientBox.currentClientEntry = rs.current.getField('_entity_data._table') |
|
|
tmpValuesDataSource.taxSourceCode = rs.current.getField('_tax_data.graft') |
|
|
tmpValuesDataSource.alienIVACond = rs.current.getField('_tax_profile_data._table') |
|
|
|
|
|
if str(ownDocumentBlock.clientRecipientBox.currentClientEntry): |
|
|
import hack |
|
|
|
|
|
# Obtiene el id de la lista de precios para poder buscar y lo coloca |
|
|
# en una variable temporaria colgada del tmpValuesDataSource (un invento que parece que sirve no se si es prolijo) |
|
|
clientResultSet = clientDataSource.createResultSet({"_entity_data._table": \ |
|
|
str(ownDocumentBlock.clientRecipientBox.currentClientEntry)}) |
|
|
clientResultSet.firstRecord() |
|
|
|
|
|
tmpValuesDataSource.priceTypeId = clientResultSet.current.getField("_price_type_data._table") |
|
|
# Calcula el tipo de nota de crédito que corresponde en función de la condición ante el IVA de la empresa y la del cliente |
|
|
clientIvaTaxProfle = int(str(tmpValuesDataSource.alienIVACond)) |
|
|
providerIvaTaxProfile = int(str(tmpValuesDataSource.ownIVACond)) |
|
|
ownDocumentBlock.creditNoteTypeEntry = hack.calcInvoiceType(clientIvaTaxProfle, providerIvaTaxProfile) |
|
|
callTrigger('creditNoteTypeValidation') |
|
|
callTrigger('searchTaxFormula') |
|
|
]]></trigger> |
|
|
<neb:Sub neb:src="taxFormula.nebc" entityToId="ownDocumentBlock.clientRecipientBox.currentClientEntry" entityFromId="tmpValuesDataSource.ownOrganizationId" searchTaxFormula="searchTaxFormula"/> |
|
|
<!-- Bloque para la búsqueda de clientes --> |
|
|
<block name="clientResultBlock" datasource="clientSearchDataSource"> |
|
|
<entry name="idEntry" field="_entity_data.id" hidden="" x="1" y="1" width="12"/> |
|
|
<!-- <entry name="uidTypeEntry" field="_entity_uid_data.entity_uid_type" hidden="" x="1" y="1" width="12"/> --> |
|
|
<entry name="uidEntry" field="_entity_uid_data.uid" hidden="" x="1" y="1" width="12"/> |
|
|
<entry name="nameEntry" field="_entity_data.name" hidden="" x="1" y="1" width="20"/> |
|
|
</block> |
|
|
<trigger name="clientSearchTrigger" type="NAMED"><![CDATA[ |
|
|
tmpValuesDataSource.priceTypeId = None |
|
|
|
|
|
codeToSearch = str(ownDocumentBlock.clientRecipientBox.clientCodeEntry) |
|
|
nameToSearch = str(ownDocumentBlock.clientRecipientBox.clientNameEntry) |
|
|
|
|
|
callTrigger('rollbackTrigger') |
|
|
|
|
|
ownDocumentBlock.clientRecipientBox.clientCodeEntry = codeToSearch |
|
|
ownDocumentBlock.clientRecipientBox.clientNameEntry = nameToSearch |
|
|
|
|
|
callTrigger('startWaitingModeTrigger') |
|
|
clientResultBlock.initQuery() |
|
|
if codeToSearch: |
|
|
clientResultBlock.uidEntry = codeToSearch+"%" |
|
|
if nameToSearch: |
|
|
clientResultBlock.nameEntry = nameToSearch+"%" |
|
|
clientResultBlock.processQuery() |
|
|
callTrigger('endWaitingModeTrigger') |
|
|
recordCount = clientResultBlock.getRecordCount() |
|
|
if recordCount > 1: |
|
|
def callback (returnValue): |
|
|
global block |
|
|
if returnValue >= 0: |
|
|
clientResultBlock.jumpRecord(returnValue) |
|
|
ownDocumentBlock.clientRecipientBox.clientCodeEntry = str(clientResultBlock.uidEntry) |
|
|
ownDocumentBlock.clientRecipientBox.clientNameEntry = str(clientResultBlock.nameEntry) |
|
|
ownDocumentBlock.clientRecipientBox.clientEntry = str(clientResultBlock.idEntry) |
|
|
callTrigger('startWaitingModeTrigger') |
|
|
callTrigger('bringClientDataTrigger') |
|
|
callTrigger('endWaitingModeTrigger') |
|
|
|
|
|
runForm ('clientSelect.gfd', {'data': clientResultBlock, 'callback': callback}) |
|
|
elif recordCount == 1: |
|
|
clientResultBlock.jumpRecord(0) |
|
|
ownDocumentBlock.clientRecipientBox.clientCodeEntry = str(clientResultBlock.uidEntry) |
|
|
ownDocumentBlock.clientRecipientBox.clientNameEntry = str(clientResultBlock.nameEntry) |
|
|
ownDocumentBlock.clientRecipientBox.clientEntry = str(clientResultBlock.idEntry) |
|
|
callTrigger('startWaitingModeTrigger') |
|
|
callTrigger('bringClientDataTrigger') |
|
|
callTrigger('endWaitingModeTrigger') |
|
|
|
|
|
]]></trigger> |
|
|
|
|
|
<!-- Fin de bloques destinados a la gestion del pago de la nota de crédito --> |
|
|
<block datasource="ownDocumentDataSource" name="ownDocumentBlock" restrictInsert=""> |
|
|
<entry field="own_entity" hidden="" name="ownPosEntityIdEntry" x="1" y="1"/> |
|
|
<entry field="id" hidden="" name="idEntry" x="1" y="1"/> |
|
|
<entry field="own_document_type" hidden="" name="typeEntry" x="1" y="1"/> |
|
|
<box height="6" label="Datos del Cliente" name="clientRecipientBox" width="103" x="0" y="2"> |
|
|
|
|
|
<label name="clientLbl" text="Cliente" x="1" y="1" /> |
|
|
|
|
|
<entry x="1" y="1" width="30" name="currentClientEntry" hidden="" /> |
|
|
<entry x="1" y="2" field="recipient" name="clientEntry" width="30" hidden=""/> |
|
|
<entry x="1" y="2" name="clientCodeEntry" width="20"> |
|
|
<options> |
|
|
<option name="tip" value="Insertar el Código"/> |
|
|
</options> |
|
|
</entry> |
|
|
<entry x="21" y="2" name="clientNameEntry" width="35"> |
|
|
<options> |
|
|
<option name="tip" value="Insertar el nombre o descripción"/> |
|
|
</options> |
|
|
</entry> |
|
|
|
|
|
<button name="clientSearchButton" trigger="clientSearchTrigger" label="Buscar" width="7" height="1" x="56" y="2"/> |
|
|
<button name="clientCallFormButton" trigger="clientCallFormTrigger" label="..." width="4" height="1" x="64" y="2"/> |
|
|
|
|
|
<label name="clientLbl" text="Lista de precios:" x="1" y="4" /> |
|
|
|
|
|
<entry x="19" y="4" field="recipient" name="priceTypeEntry" readonly="" |
|
|
width="20" style="textlookup" foreign_key="clientDataSource._entity_data.id" |
|
|
foreign_key_description="_price_type_data.name" /> |
|
|
|
|
|
</box> |
|
|
<entry field="date" name="dateEntry" style="label" hidden="" typecast="date" |
|
|
rows="10" width="24" x="7" y="7"/> |
|
|
<entry field="number" name="numberEntry" style="label" hidden="" width="24" x="7" y="7"/> |
|
|
|
|
|
<label name="creditNoteTypeLbl" text="Tipo" x="23" y="1" /> |
|
|
<entry name="creditNoteTypeEntry" width="2" x="28" y="1"> |
|
|
<trigger type="PRE-FOCUSOUT" src="creditNoteTypeValidation"/> |
|
|
</entry> |
|
|
|
|
|
</block> |
|
|
<block name="ownOrganizationBlock" datasource="ownOrganizationDataSource"> |
|
|
<entry name="ownOrganizationIdEntry" field="_entity_data._table" hidden="" x="1" y="1"/> |
|
|
<entry name="condIVAEntry" field="_tax_profile_data._table" hidden="" x="1" y="1" width="10"/> |
|
|
</block> |
|
|
|
|
|
<!-- Fecha de la nota de crédito --> |
|
|
<block name="tmpBlock" datasource="tmpValuesDataSource" transparentBlock=""> |
|
|
<label name="dateLbl" text="Fecha" x="1" y="1" /> |
|
|
<entry name="tmpDateEntry" typecast="date" |
|
|
width="14" x="7" y="1"/> |
|
|
<label name="numberLabel" text="Número de Nota de Crédito:" x="32" y="1"/> |
|
|
</block> |
|
|
<!-- # de la nota de crédito --> |
|
|
<neb:Sub neb:src="posDocument.nebc" documentType="ownDocumentBlock.typeEntry" |
|
|
ownPosBlock="ownPosBlock" stockByInvoice="stockByInvoice" |
|
|
ownPosDocumentBlock="ownPosDocumentBlock " documentNumberEntry="documentNumberEntry" |
|
|
documentNumberEntryX="65" documentNumberEntryY="1" |
|
|
searchNextDocumentNumber="searchNextCreditNoteNumber" |
|
|
ownStorehouseBlock ="ownStorehouseBlock" ownStorehouseIdEntry="ownStorehouseIdEntry" > |
|
|
</neb:Sub> |
|
|
</box> |
|
|
|
|
|
<!-- ******************************** --> |
|
|
<!-- Busqueda del producto a insertar en la nota de crédito --> |
|
|
<!-- ******************************** --> |
|
|
|
|
|
<!-- Datasource que sirve para la búsqueda del producto --> |
|
|
<datasource database="papo" name="priceTypeDataSource" table="_price_type_data"> |
|
|
<condition> |
|
|
<null> |
|
|
<cfield name="_price_type_data._end_t"/> |
|
|
</null> |
|
|
</condition> |
|
|
</datasource> |
|
|
<!-- Bloque que sirve para la búsqueda del producto respetando lista de precios --> |
|
|
<block name="priceTypeBlock" datasource="priceTypeDataSource" transparentBlock=""> |
|
|
<entry name="priceTypeParentId" field="parent" x="1" |
|
|
y="2" width="40" hidden=""/> |
|
|
<entry name="priceTypeId" field="_table" x="40" y="2" width="10" hidden="" /> |
|
|
</block> |
|
|
<!-- Datasource que sirve para almacenar el resultado de la búsqueda --> |
|
|
<datasource database="papo" name="productResultDataSource" |
|
|
table="_product_code_type_data, _product_code_data, _product_data, _product_tax_data, _price_data, _price_type_data, |
|
|
_currency_type_data" |
|
|
order_by = "_product_data.canonical_name, _price_type_data._table desc" > |
|
|
<condition> |
|
|
<and> |
|
|
<null> |
|
|
<cfield name="_product_code_type_data._end_t"/> |
|
|
</null> |
|
|
<null> |
|
|
<cfield name="_product_code_data._end_t"/> |
|
|
</null> |
|
|
<null> |
|
|
<cfield name="_product_data._end_t"/> |
|
|
</null> |
|
|
<null> |
|
|
<cfield name="_product_tax_data._end_t"/> |
|
|
</null> |
|
|
<null> |
|
|
<cfield name="_price_data._end_t"/> |
|
|
</null> |
|
|
<null> |
|
|
<cfield name="_price_type_data._end_t"/> |
|
|
</null> |
|
|
<null> |
|
|
<cfield name="_currency_type_data._end_t"/> |
|
|
</null> |
|
|
<eq> |
|
|
<cfield name="_product_code_type_data._table"/> |
|
|
<cfield name="_product_code_data.product_code_type"/> |
|
|
</eq> |
|
|
<eq> |
|
|
<cfield name="_product_data._table"/> |
|
|
<cfield name="_product_code_data.product"/> |
|
|
</eq> |
|
|
<eq> |
|
|
<cfield name="_product_data._table"/> |
|
|
<cfield name="_product_tax_data.product"/> |
|
|
</eq> |
|
|
<eq> |
|
|
<cfield name="_product_tax_data.tax"/> |
|
|
<cconst value="1"/> <!-- IVA --> |
|
|
</eq> |
|
|
<eq> |
|
|
<cfield name="_product_data._table"/> |
|
|
<cfield name="_price_data.product"/> |
|
|
</eq> |
|
|
<eq> |
|
|
<cfield name="_price_type_data._table"/> |
|
|
<cfield name="_price_data.price_type"/> |
|
|
</eq> |
|
|
<!--multicurrency--> |
|
|
<eq> |
|
|
<cfield name="_currency_type_data._table"/> |
|
|
<cfield name="_price_data.currency_type"/> |
|
|
</eq> |
|
|
<!--/multicurrency--> |
|
|
<not> |
|
|
<cfield name="_price_data.excluded"/> <!-- Solo productos no excluidos --> |
|
|
</not> |
|
|
</and> |
|
|
</condition> |
|
|
</datasource> |
|
|
<!-- Bloque que sirve para almacenar el resultado intermedio de la búsqueda --> |
|
|
<block name="tmpProdResultBlock" datasource="productResultDataSource" transparentBlock=""> |
|
|
<entry name="prodNameEntry" field="_product_data.canonical_name" x="1" y="1" width="15" rows="2" hidden=""/> |
|
|
<entry name="prodIdEntry" field="_product_data._table" x="15" y="1" width="5" rows="2" hidden=""/> |
|
|
<entry name="prodCodeEntry" field="_product_code_data.code" x="20" y="1" width="10" rows="2" hidden=""/> |
|
|
<entry name="prodCodeTypeEntry" field="_product_code_data.product_code_type" x="30" y="1" width="5" rows="2" hidden=""/> |
|
|
<entry name="prodPriceTypeEntry" field="_price_type_data.name" x="35 " y="1" width="10" rows="2" hidden=""/> |
|
|
<entry name="prodPriceTypeIdEntry" field="_price_type_data._table" x="45" y="1" width="5" rows="2" hidden=""/> |
|
|
<entry name="prodUnitPriceEntry" field="_price_data.unit_price" x="50" y="1" width="20" rows="2" hidden=""/> |
|
|
<entry name="prodPriceEntry" field="_price_data.id" x="50" y="1" width="20" rows="2" hidden=""/> |
|
|
<entry name="prodIVATaxEntry" field="_product_tax_data.amount" x="50" y="1" width="20" rows="2" hidden=""/> |
|
|
<entry name="prodCurrencyRateEntry" field="_currency_type_data.rate" x="50" y="1" width="20" rows="2" hidden=""/> |
|
|
</block> |
|
|
|
|
|
<trigger name="prodDeleteTrigger" type="NAMED"> |
|
|
ownItemBlock.prodCodeSEntry = "" |
|
|
ownItemBlock.prodNameSEntry = "" |
|
|
ownItemBlock.qtyEntry = 0.00 |
|
|
ownItemBlock.unitPriceEntry = 0.00 |
|
|
ownItemBlock.priceEntry = "0" |
|
|
#ownItemBlock.taxAmountEntry = 0 |
|
|
ownItemBlock.ivaEntry = 0 |
|
|
ownItemBlock.discountEntry = 0.00 |
|
|
ownItemBlock.bonusEntry = 0.00 |
|
|
ownItemBlock.itemTotalEntry = 0.00 |
|
|
|
|
|
callTrigger('totalCalcTrigger') |
|
|
</trigger> |
|
|
|
|
|
<trigger name="prodSearchTrigger" type="NAMED"> |
|
|
#armado de la lista de recorrido del arbol |
|
|
if tmpValuesDataSource.priceTypeId: |
|
|
search_id = str(tmpValuesDataSource.priceTypeId) |
|
|
priceListsChain=[] |
|
|
while search_id != "" : |
|
|
priceTypeBlock.initQuery() |
|
|
priceTypeBlock.priceTypeId = search_id |
|
|
priceTypeBlock.processQuery() |
|
|
search_id = str(priceTypeBlock.priceTypeParentId) |
|
|
priceListsChain.append("%s" % priceTypeBlock.priceTypeId) |
|
|
tmpProdResultBlock.clear() |
|
|
tmpProdResultBlock.initQuery() |
|
|
tmpProdResultBlock.prodNameEntry = ("%s" % ownItemBlock.prodNameSEntry)+"%" |
|
|
tmpProdResultBlock.prodCodeEntry = ("%s" % ownItemBlock.prodCodeSEntry)+"%" |
|
|
tmpProdResultBlock.prodCodeTypeEntry = "1" # Ver como elegimos el código adecuado |
|
|
tmpProdResultBlock.processQuery() |
|
|
# cargar la parte visible de modificacion de precios |
|
|
tmpProdResultBlock.firstRecord() |
|
|
product_id_anterior = None |
|
|
prodResultBlock.clear() |
|
|
for index in range(tmpProdResultBlock.getRecordCount()): |
|
|
product_id=("%s" %tmpProdResultBlock.prodIdEntry) |
|
|
if product_id != product_id_anterior: |
|
|
for pricetype in priceListsChain: |
|
|
if pricetype == ("%s" %tmpProdResultBlock.prodPriceTypeIdEntry): |
|
|
if len(str(prodResultBlock.prodNameEntry)): |
|
|
prodResultBlock.newRecord() |
|
|
prodResultBlock.prodNameEntry= ("%s" %tmpProdResultBlock.prodNameEntry) |
|
|
prodResultBlock.prodCodeEntry= ("%s" %tmpProdResultBlock.prodCodeEntry) |
|
|
prodResultBlock.prodPriceTypeEntry= ("%s" %tmpProdResultBlock.prodPriceTypeEntry) |
|
|
prodResultBlock.prodUnitPriceEntry= ("%s" %tmpProdResultBlock.prodUnitPriceEntry) |
|
|
prodResultBlock.prodPriceEntry = ("%s" %tmpProdResultBlock.prodPriceEntry) |
|
|
prodResultBlock.prodPricePreviousEntry= ("%s" %tmpProdResultBlock.prodUnitPriceEntry) |
|
|
prodResultBlock.prodProductIdEntry= ("%s" %tmpProdResultBlock.prodIdEntry) |
|
|
prodResultBlock.prodPriceListIdEntry= ("%s" %tmpProdResultBlock.prodPriceTypeIdEntry) |
|
|
prodResultBlock.prodIVATaxEntry= ("%s" %tmpProdResultBlock.prodIVATaxEntry) |
|
|
prodResultBlock.prodCurrencyRateEntry= ("%s" %tmpProdResultBlock.prodCurrencyRateEntry) |
|
|
product_id_anterior=product_id |
|
|
break |
|
|
tmpProdResultBlock.nextRecord() |
|
|
prodResultBlock.jumpRecord(0) |
|
|
recordCount = prodResultBlock.getRecordCount() |
|
|
if recordCount > 1: |
|
|
def callback (returnValue): |
|
|
global block |
|
|
if returnValue >= 0: |
|
|
prodResultBlock.jumpRecord(returnValue) |
|
|
callTrigger('prodInsertTrigger') |
|
|
|
|
|
runForm ('productSelect.gfd', {'data': prodResultBlock, 'callback': callback}) |
|
|
elif recordCount == 1: |
|
|
prodResultBlock.jumpRecord(0) |
|
|
if not prodResultBlock.isEmpty(): |
|
|
callTrigger('prodInsertTrigger') |
|
|
else: |
|
|
genericBox("Debe elegir un cliente para poder cargar productos",['Aceptar']) |
|
|
</trigger> |
|
|
|
|
|
<!-- En este bloque se almacena el reultado final/real de la búsqueda para seleccion el correcto --> |
|
|
<block name="prodResultBlock" datasource="prodResultDataSource" restrictInsert="" transparentBlock=""> |
|
|
<entry name="prodCodeEntry" width="10" x="37" y="10" rows="2" hidden=""/> |
|
|
<entry name="prodNameEntry" width="22" x="47" y="10" rows="2" hidden=""/> |
|
|
<entry name="prodPriceTypeEntry" x="1 " y="1" width="10" rows="8" hidden=""/> |
|
|
<entry name="prodUnitPriceEntry" x="1" y="1" width="10" rows="8" hidden=""/> |
|
|
<entry name="prodPriceEntry" x="1" y="1" width="20" rows="2" hidden=""/> |
|
|
<entry name="prodPricePreviousEntry" x="1" y="1" width="10" rows="8" hidden=""/> |
|
|
<entry name="prodProductIdEntry" x="1" y="1" width="5" rows="8" hidden=""/> |
|
|
<entry name="prodPriceListIdEntry" x="1" y="1" width="5" rows="8" hidden=""/> |
|
|
<entry name="prodIVATaxEntry" x="1" y="1" width="5" rows="8" hidden=""/> |
|
|
<entry name="prodCurrencyRateEntry" x="1" y="1" width="10" rows="8" hidden=""/> |
|
|
</block> |
|
|
<!-- Insertar el producto seleccionado --> |
|
|
<trigger name="prodInsertTrigger" type="NAMED"> |
|
|
import hack |
|
|
|
|
|
ownItemBlock.prodCodeSEntry = str(prodResultBlock.prodCodeEntry) |
|
|
ownItemBlock.prodNameSEntry = str(prodResultBlock.prodNameEntry) |
|
|
ownItemBlock.priceEntry = str(prodResultBlock.prodPriceEntry) |
|
|
|
|
|
prodResultBlock.prodUnitPriceEntry = hack.a2f(prodResultBlock.prodUnitPriceEntry,4) * \ |
|
|
hack.a2f(prodResultBlock.prodCurrencyRateEntry,4) |
|
|
lItemPrice = hack.a2f(prodResultBlock.prodUnitPriceEntry)*hack.a2f(ownItemBlock.qtyEntry,2) |
|
|
#ownItemBlock.taxAmountEntry = (hack.a2f(prodResultBlock.prodIVATaxEntry,4)/100) * lItemPrice |
|
|
ownItemBlock.ivaEntry = hack.a2f(prodResultBlock.prodIVATaxEntry,4) |
|
|
ownItemBlock.unitPriceEntry = hack.a2f(prodResultBlock.prodUnitPriceEntry,4) |
|
|
|
|
|
callTrigger('totalCalcTrigger') |
|
|
</trigger> |
|
|
<!-- ****** Fin búsqueda ************ --> |
|
|
|
|
|
<!-- Productos --> |
|
|
<block datasource="ownItemDataSource" name="ownItemBlock"> |
|
|
<!-- <trigger name="ownItemFocusOut" type="PRE-FOCUSOUT" --> |
|
|
<!-- src="totalCalcTrigger" /> --> |
|
|
<entry name="ivaRNIAmountEntry" x="1" y ="1" hidden=""/> |
|
|
<entry name="ivaAmountEntry" x="1" y ="1" hidden=""/> |
|
|
<entry name="ownItemId" x="1" y ="1" hidden="" field="own_item.id"/> |
|
|
<label text="Productos de la Nota de Crédito" x="1" y="9"/> |
|
|
<label text="Código" x="1" y="10"/> |
|
|
<entry name="prodCodeSEntry" width="14" x="1" y="11" rows="10"> |
|
|
<options> |
|
|
<option name="tip" value="Insertar el código"/> |
|
|
</options> |
|
|
</entry> |
|
|
<label text="Nombre" x="15" y="10"/> |
|
|
<entry name="prodNameSEntry" width="20" x="15" y="11" rows="10"> |
|
|
<options> |
|
|
<option name="tip" value="Insertar el nombre o descripción del producto"/> |
|
|
</options> |
|
|
</entry> |
|
|
<button name="prodSearchButton" trigger="prodSearchTrigger" label="Buscar" width="7" height="10" x="35" y="11"/> |
|
|
<button name="prodCallFormButton" trigger="prodCallFormTrigger" label=".." width="3" height="10" x="42" y="11"/> |
|
|
|
|
|
<entry field="own_item.own_document" name="ownDocumentEntry" hidden="" x="1" y="1"/> |
|
|
|
|
|
<label name="qtyLbl" text="Cantidad" x="45" y="10"/> |
|
|
<!-- mdione's bookmark --> |
|
|
<entry field="own_product_item.qty" name="qtyEntry" rows="10" typecast="number" displaymask="%0.4f" width="11" x="45" y="11"> |
|
|
<trigger name="qtyEntryPreFocusout" type="PRE-FOCUSOUT" src="totalCalcTrigger" /> |
|
|
</entry> |
|
|
|
|
|
<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.4f"> |
|
|
<trigger name="unitPriceEntryPreFocusout" type="PRE-FOCUSOUT" src="totalCalcTrigger" /> |
|
|
</entry> |
|
|
<entry x="1" y="14" readonly="" field="own_product_item.price" name="priceEntry" width="10" rows="5" hidden=""/> |
|
|
|
|
|
|
|
|
<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"> |
|
|
<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"> |
|
|
<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=""/> |
|
|
<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"/> |
|
|
<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> |
|
|
<button name="prodDeleteButton" trigger="prodDeleteTrigger" label="Borrar" width="7" height="10" x="95" y="11"/> |
|
|
<scrollbar page="5" x="103" y="11" width="1" height="10"/> |
|
|
<button name="printButton" label="Imprimir" trigger="printTrigger" |
|
|
x="25" y="24" width="14" height="1"/> |
|
|
<button x="45" y="24" trigger="rollbackTrigger" width="14" label="Cancelar" |
|
|
name="rollbackBtn" height="1"/> |
|
|
</block> |
|
|
|
|
|
<neb:Sub neb:src="ownItemTax.nebc"/> |
|
|
|
|
|
<!-- Bloques que sirven para el pago --> |
|
|
<block name="ownDocumentProceedingBlock" datasource="ownDocumentProceedingDataSource" transparentBlock=""> |
|
|
<entry name="proceedingEntry" field="proceeding" hidden="" x="1" y="1" width="12"/> |
|
|
<entry name="ownDocumentEntry" field="own_document" hidden="" x="1" y="1" width="12"/> |
|
|
<entry name="amountEntry" field="amount" hidden="" x="1" y="1" width="12"/> |
|
|
</block> |
|
|
<block name="currencyMovementBlock" datasource="currencyMovementDataSource" transparentBlock=""> |
|
|
<entry name="proceedingEntry" field="movement.proceeding" hidden="" x="1" y="1" width="12"/> |
|
|
<entry name="movementTypeEntry" field="movement.movement_type" hidden="" x="1" y="1" width="12"/> |
|
|
<entry name="amountEntry" field="movement.amount" hidden="" x="1" y="1" width="12"/> |
|
|
<entry name="currencyTypeEntry" field="currency_movement.currency_type" hidden="" x="1" y="1" width="12"/> |
|
|
</block> |
|
|
<!-- Datasource que sirve para almacenar el resultado de la búsqueda --> |
|
|
<block datasource="ownDocumentDataSource" name="totalBlock" restrictInsert=""> |
|
|
<label text="Neto " x="55" y="21"/> |
|
|
<entry name="netoEntry" field="net_total" x="55" y="22" width="10" typecast="number" displaymask="%0.2f" |
|
|
default="0.00"> |
|
|
<trigger type="PRE-FOCUSOUT" src="recalcTotalTrigger"/> |
|
|
</entry> |
|
|
<label text="IVA " x="66" y="21"/> |
|
|
<entry name="ivaEntry" field="tax_total" x="66" y="22" width="10" typecast="number" displaymask="%0.2f" |
|
|
default="0.00"> |
|
|
<trigger type="PRE-FOCUSOUT" src="recalcTotalTrigger"/> |
|
|
</entry> |
|
|
<label text="Total " x="82" y="21"/> |
|
|
<entry name="totalEntry" style="label" readonly="" x="82" y="22" width="10" typecast="number" displaymask="%0.2f" |
|
|
default="0.00"/> |
|
|
</block> |
|
|
<neb:Sub neb:src="setStock.nebc" ownDocumentId="ownDocumentBlock.idEntry" storehouseEntityId="ownStorehouseBlock.ownStorehouseIdEntry" |
|
|
stockAddTrigger="stockAddTrigger" stockSubstractTrigger="stockSubstractTrigger"/> |
|
|
|
|
|
|
|
|
<!-- <box height="4" label="Cobro de la Nota de Crédito" name="payBox" --> |
|
|
<!-- width="82" x="0" y="23"> --> |
|
|
<!-- <block datasource="payDataSource" name="payBlock"> --> |
|
|
<!-- <label text="Efectivo : " x="1" y="1"/> --> |
|
|
<!-- <entry name="cashEntry" typecast="number" displaymask="%0.2f" default="0.00" --> |
|
|
<!-- x="11" y="1" width="12"> --> |
|
|
<!-- <trigger name="cashEntryPreFocusout" type="Pre-Focusout"> --> |
|
|
<!-- import hack --> |
|
|
<!-- payBlock.ctaCteEntry = str(hack.a2f(totalBlock.totalEntry) - hack.a2f(payBlock.cashEntry)) --> |
|
|
<!-- </trigger> --> |
|
|
<!-- </entry> --> |
|
|
<!-- <label text="Cta. Cte. : " x="24" y="1"/> --> |
|
|
<!-- <entry name="ctaCteEntry" typecast="number" displaymask="%0.2f" default="0.00" --> |
|
|
<!-- x="36" y="1" width="12"> --> |
|
|
<!-- <trigger name="ctaCteEntryPreFocusOut" type="Pre-Focusout"> --> |
|
|
<!-- import hack --> |
|
|
<!-- payBlock.cashEntry = str(hack.a2f(totalBlock.totalEntry) - hack.a2f(payBlock.ctaCteEntry)) --> |
|
|
<!-- </trigger> --> |
|
|
<!-- </entry> --> |
|
|
|
|
|
<!-- </block> --> |
|
|
<!-- </box> --> |
|
|
<!-- <block name="ownOrganizationBlock" datasource="ownOrganizationDataSource"> --> |
|
|
<!-- <entry name="condIVAEntry" field="_tax_profile_data._table" hidden="" x="1" y="1" width="10"/> --> |
|
|
<!-- </block> --> |
|
|
</page> |
|
19 |
</form> |
</form> |