175 |
<datasource database="papo" name="ownDocumentDataSource" table="own_document" |
<datasource database="papo" name="ownDocumentDataSource" table="own_document" |
176 |
order_by="date" /> |
order_by="date" /> |
177 |
|
|
|
<!-- Origen de datos que contiene el numero de la proxima nota de crédito --> |
|
|
<datasource name="branchDocumentDataSource" database="papo" |
|
|
table="branch_document, _branch_document_data" historytable="_branch_document_data"> |
|
|
<condition> |
|
|
<and> |
|
|
<eq> |
|
|
<cfield name="branch_document.id"/> |
|
|
<cfield name="_branch_document_data._table"/> |
|
|
</eq> |
|
|
<null> |
|
|
<cfield name="_branch_document_data._end_t"/> |
|
|
</null> |
|
|
</and> |
|
|
</condition> |
|
|
</datasource> |
|
178 |
|
|
179 |
<!-- Origen de datos que contiene los items de la nota de crédito --> |
<!-- Origen de datos que contiene los items de la nota de crédito --> |
180 |
|
|
256 |
runForm('product.gfd') |
runForm('product.gfd') |
257 |
]]></trigger> |
]]></trigger> |
258 |
|
|
|
<trigger name="searchNextCreditNoteNumber" type="NAMED"><![CDATA[ |
|
|
import gnue.common.GConditions as GConditions |
|
|
|
|
|
condCreditNoteNumber = GConditions.GCondition() |
|
|
|
|
|
tmpAnd = GConditions.GCand(condCreditNoteNumber) |
|
|
eq = GConditions.GCeq(tmpAnd) |
|
|
GConditions.GCField(eq,"_branch_document_data.document_type") |
|
|
GConditions.GCConst(eq,str(ownDocumentBlock.typeEntry)) |
|
|
|
|
|
branchDocumentDataSource.createResultSet(condCreditNoteNumber) |
|
|
|
|
|
]]></trigger> |
|
259 |
|
|
260 |
<trigger name="setCreditNoteType" type="NAMED"><![CDATA[ |
<trigger name="setCreditNoteType" type="NAMED"><![CDATA[ |
261 |
creditNoteType = str(ownDocumentBlock.creditNoteTypeEntry).strip().lower() |
creditNoteType = str(ownDocumentBlock.creditNoteTypeEntry).strip().lower() |
316 |
# it's _such_ a pitty |
# it's _such_ a pitty |
317 |
# pleasePrint ('serviceCreditNote', { 'id': str(ownDocumentBlock.idEntry) }) |
# pleasePrint ('serviceCreditNote', { 'id': str(ownDocumentBlock.idEntry) }) |
318 |
#report='productCreditNote-%s' % str(ownDocumentBlock.typeEntry) |
#report='productCreditNote-%s' % str(ownDocumentBlock.typeEntry) |
319 |
#hack.pleasePrint (self, str(ownDocumentBlock.typeEntry), report, [ 'id='+str(ownDocumentBlock.idEntry) ],branchDocumentBlock.documentPrintCommand) |
#hack.pleasePrint (self, str(ownDocumentBlock.typeEntry), report, [ 'id='+str(ownDocumentBlock.idEntry) ],ownPosDocumentBlock.documentPrintCommand) |
320 |
callTrigger('rollbackTrigger') |
callTrigger('rollbackTrigger') |
321 |
callTrigger('endWaitingModeTrigger') |
callTrigger('endWaitingModeTrigger') |
322 |
]]></trigger> |
]]></trigger> |
323 |
|
|
324 |
<trigger name="commitTrigger" type="NAMED"> |
<trigger name="commitTrigger" type="NAMED"> |
325 |
|
|
326 |
ownDocumentBlock.numberEntry= str(branchDocumentBlock.documentNumberEntry) |
ownDocumentBlock.numberEntry= str(ownPosDocumentBlock.documentNumberEntry) |
327 |
branchDocumentBlock.documentNumberEntry.atomicModify (lambda x: int(x)+1) |
ownPosDocumentBlock.documentNumberEntry.atomicModify (lambda x: int(x)+1) |
328 |
|
|
329 |
ownDocumentBlock.dateEntry = str(tmpBlock.tmpDateEntry ) |
ownDocumentBlock.dateEntry = str(tmpBlock.tmpDateEntry ) |
330 |
if len(ownDocumentBlock.dateEntry) == 0: |
if len(ownDocumentBlock.dateEntry) == 0: |
569 |
<label name="dateLbl" text="Fecha" x="1" y="1" /> |
<label name="dateLbl" text="Fecha" x="1" y="1" /> |
570 |
<entry name="tmpDateEntry" typecast="date" |
<entry name="tmpDateEntry" typecast="date" |
571 |
width="14" x="7" y="1"/> |
width="14" x="7" y="1"/> |
572 |
|
<label name="numberLabel" text="Número de Nota de Crédito:" x="32" y="1"/> |
573 |
</block> |
</block> |
574 |
|
<!-- # de la nota de crédito --> |
575 |
<!-- # de nota de crédito --> |
<neb:Sub neb:src="posDocument.nebc" documentType="ownDocumentBlock.typeEntry" |
576 |
<block name="branchDocumentBlock" datasource="branchDocumentDataSource"> |
ownPosDocumentBlock="ownPosDocumentBlock " documentNumberEntry="documentNumberEntry" |
577 |
<label name="dateLabel" text="Número de Nota de Crédito:" |
documentNumberEntryX="65" documentNumberEntryY="1" |
578 |
x="32" y="1"/> |
searchNextDocumentNumber="searchNextCreditNoteNumber" > |
579 |
<entry name="documentNumberEntry" field="_branch_document_data.number" style="label" |
</neb:Sub> |
580 |
x="65" y="1" width="15"/> |
|
|
<entry name="documentTypeEntry" field="_branch_document_data.document_type" hidden="" |
|
|
x="50" y="1" width="15"/> |
|
|
<entry name="branchEntry" field="_branch_document_data.branch" hidden="" |
|
|
x="50" y="1" width="15"/> |
|
|
<entry name="documentPrintCommand" field="_branch_document_data.print_command" hidden="" |
|
|
x="50" y="1" width="15"/> |
|
|
</block> |
|
|
|
|
581 |
</box> |
</box> |
582 |
|
|
583 |
<!-- ******************************** --> |
<!-- ******************************** --> |