1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
<!DOCTYPE form SYSTEM "gnue-forms.dtd"> |
|
2 |
|
|
3 |
<form title="Impresion I.V.A. Ventas" height="7" width="30"> |
<!-- GNUe Forms 0.5.0 Migration Tool |
4 |
|
Saved on: 2003-03-14 18:40:06 --> |
5 |
|
|
6 |
<datasource name="printDataSource" cache="1"/> |
<form title="Impresion I.V.A. Ventas"> |
7 |
<datasource name="clientSearchDataSource" database="papo" |
<datasource name="invoiceToPayedDataSource" cache="1"/> |
8 |
table="_entity_data, _alien_entity_data, _persona_data, _client_data, |
<datasource name="tmpInvToPayedDataSource" cache="1"/> |
9 |
_price_type_data, entity_type_uid_conf, _entity_uid_type_data, |
<datasource name="currencyMovementDataSource" connection="papo" |
10 |
_entity_uid_data" order_by="_entity_data.name"> |
table="movement, currency_movement"> |
11 |
|
<condition> |
12 |
|
<eq> |
13 |
|
<cfield name="movement.id"/> |
14 |
|
<cfield name="currency_movement.movement"/> |
15 |
|
</eq> |
16 |
|
</condition> |
17 |
|
</datasource> |
18 |
|
<datasource name="ownDocumentProceedingDataSource" connection="papo" |
19 |
|
table="own_document_proceeding"/> |
20 |
|
<datasource name="proceedingDataSource" connection="papo" table="proceeding"/> |
21 |
|
<datasource name="ownItemDataSource" connection="papo" |
22 |
|
detaillink="own_item.own_document" master="ownDocumentDataSource" masterlink="id" |
23 |
|
table="own_item, own_product_item, own_item_tax"> |
24 |
<condition> |
<condition> |
25 |
<and> |
<and> |
26 |
<eq> |
<eq> |
27 |
<cfield name="_entity_data._table"/> |
<cfield name="own_item.id"/> |
28 |
<cfield name="_alien_entity_data.entity"/> |
<cfield name="own_product_item.own_item"/> |
|
</eq> |
|
|
<eq> |
|
|
<cfield name="_alien_entity_data._table"/> |
|
|
<cfield name="_persona_data.alien_entity"/> |
|
29 |
</eq> |
</eq> |
30 |
<eq> |
<eq> |
31 |
<cfield name="_persona_data._table"/> |
<cfield name="own_item.id"/> |
32 |
<cfield name="_client_data.persona"/> |
<cfield name="own_item_tax.own_item"/> |
33 |
</eq> |
</eq> |
34 |
<eq> |
<eq> |
35 |
<cfield name="_price_type_data._table"/> |
<cfield name="own_item_tax.tax"/> |
36 |
<cfield name="_client_data.price_type"/> |
<cconst value="1"/> |
37 |
</eq> |
</eq> |
38 |
|
</and> |
39 |
|
</condition> |
40 |
|
</datasource> |
41 |
|
<datasource name="ownDocumentDataSource" connection="papo" order_by="date" |
42 |
|
table="own_document"/> |
43 |
|
<datasource name="payTotDataSource" connection="papo" |
44 |
|
table="_entity_data, own_document, own_document_proceeding"> |
45 |
|
<condition> |
46 |
|
<and> |
47 |
<eq> |
<eq> |
48 |
<cfield name="_entity_data._table"/> |
<cfield name="_entity_data._table"/> |
49 |
<cfield name="_entity_uid_data.entity"/> |
<cfield name="own_document.recipient"/> |
50 |
</eq> |
</eq> |
51 |
<eq> |
<eq> |
52 |
<cfield name="_entity_uid_data.entity_uid_type"/> |
<cfield name="own_document.id"/> |
53 |
<cfield name="_entity_uid_type_data._table"/> |
<cfield name="own_document_proceeding.own_document"/> |
54 |
</eq> |
</eq> |
55 |
|
<and> |
56 |
|
<or> |
57 |
|
<eq> |
58 |
|
<cfield name="own_document.own_document_type"/> |
59 |
|
<cconst value="1"/> |
60 |
|
</eq> |
61 |
|
<eq> |
62 |
|
<cfield name="own_document.own_document_type"/> |
63 |
|
<cconst value="4"/> |
64 |
|
</eq> |
65 |
|
</or> |
66 |
|
</and> |
67 |
|
</and> |
68 |
|
</condition> |
69 |
|
</datasource> |
70 |
|
<datasource name="invTaxTotDataSource" connection="papo" |
71 |
|
table="own_document, own_document_tax"> |
72 |
|
<condition> |
73 |
|
<eq> |
74 |
|
<cfield name="own_document.id"/> |
75 |
|
<cfield name="own_document_tax.own_document"/> |
76 |
|
</eq> |
77 |
|
</condition> |
78 |
|
</datasource> |
79 |
|
<datasource name="recipientInvoiceDataSource" connection="papo" |
80 |
|
table="_entity_data, own_document, own_document_proceeding"> |
81 |
|
<condition> |
82 |
|
<and> |
83 |
<eq> |
<eq> |
84 |
<cfield name="_entity_type_data._table"/> |
<cfield name="_entity_data.id"/> |
85 |
<cfield name="entity_type_uid_conf.entity_type"/> |
<cfield name="own_document.recipient"/> |
86 |
</eq> |
</eq> |
87 |
<eq> |
<eq> |
88 |
<cfield name="entity_type_uid_conf.entity_type"/> |
<cfield name="own_document.id"/> |
89 |
<cconst value="8"/> <!-- Es el id del entity_type correspondiente a cliente --> |
<cfield name="own_document_proceeding.own_document"/> |
90 |
</eq> |
</eq> |
91 |
<eq> |
<eq> |
92 |
<cfield name="_entity_uid_type_data._table"/> |
<cfield name="own_document.own_document_type"/> |
93 |
<cfield name="entity_type_uid_conf.entity_uid_type"/> |
<cconst value="3"/> |
94 |
</eq> |
</eq> |
|
<null> |
|
|
<cfield name="_entity_data._end_t"/> |
|
|
</null> |
|
|
<null> |
|
|
<cfield name="_alien_entity_data._end_t"/> |
|
|
</null> |
|
|
<null> |
|
|
<cfield name="_persona_data._end_t"/> |
|
|
</null> |
|
|
<null> |
|
|
<cfield name="_client_data._end_t"/> |
|
|
</null> |
|
|
<null> |
|
|
<cfield name="_price_type_data._end_t"/> |
|
|
</null> |
|
|
<null> |
|
|
<cfield name="_entity_uid_data._end_t"/> |
|
|
</null> |
|
|
<null> |
|
|
<cfield name="_entity_type_data._end_t"/> |
|
|
</null> |
|
|
<null> |
|
|
<cfield name="_entity_uid_type_data._end_t"/> |
|
|
</null> |
|
95 |
</and> |
</and> |
96 |
</condition> |
</condition> |
97 |
</datasource> |
</datasource> |
98 |
|
<datasource name="productInvoiceDataSource" connection="papo" |
99 |
|
order_by="own_document.date" |
100 |
<!-- Origen de datos que srive para calcular el total facturado --> |
table="_entity_data, own_document, own_item, own_product_item, _price_data, own_item_tax"> |
101 |
|
<condition> |
|
<datasource name="productInvoiceDataSource" database="papo" |
|
|
table="_entity_data, own_document, own_item, own_product_item, _price_data, own_item_tax" |
|
|
order_by="own_document.date"> |
|
|
<condition> |
|
102 |
<and> |
<and> |
103 |
<eq> |
<eq> |
|
<!-- Aqui se refiere al cliente --> |
|
104 |
<cfield name="_entity_data.id"/> |
<cfield name="_entity_data.id"/> |
105 |
<cfield name="own_document.recipient"/> |
<cfield name="own_document.recipient"/> |
106 |
</eq> |
</eq> |
122 |
</eq> |
</eq> |
123 |
<eq> |
<eq> |
124 |
<cfield name="own_document.own_document_type"/> |
<cfield name="own_document.own_document_type"/> |
125 |
<cconst value="4"/> |
<cconst value="4"/> |
126 |
</eq> |
</eq> |
127 |
</and> |
</and> |
128 |
</condition> |
</condition> |
129 |
</datasource> |
</datasource> |
130 |
|
<datasource name="clientSearchDataSource" connection="papo" |
131 |
<datasource name="recipientInvoiceDataSource" database="papo" |
order_by="_entity_data.name" |
132 |
table="_entity_data, own_document, own_document_proceeding"> |
table="_entity_data, _alien_entity_data, _persona_data, _client_data, _price_type_data, entity_type_uid_conf, _entity_uid_type_data, _entity_uid_data"> |
133 |
<condition> |
<condition> |
134 |
<and> |
<and> |
135 |
<eq> |
<eq> |
136 |
<!-- Aqui se refiere al cliente --> |
<cfield name="_entity_data._table"/> |
137 |
<cfield name="_entity_data.id"/> |
<cfield name="_alien_entity_data.entity"/> |
|
<cfield name="own_document.recipient"/> |
|
138 |
</eq> |
</eq> |
139 |
<eq> |
<eq> |
140 |
<cfield name="own_document.id"/> |
<cfield name="_alien_entity_data._table"/> |
141 |
<cfield name="own_document_proceeding.own_document"/> |
<cfield name="_persona_data.alien_entity"/> |
142 |
</eq> |
</eq> |
143 |
<eq> |
<eq> |
144 |
<cfield name="own_document.own_document_type"/> |
<cfield name="_persona_data._table"/> |
145 |
<cconst value="3"/> |
<cfield name="_client_data.persona"/> |
146 |
</eq> |
</eq> |
|
</and> |
|
|
</condition> |
|
|
</datasource> |
|
|
|
|
|
<datasource name="invTaxTotDataSource" database="papo" |
|
|
table="own_document, own_document_tax"> |
|
|
<condition> |
|
|
<eq> |
|
|
<cfield name="own_document.id"/> |
|
|
<cfield name="own_document_tax.own_document"/> |
|
|
</eq> |
|
|
</condition> |
|
|
</datasource> |
|
|
|
|
|
|
|
|
<datasource name="payTotDataSource" database="papo" table="_entity_data, own_document, own_document_proceeding"> |
|
|
<condition> |
|
|
<and> |
|
147 |
<eq> |
<eq> |
148 |
<!-- Aqui se refiere al cliente --> |
<cfield name="_price_type_data._table"/> |
149 |
<cfield name="_entity_data._table"/> |
<cfield name="_client_data.price_type"/> |
|
<cfield name="own_document.recipient"/> |
|
150 |
</eq> |
</eq> |
151 |
<eq> |
<eq> |
152 |
<cfield name="own_document.id"/> |
<cfield name="_entity_data._table"/> |
153 |
<cfield name="own_document_proceeding.own_document"/> |
<cfield name="_entity_uid_data.entity"/> |
154 |
</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> |
|
|
|
|
|
<datasource database="papo" name="ownDocumentDataSource" table="own_document" |
|
|
order_by="date" /> |
|
|
|
|
|
<datasource name="ownItemDataSource" database="papo" detaillink="own_item.own_document" |
|
|
master="ownDocumentDataSource" masterlink="id" |
|
|
table="own_item, own_product_item, own_item_tax"> |
|
|
<condition> |
|
|
<and> |
|
155 |
<eq> |
<eq> |
156 |
<cfield name="own_item.id"/> |
<cfield name="_entity_uid_data.entity_uid_type"/> |
157 |
<cfield name="own_product_item.own_item"/> |
<cfield name="_entity_uid_type_data._table"/> |
158 |
</eq> |
</eq> |
159 |
<eq> |
<eq> |
160 |
<cfield name="own_item.id"/> |
<cfield name="_entity_type_data._table"/> |
161 |
<cfield name="own_item_tax.own_item"/> |
<cfield name="entity_type_uid_conf.entity_type"/> |
162 |
</eq> |
</eq> |
163 |
<eq> |
<eq> |
164 |
<cfield name="own_item_tax.tax"/> |
<cfield name="entity_type_uid_conf.entity_type"/> |
165 |
<cconst value="1"/> |
<cconst value="8"/> |
166 |
</eq> |
</eq> |
167 |
|
<eq> |
168 |
|
<cfield name="_entity_uid_type_data._table"/> |
169 |
|
<cfield name="entity_type_uid_conf.entity_uid_type"/> |
170 |
|
</eq> |
171 |
|
<null> |
172 |
|
<cfield name="_entity_data._end_t"/> |
173 |
|
</null> |
174 |
|
<null> |
175 |
|
<cfield name="_alien_entity_data._end_t"/> |
176 |
|
</null> |
177 |
|
<null> |
178 |
|
<cfield name="_persona_data._end_t"/> |
179 |
|
</null> |
180 |
|
<null> |
181 |
|
<cfield name="_client_data._end_t"/> |
182 |
|
</null> |
183 |
|
<null> |
184 |
|
<cfield name="_price_type_data._end_t"/> |
185 |
|
</null> |
186 |
|
<null> |
187 |
|
<cfield name="_entity_uid_data._end_t"/> |
188 |
|
</null> |
189 |
|
<null> |
190 |
|
<cfield name="_entity_type_data._end_t"/> |
191 |
|
</null> |
192 |
|
<null> |
193 |
|
<cfield name="_entity_uid_type_data._end_t"/> |
194 |
|
</null> |
195 |
</and> |
</and> |
196 |
</condition> |
</condition> |
197 |
</datasource> |
</datasource> |
198 |
|
<datasource name="printDataSource" cache="1"/> |
199 |
|
<trigger name="printTrigger" type="NAMED"><![CDATA[ |
200 |
|
|
201 |
<datasource name="proceedingDataSource" database="papo" table="proceeding"/> |
if not str(printBlock.startDateEntry).strip() \ |
202 |
|
or not str(printBlock.startDateEntry).strip(): |
|
<datasource name="ownDocumentProceedingDataSource" database="papo" table="own_document_proceeding"/> |
|
|
<datasource name="currencyMovementDataSource" database="papo" |
|
|
table="movement, currency_movement"> |
|
|
<condition> |
|
|
<eq> |
|
|
<cfield name="movement.id"/> |
|
|
<cfield name="currency_movement.movement"/> |
|
|
</eq> |
|
|
</condition> |
|
|
</datasource> |
|
|
|
|
|
<datasource name="tmpInvToPayedDataSource" cache="1"/> |
|
|
|
|
|
<datasource name="invoiceToPayedDataSource" cache="1"/> |
|
|
|
|
|
<trigger type="NAMED" name="printTrigger"><![CDATA[ |
|
|
|
|
|
if not str(printBlock.printBox.startDateEntry).strip() \ |
|
|
or not str(printBlock.printBox.startDateEntry).strip(): |
|
203 |
genericBox("Las fechas deben tener un valor",['Aceptar']) |
genericBox("Las fechas deben tener un valor",['Aceptar']) |
204 |
else: |
else: |
205 |
callTrigger('startWaitingModeTrigger') |
callTrigger('startWaitingModeTrigger') |
222 |
tmpAnd = GConditions.GCand(condProductInvoice) |
tmpAnd = GConditions.GCand(condProductInvoice) |
223 |
ge = GConditions.GCge(tmpAnd) |
ge = GConditions.GCge(tmpAnd) |
224 |
GConditions.GCField(ge,"own_document.date") |
GConditions.GCField(ge,"own_document.date") |
225 |
GConditions.GCConst(ge,str(printBlock.printBox.startDateEntry)) |
GConditions.GCConst(ge,str(printBlock.startDateEntry)) |
226 |
le = GConditions.GCle(tmpAnd) |
le = GConditions.GCle(tmpAnd) |
227 |
GConditions.GCField(le,"own_document.date") |
GConditions.GCField(le,"own_document.date") |
228 |
GConditions.GCConst(le,str(printBlock.printBox.endDateEntry)) |
GConditions.GCConst(le,str(printBlock.endDateEntry)) |
229 |
|
|
230 |
productInvoiceResultSet = productInvoiceDataSource.createResultSet(condProductInvoice) |
productInvoiceResultSet = productInvoiceDataSource.createResultSet(condProductInvoice) |
231 |
more = productInvoiceResultSet.firstRecord() |
more = productInvoiceResultSet.firstRecord() |
270 |
hack.previewPrint(table) |
hack.previewPrint(table) |
271 |
|
|
272 |
]]></trigger> |
]]></trigger> |
273 |
|
<trigger name="cancelTrigger" type="NAMED"><![CDATA[ |
|
<trigger type="NAMED" name="cancelTrigger"><![CDATA[ |
|
274 |
import hack |
import hack |
275 |
|
|
276 |
ownDocumentBlock.processRollback() |
ownDocumentBlock.rollback() |
277 |
|
|
278 |
]]></trigger> |
]]></trigger> |
|
|
|
279 |
<trigger name="startWaitingModeTrigger" type="NAMED"><![CDATA[ |
<trigger name="startWaitingModeTrigger" type="NAMED"><![CDATA[ |
280 |
setStatusText("Procesando ...") |
setStatusText("Procesando ...") |
281 |
try: |
try: |
288 |
# busy clock |
# busy clock |
289 |
self._object.dispatchEvent(GFEvent('beginWAIT')) |
self._object.dispatchEvent(GFEvent('beginWAIT')) |
290 |
]]></trigger> |
]]></trigger> |
|
|
|
291 |
<trigger name="endWaitingModeTrigger" type="NAMED"><![CDATA[ |
<trigger name="endWaitingModeTrigger" type="NAMED"><![CDATA[ |
292 |
try: |
try: |
293 |
# gnue version <= 0.4 |
# gnue version <= 0.4 |
299 |
self._object.dispatchEvent(GFEvent('endWAIT')) |
self._object.dispatchEvent(GFEvent('endWAIT')) |
300 |
setStatusText("Listo") |
setStatusText("Listo") |
301 |
]]></trigger> |
]]></trigger> |
302 |
|
<logic> |
303 |
<page name="Impresion IVA Ventas"> |
<block name="printBlock" datasource="printDataSource"> |
304 |
|
<field name="startDateEntry" typecast="date"/> |
305 |
<block datasource="printDataSource" name="printBlock"> |
<field name="endDateEntry" typecast="date"/> |
|
<box height="8" label="Impresion IVA Ventas" name="printBox" width="25" x="1" y="1"> |
|
|
<label name="startDateLbl" text="Desde : " x="1" y="1"/> |
|
|
<entry name="startDateEntry" typecast="date" x="9" y="1" width="12"/> |
|
|
<label name="startDateLbl" text="Hasta : " x="1" y="2"/> |
|
|
<entry name="endDateEntry" typecast="date" x="9" y="2" width="12"/> |
|
|
<button name="printButton" trigger="printTrigger" |
|
|
label="Imprimir" width="20" height="1" x="2" y="4"/> |
|
|
</box> |
|
306 |
</block> |
</block> |
307 |
|
</logic> |
308 |
</page> |
<layout xmlns:c="GNUe:Layout:Char" c:height="10" c:width="30"> |
309 |
|
<page name="Impresion IVA Ventas"> |
310 |
|
<box name="printBox" c:height="8" label="Impresion IVA Ventas" |
311 |
|
c:width="25" c:x="1" c:y="1"/> |
312 |
|
<label name="startDateLbl" text="Desde : " c:x="3" c:y="3"/> |
313 |
|
<entry block="printBlock" field="startDateEntry" c:width="12" c:x="11" |
314 |
|
c:y="3"/> |
315 |
|
<label name="startDateLbl" text="Hasta : " c:x="3" c:y="4"/> |
316 |
|
<entry block="printBlock" field="endDateEntry" c:width="12" c:x="11" |
317 |
|
c:y="4"/> |
318 |
|
<button name="printButton" c:height="1" label="Imprimir" c:width="20" |
319 |
|
c:x="4" c:y="6"> |
320 |
|
<trigger src="printTrigger" type="On-Action"/> |
321 |
|
</button> |
322 |
|
</page> |
323 |
|
</layout> |
324 |
</form> |
</form> |
|
|
|
|
|
|