419 |
if rs.firstRecord(): |
if rs.firstRecord(): |
420 |
ownDocumentBlock.clientRecipientBox.currentClientEntry = rs.current.getField('_entity_data._table') |
ownDocumentBlock.clientRecipientBox.currentClientEntry = rs.current.getField('_entity_data._table') |
421 |
if str(ownDocumentBlock.clientRecipientBox.currentClientEntry): |
if str(ownDocumentBlock.clientRecipientBox.currentClientEntry): |
422 |
|
print "here1: %s" % str(ownDocumentBlock.clientRecipientBox.clientEntry) |
423 |
# Actualiza el puntaje |
# Actualiza el puntaje |
424 |
ownDocumentBlock.clientRecipientBox.scoreEntry = str(ownDocumentBlock.clientRecipientBox.clientEntry) |
ownDocumentBlock.clientRecipientBox.scoreEntry = str(ownDocumentBlock.clientRecipientBox.clientEntry) |
425 |
|
print "here2: %s" % str(ownDocumentBlock.clientRecipientBox.clientEntry) |
426 |
# Actualiza el limite de credito |
# Actualiza el limite de credito |
427 |
ownDocumentBlock.clientRecipientBox.creditLimitEntry = str(ownDocumentBlock.clientRecipientBox.clientEntry) |
a= str(ownDocumentBlock.clientRecipientBox.clientEntry) |
428 |
|
print a |
429 |
|
ownDocumentBlock.clientRecipientBox.creditLimitEntry = a |
430 |
|
print "here3: %s" % str(ownDocumentBlock.clientRecipientBox.clientEntry) |
431 |
# Aca si existe un balance, calcula la deuda desde ese balance en adelante sino |
# Aca si existe un balance, calcula la deuda desde ese balance en adelante sino |
432 |
# calcula la deuda desde el primer documento vinculado al cliente actual |
# calcula la deuda desde el primer documento vinculado al cliente actual |
433 |
creditLimitBlock.processRollback() |
creditLimitBlock.processRollback() |
434 |
|
print "here4: %s" % str(ownDocumentBlock.clientRecipientBox.clientEntry) |
435 |
creditLimitBlock.initQuery() |
creditLimitBlock.initQuery() |
436 |
|
print "here: %s" % str(ownDocumentBlock.clientRecipientBox.clientEntry) |
437 |
creditLimitBlock.entityEntry = str(ownDocumentBlock.clientRecipientBox.currentClientEntry) |
creditLimitBlock.entityEntry = str(ownDocumentBlock.clientRecipientBox.currentClientEntry) |
438 |
|
print "here: %s" % str(ownDocumentBlock.clientRecipientBox.clientEntry) |
439 |
creditLimitBlock.processQuery() |
creditLimitBlock.processQuery() |
440 |
|
print "here: %s" % str(ownDocumentBlock.clientRecipientBox.clientEntry) |
441 |
calculatedValuesDataSource.creditLimitAmount = str(creditLimitBlock.creditLimitAmountEntry) |
calculatedValuesDataSource.creditLimitAmount = str(creditLimitBlock.creditLimitAmountEntry) |
442 |
|
print "here: %s" % str(ownDocumentBlock.clientRecipientBox.clientEntry) |
443 |
|
|
444 |
import gnue.common.GConditions as GConditions |
import gnue.common.GConditions as GConditions |
445 |
import hack |
import hack |
450 |
|
|
451 |
balance = 0 |
balance = 0 |
452 |
if str(creditLimitBlock.balanceEntry): |
if str(creditLimitBlock.balanceEntry): |
453 |
|
print "here1: %s" % str(ownDocumentBlock.clientRecipientBox.clientEntry) |
454 |
tmpAnd = GConditions.GCand(condProductInvoice) |
tmpAnd = GConditions.GCand(condProductInvoice) |
455 |
gt = GConditions.GCgt(tmpAnd) |
gt = GConditions.GCgt(tmpAnd) |
456 |
GConditions.GCField(gt,"own_document.date") |
GConditions.GCField(gt,"own_document.date") |
474 |
GConditions.GCConst(eq,str(ownDocumentBlock.clientRecipientBox.currentClientEntry)) |
GConditions.GCConst(eq,str(ownDocumentBlock.clientRecipientBox.currentClientEntry)) |
475 |
balance = hack.a2f(creditLimitBlock.balance) |
balance = hack.a2f(creditLimitBlock.balance) |
476 |
else: |
else: |
477 |
|
print "here2: %s" % str(ownDocumentBlock.clientRecipientBox.clientEntry) |
478 |
eq = GConditions.GCeq(condProductInvoice) |
eq = GConditions.GCeq(condProductInvoice) |
479 |
GConditions.GCField(eq,"_entity_data._table") |
GConditions.GCField(eq,"_entity_data._table") |
480 |
GConditions.GCConst(eq,str(ownDocumentBlock.clientRecipientBox.currentClientEntry)) |
GConditions.GCConst(eq,str(ownDocumentBlock.clientRecipientBox.currentClientEntry)) |
492 |
spentTotal = 0 |
spentTotal = 0 |
493 |
|
|
494 |
while more: |
while more: |
495 |
|
print "here: %s" % str(ownDocumentBlock.clientRecipientBox.clientEntry) |
496 |
invoiceTotal = 0 |
invoiceTotal = 0 |
497 |
currOwnDoc = productInvoiceResultSet.current.getField("own_document.id") |
currOwnDoc = productInvoiceResultSet.current.getField("own_document.id") |
498 |
while productInvoiceResultSet.current.getField("own_document.id") == currOwnDoc and more: |
while productInvoiceResultSet.current.getField("own_document.id") == currOwnDoc and more: |
569 |
x="32" y="1" /> |
x="32" y="1" /> |
570 |
<!-- foreign_key y foreign_key_description estan deprecados --> |
<!-- foreign_key y foreign_key_description estan deprecados --> |
571 |
<!-- se van a llamar fk_source y fk_description respectivamente --> |
<!-- se van a llamar fk_source y fk_description respectivamente --> |
572 |
<entry name="scoreEntry" field="recipient" style="textlookup" readonly="" |
<entry name="scoreEntry" field="recipient" |
573 |
|
style="textlookup" readonly="" |
574 |
foreign_key="clientDataSource._entity_data.id" foreign_key_description="_client_data.score" |
foreign_key="clientDataSource._entity_data.id" foreign_key_description="_client_data.score" |
575 |
x="32" y="2" width="10"/> |
x="32" y="2" width="10"/> |
576 |
<label name="ctaCteLabel" text="Cta. Cte." |
<label name="ctaCteLabel" text="Cta. Cte." |
577 |
x="43" y="1"/> |
x="43" y="1"/> |
578 |
<!-- foreign_key y foreign_key_description estan deprecados --> |
<!-- foreign_key y foreign_key_description estan deprecados --> |
579 |
<!-- se van a llamar fk_source y fk_description respectivamente --> |
<!-- se van a llamar fk_source y fk_description respectivamente --> |
580 |
<entry name="creditLimitEntry" field="recipient" style="textlookup" readonly="" |
<entry name="creditLimitEntry" field="recipient" style="textlookup" |
581 |
|
readonly="" displaymask="%0.2f" |
582 |
foreign_key="textLookUpCreditLimitDataSource._entity_data.id" |
foreign_key="textLookUpCreditLimitDataSource._entity_data.id" |
583 |
foreign_key_description="_credit_limit_data.credit_limit" |
foreign_key_description="_credit_limit_data.credit_limit" |
584 |
x="43" y="2" width="8"/> |
x="43" y="2" width="8"/> |
672 |
<block name="totalBlock" datasource="calculatedValuesDataSource"> |
<block name="totalBlock" datasource="calculatedValuesDataSource"> |
673 |
<label text="Total" |
<label text="Total" |
674 |
x="53" y="13"/> |
x="53" y="13"/> |
675 |
|
<<<<<<< serviceInvoice.gfd |
676 |
|
<entry name="totalEntry" style="label" typecast="number" displaymask="%0.2f" default="0" |
677 |
|
======= |
678 |
<entry name="totalEntry" style="label" typecast="number" displaymask="%0.2f" default="0.00" |
<entry name="totalEntry" style="label" typecast="number" displaymask="%0.2f" default="0.00" |
679 |
|
>>>>>>> 1.18 |
680 |
x="64" y="13" width="12"/> |
x="64" y="13" width="12"/> |
681 |
</block> |
</block> |
682 |
</box> |
</box> |
685 |
<block name="paymentBlock" datasource="paymentDataSource"> |
<block name="paymentBlock" datasource="paymentDataSource"> |
686 |
<label text="Efectivo :" |
<label text="Efectivo :" |
687 |
x="1" y="1"/> |
x="1" y="1"/> |
688 |
|
<<<<<<< serviceInvoice.gfd |
689 |
|
<entry name="cashEntry" typecast="number" displaymask="%0.2f" default="0" |
690 |
|
======= |
691 |
<entry name="cashEntry" typecast="number" displaymask="%0.2f" default="0.00" |
<entry name="cashEntry" typecast="number" displaymask="%0.2f" default="0.00" |
692 |
|
>>>>>>> 1.18 |
693 |
x="11" y="1" width="12"> |
x="11" y="1" width="12"> |
694 |
<trigger name="cashEntryPreFocusOut" type="Pre-Focusout"><![CDATA[ |
<trigger name="cashEntryPreFocusOut" type="Pre-Focusout"><![CDATA[ |
695 |
from hack import a2f |
from hack import a2f |
699 |
</entry> |
</entry> |
700 |
<label text="Cta. Cte. :" |
<label text="Cta. Cte. :" |
701 |
x="24" y="1"/> |
x="24" y="1"/> |
702 |
|
<<<<<<< serviceInvoice.gfd |
703 |
|
<entry name="ctaCteEntry" typecast="number" displaymask="%0.2f" default="0" |
704 |
|
======= |
705 |
<entry name="ctaCteEntry" typecast="number" displaymask="%0.2f" default="0.00" |
<entry name="ctaCteEntry" typecast="number" displaymask="%0.2f" default="0.00" |
706 |
|
>>>>>>> 1.18 |
707 |
x="36" y="1" width="12"> |
x="36" y="1" width="12"> |
708 |
<trigger name="ctaCteEntryPreFocusOut" type="Pre-Focusout"><![CDATA[ |
<trigger name="ctaCteEntryPreFocusOut" type="Pre-Focusout"><![CDATA[ |
709 |
from hack import a2f |
from hack import a2f |