1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
<?xml version="1.0" encoding="ISO-8859-1"?> |
2 |
|
|
3 |
<form width="81" height="23" title="Facturacion de Servicios"> |
<!-- GNUe Forms 0.5.0 Migration Tool |
4 |
<!-- datatsources --> |
Saved on: 2003-03-14 17:54:37 --> |
5 |
<datasource name="clientDataSource" database="papo" |
|
6 |
table="entity, _entity_data, alien_entity, _alien_entity_data, persona, _persona_data, client, _client_data"> |
<form title="Facturacion de Servicios"> |
7 |
|
<datasource name="paymentDataSource" cache="1"/> |
8 |
|
<datasource name="dateDataSource" cache="1"/> |
9 |
|
<datasource name="calculatedValuesDataSource" cache="1"/> |
10 |
|
<datasource name="movementDataSource" connection="papo" table="movement"/> |
11 |
|
<datasource name="currencyMovementDataSource" connection="papo" |
12 |
|
table="movement, currency_movement"> |
13 |
|
<condition> |
14 |
|
<eq> |
15 |
|
<cfield name="movement.id"/> |
16 |
|
<cfield name="currency_movement.movement"/> |
17 |
|
</eq> |
18 |
|
</condition> |
19 |
|
</datasource> |
20 |
|
<datasource name="ownDocumentProceedingDataSource" connection="papo" |
21 |
|
table="own_document_proceeding"/> |
22 |
|
<datasource name="proceedingDataSource" connection="papo" table="proceeding"/> |
23 |
|
<datasource name="ownItemDataSource" connection="papo" |
24 |
|
detaillink="own_item.own_document" master="ownDocumentDataSource" masterlink="id" |
25 |
|
table="own_item, own_service_item, own_item_tax"> |
26 |
<condition> |
<condition> |
27 |
<and> |
<and> |
|
<!-- 'obvious' join --> |
|
|
<eq> |
|
|
<cfield name="entity.id"/> |
|
|
<cfield name="_entity_data._table"/> |
|
|
</eq> |
|
28 |
<eq> |
<eq> |
29 |
<cfield name="alien_entity.id"/> |
<cfield name="own_item.id"/> |
30 |
<cfield name="_alien_entity_data._table"/> |
<cfield name="own_service_item.own_item"/> |
31 |
</eq> |
</eq> |
32 |
<eq> |
<eq> |
33 |
<cfield name="persona.id"/> |
<cfield name="own_item.id"/> |
34 |
<cfield name="_persona_data._table"/> |
<cfield name="own_item_tax.own_item"/> |
35 |
</eq> |
</eq> |
36 |
<eq> |
<eq> |
37 |
<cfield name="client.id"/> |
<cfield name="own_item_tax.tax"/> |
38 |
<cfield name="_client_data._table"/> |
<cconst value="1"/> |
39 |
</eq> |
</eq> |
40 |
<!-- 'real' join --> |
</and> |
41 |
|
</condition> |
42 |
|
</datasource> |
43 |
|
<datasource name="creditLimitDataSource" connection="papo" |
44 |
|
table="_credit_limit_data"> |
45 |
|
<condition> |
46 |
|
<and> |
47 |
<eq> |
<eq> |
48 |
<cfield name="entity.id"/> |
<cfield name="_credit_limit_data.movement_type"/> |
49 |
<cfield name="_alien_entity_data.entity"/> |
<cconst value="1"/> |
50 |
</eq> |
</eq> |
51 |
|
<null> |
52 |
|
<cfield name="_credit_limit_data._end_t"/> |
53 |
|
</null> |
54 |
|
</and> |
55 |
|
</condition> |
56 |
|
</datasource> |
57 |
|
<datasource name="textLookUpCreditLimitDataSource" connection="papo" |
58 |
|
table="_entity_data, _credit_limit_data"> |
59 |
|
<condition> |
60 |
|
<and> |
61 |
<eq> |
<eq> |
62 |
<cfield name="alien_entity.id"/> |
<cfield name="_entity_data._table"/> |
63 |
<cfield name="_persona_data.alien_entity"/> |
<cfield name="_credit_limit_data.entity"/> |
64 |
</eq> |
</eq> |
65 |
<eq> |
<eq> |
66 |
<cfield name="persona.id"/> |
<cfield name="_credit_limit_data.movement_type"/> |
67 |
<cfield name="_client_data.persona"/> |
<cconst value="1"/> |
68 |
</eq> |
</eq> |
69 |
<null> |
<null> |
70 |
<cfield name="_entity_data._end_t"/> |
<cfield name="_credit_limit_data._end_t"/> |
|
</null> |
|
|
<null> |
|
|
<cfield name="_alien_entity_data._end_t"/> |
|
|
</null> |
|
|
<null> |
|
|
<cfield name="_persona_data._end_t"/> |
|
71 |
</null> |
</null> |
72 |
|
</and> |
73 |
|
</condition> |
74 |
|
</datasource> |
75 |
|
<datasource name="branchDocumentDataSource" connection="papo" |
76 |
|
historytable="_branch_document_data" prequery="" table="branch_document, _branch_document_data"> |
77 |
|
<condition> |
78 |
|
<and> |
79 |
|
<eq> |
80 |
|
<cfield name="branch_document.id"/> |
81 |
|
<cfield name="_branch_document_data._table"/> |
82 |
|
</eq> |
83 |
|
<eq> |
84 |
|
<cfield name="_branch_document_data.document_type"/> |
85 |
|
<cconst value="1"/> |
86 |
|
</eq> |
87 |
<null> |
<null> |
88 |
<cfield name="_client_data._end_t"/> |
<cfield name="_branch_document_data._end_t"/> |
89 |
</null> |
</null> |
90 |
</and> |
</and> |
91 |
</condition> |
</condition> |
92 |
</datasource> |
</datasource> |
93 |
|
<datasource name="ownDocumentDataSource" connection="papo" order_by="date" |
94 |
<!-- Origen de datos que sirve para calcular el total facturado --> |
table="own_document"/> |
95 |
|
<datasource name="paidTotalDataSource" connection="papo" |
96 |
<datasource name="productInvoiceTotalDataSource" database="papo" |
table="_entity_data, own_document, own_document_proceeding"> |
97 |
table="_entity_data, own_document, own_item, own_product_item, _price_data, own_item_tax" |
<condition> |
|
order_by="own_product_item.id"> |
|
|
<condition> |
|
98 |
<and> |
<and> |
99 |
<eq> |
<eq> |
|
<!-- Aqui se refiere al cliente --> |
|
100 |
<cfield name="_entity_data.id"/> |
<cfield name="_entity_data.id"/> |
101 |
<cfield name="own_document.recipient"/> |
<cfield name="own_document.recipient"/> |
102 |
</eq> |
</eq> |
103 |
<eq> |
<eq> |
104 |
<cfield name="own_document.id"/> |
<cfield name="own_document.id"/> |
105 |
<cfield name="own_item.own_document"/> |
<cfield name="own_document_proceeding.own_document"/> |
|
</eq> |
|
|
<eq> |
|
|
<cfield name="own_item.id"/> |
|
|
<cfield name="own_product_item.own_item"/> |
|
|
</eq> |
|
|
<eq> |
|
|
<cfield name="own_product_item.price"/> |
|
|
<cfield name="_price_data.id"/> |
|
|
</eq> |
|
|
<eq> |
|
|
<cfield name="own_item.id"/> |
|
|
<cfield name="own_item_tax.own_item"/> |
|
|
</eq> |
|
|
<eq> |
|
|
<cfield name="own_document.own_document_type"/> |
|
|
<cconst value="4"/> |
|
106 |
</eq> |
</eq> |
107 |
</and> |
<and> |
108 |
</condition> |
<or> |
109 |
|
<eq> |
110 |
|
<cfield name="own_document.own_document_type"/> |
111 |
|
<cconst value="1"/> |
112 |
|
</eq> |
113 |
|
<eq> |
114 |
|
<cfield name="own_document.own_document_type"/> |
115 |
|
<cconst value="4"/> |
116 |
|
</eq> |
117 |
|
</or> |
118 |
|
</and> |
119 |
|
</and> |
120 |
|
</condition> |
121 |
</datasource> |
</datasource> |
122 |
|
<datasource name="serviceInvoiceTotalDataSource" connection="papo" |
123 |
<!-- Origen de datos para obtener el total facturado a este cliente (para el calculo del balance de la cta cte) --> |
order_by="own_service_item.id" |
124 |
<datasource name="serviceInvoiceTotalDataSource" database="papo" |
table="_entity_data, own_document, own_item, own_service_item, own_item_tax"> |
|
table="_entity_data, own_document, own_item, own_service_item, own_item_tax" |
|
|
order_by="own_service_item.id"> |
|
125 |
<condition> |
<condition> |
126 |
<and> |
<and> |
127 |
<eq> |
<eq> |
|
<!-- Aqui se refiere al cliente --> |
|
128 |
<cfield name="_entity_data.id"/> |
<cfield name="_entity_data.id"/> |
129 |
<cfield name="own_document.recipient"/> |
<cfield name="own_document.recipient"/> |
130 |
</eq> |
</eq> |
144 |
<cfield name="own_document.own_document_type"/> |
<cfield name="own_document.own_document_type"/> |
145 |
<cconst value="1"/> |
<cconst value="1"/> |
146 |
</eq> |
</eq> |
147 |
</and> |
</and> |
148 |
</condition> |
</condition> |
149 |
</datasource> |
</datasource> |
150 |
|
<datasource name="productInvoiceTotalDataSource" connection="papo" |
151 |
<!-- Origen de datos que sirve para calcular el total adeudado --> |
order_by="own_product_item.id" |
152 |
<datasource name="paidTotalDataSource" database="papo" table="_entity_data, own_document, own_document_proceeding"> |
table="_entity_data, own_document, own_item, own_product_item, _price_data, own_item_tax"> |
153 |
<condition> |
<condition> |
154 |
<and> |
<and> |
155 |
<eq> |
<eq> |
156 |
<!-- Aqui se refiere al cliente --> |
<cfield name="_entity_data.id"/> |
|
<cfield name="_entity_data.id"/> |
|
157 |
<cfield name="own_document.recipient"/> |
<cfield name="own_document.recipient"/> |
158 |
</eq> |
</eq> |
159 |
<eq> |
<eq> |
160 |
<cfield name="own_document.id"/> |
<cfield name="own_document.id"/> |
161 |
<cfield name="own_document_proceeding.own_document"/> |
<cfield name="own_item.own_document"/> |
162 |
</eq> |
</eq> |
|
<and> |
|
|
<or> |
|
|
<eq> |
|
|
<cfield name="own_document.own_document_type"/> |
|
|
<cconst value="1"/> |
|
|
</eq> |
|
|
<eq> |
|
|
<cfield name="own_document.own_document_type"/> |
|
|
<cconst value="4"/> |
|
|
</eq> |
|
|
</or> |
|
|
</and> |
|
|
</and> |
|
|
</condition> |
|
|
</datasource> |
|
|
|
|
|
<!-- Origen de datos que contiene el encabezado de la factura --> |
|
|
<datasource name="ownDocumentDataSource" database="papo" table="own_document" |
|
|
order_by="date"/> |
|
|
|
|
|
<!-- Origen de datos que contiene el numero de la proxima factura --> |
|
|
<datasource name="branchDocumentDataSource" database="papo" |
|
|
table="branch_document, _branch_document_data" historytable="_branch_document_data" prequery=""> |
|
|
<condition> |
|
|
<and> |
|
163 |
<eq> |
<eq> |
164 |
<cfield name="branch_document.id"/> |
<cfield name="own_item.id"/> |
165 |
<cfield name="_branch_document_data._table"/> |
<cfield name="own_product_item.own_item"/> |
166 |
</eq> |
</eq> |
|
<!-- numero para las facturas de servicios --> |
|
167 |
<eq> |
<eq> |
168 |
<cfield name="_branch_document_data.document_type"/> |
<cfield name="own_product_item.price"/> |
169 |
<cconst value="1"/> |
<cfield name="_price_data.id"/> |
170 |
|
</eq> |
171 |
|
<eq> |
172 |
|
<cfield name="own_item.id"/> |
173 |
|
<cfield name="own_item_tax.own_item"/> |
174 |
|
</eq> |
175 |
|
<eq> |
176 |
|
<cfield name="own_document.own_document_type"/> |
177 |
|
<cconst value="4"/> |
178 |
</eq> |
</eq> |
|
<!-- que este activo --> |
|
|
<null> |
|
|
<cfield name="_branch_document_data._end_t"/> |
|
|
</null> |
|
179 |
</and> |
</and> |
180 |
</condition> |
</condition> |
181 |
</datasource> |
</datasource> |
182 |
|
<datasource name="clientDataSource" connection="papo" |
183 |
<!-- Origen de datos que sirve para consultar el limite de crédito --> |
table="entity, _entity_data, alien_entity, _alien_entity_data, persona, _persona_data, client, _client_data"> |
|
<!-- asignado al cliente que se le factura --> |
|
|
<!-- el primero es para el text lookup de los datos del cliente --> |
|
|
<datasource name="textLookUpCreditLimitDataSource" database="papo" |
|
|
table="_entity_data, _credit_limit_data"> |
|
184 |
<condition> |
<condition> |
185 |
<and> |
<and> |
186 |
<eq> |
<eq> |
187 |
|
<cfield name="entity.id"/> |
188 |
<cfield name="_entity_data._table"/> |
<cfield name="_entity_data._table"/> |
|
<cfield name="_credit_limit_data.entity"/> |
|
189 |
</eq> |
</eq> |
190 |
<eq> |
<eq> |
191 |
<cfield name="_credit_limit_data.movement_type"/> |
<cfield name="alien_entity.id"/> |
192 |
<cconst value="1"/> |
<cfield name="_alien_entity_data._table"/> |
193 |
</eq> |
</eq> |
|
<null> |
|
|
<cfield name="_credit_limit_data._end_t"/> |
|
|
</null> |
|
|
</and> |
|
|
</condition> |
|
|
</datasource> |
|
|
|
|
|
<!-- y el segundo para el calculo del balance en si --> |
|
|
<datasource name="creditLimitDataSource" database="papo" table="_credit_limit_data"> |
|
|
<condition> |
|
|
<and> |
|
|
<eq> |
|
|
<cfield name="_credit_limit_data.movement_type"/> |
|
|
<cconst value="1"/> |
|
|
</eq> |
|
|
<null> |
|
|
<cfield name="_credit_limit_data._end_t"/> |
|
|
</null> |
|
|
</and> |
|
|
</condition> |
|
|
</datasource> |
|
|
|
|
|
<!-- Origen de datos que contiene los items de la factura --> |
|
|
<datasource name="ownItemDataSource" database="papo" table="own_item, own_service_item, own_item_tax" |
|
|
master="ownDocumentDataSource" masterlink="id" detaillink="own_item.own_document"> |
|
|
<condition> |
|
|
<and> |
|
194 |
<eq> |
<eq> |
195 |
<cfield name="own_item.id"/> |
<cfield name="persona.id"/> |
196 |
<cfield name="own_service_item.own_item"/> |
<cfield name="_persona_data._table"/> |
197 |
</eq> |
</eq> |
198 |
<eq> |
<eq> |
199 |
<cfield name="own_item.id"/> |
<cfield name="client.id"/> |
200 |
<cfield name="own_item_tax.own_item"/> |
<cfield name="_client_data._table"/> |
201 |
</eq> |
</eq> |
202 |
<eq> |
<eq> |
203 |
<cfield name="own_item_tax.tax"/> |
<cfield name="entity.id"/> |
204 |
<cconst value="1"/> |
<cfield name="_alien_entity_data.entity"/> |
205 |
</eq> |
</eq> |
206 |
|
<eq> |
207 |
|
<cfield name="alien_entity.id"/> |
208 |
|
<cfield name="_persona_data.alien_entity"/> |
209 |
|
</eq> |
210 |
|
<eq> |
211 |
|
<cfield name="persona.id"/> |
212 |
|
<cfield name="_client_data.persona"/> |
213 |
|
</eq> |
214 |
|
<null> |
215 |
|
<cfield name="_entity_data._end_t"/> |
216 |
|
</null> |
217 |
|
<null> |
218 |
|
<cfield name="_alien_entity_data._end_t"/> |
219 |
|
</null> |
220 |
|
<null> |
221 |
|
<cfield name="_persona_data._end_t"/> |
222 |
|
</null> |
223 |
|
<null> |
224 |
|
<cfield name="_client_data._end_t"/> |
225 |
|
</null> |
226 |
</and> |
</and> |
227 |
</condition> |
</condition> |
228 |
</datasource> |
</datasource> |
|
|
|
|
<!-- Origen de datos que sirve para dar de alta procedimientos de pago (en este caso de la factura) --> |
|
|
<datasource name="proceedingDataSource" database="papo" table="proceeding"/> |
|
|
|
|
|
<!-- Origen de datos que sirve para dar de alta pagos con algun tipo de currency --> |
|
|
<datasource name="ownDocumentProceedingDataSource" database="papo" table="own_document_proceeding"/> |
|
|
|
|
|
<!-- Origen de datos que sirve para dar de alta pagos con algun tipo de currency --> |
|
|
<datasource name="currencyMovementDataSource" database="papo" table="movement, currency_movement"> |
|
|
<condition> |
|
|
<eq> |
|
|
<cfield name="movement.id"/> |
|
|
<cfield name="currency_movement.movement"/> |
|
|
</eq> |
|
|
</condition> |
|
|
</datasource> |
|
|
|
|
|
<!-- Origen de datos que sirve para dar de alta pagos con cta. cte. --> |
|
|
<datasource name="movementDataSource" database="papo" table="movement"/> |
|
|
|
|
|
<!-- 'Origen' de datos para mantener los valores calculables --> |
|
|
<datasource name="calculatedValuesDataSource" cache="1"/> |
|
|
<!-- la fecha va aca asi rollback no se queja --> |
|
|
<datasource name="dateDataSource" cache="1"/> |
|
|
<datasource name="paymentDataSource" cache="1"/> |
|
|
|
|
|
<!-- BUG: falta lo de los tax profiles --> |
|
|
|
|
|
<!-- global triggers --> |
|
|
<!-- Valor final del servicio, con impuesto y todo --> |
|
229 |
<trigger name="calculateEndPriceTrigger" type="NAMED"><![CDATA[ |
<trigger name="calculateEndPriceTrigger" type="NAMED"><![CDATA[ |
230 |
from hack import a2f |
from hack import a2f |
231 |
|
|
237 |
# update total |
# update total |
238 |
callTrigger ('calculateTotalTrigger') |
callTrigger ('calculateTotalTrigger') |
239 |
]]></trigger> |
]]></trigger> |
|
|
|
|
|
|
|
<!-- Este trigger calcula el total facturado --> |
|
240 |
<trigger name="calculateTotalTrigger" type="NAMED"><![CDATA[ |
<trigger name="calculateTotalTrigger" type="NAMED"><![CDATA[ |
241 |
from hack import a2f |
from hack import a2f |
242 |
|
|
244 |
|
|
245 |
itemNumber= ownItemBlock.getRecordCount () |
itemNumber= ownItemBlock.getRecordCount () |
246 |
for i in range (itemNumber): |
for i in range (itemNumber): |
247 |
ownItemBlock.jumpRecord (i) |
ownItemBlock.gotoRecord (i) |
248 |
netTotal= netTotal+a2f (ownItemBlock.endPriceEntry) |
netTotal= netTotal+a2f (ownItemBlock.endPriceEntry) |
249 |
|
|
250 |
totalBlock.totalEntry = str (netTotal) |
totalBlock.totalEntry = str (netTotal) |
251 |
paymentBlock.cashEntry = str (netTotal) |
paymentBlock.cashEntry = str (netTotal) |
252 |
paymentBlock.ctaCteEntry = "0.0" |
paymentBlock.ctaCteEntry = "0.0" |
253 |
]]></trigger> |
]]></trigger> |
|
|
|
254 |
<trigger name="onStartUp" type="On-Startup"><![CDATA[ |
<trigger name="onStartUp" type="On-Startup"><![CDATA[ |
255 |
dateBlock.dateEntry= ownDocumentDataSource.getTimeStamp () |
dateBlock.dateEntry1= ownDocumentDataSource.getTimeStamp () |
256 |
]]></trigger> |
]]></trigger> |
|
|
|
|
<!-- buttons triggers --> |
|
257 |
<trigger name="printTrigger" type="NAMED"><![CDATA[ |
<trigger name="printTrigger" type="NAMED"><![CDATA[ |
258 |
import hack |
import hack |
259 |
|
|
260 |
currentCredit= hack.a2f (calculatedValuesDataSource.creditLimitAmount) - \ |
currentCredit= hack.a2f (calculatedValuesDataSource.creditLimitAmount) - \ |
261 |
hack.a2f (ownDocumentBlock.clientRecipientBox.debtEntry) |
hack.a2f (ownDocumentBlock.debtEntry) |
262 |
|
|
263 |
if hack.a2f (paymentBlock.ctaCteEntry) > currentCredit: |
if hack.a2f (paymentBlock.ctaCteEntry) > currentCredit: |
264 |
genericBox ("Está excedido el Límite de Crédito",["Ok"]) |
genericBox ("Está excedido el Límite de Crédito",["Ok"]) |
274 |
callTrigger('rollbackTrigger') |
callTrigger('rollbackTrigger') |
275 |
|
|
276 |
]]></trigger> |
]]></trigger> |
|
|
|
277 |
<trigger name="fixDateTrigger" type="NAMED"><![CDATA[ |
<trigger name="fixDateTrigger" type="NAMED"><![CDATA[ |
278 |
runForm ('date.gfd') |
runForm ('date.gfd') |
279 |
]]></trigger> |
]]></trigger> |
|
|
|
280 |
<trigger name="fixInvoiceNoTrigger" type="NAMED"><![CDATA[ |
<trigger name="fixInvoiceNoTrigger" type="NAMED"><![CDATA[ |
281 |
runForm ('branch_document.gfd') |
runForm ('branch_document.gfd') |
282 |
# refresh! |
# refresh! |
283 |
]]></trigger> |
]]></trigger> |
|
|
|
284 |
<trigger name="quitTrigger" type="NAMED"><![CDATA[ |
<trigger name="quitTrigger" type="NAMED"><![CDATA[ |
285 |
callTrigger ('rollbackTrigger') |
callTrigger ('rollbackTrigger') |
286 |
ownDocumentBlock.processRollback () |
ownDocumentBlock.rollback () |
287 |
# this will (should?) be close |
# this will (should?) be close |
288 |
exit () |
exit () |
289 |
]]></trigger> |
]]></trigger> |
|
|
|
290 |
<trigger name="rollbackTrigger" type="NAMED"><![CDATA[ |
<trigger name="rollbackTrigger" type="NAMED"><![CDATA[ |
291 |
for block in form._object._blockList: |
for block in form._object._logic._blockList: |
292 |
block.processRollback () |
block.processRollback () |
293 |
|
|
294 |
ownDocumentBlock.newRecord () |
ownDocumentBlock.newRecord () |
295 |
branchDocumentBlock.initQuery() |
branchDocumentBlock.initQuery() |
296 |
branchDocumentBlock.processQuery() |
branchDocumentBlock.executeQuery() |
297 |
|
|
298 |
dateBlock.dateEntry= ownDocumentDataSource.getTimeStamp () |
dateBlock.dateEntry1= ownDocumentDataSource.getTimeStamp () |
299 |
]]></trigger> |
]]></trigger> |
|
|
|
300 |
<trigger name="commitTrigger" type="NAMED"><![CDATA[ |
<trigger name="commitTrigger" type="NAMED"><![CDATA[ |
301 |
# copy the date |
# copy the date |
302 |
ownDocumentBlock.dateEntry= str(dateBlock.dateEntry) |
ownDocumentBlock.dateEntry= str(dateBlock.dateEntry1) |
303 |
ownDocumentBlock.numberEntry= str(branchDocumentBlock.documentNumberEntry) |
ownDocumentBlock.numberEntry= str(branchDocumentBlock.documentNumberEntry) |
304 |
branchDocumentBlock.documentNumberEntry.atomicModify (lambda x: int(x)+1) |
branchDocumentBlock.documentNumberEntry.atomicModify (lambda x: int(x)+1) |
305 |
|
|
307 |
if len(ownDocumentBlock.dateEntry)==0: |
if len(ownDocumentBlock.dateEntry)==0: |
308 |
ownDocumentBlock.dateEntry= ownDocumentDataSource.getTimeStamp () |
ownDocumentBlock.dateEntry= ownDocumentDataSource.getTimeStamp () |
309 |
|
|
310 |
proceedingBlock.processRollback () |
proceedingBlock.rollback () |
311 |
proceedingBlock.idEntry.autofillBySequence ('proceeding_id_seq') |
proceedingBlock.idEntry1.autofillBySequence ('proceeding_id_seq') |
312 |
proceedingBlock.dateEntry= proceedingDataSource.getTimeStamp () |
proceedingBlock.dateEntry2= proceedingDataSource.getTimeStamp () |
313 |
|
|
314 |
ownDocumentBlock.idEntry.autofillBySequence ('own_document_id_seq') |
ownDocumentBlock.idEntry.autofillBySequence ('own_document_id_seq') |
315 |
ownDocumentBlock.typeEntry= "1" |
ownDocumentBlock.typeEntry= "1" |
316 |
|
|
317 |
ownDocumentProceedingBlock.processRollback () |
ownDocumentProceedingBlock.rollback () |
318 |
ownDocumentProceedingBlock.proceedingEntry= str (proceedingBlock.idEntry) |
ownDocumentProceedingBlock.proceedingEntry= str (proceedingBlock.idEntry1) |
319 |
ownDocumentProceedingBlock.ownDocumentEntry= str (ownDocumentBlock.idEntry) |
ownDocumentProceedingBlock.ownDocumentEntry1= str (ownDocumentBlock.idEntry) |
320 |
ownDocumentProceedingBlock.amountEntry= str (paymentBlock.cashEntry) |
ownDocumentProceedingBlock.amountEntry= str (paymentBlock.cashEntry) |
321 |
|
|
322 |
# movimiento en pesos |
# movimiento en pesos |
323 |
currencyMovementBlock.processRollback () |
currencyMovementBlock.rollback () |
324 |
currencyMovementBlock.proceedingEntry= str (proceedingBlock.idEntry) |
currencyMovementBlock.proceedingEntry1= str (proceedingBlock.idEntry1) |
325 |
currencyMovementBlock.movementTypeEntry= "" # Revisar como queda esto |
currencyMovementBlock.movementTypeEntry2= "" # Revisar como queda esto |
326 |
currencyMovementBlock.currencyTypeEntry= "1" |
currencyMovementBlock.currencyTypeEntry= "1" |
327 |
currencyMovementBlock.amountEntry= str (paymentBlock.cashEntry) |
currencyMovementBlock.amountEntry1= str (paymentBlock.cashEntry) |
328 |
|
|
329 |
ownDocumentBlock.commit () |
ownDocumentBlock.commit () |
330 |
|
|
331 |
setFocus(ownDocumentBlock.clientRecipientBox.clientEntry) |
setFocus(ownDocumentBlock.clientEntry) |
332 |
|
|
333 |
# this is enough |
# this is enough |
334 |
# and more modularized |
# and more modularized |
335 |
]]></trigger> |
]]></trigger> |
|
|
|
336 |
<trigger name="commitAndRollBackTrigger" type="NAMED"><![CDATA[ |
<trigger name="commitAndRollBackTrigger" type="NAMED"><![CDATA[ |
337 |
callTrigger ('commitTrigger') |
callTrigger ('commitTrigger') |
338 |
callTrigger ('rollbackTrigger') |
callTrigger ('rollbackTrigger') |
339 |
]]></trigger> |
]]></trigger> |
340 |
|
<logic> |
341 |
<!-- the form --> |
<block name="ownDocumentBlock" datasource="ownDocumentDataSource"> |
342 |
<page name="Factura de Servicios"> |
<field name="idEntry" field="id"/> |
343 |
<box name="invoiceHeaderBox" label="Factura de servicios" |
<field name="typeEntry" field="own_document_type"/> |
344 |
x="0" y="0" width="81" height="8"> |
<field name="dateEntry" field="date"/> |
345 |
|
<field name="numberEntry" field="number"/> |
346 |
<block name="ownDocumentBlock" datasource="ownDocumentDataSource"> |
<field name="currentClientEntry"/> |
347 |
<!-- hidden fields --> |
<field name="clientEntry" field="recipient" |
348 |
<entry name="idEntry" field="id" hidden="" |
fk_description="_entity_data.name" fk_key="_entity_data.id" fk_source="clientDataSource"> |
349 |
x="1" y="1"/> |
<trigger name="showClientDataTrigger" type="PRE-FOCUSOUT"><![CDATA[ |
350 |
<entry name="typeEntry" field="own_document_type" hidden="" |
rs = clientDataSource.createResultSet({'_entity_data.id':str(ownDocumentBlock.clientEntry)}) |
|
x="1" y="1"/> |
|
|
<entry name="dateEntry" field="date" hidden="" |
|
|
x="1" y="1"/> |
|
|
<entry name="numberEntry" field="number" hidden="" |
|
|
x="1" y="1"/> |
|
|
|
|
|
<!-- Datos del cliente --> |
|
|
<box name="clientRecipientBox" label="Datos del Cliente" |
|
|
x="0" y="2" width="65" height="5"> |
|
|
|
|
|
<entry x="1" y="1" width="30" name="currentClientEntry" hidden="" /> |
|
|
<!-- form things --> |
|
|
<label name="clientLabel" text="Cliente" |
|
|
x="1" y="1"/> |
|
|
<!-- foreign_key y foreign_key_description estan deprecados --> |
|
|
<!-- se van a llamar fk_source y fk_description respectivamente --> |
|
|
<entry name="clientEntry" field="recipient" style="dropdown" |
|
|
foreign_key="clientDataSource._entity_data.id" foreign_key_description="_entity_data.name" |
|
|
x="1" y="2" width="30"> |
|
|
<trigger name="showClientDataTrigger" type="PRE-FOCUSOUT"><![CDATA[ |
|
|
rs = clientDataSource.createResultSet({'_entity_data.id':str(ownDocumentBlock.clientRecipientBox.clientEntry)}) |
|
351 |
if rs.firstRecord(): |
if rs.firstRecord(): |
352 |
ownDocumentBlock.clientRecipientBox.currentClientEntry = rs.current.getField('_entity_data._table') |
ownDocumentBlock.currentClientEntry = rs.current.getField('_entity_data._table') |
353 |
if str(ownDocumentBlock.clientRecipientBox.currentClientEntry): |
if str(ownDocumentBlock.currentClientEntry): |
354 |
print "here1: %s" % str(ownDocumentBlock.clientRecipientBox.clientEntry) |
print "here1: %s" % str(ownDocumentBlock.clientEntry) |
355 |
# Actualiza el puntaje |
# Actualiza el puntaje |
356 |
ownDocumentBlock.clientRecipientBox.scoreEntry = str(ownDocumentBlock.clientRecipientBox.clientEntry) |
ownDocumentBlock.scoreEntry = str(ownDocumentBlock.clientEntry) |
357 |
print "here2: %s" % str(ownDocumentBlock.clientRecipientBox.clientEntry) |
print "here2: %s" % str(ownDocumentBlock.clientEntry) |
358 |
# Actualiza el limite de credito |
# Actualiza el limite de credito |
359 |
a= str(ownDocumentBlock.clientRecipientBox.clientEntry) |
a= str(ownDocumentBlock.clientEntry) |
360 |
print a |
print a |
361 |
ownDocumentBlock.clientRecipientBox.creditLimitEntry = a |
ownDocumentBlock.creditLimitEntry = a |
362 |
print "here3: %s" % str(ownDocumentBlock.clientRecipientBox.clientEntry) |
print "here3: %s" % str(ownDocumentBlock.clientEntry) |
363 |
# 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 |
364 |
# calcula la deuda desde el primer documento vinculado al cliente actual |
# calcula la deuda desde el primer documento vinculado al cliente actual |
365 |
creditLimitBlock.processRollback() |
creditLimitBlock.rollback() |
366 |
print "here4: %s" % str(ownDocumentBlock.clientRecipientBox.clientEntry) |
print "here4: %s" % str(ownDocumentBlock.clientEntry) |
367 |
creditLimitBlock.initQuery() |
creditLimitBlock.initQuery() |
368 |
print "here: %s" % str(ownDocumentBlock.clientRecipientBox.clientEntry) |
print "here: %s" % str(ownDocumentBlock.clientEntry) |
369 |
creditLimitBlock.entityEntry = str(ownDocumentBlock.clientRecipientBox.currentClientEntry) |
creditLimitBlock.entityEntry = str(ownDocumentBlock.currentClientEntry) |
370 |
print "here: %s" % str(ownDocumentBlock.clientRecipientBox.clientEntry) |
print "here: %s" % str(ownDocumentBlock.clientEntry) |
371 |
creditLimitBlock.processQuery() |
creditLimitBlock.executeQuery() |
372 |
print "here: %s" % str(ownDocumentBlock.clientRecipientBox.clientEntry) |
print "here: %s" % str(ownDocumentBlock.clientEntry) |
373 |
calculatedValuesDataSource.creditLimitAmount = str(creditLimitBlock.creditLimitAmountEntry) |
calculatedValuesDataSource.creditLimitAmount = str(creditLimitBlock.creditLimitAmountEntry) |
374 |
print "here: %s" % str(ownDocumentBlock.clientRecipientBox.clientEntry) |
print "here: %s" % str(ownDocumentBlock.clientEntry) |
375 |
|
|
376 |
import gnue.common.GConditions as GConditions |
import gnue.common.GConditions as GConditions |
377 |
import hack |
import hack |
382 |
|
|
383 |
balance = 0 |
balance = 0 |
384 |
if str(creditLimitBlock.balanceEntry): |
if str(creditLimitBlock.balanceEntry): |
385 |
print "here1: %s" % str(ownDocumentBlock.clientRecipientBox.clientEntry) |
print "here1: %s" % str(ownDocumentBlock.clientEntry) |
386 |
tmpAnd = GConditions.GCand(condProductInvoice) |
tmpAnd = GConditions.GCand(condProductInvoice) |
387 |
gt = GConditions.GCgt(tmpAnd) |
gt = GConditions.GCgt(tmpAnd) |
388 |
GConditions.GCField(gt,"own_document.date") |
GConditions.GCField(gt,"own_document.date") |
389 |
GConditions.GCConst(gt,str(creditLimitBlock.timeStampEntry)) |
GConditions.GCConst(gt,str(creditLimitBlock.timeStampEntry)) |
390 |
eq = GConditions.GCeq(tmpAnd) |
eq = GConditions.GCeq(tmpAnd) |
391 |
GConditions.GCField(eq,"_entity_data._table") |
GConditions.GCField(eq,"_entity_data._table") |
392 |
GConditions.GCConst(eq,str(ownDocumentBlock.clientRecipientBox.currentClientEntry)) |
GConditions.GCConst(eq,str(ownDocumentBlock.currentClientEntry)) |
393 |
tmpAnd = GConditions.GCand(condServiceInvoice) |
tmpAnd = GConditions.GCand(condServiceInvoice) |
394 |
gt = GConditions.GCgt(tmpAnd) |
gt = GConditions.GCgt(tmpAnd) |
395 |
GConditions.GCField(gt,"own_document.date") |
GConditions.GCField(gt,"own_document.date") |
396 |
GConditions.GCConst(gt,str(creditLimitBlock.timeStampEntry)) |
GConditions.GCConst(gt,str(creditLimitBlock.timeStampEntry)) |
397 |
eq = GConditions.GCeq(tmpAnd) |
eq = GConditions.GCeq(tmpAnd) |
398 |
GConditions.GCField(eq,"_entity_data._table") |
GConditions.GCField(eq,"_entity_data._table") |
399 |
GConditions.GCConst(eq,str(ownDocumentBlock.clientRecipientBox.currentClientEntry)) |
GConditions.GCConst(eq,str(ownDocumentBlock.currentClientEntry)) |
400 |
tmpAnd = GConditions.GCand(condPay) |
tmpAnd = GConditions.GCand(condPay) |
401 |
gt = GConditions.GCgt(tmpAnd) |
gt = GConditions.GCgt(tmpAnd) |
402 |
GConditions.GCField(gt,"own_document.date") |
GConditions.GCField(gt,"own_document.date") |
403 |
GConditions.GCConst(gt,str(creditLimitBlock.timeStampEntry)) |
GConditions.GCConst(gt,str(creditLimitBlock.timeStampEntry)) |
404 |
eq = GConditions.GCeq(tmpAnd) |
eq = GConditions.GCeq(tmpAnd) |
405 |
GConditions.GCField(eq,"_entity_data._table") |
GConditions.GCField(eq,"_entity_data._table") |
406 |
GConditions.GCConst(eq,str(ownDocumentBlock.clientRecipientBox.currentClientEntry)) |
GConditions.GCConst(eq,str(ownDocumentBlock.currentClientEntry)) |
407 |
balance = hack.a2f(creditLimitBlock.balance) |
balance = hack.a2f(creditLimitBlock.balance) |
408 |
else: |
else: |
409 |
print "here2: %s" % str(ownDocumentBlock.clientRecipientBox.clientEntry) |
print "here2: %s" % str(ownDocumentBlock.clientEntry) |
410 |
eq = GConditions.GCeq(condProductInvoice) |
eq = GConditions.GCeq(condProductInvoice) |
411 |
GConditions.GCField(eq,"_entity_data._table") |
GConditions.GCField(eq,"_entity_data._table") |
412 |
GConditions.GCConst(eq,str(ownDocumentBlock.clientRecipientBox.currentClientEntry)) |
GConditions.GCConst(eq,str(ownDocumentBlock.currentClientEntry)) |
413 |
eq = GConditions.GCeq(condServiceInvoice) |
eq = GConditions.GCeq(condServiceInvoice) |
414 |
GConditions.GCField(eq,"_entity_data._table") |
GConditions.GCField(eq,"_entity_data._table") |
415 |
GConditions.GCConst(eq,str(ownDocumentBlock.clientRecipientBox.currentClientEntry)) |
GConditions.GCConst(eq,str(ownDocumentBlock.currentClientEntry)) |
416 |
eq = GConditions.GCeq(condPay) |
eq = GConditions.GCeq(condPay) |
417 |
GConditions.GCField(eq,"_entity_data._table") |
GConditions.GCField(eq,"_entity_data._table") |
418 |
GConditions.GCConst(eq,str(ownDocumentBlock.clientRecipientBox.currentClientEntry)) |
GConditions.GCConst(eq,str(ownDocumentBlock.currentClientEntry)) |
419 |
|
|
420 |
# Calculo del total facturado |
# Calculo del total facturado |
421 |
## Factura de productos |
## Factura de productos |
424 |
spentTotal = 0 |
spentTotal = 0 |
425 |
|
|
426 |
while more: |
while more: |
427 |
print "here: %s" % str(ownDocumentBlock.clientRecipientBox.clientEntry) |
print "here: %s" % str(ownDocumentBlock.clientEntry) |
428 |
invoiceTotal = 0 |
invoiceTotal = 0 |
429 |
currOwnDoc = productInvoiceResultSet.current.getField("own_document.id") |
currOwnDoc = productInvoiceResultSet.current.getField("own_document.id") |
430 |
while productInvoiceResultSet.current.getField("own_document.id") == currOwnDoc and more: |
while productInvoiceResultSet.current.getField("own_document.id") == currOwnDoc and more: |
488 |
# Calculo del total adeudado |
# Calculo del total adeudado |
489 |
# print "--> %d %d %d" % (spentTotal, balance, paidTotal) |
# print "--> %d %d %d" % (spentTotal, balance, paidTotal) |
490 |
debt = spentTotal - balance - payTotal |
debt = spentTotal - balance - payTotal |
491 |
ownDocumentBlock.clientRecipientBox.debtEntry = str(debt) |
ownDocumentBlock.debtEntry = str(debt) |
492 |
|
|
493 |
### FALTA GRABAR EL BALANCE ### |
### FALTA GRABAR EL BALANCE ### |
494 |
]]></trigger> |
]]></trigger> |
495 |
|
<trigger name="showScoreTrigger" type="PRE-FOCUSIN"><![CDATA[ |
496 |
<trigger name="showScoreTrigger" type="PRE-FOCUSIN"><![CDATA[ |
ownDocumentBlock.rollback () |
|
ownDocumentBlock.processRollback () |
|
497 |
]]></trigger> |
]]></trigger> |
498 |
</entry> |
</field> |
499 |
<label name="scoreLabel" text="Puntaje" |
<field name="scoreEntry" field="recipient" |
500 |
x="32" y="1" /> |
fk_description="_client_data.score" fk_key="_entity_data.id" fk_source="clientDataSource" readonly=""/> |
501 |
<!-- foreign_key y foreign_key_description estan deprecados --> |
<field name="creditLimitEntry" displaymask="%0.2f" field="recipient" |
502 |
<!-- se van a llamar fk_source y fk_description respectivamente --> |
fk_description="_credit_limit_data.credit_limit" fk_key="_entity_data.id" |
503 |
<entry name="scoreEntry" field="recipient" |
fk_source="textLookUpCreditLimitDataSource" readonly=""/> |
504 |
style="textlookup" readonly="" |
<field name="debtEntry" displaymask="%0.2f" typecast="number"/> |
505 |
foreign_key="clientDataSource._entity_data.id" foreign_key_description="_client_data.score" |
</block> |
506 |
x="32" y="2" width="10"/> |
<block name="dateBlock" datasource="dateDataSource"> |
507 |
<label name="ctaCteLabel" text="Cta. Cte." |
<field name="dateEntry1" field="date" readonly="" typecast="date"/> |
508 |
x="43" y="1"/> |
</block> |
509 |
<!-- foreign_key y foreign_key_description estan deprecados --> |
<block name="branchDocumentBlock" datasource="branchDocumentDataSource"> |
510 |
<!-- se van a llamar fk_source y fk_description respectivamente --> |
<field name="documentNumberEntry" field="_branch_document_data.number"/> |
511 |
<entry name="creditLimitEntry" field="recipient" style="textlookup" |
<field name="documentTypeEntry" |
512 |
readonly="" displaymask="%0.2f" |
field="_branch_document_data.document_type"/> |
513 |
foreign_key="textLookUpCreditLimitDataSource._entity_data.id" |
<field name="branchEntry" field="_branch_document_data.branch"/> |
514 |
foreign_key_description="_credit_limit_data.credit_limit" |
</block> |
515 |
x="43" y="2" width="8"/> |
<block name="creditLimitBlock" datasource="creditLimitDataSource"> |
516 |
<label name="debtLabel" text="Deuda" |
<field name="entityEntry" field="_credit_limit_data.entity"/> |
517 |
x="55" y="1"/> |
<field name="movementTypeEntry" field="_credit_limit_data.movement_type"/> |
518 |
<entry name="debtEntry" style="label" typecast="number" displaymask="%0.2f" |
<field name="balanceEntry" field="_credit_limit_data.balance"/> |
519 |
x="55" y="2" width="12"/> |
<field name="timeStampEntry" field="_credit_limit_data.time_stamp"/> |
520 |
</box> |
</block> |
521 |
|
<block name="ownItemBlock" datasource="ownItemDataSource"> |
522 |
</block> |
<field name="ownDocumentEntry" field="own_item.own_document"/> |
523 |
|
<field name="serviceEntry" field="own_service_item.description"/> |
524 |
<!-- fecha --> |
<field name="priceEntry" displaymask="%0.2f" |
525 |
<block name="dateBlock" datasource="dateDataSource"> |
field="own_service_item.amount" typecast="number"> |
526 |
<label name="dateLabel" text="Fecha:" |
<trigger name="priceEntryPreFocusOut" src="calculateEndPriceTrigger" |
527 |
x="1" y="1"/> |
type="PRE-FOCUSOUT"/> |
528 |
<entry name="dateEntry" field="date" style="label" readonly="" typecast="date" |
</field> |
529 |
x="7" y="1" width="10"/> |
<field name="taxPercentEntry" displaymask="%0.2f" typecast="number" |
530 |
<!-- <button name="fixDateButton" label="Corregir" trigger="fixDateTrigger" --> |
value="0"> |
531 |
<!-- x="18" y="1" width="10" height="1"/> --> |
<trigger name="taxPercentEntryPreFocusOut" |
532 |
</block> |
src="calculateEndPriceTrigger" type="POST-FOCUSOUT"/> |
533 |
|
</field> |
534 |
<!-- # de factura --> |
<field name="taxEntry" field="own_item_tax.amount" typecast="number" |
535 |
<block name="branchDocumentBlock" datasource="branchDocumentDataSource"> |
value="0"/> |
536 |
<label name="dateLabel" text="Número de Factura:" |
<field name="endPriceEntry"/> |
537 |
x="32" y="1"/> |
</block> |
538 |
<entry name="documentNumberEntry" field="_branch_document_data.number" style="label" |
<block name="totalBlock" datasource="calculatedValuesDataSource"> |
539 |
x="55" y="1" width="15"/> |
<field name="totalEntry" default="0" displaymask="%0.2f" |
540 |
<entry name="documentTypeEntry" field="_branch_document_data.document_type" hidden="" |
typecast="number"/> |
541 |
x="50" y="1" width="15"/> |
</block> |
542 |
<entry name="branchEntry" field="_branch_document_data.branch" hidden="" |
<block name="paymentBlock" datasource="paymentDataSource"> |
543 |
x="50" y="1" width="15"/> |
<field name="cashEntry" default="0" displaymask="%0.2f" |
544 |
|
typecast="number"> |
545 |
<button name="fixInvoiceNoButton" label="Corregir" trigger="fixInvoiceNoTrigger" |
<trigger name="cashEntryPreFocusOut" type="Pre-Focusout"><![CDATA[ |
|
x="66" y="1" width="10" height="1"/> |
|
|
</block> |
|
|
|
|
|
<!-- Limites de credito del cliente --> |
|
|
<block datasource="creditLimitDataSource" name="creditLimitBlock"> |
|
|
<entry name="entityEntry" field="_credit_limit_data.entity" hidden="" |
|
|
x="1" y="1" width="10"/> |
|
|
<entry name="movementTypeEntry" field="_credit_limit_data.movement_type" hidden="" |
|
|
x="1" y="1" width="10"/> |
|
|
<entry name="balanceEntry" field="_credit_limit_data.balance" hidden="" |
|
|
x="1" y="1" width="10"/> |
|
|
<entry name="timeStampEntry" field="_credit_limit_data.time_stamp" hidden="" |
|
|
x="1" y="1" width="10"/> |
|
|
</block> |
|
|
</box> |
|
|
|
|
|
<!-- Servicios facturados --> |
|
|
<box name="invoiceItemBox" label="Servicios a facturar" |
|
|
x="0" y="7" width="81" height="16"> |
|
|
<block name="ownItemBlock" datasource="ownItemDataSource"> |
|
|
<!-- hidden entries --> |
|
|
<entry name="ownDocumentEntry" field="own_item.own_document" hidden="" |
|
|
x="1" y="1"/> |
|
|
|
|
|
<!-- Datos del servicio --> |
|
|
<label name="serviceLabel" text="Servicio" |
|
|
x="1" y="1"/> |
|
|
<entry name="serviceEntry" field="own_service_item.description" |
|
|
x="1" y="2" width="40" height="2" rows="5" rowSpacer="1"/> |
|
|
<label name="priceLabel" text="Precio" |
|
|
x="42" y="1"/> |
|
|
<!-- falta agregar los impuestos al servicio --> |
|
|
<!-- idea: un boton 'Impuestos' que abra una ventana con dos textlist (que no hay) --> |
|
|
<!-- uno con todos los impuestos posibles y el otro con los que se le van a aplicar al servicio --> |
|
|
<!-- lo cual me lleva a pensar que se puede devolver cosas de ventanas a traves de tablas --> |
|
|
<entry name="priceEntry" field="own_service_item.amount" typecast="number" displaymask="%0.2f" |
|
|
x="42" y="2" width="10" rows="5" rowSpacer="1"> |
|
|
<trigger name="priceEntryPreFocusOut" type="PRE-FOCUSOUT" src="calculateEndPriceTrigger"/> |
|
|
</entry> |
|
|
<label name="taxLabel" text="IVA (%)" |
|
|
x="53" y="1"/> |
|
|
<entry name="taxPercentEntry" value="0" typecast="number" displaymask="%0.2f" |
|
|
x="53" y="2" width="10" rows="5" rowSpacer="1"> |
|
|
<trigger name="taxPercentEntryPreFocusOut" type="POST-FOCUSOUT" src="calculateEndPriceTrigger"/> |
|
|
</entry> |
|
|
<entry name="taxEntry" field="own_item_tax.amount" value="0" typecast="number" hidden="" |
|
|
x="53" y="2" width="10" rows="5" rowSpacer="1"/> |
|
|
<label name="endPriceLabel" text="Precio final" |
|
|
x="64" y="1"/> |
|
|
<entry name="endPriceEntry" style="label" |
|
|
x="64" y="2" width="10" rows="5" rowSpacer="1"/> |
|
|
<scrollbar page="5" |
|
|
x="78" y="2" width="1" height="10"/> |
|
|
</block> |
|
|
|
|
|
<!-- Valores calculados --> |
|
|
<!-- notar que dicen read-only, pero se pueden cambiar por 'soft' --> |
|
|
<block name="totalBlock" datasource="calculatedValuesDataSource"> |
|
|
<label text="Total" |
|
|
x="53" y="13"/> |
|
|
<<<<<<< serviceInvoice.gfd |
|
|
<entry name="totalEntry" style="label" typecast="number" displaymask="%0.2f" default="0" |
|
|
======= |
|
|
<entry name="totalEntry" style="label" typecast="number" displaymask="%0.2f" default="0.00" |
|
|
>>>>>>> 1.18 |
|
|
x="64" y="13" width="12"/> |
|
|
</block> |
|
|
</box> |
|
|
<box name="paymentBox" label="Cobro de la factura" |
|
|
x="0" y="22" width="81" height="4"> |
|
|
<block name="paymentBlock" datasource="paymentDataSource"> |
|
|
<label text="Efectivo :" |
|
|
x="1" y="1"/> |
|
|
<<<<<<< serviceInvoice.gfd |
|
|
<entry name="cashEntry" typecast="number" displaymask="%0.2f" default="0" |
|
|
======= |
|
|
<entry name="cashEntry" typecast="number" displaymask="%0.2f" default="0.00" |
|
|
>>>>>>> 1.18 |
|
|
x="11" y="1" width="12"> |
|
|
<trigger name="cashEntryPreFocusOut" type="Pre-Focusout"><![CDATA[ |
|
546 |
from hack import a2f |
from hack import a2f |
547 |
|
|
548 |
paymentBlock.ctaCteEntry= str (a2f (totalBlock.totalEntry) - a2f (paymentBlock.cashEntry)) |
paymentBlock.ctaCteEntry= str (a2f (totalBlock.totalEntry) - a2f (paymentBlock.cashEntry)) |
549 |
]]></trigger> |
]]></trigger> |
550 |
</entry> |
</field> |
551 |
<label text="Cta. Cte. :" |
<field name="ctaCteEntry" default="0" displaymask="%0.2f" |
552 |
x="24" y="1"/> |
typecast="number"> |
553 |
<<<<<<< serviceInvoice.gfd |
<trigger name="ctaCteEntryPreFocusOut" type="Pre-Focusout"><![CDATA[ |
|
<entry name="ctaCteEntry" typecast="number" displaymask="%0.2f" default="0" |
|
|
======= |
|
|
<entry name="ctaCteEntry" typecast="number" displaymask="%0.2f" default="0.00" |
|
|
>>>>>>> 1.18 |
|
|
x="36" y="1" width="12"> |
|
|
<trigger name="ctaCteEntryPreFocusOut" type="Pre-Focusout"><![CDATA[ |
|
554 |
from hack import a2f |
from hack import a2f |
555 |
|
|
556 |
paymentBlock.cashEntry= str (a2f (totalBlock.totalEntry) - a2f (paymentBlock.ctaCteEntry)) |
paymentBlock.cashEntry= str (a2f (totalBlock.totalEntry) - a2f (paymentBlock.ctaCteEntry)) |
557 |
]]></trigger> |
]]></trigger> |
558 |
</entry> |
</field> |
559 |
<!-- buttons --> |
</block> |
560 |
<!--button name="commitButton" label="Aceptar" trigger="commitAndRollBackTrigger" |
<block name="creditLimitBlock1" datasource="creditLimitDataSource"> |
561 |
x="65" y="3" width="14" height="1"/--> |
<field name="entityEntry1" field="_credit_limit_data.entity"/> |
562 |
<button name="rollbackButton" label="Deshacer" trigger="rollbackTrigger" |
<field name="movementTypeEntry1" |
563 |
x="65" y="1" width="14" height="1"/> |
field="_credit_limit_data.movement_type"/> |
564 |
<button name="printButton" label="Imprimir" trigger="printTrigger" |
<field name="creditLimitAmountEntry" |
565 |
x="50" y="1" width="14" height="1"/> |
field="_credit_limit_data.credit_limit"/> |
566 |
<!-- button name="quitButton" label="Salir" trigger="quitTrigger" |
<field name="balanceEntry1" field="_credit_limit_data.balance"/> |
567 |
x="65" y="6" width="14" height="1"/ --> |
<field name="timeStampEntry1" field="_credit_limit_data.time_stamp"/> |
|
|
|
|
</block> |
|
|
</box> |
|
|
<!-- blocks needed due to broken functionality --> |
|
|
<!-- the order is important. e.g., prceedingBlock should be before ownDocumentProceedingBlock --> |
|
|
<block name="creditLimitBlock" datasource="creditLimitDataSource"> |
|
|
<entry name="entityEntry" field="_credit_limit_data.entity" hidden="" |
|
|
x="11" y="109" width="10"/> |
|
|
<entry name="movementTypeEntry" field="_credit_limit_data.movement_type" hidden="" |
|
|
x="1" y="109" width="10"/> |
|
|
<entry name="creditLimitAmountEntry" field="_credit_limit_data.credit_limit" hidden="" |
|
|
x="1" y="109" width="10"/> |
|
|
<entry name="balanceEntry" field="_credit_limit_data.balance" hidden="" |
|
|
x="22" y="109" width="10"/> |
|
|
<entry name="timeStampEntry" field="_credit_limit_data.time_stamp" hidden="" |
|
|
x="33" y="109" width="10"/> |
|
568 |
</block> |
</block> |
569 |
<block name="proceedingBlock" datasource="proceedingDataSource"> |
<block name="proceedingBlock" datasource="proceedingDataSource"> |
570 |
<entry name="idEntry" field="id" hidden="" |
<field name="idEntry1" field="id"/> |
571 |
x="1" y="1" width="12"/> |
<field name="dateEntry2" field="date"/> |
572 |
<entry name="dateEntry" field="date" hidden="" |
</block> |
573 |
x="1" y="1" width="12"/> |
<block name="ownDocumentProceedingBlock" |
574 |
</block> |
datasource="ownDocumentProceedingDataSource"> |
575 |
<block name="ownDocumentProceedingBlock" datasource="ownDocumentProceedingDataSource"> |
<field name="proceedingEntry" field="proceeding"/> |
576 |
<entry name="proceedingEntry" field="proceeding" hidden="" |
<field name="ownDocumentEntry1" field="own_document"/> |
577 |
x="1" y="1" width="12"/> |
<field name="amountEntry" field="amount"/> |
578 |
<entry name="ownDocumentEntry" field="own_document" hidden="" |
</block> |
579 |
x="1" y="1" width="12"/> |
<block name="currencyMovementBlock" |
580 |
<entry name="amountEntry" field="amount" hidden="" |
datasource="currencyMovementDataSource"> |
581 |
x="1" y="1" width="12"/> |
<field name="proceedingEntry1" field="movement.proceeding"/> |
582 |
</block> |
<field name="movementTypeEntry2" field="movement.movement_type"/> |
583 |
<block name="currencyMovementBlock" datasource="currencyMovementDataSource"> |
<field name="amountEntry1" field="movement.amount"/> |
584 |
<entry name="proceedingEntry" field="movement.proceeding" hidden="" |
<field name="currencyTypeEntry" field="currency_movement.currency_type"/> |
|
x="1" y="1" width="12"/> |
|
|
<entry name="movementTypeEntry" field="movement.movement_type" hidden="" |
|
|
x="1" y="1" width="12"/> |
|
|
<entry name="amountEntry" field="movement.amount" hidden="" |
|
|
x="1" y="1" width="12"/> |
|
|
<entry name="currencyTypeEntry" field="currency_movement.currency_type" hidden="" |
|
|
x="1" y="1" width="12"/> |
|
585 |
</block> |
</block> |
586 |
</page> |
</logic> |
587 |
|
<layout xmlns:c="GNUe:Layout:Char" c:height="26" c:width="81"> |
588 |
|
<page name="Factura de Servicios"> |
589 |
|
<box name="invoiceHeaderBox" c:height="8" label="Factura de servicios" |
590 |
|
c:width="81" c:x="0" c:y="0"/> |
591 |
|
<entry block="ownDocumentBlock" field="idEntry" hidden="" c:x="2" |
592 |
|
c:y="2"/> |
593 |
|
<entry block="ownDocumentBlock" field="typeEntry" hidden="" c:x="2" |
594 |
|
c:y="2"/> |
595 |
|
<entry block="ownDocumentBlock" field="dateEntry" hidden="" c:x="2" |
596 |
|
c:y="2"/> |
597 |
|
<entry block="ownDocumentBlock" field="numberEntry" hidden="" c:x="2" |
598 |
|
c:y="2"/> |
599 |
|
<box name="clientRecipientBox" c:height="5" label="Datos del Cliente" |
600 |
|
c:width="65" c:x="1" c:y="3"/> |
601 |
|
<entry block="ownDocumentBlock" field="currentClientEntry" hidden="" |
602 |
|
c:width="30" c:x="4" c:y="5"/> |
603 |
|
<label name="clientLabel" text="Cliente" c:x="4" c:y="5"/> |
604 |
|
<entry block="ownDocumentBlock" field="clientEntry" style="dropdown" |
605 |
|
c:width="30" c:x="4" c:y="6"/> |
606 |
|
<label name="scoreLabel" text="Puntaje" c:x="35" c:y="5"/> |
607 |
|
<entry block="ownDocumentBlock" field="scoreEntry" style="textlookup" |
608 |
|
c:width="10" c:x="35" c:y="6"/> |
609 |
|
<label name="ctaCteLabel" text="Cta. Cte." c:x="46" c:y="5"/> |
610 |
|
<entry block="ownDocumentBlock" field="creditLimitEntry" |
611 |
|
style="textlookup" c:width="8" c:x="46" c:y="6"/> |
612 |
|
<label name="debtLabel" text="Deuda" c:x="58" c:y="5"/> |
613 |
|
<entry block="ownDocumentBlock" field="debtEntry" style="label" |
614 |
|
c:width="12" c:x="58" c:y="6"/> |
615 |
|
<label name="dateLabel" text="Fecha:" c:x="2" c:y="2"/> |
616 |
|
<entry block="dateBlock" field="dateEntry1" style="label" c:width="10" |
617 |
|
c:x="8" c:y="2"/> |
618 |
|
<label name="dateLabel" text="Número de Factura:" c:x="33" c:y="2"/> |
619 |
|
<entry block="branchDocumentBlock" field="documentNumberEntry" |
620 |
|
style="label" c:width="15" c:x="56" c:y="2"/> |
621 |
|
<entry block="branchDocumentBlock" field="documentTypeEntry" hidden="" |
622 |
|
c:width="15" c:x="51" c:y="2"/> |
623 |
|
<entry block="branchDocumentBlock" field="branchEntry" hidden="" |
624 |
|
c:width="15" c:x="51" c:y="2"/> |
625 |
|
<button name="fixInvoiceNoButton" c:height="1" label="Corregir" |
626 |
|
c:width="10" c:x="67" c:y="2"> |
627 |
|
<trigger src="fixInvoiceNoTrigger" type="On-Action"/> |
628 |
|
</button> |
629 |
|
<entry block="creditLimitBlock" field="entityEntry" hidden="" |
630 |
|
c:width="10" c:x="2" c:y="2"/> |
631 |
|
<entry block="creditLimitBlock" field="movementTypeEntry" hidden="" |
632 |
|
c:width="10" c:x="2" c:y="2"/> |
633 |
|
<entry block="creditLimitBlock" field="balanceEntry" hidden="" |
634 |
|
c:width="10" c:x="2" c:y="2"/> |
635 |
|
<entry block="creditLimitBlock" field="timeStampEntry" hidden="" |
636 |
|
c:width="10" c:x="2" c:y="2"/> |
637 |
|
<box name="invoiceItemBox" c:height="16" label="Servicios a facturar" |
638 |
|
c:width="81" c:x="0" c:y="7"/> |
639 |
|
<entry block="ownItemBlock" field="ownDocumentEntry" hidden="" c:x="2" |
640 |
|
c:y="9"/> |
641 |
|
<label name="serviceLabel" text="Servicio" c:x="2" c:y="9"/> |
642 |
|
<entry block="ownItemBlock" field="serviceEntry" c:height="2" |
643 |
|
rowSpacer="1" rows="5" c:width="40" c:x="2" c:y="10"/> |
644 |
|
<label name="priceLabel" text="Precio" c:x="43" c:y="9"/> |
645 |
|
<entry block="ownItemBlock" field="priceEntry" rowSpacer="1" rows="5" |
646 |
|
c:width="10" c:x="43" c:y="10"/> |
647 |
|
<label name="taxLabel" text="IVA (%)" c:x="54" c:y="9"/> |
648 |
|
<entry block="ownItemBlock" field="taxPercentEntry" rowSpacer="1" |
649 |
|
rows="5" c:width="10" c:x="54" c:y="10"/> |
650 |
|
<entry block="ownItemBlock" field="taxEntry" hidden="" rowSpacer="1" |
651 |
|
rows="5" c:width="10" c:x="54" c:y="10"/> |
652 |
|
<label name="endPriceLabel" text="Precio final" c:x="65" c:y="9"/> |
653 |
|
<entry block="ownItemBlock" field="endPriceEntry" rowSpacer="1" rows="5" |
654 |
|
style="label" c:width="10" c:x="65" c:y="10"/> |
655 |
|
<scrollbar block="ownItemBlock" c:height="10" page="5" c:width="1" |
656 |
|
c:x="79" c:y="10"/> |
657 |
|
<label text="Total" c:x="54" c:y="21"/> |
658 |
|
<entry block="totalBlock" field="totalEntry" style="label" c:width="12" |
659 |
|
c:x="65" c:y="21"/> |
660 |
|
<box name="paymentBox" c:height="4" label="Cobro de la factura" |
661 |
|
c:width="81" c:x="0" c:y="22"/> |
662 |
|
<label text="Efectivo :" c:x="2" c:y="24"/> |
663 |
|
<entry block="paymentBlock" field="cashEntry" c:width="12" c:x="12" |
664 |
|
c:y="24"/> |
665 |
|
<label text="Cta. Cte. :" c:x="25" c:y="24"/> |
666 |
|
<entry block="paymentBlock" field="ctaCteEntry" c:width="12" c:x="37" |
667 |
|
c:y="24"/> |
668 |
|
<button name="rollbackButton" c:height="1" label="Deshacer" c:width="14" |
669 |
|
c:x="66" c:y="24"> |
670 |
|
<trigger src="rollbackTrigger" type="On-Action"/> |
671 |
|
</button> |
672 |
|
<button name="printButton" c:height="1" label="Imprimir" c:width="14" |
673 |
|
c:x="51" c:y="24"> |
674 |
|
<trigger src="printTrigger" type="On-Action"/> |
675 |
|
</button> |
676 |
|
<entry block="creditLimitBlock1" field="entityEntry1" hidden="" |
677 |
|
c:width="10" c:x="11" c:y="109"/> |
678 |
|
<entry block="creditLimitBlock1" field="movementTypeEntry1" hidden="" |
679 |
|
c:width="10" c:x="1" c:y="109"/> |
680 |
|
<entry block="creditLimitBlock1" field="creditLimitAmountEntry" |
681 |
|
hidden="" c:width="10" c:x="1" c:y="109"/> |
682 |
|
<entry block="creditLimitBlock1" field="balanceEntry1" hidden="" |
683 |
|
c:width="10" c:x="22" c:y="109"/> |
684 |
|
<entry block="creditLimitBlock1" field="timeStampEntry1" hidden="" |
685 |
|
c:width="10" c:x="33" c:y="109"/> |
686 |
|
<entry block="proceedingBlock" field="idEntry1" hidden="" c:width="12" |
687 |
|
c:x="1" c:y="1"/> |
688 |
|
<entry block="proceedingBlock" field="dateEntry2" hidden="" c:width="12" |
689 |
|
c:x="1" c:y="1"/> |
690 |
|
<entry block="ownDocumentProceedingBlock" field="proceedingEntry" |
691 |
|
hidden="" c:width="12" c:x="1" c:y="1"/> |
692 |
|
<entry block="ownDocumentProceedingBlock" field="ownDocumentEntry1" |
693 |
|
hidden="" c:width="12" c:x="1" c:y="1"/> |
694 |
|
<entry block="ownDocumentProceedingBlock" field="amountEntry" hidden="" |
695 |
|
c:width="12" c:x="1" c:y="1"/> |
696 |
|
<entry block="currencyMovementBlock" field="proceedingEntry1" hidden="" |
697 |
|
c:width="12" c:x="1" c:y="1"/> |
698 |
|
<entry block="currencyMovementBlock" field="movementTypeEntry2" |
699 |
|
hidden="" c:width="12" c:x="1" c:y="1"/> |
700 |
|
<entry block="currencyMovementBlock" field="amountEntry1" hidden="" |
701 |
|
c:width="12" c:x="1" c:y="1"/> |
702 |
|
<entry block="currencyMovementBlock" field="currencyTypeEntry" hidden="" |
703 |
|
c:width="12" c:x="1" c:y="1"/> |
704 |
|
</page> |
705 |
|
</layout> |
706 |
</form> |
</form> |