$document_name => ''
$document_type_A => ''
$document_type_B => ''
$document_type_C => ''
$stock_alta => ''
$stock_borrado => ''
tmpValuesDataSource.priceTypeId = None
tmpValuesDataSource.priceWithIva = 0
ownOrganizationBlock.clear()
ownOrganizationBlock.initQuery()
ownOrganizationBlock.processQuery()
print "iva condition" , str(ownOrganizationBlock.condIVAEntry)
print "entity id", str(ownOrganizationBlock.ownOrganizationIdEntry)
tmpValuesDataSource.ownOrganizationId = str(ownOrganizationBlock.ownOrganizationIdEntry)
tmpValuesDataSource.ownIVACond = str(ownOrganizationBlock.condIVAEntry)
tmpBlock.tmpDateEntry = ownDocumentDataSource.getTimeStamp()
import hack
if len(str(ownDocAuxBlock.withIvaEntry)) and \
len(str(ownItemBlock.unitPriceAuxEntry)) and \
len(str(ownItemBlock.ivaEntry)):
if int(str(ownDocAuxBlock.withIvaEntry)):
ownItemBlock.unitPriceEntry = hack.a2f(ownItemBlock.unitPriceAuxEntry,4)/ round(1+hack.a2f(ownItemBlock.ivaEntry,4)/100,4)
else:
ownItemBlock.unitPriceEntry = str(ownItemBlock.unitPriceAuxEntry)
invoiceType = str(ownDocumentBlock.invoiceTypeEntry).strip().lower()
if invoiceType == 'a':
ownDocumentBlock.typeEntry = '"'.$document_type_A.'"'
elif invoiceType == 'b':
ownDocumentBlock.typeEntry = '"'.$document_type_B.'"'
elif invoiceType == 'c':
ownDocumentBlock.typeEntry = '"'.$document_type_C.'"'
else:
ownDocumentBlock.typeEntry = ''
0 and len(ownItemBlock.prodNameSEntry) > 0:
if not str(ownDocumentBlock.invoiceTypeEntry):
genericBox("Falta el tipo de comprobante",["Aceptar"])
else:
setFocus(currencyTypeBlock.currencyBox.payEntry)
callTrigger('currencyWorkTrigger')
]]>
import hack
ownDocumentBlock.numberEntry = str(ownPosDocumentBlock.documentNumberEntry)
#cargo pos
ownDocumentBlock.ownPosEntityIdEntry = str(ownPosBlock.ownPosEntityIdEntry)
#/cargo pos
ownDocumentBlock.dueDateEntry = str(payBlock.dateEntry)
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()
#cargo documento de retenciones
callTrigger('retentionCommitTrigger')
callTrigger('proceedingCommitTrigger')
postChangeAdvance = 5
#lOwnDocId = str(ownDocumentBlock.idEntry)
#if stock by invoice
if str(ownPosBlock.stockByInvoice) == "1":
print "llamado al trigger"
callTrigger('$stock_alta')
callTrigger('taxFillTrigger')
ownItemTaxBlock.postChanges()
ownDocumentTaxTotalBlock.postChanges()
commitConnection()
except DBError, err:
rollbackConnection()
message = ["el comprobante","el número del comprobante","el procedimiento General",
"el procedimiento del comprobante","las monedas de pago del comprobante",
"el stock" ]
genericBox("Hay problemas para grabar "+message[postChangeAdvance]+"\n"+str(err),['Aceptar'])
# this one's called from the print trigger, so let it know something went wrong
raise
tmpValuesDataSource.priceWithIva = 0
setFocus(ownItemBlock.prodCodeSEntry)
tmpValuesDataSource.priceTypeId = None
tmpValuesDataSource.priceWithIva = 0
clear()
tmpBlock.tmpDateEntry = ownDocumentDataSource.getTimeStamp()
#setFocus(ownDocumentBlock.clientCodeEntry)
callTrigger('rollbackTrigger')
ownDocumentBlock.clear()
exit()
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)
# lo traigo de tax_formula
#ivaSourceCode = str(tmpValuesDataSource.IVAGraft)
#amount = lItemPrice
#taxPercent = hack.a2f(ownItemBlock.ivaEntry,4)
#exec(ivaSourceCode)
#aca debo cargarlo en item tax
#ownItemBlock.taxAmountEntry = hack.a2f(graft(ownIVACond,alienIVACond,amount,taxPercent),4)
# IVA
lTTax = hack.a2f(totalBlock.ivaEntry,2)
amount = lItemPrice
taxPercent = hack.a2f(ownItemBlock.ivaEntry,2)
#print "iva fmla",str(tmpValuesDataSource.IVAGraft)
#print "iva RNI fmla",tmpValuesDataSource.IVARNIGraft
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 += hack.a2f(lRecord.getField("own_item_tax.amount"),4)
ownDocumentBlock.netTotalEntry = str(round(lTNeto,2))
totalBlock.netoEntry = str(round(lTNeto,2))
ownDocumentBlock.taxTotalEntry = str(round(lTTax,2))
totalBlock.ivaEntry = str(round(lTTax,2))
totalBlock.totalEntry = str(round(lTNeto+lTTax,2))
payBlock.cashEntry = str(round(lTNeto+lTTax,2))
payBlock.ctaCteEntry = "0.0"
if ($document_type_A == 4) {
if str(ownDocumentBlock.relatedToEntry)and (str(totalBlock.printDespatchNote) == "1") :
genericBox("Solo se incluira como relacionado el remito generado\n",['Aceptar'])
}
print "volvi"
if ($document_type_A == 4) {
import hack
reportNo= str(ownDocumentBlock.typeEntry)
#print 'here nos iva cond _ ell iva cond: %s, %s' % (str(tmpValuesDataSource.alienIVACond), str(tmpValuesDataSource.ownIVACond))
if str(tmpValuesDataSource.alienIVACond)=='2' and str(tmpValuesDataSource.ownIVACond)=='1':
# hack to use alternative report and print config
reportNo= '4_and_half'
report='productInvoice-%s' % reportNo
print 'here: %s' % reportNo
print "llamo al hack.pleasePrint"
hack.pleasePrint (self, reportNo, report, [ 'id='+str(ownDocumentBlock.idEntry) ],str(ownPosDocumentBlock.documentPrintCommand))
}
callTrigger('rollbackTrigger')
if ($document_type_A == 4) {
import hack
print "entro al trigger"
if str(totalBlock.printDespatchNote) == "1":
# defino la funcion de callback
def invoiceForDespatchNote (despatchNoteId,despatchNoteNumber):
print "id",despatchNoteId,"number",despatchNoteNumber
ownDocumentBlock.relatedToEntry = str(despatchNoteNumber).strip().rjust(8).replace(' ','0')
#solo para que no ensucie el update
if str(ownDocumentBlock.dueDateEntry) == "":
ownDocumentBlock.dueDateEntry = None
documentRelationBlock.despatchEntry = str(despatchNoteId)
documentRelationBlock.invoiceEntry = str(ownDocumentBlock.idEntry)
documentRelationBlock.relationTypeEntry = str('"'.PAPO::invoiceOfDespatchNote.'"')
from gnue.common.GDataObjects import ConnectionError as DBError
try:
print "largo el post changes"
documentRelationBlock.postChanges()
ownDocumentBlock.postChanges()
commitConnection()
except DBError, err:
genericBox("Hay problemas para grabar el numero de remito\n"+str(err),['Aceptar'])
rollbackConnection()
callTrigger('invoiceForDespatchNoteTrigger')
# fin de definicion
print "llamo al otro form"
runForm ('despatchNote.gfd', {'invoiceid':str(ownDocumentBlock.idEntry),'invdocblock':ownDocumentBlock,'invitemblock':ownItemBlock ,'callback': invoiceForDespatchNote })
else:
print "no llamo a despatch note"
}
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')
]]>
if ($document_type_A == 4) {
}
ownItemBlock.prodCodeSEntry = ""
ownItemBlock.prodNameSEntry = ""
ownItemBlock.qtyEntry = 0.00
ownItemBlock.unitPriceEntry = 0.00
ownItemBlock.priceEntry = "0"
#IVA
#ownItemBlock.taxAmountEntry = 0
ownItemBlock.ivaEntry = 0
ownItemBlock.discountEntry = 0.00
ownItemBlock.bonusEntry = 0.00
ownItemBlock.itemTotalEntry = 0.00
callTrigger('totalCalcTrigger')
#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'])
import hack
ownItemBlock.prodCodeSEntry = str(prodResultBlock.prodCodeEntry)
ownItemBlock.prodNameSEntry = str(prodResultBlock.prodNameEntry)
ownItemBlock.priceEntry = str(prodResultBlock.prodPriceEntry)
prodResultBlock.prodUnitPriceEntry = round(hack.a2f(prodResultBlock.prodUnitPriceEntry,4) * \
hack.a2f(prodResultBlock.prodCurrencyRateEntry,4),4)
lItemPrice = round(hack.a2f(prodResultBlock.prodUnitPriceEntry,4)*hack.a2f(ownItemBlock.qtyEntry,4),2)
#ownItemBlock.taxAmountEntry = round((hack.a2f(prodResultBlock.prodIVATaxEntry,4)/100) * lItemPrice,4)
ownItemBlock.ivaEntry = hack.a2f(prodResultBlock.prodIVATaxEntry,2)
ownItemBlock.unitPriceAuxEntry = str(prodResultBlock.prodUnitPriceEntry)
callTrigger('setUnitPriceTrigger')
callTrigger('totalCalcTrigger')
if ($document_type_A == 4) {
}
0:
currencyTypeBlock.clear()
currencyDataBlock.clear()
rs = currencyTypeDataSource.createResultSet()
client = 0
more = rs.firstRecord()
while more:
if not currencyTypeBlock.getCurrentRecord().isEmpty():
currencyTypeBlock.newRecord()
currencyTypeBlock.currencyBox.idEntry = rs.current.getField("id")
currencyTypeBlock.currencyBox.nameEntry = rs.current.getField("name")
currencyTypeBlock.currencyBox.rateEntry = hack.a2f(rs.current.getField("rate"),4)
monto = round(hack.a2f(payBlock.cashEntry,4) / hack.a2f(rs.current.getField("rate"),4),4)
currencyTypeBlock.currencyBox.formatEntry = rs.current.getField("format")
currencyTypeBlock.currencyBox.amountEntry = str(currencyTypeBlock.currencyBox.formatEntry) % monto
currencyTypeBlock.currencyBox.payEntry = 0.0
more = rs.nextRecord()
currencyTypeBlock.firstRecord ()
currencyDataBlock.recipientBox.dateEntry = str(tmpBlock.tmpDateEntry)
currencyDataBlock.recipientBox.numberEntry = str(ownPosDocumentBlock.documentNumberEntry)
currencyDataBlock.clientRecipientBox.clientCodeEntry = str(ownDocumentBlock.clientRecipientBox.clientCodeEntry)
currencyDataBlock.clientRecipientBox.clientNameEntry = str(ownDocumentBlock.clientRecipientBox.clientNameEntry)
#payBlock.dateEntry = str(tmpBlock.tmpDateEntry)
currencyDataBlock.clientRecipientBox.totalEntry = str(hack.a2f(payBlock.cashEntry,2))
]]>
0:
total -= round(hack.a2f(currencyTypeBlock.currencyBox.payEntry,4) * hack.a2f(currencyTypeBlock.currencyBox.rateEntry,4),4)
rc = currencyTypeBlock.getRecordCount()
for recNum in range(rc):
currencyTypeBlock.jumpRecord(recNum)
if hack.a2f(currencyTypeBlock.currencyBox.rateEntry,4) > 0:
monto = round(total / hack.a2f(currencyTypeBlock.currencyBox.rateEntry,4),4)
currencyTypeBlock.currencyBox.amountEntry = str(currencyTypeBlock.currencyBox.formatEntry) % monto
currencyTypeBlock.jumpRecord(rn)
]]>
import hack
callTrigger('currencyTypeTrigger')
total = hack.a2f(payBlock.cashEntry,2)
rc = currencyTypeBlock.getRecordCount()
for recNum in range(rc):
currencyTypeBlock.jumpRecord(recNum)
if hack.a2f(currencyTypeBlock.currencyBox.rateEntry,4) > 0:
total -= round(hack.a2f(currencyTypeBlock.currencyBox.payEntry,4) * hack.a2f(currencyTypeBlock.currencyBox.rateEntry,4),4)
if round(total,2) != 0:
genericBox("El los montos no completan el total del documento\n",['Aceptar'])
else:
from gnue.common.GDataObjects import ConnectionError as DBError
callTrigger('startWaitingModeTrigger')
try:
callTrigger ('commitTrigger')
if ($document_type_A == 4) {
if str(totalBlock.printDespatchNote) == "1":
callTrigger('makeDespatchNote')
else:
reportNo= str(ownDocumentBlock.typeEntry)
print 'here: %s, %s' % (str(tmpValuesDataSource.alienIVACond), str(tmpValuesDataSource.ownIVACond))
if str(tmpValuesDataSource.alienIVACond)=='2' and str(tmpValuesDataSource.ownIVACond)=='1':
# hack to use alternative report and print config
reportNo= '4_and_half'
report='productInvoice-%s' % reportNo
print 'here: %s' % reportNo
hack.pleasePrint (self, reportNo, report, [ 'id='+str(ownDocumentBlock.idEntry) ],str(ownPosDocumentBlock.documentPrintCommand))
callTrigger('makeDespatchNote')
callTrigger('rollbackTrigger')
} else {
callTrigger('rollbackTrigger')
}
except DBError:
# just ignore, as the commit trigger already reports the error to the user
pass
callTrigger('endWaitingModeTrigger')
import hack
lCurrentCredit = round(hack.a2f(tmpValuesDataSource.creditLimitAmount,2) - \
hack.a2f(ownDocumentBlock.clientRecipientBox.deudaEntry,2),2)
newCtaCteValue = round(hack.a2f(totalBlock.totalEntry,2) - hack.a2f(retentionTmpBlock.retentionTotal,2) - hack.a2f(payBlock.cashEntry,2),2)
if newCtaCteValue > lCurrentCredit and hack.a2f(payBlock.cashEntry,2) != (hack.a2f(totalBlock.totalEntry,2) - hack.a2f(retentionTmpBlock.retentionTotal,2)):
genericBox("Esta excedido el Límite de Crédito",["Aceptar"])
payBlock.ctaCteEntry = "0.00"
payBlock.cashEntry = hack.a2f(totalBlock.totalEntry,2) - hack.a2f(retentionTmpBlock.retentionTotal,2)
else:
payBlock.ctaCteEntry = newCtaCteValue
callTrigger('currencyTypeTrigger')
import hack
lCurrentCredit = round(hack.a2f(tmpValuesDataSource.creditLimitAmount,2) - \
hack.a2f(ownDocumentBlock.clientRecipientBox.deudaEntry,2),2)
if not (0 >= lCurrentCredit and hack.a2f(payBlock.ctaCteEntry,2) == 0.00):
if hack.a2f(payBlock.ctaCteEntry,2) > lCurrentCredit:
genericBox("Esta excedido el Límite de Crédito",["Aceptar"])
payBlock.ctaCteEntry = "0.00"
payBlock.cashEntry = hack.a2f(totalBlock.totalEntry,2) - hack.a2f(retentionTmpBlock.retentionTotal,2)
else:
payBlock.cashEntry = str(round(hack.a2f(totalBlock.totalEntry,2) - hack.a2f(retentionTmpBlock.retentionTotal,2) - hack.a2f(payBlock.ctaCteEntry,2),2))
callTrigger('currencyTypeTrigger')
import hack
#levanto proceeding
proceedingBlock.clear()
proceedingBlock.dateEntry = proceedingDataSource.getTimeStamp()
proceedingBlock.postChanges()
#alien document proceeding
#recorro los documentos de retenciones cargo los alien_document_proceeding
rc = retentionBlock.getRecordCount()
for recNum in range(rc):
if (recNum > 0):
alienDocumentProceedingBlock.nextRecord()
retentionBlock.jumpRecord(recNum)
print "tipo",type(retentionBlock.idEntry)
if str(retentionBlock.idEntry):
alienDocumentProceedingBlock.proceedingEntry = str(proceedingBlock.idEntry)
alienDocumentProceedingBlock.alienDocumentEntry = str(retentionBlock.idEntry)
alienDocumentProceedingBlock.amountEntry = str(retentionBlock.retentionAmountEntry)
#own document proceeding
ownDocumentProceedingBlock.clear()
ownDocumentProceedingBlock.proceedingEntry = str(proceedingBlock.idEntry)
ownDocumentProceedingBlock.ownDocumentEntry = str(ownDocumentBlock.idEntry)
ownDocumentProceedingBlock.amountEntry = hack.a2f(payBlock.cashEntry)+hack.a2f(retentionTmpBlock.retentionTotal)
#currency
rc = currencyTypeBlock.getRecordCount()
for recNum in range(rc):
currencyTypeBlock.jumpRecord(recNum)
if hack.a2f(currencyTypeBlock.currencyBox.payEntry,2) > 0:
if not currencyMovementBlock.getCurrentRecord().isEmpty():
currencyMovementBlock.newRecord()
currencyMovementBlock.proceedingEntry = str(proceedingBlock.idEntry)
currencyMovementBlock.movementTypeEntry = "" # Revisar com queda esto
currencyMovementBlock.currencyTypeEntry = str(currencyTypeBlock.currencyBox.idEntry)
#currencyMovementBlock.amountEntry = str(round(hack.a2f(currencyTypeBlock.currencyBox.payEntry,2) * hack.a2f(currencyTypeBlock.currencyBox.rateEntry,4),2))
#ahora guardo moneda original
currencyMovementBlock.amountEntry = str(hack.a2f(currencyTypeBlock.currencyBox.payEntry,4))
#post changes
postChangeAdvance = 3
ownDocumentProceedingBlock.postChanges()
alienDocumentProceedingBlock.postChanges()
postChangeAdvance = 4
currencyMovementBlock.postChanges()
import hack
payBlock.cashEntry = round(hack.a2f(totalBlock.totalEntry,2) - hack.a2f(retentionTmpBlock.retentionTotal,2),2)
callTrigger('cashEntryPreFocusout')