|
@@ -134,10 +134,19 @@ class EiruPosSessionConfirm(models.Model):
|
|
|
|
|
|
balanceLine = []
|
|
balanceLine = []
|
|
if(amountStatement != statement['amountConfirm']):
|
|
if(amountStatement != statement['amountConfirm']):
|
|
- amountConfirm = statement['amountConfirm'] - amountStatement
|
|
|
|
- name = "Ajuste de cierre de caja (POS)"
|
|
|
|
- referencia = "Ganancia" if(amountConfirm > 0) else "Perdida"
|
|
|
|
|
|
+ # amountConfirm = (statement['amountConfirm']) - (amountStatement)
|
|
|
|
+
|
|
|
|
+ if (amountStatement < 0):
|
|
|
|
+ balanceNegative = self.confirm_pos_create_statement_line(bankStatement, "Ajuste saldo negativo PTV", abs(amountStatement), "Perdida")
|
|
|
|
+ amountStatement = 0.0
|
|
|
|
+
|
|
|
|
+ amountConfirm = (statement['amountConfirm']) - (amountStatement)
|
|
|
|
|
|
|
|
+
|
|
|
|
+ name = "Ajuste de cierre de caja (POS)"
|
|
|
|
+ referencia = "Ganancia" if(amountConfirm >= 0) else "Perdida"
|
|
|
|
+ # referencia = "Ganancia" if((amountConfirm >= 0) and (amountStatement >= 0) ) else "Perdida"
|
|
|
|
+ # import web_pdb; web_pdb.set_trace()
|
|
balanceLine = self.confirm_pos_create_statement_line( bankStatement, name, amountConfirm, referencia)
|
|
balanceLine = self.confirm_pos_create_statement_line( bankStatement, name, amountConfirm, referencia)
|
|
|
|
|
|
cashboxConfirm = {
|
|
cashboxConfirm = {
|
|
@@ -196,6 +205,7 @@ class EiruPosSessionConfirm(models.Model):
|
|
if (bankStatement.balance_start > 0):
|
|
if (bankStatement.balance_start > 0):
|
|
amountStatement += bankStatement.balance_start
|
|
amountStatement += bankStatement.balance_start
|
|
|
|
|
|
|
|
+ # import web_pdb; web_pdb.set_trace()
|
|
if (amountStatement > 0.0):
|
|
if (amountStatement > 0.0):
|
|
name="Saldo para próxima apertura de caja"
|
|
name="Saldo para próxima apertura de caja"
|
|
lineNextOpen = self.confirm_pos_create_statement_line(bankStatement, name, (- amountStatement), "TPV")
|
|
lineNextOpen = self.confirm_pos_create_statement_line(bankStatement, name, (- amountStatement), "TPV")
|