87 |
<cfield name="own_item.id"/> |
<cfield name="own_item.id"/> |
88 |
<cfield name="own_item_tax.own_item"/> |
<cfield name="own_item_tax.own_item"/> |
89 |
</eq> |
</eq> |
90 |
|
<eq> |
91 |
|
<cfield name="own_document.own_document_type"/> |
92 |
|
<cconst value="1"/> |
93 |
|
</eq> |
94 |
</and> |
</and> |
95 |
</condition> |
</condition> |
96 |
</datasource> |
</datasource> |
149 |
</condition> |
</condition> |
150 |
</datasource> |
</datasource> |
151 |
|
|
152 |
|
<datasource name="movementDataSource" database="papo" table="movement"/> |
153 |
|
|
154 |
|
<datasource name="proceedingDataSource" database="papo" table="proceeding"/> |
155 |
|
|
156 |
|
<datasource name="ownDocumentProceedingDataSource" database="papo" table="own_document_proceeding"/> |
157 |
|
<datasource name="currencyMovementDataSource" database="papo" |
158 |
|
table="movement, currency_movement"> |
159 |
|
<condition> |
160 |
|
<eq> |
161 |
|
<cfield name="movement.id"/> |
162 |
|
<cfield name="currency_movement.movement"/> |
163 |
|
</eq> |
164 |
|
</condition> |
165 |
|
</datasource> |
166 |
|
|
167 |
<datasource name="tmpInvToPayedDataSource" cache="1"/> |
<datasource name="tmpInvToPayedDataSource" cache="1"/> |
168 |
|
|
169 |
<datasource name="invoiceToPayedDataSource" cache="1"/> |
<datasource name="invoiceToPayedDataSource" cache="1"/> |
170 |
|
|
171 |
<trigger type="NAMED" name="showInvoiceToPayTrigger"><![CDATA[ |
<trigger type="NAMED" name="showInvoiceToPayTrigger"><![CDATA[ |
172 |
|
total = 0.0 |
173 |
if str(ownDocumentBlock.clientRecipientBox.clientEntry): |
if str(ownDocumentBlock.clientRecipientBox.clientEntry): |
174 |
import gnue.common.GConditions as GConditions |
import gnue.common.GConditions as GConditions |
175 |
import hack |
import hack |
233 |
for recNum in range(rc): |
for recNum in range(rc): |
234 |
tmpInvToPayedBlock.jumpRecord(recNum) |
tmpInvToPayedBlock.jumpRecord(recNum) |
235 |
if hack.a2f(tmpInvToPayedBlock.payedEntry) < hack.a2f(tmpInvToPayedBlock.amountEntry): |
if hack.a2f(tmpInvToPayedBlock.payedEntry) < hack.a2f(tmpInvToPayedBlock.amountEntry): |
236 |
invoiceToPayedBlock.invoiceBox.idEntry = tmpInvToPayedBlock.idEntry |
invoiceToPayedBlock.invoiceBox.idEntry = str(tmpInvToPayedBlock.idEntry) |
237 |
invoiceToPayedBlock.invoiceBox.dateEntry = tmpInvToPayedBlock.dateEntry |
invoiceToPayedBlock.invoiceBox.dateEntry = str(tmpInvToPayedBlock.dateEntry) |
238 |
invoiceToPayedBlock.invoiceBox.amountEntry = tmpInvToPayedBlock.amountEntry |
invoiceToPayedBlock.invoiceBox.amountEntry = str(tmpInvToPayedBlock.amountEntry) |
239 |
invoiceToPayedBlock.invoiceBox.payedEntry = tmpInvToPayedBlock.payedEntry |
invoiceToPayedBlock.invoiceBox.payedEntry = str(tmpInvToPayedBlock.payedEntry) |
240 |
invoiceToPayedBlock.invoiceBox.payEntry = str( |
invoiceToPayedBlock.invoiceBox.payEntry = str( |
241 |
hack.a2f(tmpInvToPayedBlock.amountEntry) - \ |
hack.a2f(tmpInvToPayedBlock.amountEntry) - \ |
242 |
hack.a2f(tmpInvToPayedBlock.payedEntry)) |
hack.a2f(tmpInvToPayedBlock.payedEntry)) |
243 |
|
total += hack.a2f(invoiceToPayedBlock.invoiceBox.payEntry) |
244 |
invoiceToPayedBlock.newRecord() |
invoiceToPayedBlock.newRecord() |
245 |
|
|
246 |
|
invoiceToPayedBlock.invoiceBox.totalEntry = str(total) |
247 |
|
|
248 |
]]></trigger> |
]]></trigger> |
249 |
|
|
250 |
<trigger type="NAMED" name="cancelTrigger"><![CDATA[ |
<trigger type="NAMED" name="cancelTrigger"><![CDATA[ |
251 |
import hack |
import hack |
252 |
|
|
253 |
hack.rollback(invoiceToPayedBlock) |
invoiceToPayedBlock.processRollback() |
254 |
hack.rollback(ownDocumentBlock) |
ownDocumentBlock.processRollback() |
255 |
hack.rollback(tmpInvToPayedBlock) |
tmpInvToPayedBlock.processRollback() |
256 |
|
|
257 |
]]></trigger> |
]]></trigger> |
258 |
|
|
259 |
<trigger type="NAMED" name="acceptTrigger"><![CDATA[ |
<trigger type="NAMED" name="acceptTrigger"><![CDATA[ |
260 |
import hack |
import hack |
261 |
|
|
262 |
|
proceedingBlock.processRollback() |
263 |
|
proceedingBlock.idEntry.autofillBySequence('proceeding_id_seq') |
264 |
|
proceedingBlock.dateEntry = proceedingDataSource.getTimeStamp() |
265 |
|
|
266 |
rc = invoiceToPayedBlock.getRecordCount() |
rc = invoiceToPayedBlock.getRecordCount() |
|
|
|
267 |
for recNum in range(rc): |
for recNum in range(rc): |
268 |
invoiceToPayedBlock.jumpRecord(recNum) |
invoiceToPayedBlock.jumpRecord(recNum) |
269 |
if hack.a2f(invoiceToPayedBlock.invoiceBox.payedEntry) > 0: |
if hack.a2f(invoiceToPayedBlock.invoiceBox.payedEntry) > 0: |
270 |
print "hola" |
ownDocumentProceedingBlock.processRollback() |
271 |
|
ownDocumentBlock.idEntry.autofillBySequence('own_document_id_seq') |
272 |
|
ownDocumentBlock.typeEntry = "2" |
273 |
|
|
274 |
|
ownDocumentProceedingBlock.proceedingEntry = str(proceedingBlock.idEntry) |
275 |
|
ownDocumentProceedingBlock.ownDocumentEntry = str(ownDocumentBlock.idEntry) |
276 |
|
ownDocumentProceedingBlock.amountEntry = str(payBlock.cashEntry) |
277 |
|
|
278 |
|
currencyMovementBlock.processRollback() |
279 |
|
currencyMovementBlock.proceedingEntry = str(proceedingBlock.idEntry) |
280 |
|
currencyMovementBlock.movementTypeEntry = "" # Revisar com queda esto |
281 |
|
currencyMovementBlock.currencyTypeEntry = "1" |
282 |
|
currencyMovementBlock.amountEntry = str(payBlock.cashEntry) |
283 |
|
|
284 |
]]></trigger> |
]]></trigger> |
285 |
|
|
286 |
|
<trigger type="NAMED" name="totalTrigger"><![CDATA[ |
287 |
|
|
288 |
|
import hack |
289 |
|
rc = invoiceToPayedBlock.getRecordCount() |
290 |
|
total = 0.0 |
291 |
|
|
292 |
|
for recNum in range(rc): |
293 |
|
invoiceToPayedBlock.jumpRecord(recNum) |
294 |
|
total += hack.a2f(invoiceToPayedBlock.invoiceBox.payEntry) |
295 |
|
|
296 |
|
invoiceToPayedBlock.invoiceBox.totalEntry = str(total) |
297 |
|
|
298 |
|
]]></trigger> |
299 |
|
|
300 |
<page name="Emision de Recibos"> |
<page name="Emision de Recibos"> |
301 |
|
|
306 |
<label name="clientLbl" text="Cliente" x="1" y="1" /> |
<label name="clientLbl" text="Cliente" x="1" y="1" /> |
307 |
<entry x="1" y="2" field="recipient" name="clientEntry" |
<entry x="1" y="2" field="recipient" name="clientEntry" |
308 |
width="40" style="dropdown" foreign_key="clientDataSource._entity_data._table" |
width="40" style="dropdown" foreign_key="clientDataSource._entity_data._table" |
309 |
foreign_key_description="_entity_data.name" > |
foreign_key_description="_entity_data.name"/> |
310 |
</entry> |
<button name="showInvoicesButton" trigger="showInvoiceToPayTrigger" |
311 |
<button name="showInvoicesButton" trigger="showInvoiceToPayTrigger" label="Facturas Pendientes" |
label="Facturas Pendientes" width="20" height="1" x="42" y="2"/> |
|
width="20" height="1" x="42" y="2"/> |
|
312 |
</box> |
</box> |
313 |
</block> |
</block> |
314 |
|
|
327 |
<label name="payedLbl" text="Pagado" x="24" y="1"/> |
<label name="payedLbl" text="Pagado" x="24" y="1"/> |
328 |
<label name="payLbl" text="A Pagar" x="35" y="1"/> |
<label name="payLbl" text="A Pagar" x="35" y="1"/> |
329 |
|
|
330 |
<entry name="idEntry" field="id" hidden="" rows="8" x="1" y="2" width="1" /> |
<entry name="idEntry" field="id" style="label" hidden="" rows="8" x="1" y="2" width="1" /> |
331 |
<entry name="dateEntry" field="date" rows="8" x="1" y="2" width="11" readonly=""/> |
<entry name="dateEntry" field="date" style="label" rows="8" |
332 |
<entry name="amountEntry" field="amount" rows="8" x="13" y="2" width="10" readonly=""/> |
x="1" y="2" width="11" readonly=""/> |
333 |
<entry name="payedEntry" field="payed" rows="8" x="24" y="2" width="10" readonly=""/> |
<entry name="amountEntry" field="amount" style="label" rows="8" |
334 |
<entry name="payEntry" field="pay" rows="8" x="35" y="2" width="10"/> |
x="13" y="2" width="10" readonly=""/> |
335 |
|
<entry name="payedEntry" field="payed" style="label" rows="8" |
336 |
|
x="24" y="2" width="10" readonly=""/> |
337 |
|
<entry name="payEntry" field="pay" rows="8" x="35" y="2" width="10"> |
338 |
|
<trigger type="PRE-FOCUSOUT" src="totalTrigger"/> |
339 |
|
</entry> |
340 |
<scrollbar page="2" x="46" y="2" width="1" height="8"/> |
<scrollbar page="2" x="46" y="2" width="1" height="8"/> |
341 |
|
|
342 |
|
<label name="totalLbl" text="Total a Pagar" x="49" y="5"/> |
343 |
|
<entry name="totalEntry" field="total" x="49" y="6" width="10" readonly=""/> |
344 |
|
|
345 |
<button name="acceptButton" trigger="acceptTrigger" label="Aceptar" |
<button name="acceptButton" trigger="acceptTrigger" label="Aceptar" |
346 |
width="10" height="1" x="49" y="8"/> |
width="10" height="1" x="49" y="8"/> |
347 |
<button name="cancelButton" trigger="cancelTrigger" label="Cancelar" |
<button name="cancelButton" trigger="cancelTrigger" label="Cancelar" |
349 |
</box> |
</box> |
350 |
</block> |
</block> |
351 |
|
|
352 |
|
<block name="ownDocumentProceedingBlock" datasource="ownDocumentProceedingDataSource"> |
353 |
|
<entry name="proceedingEntry" field="proceeding" hidden="" x="1" y="1" width="12"/> |
354 |
|
<entry name="ownDocumentEntry" field="own_document" hidden="" x="1" y="1" width="12"/> |
355 |
|
<entry name="amountEntry" field="amount" hidden="" x="1" y="1" width="12"/> |
356 |
|
</block> |
357 |
|
<block name="currencyMovementBlock" datasource="currencyMovementDataSource"> |
358 |
|
<entry name="proceedingEntry" field="movement.proceeding" hidden="" |
359 |
|
x="1" y="1" width="12"/> |
360 |
|
<entry name="movementTypeEntry" field="movement.movement_type" hidden="" |
361 |
|
x="1" y="1" width="12"/> |
362 |
|
<entry name="amountEntry" field="movement.amount" hidden="" x="1" y="1" width="12"/> |
363 |
|
<entry name="currencyTypeEntry" field="currency_movement.currency_type" hidden="" |
364 |
|
x="1" y="1" width="12"/> |
365 |
|
</block> |
366 |
|
<block name="movementBlock" datasource="movementDataSource"> |
367 |
|
<entry name="proceedingEntry" field="movement.proceeding" hidden="" |
368 |
|
x="1" y="1" width="12"/> |
369 |
|
<entry name="movementTypeEntry" field="movement.movement_type" hidden="" |
370 |
|
x="1" y="1" width="12"/> |
371 |
|
<entry name="amountEntry" field="movement.amount" hidden="" x="1" y="1" width="12"/> |
372 |
|
</block> |
373 |
|
|
374 |
|
|
375 |
</page> |
</page> |
376 |
</form> |
</form> |