|
79 | 79 | <t t-set="secondary_currency_rate" t-value="o.exchange_rate if o.other_currency else o.counterpart_exchange_rate"/> |
80 | 80 | <thead> |
81 | 81 | <tr> |
82 | | - <th><span>Pagos</span></th> |
83 | | - <th class="text-right" t-if="secondary_currency"><span>Importe divisa</span></th> |
84 | | - <th class="text-right"><span>Importe</span></th> |
| 82 | + <th><strong><span>Pagos</span></strong></th> |
| 83 | + <th class="text-right" t-if="secondary_currency"><strong><span>Importe divisa</span></strong></th> |
| 84 | + <th class="text-right"><strong><span>Importe</span></strong></th> |
85 | 85 | </tr> |
86 | 86 | </thead> |
87 | 87 | <tbody> |
88 | | - <t t-foreach="payment_bundle" t-as="doc"> |
89 | | - <t t-foreach="doc._get_latam_checks()" t-as="check"> |
| 88 | + <t t-foreach="payment_bundle" t-as="payment"> |
| 89 | + <t t-foreach="payment._get_latam_checks()" t-as="check"> |
90 | 90 | <tr> |
91 | 91 | <td> |
92 | 92 | <span t-out="'Cheque nro %s' % (check.name)">Check nro 123456</span> |
93 | 93 | <span t-if="check.bank_id" t-out="' - %s' % (check.bank_id.name)"> - Santander Rio</span> |
94 | | - <span t-if="doc.payment_method_code == 'own_checks'" t-out="' (%s)' % (check.payment_method_line_id.name)"> (Chequera electrónica)</span> |
| 94 | + <span t-if="payment.payment_method_code == 'own_checks'" t-out="' (%s)' % (check.payment_method_line_id.name)"> (Chequera electrónica)</span> |
95 | 95 | <span t-if="check.payment_date"> - Venc. <span t-field="check.payment_date"/></span> |
96 | 96 | </td> |
97 | 97 | <td class="text-right" t-if="secondary_currency"> |
98 | 98 | <span class="text-nowrap" t-out="check.amount if o.other_currency else secondary_currency.round(check.amount / secondary_currency_rate)" t-options='{"widget": "monetary", "display_currency": secondary_currency}'/> |
99 | 99 | </td> |
100 | 100 | <td class="text-right o_price_total"> |
101 | | - <span class="text-nowrap" t-out="doc.company_currency_id.round(check.amount * secondary_currency_rate) if doc.other_currency else check.amount" t-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/> |
| 101 | + <span class="text-nowrap" t-out="payment.company_currency_id.round(check.amount * secondary_currency_rate) if payment.other_currency else check.amount" t-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/> |
102 | 102 | </td> |
103 | 103 | </tr> |
104 | 104 | </t> |
105 | 105 | </t> |
106 | | - <t t-foreach="payment_bundle.l10n_ar_withholding_line_ids" t-as="line"> |
| 106 | + <t t-foreach="payment_bundle.l10n_ar_withholding_line_ids" t-as="wth_payment"> |
107 | 107 | <tr> |
108 | 108 | <td> |
109 | | - <span t-if="line.tax_id.l10n_ar_tax_type in ['earnings', 'earnings_scale']" t-out="line.tax_id.invoice_label or 'Retención Ganancias'"/> |
110 | | - <span t-else="" t-out="line.tax_id.invoice_label or line.tax_id.name"/> |
| 109 | + <span t-if="wth_payment.tax_id.l10n_ar_tax_type in ['earnings', 'earnings_scale']" t-out="wth_payment.tax_id.invoice_label or 'Retención Ganancias'"/> |
| 110 | + <span t-else="" t-out="wth_payment.tax_id.invoice_label or wth_payment.tax_id.name"/> |
111 | 111 | </td> |
112 | 112 | <td class="text-right" t-if="secondary_currency"> |
113 | 113 | <!-- TODO t t-set="line_secondary_currency_rate" t-value="o.exchange_rate if o.other_currency else o.counterpart_exchange_rate"/--> |
114 | 114 |
|
115 | | - <span class="text-nowrap" t-out="secondary_currency.round(line.amount / secondary_currency_rate)" t-options='{"widget": "monetary", "display_currency": secondary_currency}'/> </td> |
| 115 | + <span class="text-nowrap" t-out="secondary_currency.round(wth_payment.amount / secondary_currency_rate)" t-options='{"widget": "monetary", "display_currency": secondary_currency}'/> </td> |
116 | 116 | <td class="text-right o_price_total"> |
117 | | - <span class="text-nowrap" t-field="line.amount"/> |
| 117 | + <span class="text-nowrap" t-field="wth_payment.amount"/> |
118 | 118 | </td> |
119 | 119 | </tr> |
120 | 120 | </t> |
|
123 | 123 | <t t-set='sign' t-value="o.payment_type == 'outbound' and -1 or 1"/> |
124 | 124 | <tr> |
125 | 125 | <td> |
126 | | - <span t-field='line.tax_line_id.name'/> |
| 126 | + <span t-field='wth_payment.tax_line_id.name'/> |
127 | 127 | </td> |
128 | 128 | <td class="text-right" t-if="o.other_currency"> |
129 | | - <span t-out="line.amount_currency * sign" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/> |
| 129 | + <span t-out="wth_payment.amount_currency * sign" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/> |
130 | 130 | </td> |
131 | 131 | <td class="text-right o_price_total"> |
132 | | - <span t-out="line.balance * sign" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/> |
| 132 | + <span t-out="wth_payment.balance * sign" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/> |
133 | 133 | </td> |
134 | 134 | </tr> |
135 | 135 | </t> --> |
136 | | - <t t-foreach="payment_bundle.filtered('write_off_amount')" t-as="doc"> |
| 136 | + <t t-foreach="payment_bundle.filtered('write_off_amount')" t-as="woff_payment"> |
137 | 137 | <tr > |
138 | 138 | <td> |
139 | | - <span t-out="doc.write_off_type_id.label or doc.write_off_type_id.name"/> |
| 139 | + <span t-out="woff_payment.write_off_type_id.label or woff_payment.write_off_type_id.name"/> |
140 | 140 | </td> |
141 | 141 | <td class="text-right" t-if="secondary_currency"> |
142 | 142 | <!-- TODO t t-set="line_secondary_currency_rate" t-value="o.exchange_rate if o.other_currency else o.counterpart_exchange_rate"/--> |
143 | | - <span class="text-nowrap" t-out="secondary_currency.round(doc.write_off_amount / secondary_currency_rate)" t-options='{"widget": "monetary", "display_currency": secondary_currency}'/> </td> |
| 143 | + <span class="text-nowrap" t-out="secondary_currency.round(woff_payment.write_off_amount / secondary_currency_rate)" t-options='{"widget": "monetary", "display_currency": secondary_currency}'/></td> |
144 | 144 | <td class="text-right o_price_total"> |
145 | | - <span class="text-nowrap" t-field="doc.write_off_amount"/> |
| 145 | + <span class="text-nowrap" t-field="woff_payment.write_off_amount"/> |
146 | 146 | </td> |
147 | 147 | </tr> |
148 | 148 | </t> |
149 | | - <t t-foreach="payment_bundle.filtered(lambda x: not x._is_latam_check_payment())" t-as="doc"> |
| 149 | + <t t-foreach="payment_bundle.filtered(lambda x: not x._is_latam_check_payment())" t-as="check_payment"> |
150 | 150 | <tr> |
151 | 151 | <td> |
152 | | - <span t-field="doc.journal_id.name"/> |
| 152 | + <span t-field="check_payment.journal_id.name"/> |
153 | 153 | </td> |
154 | 154 | <td class="text-right" t-if="secondary_currency"> |
155 | | - <span class="text-nowrap" t-out="doc.amount_signed if doc.other_currency else secondary_currency.round(doc.amount / secondary_currency_rate)" t-options='{"widget": "monetary", "display_currency": secondary_currency}'/> </td> |
| 155 | + <span class="text-nowrap" t-out="check_payment.amount_signed if check_payment.other_currency else secondary_currency.round(check_payment.amount / secondary_currency_rate)" t-options='{"widget": "monetary", "display_currency": secondary_currency}'/></td> |
156 | 156 | <td class="text-right o_price_total"> |
157 | | - <span class="text-nowrap" t-out="doc.company_currency_id.round(doc.amount * secondary_currency_rate) if doc.other_currency else doc.amount" t-options='{"widget": "monetary", "display_currency": doc.company_currency_id}'/> |
| 157 | + <span class="text-nowrap" t-out="check_payment.company_currency_id.round(check_payment.amount * secondary_currency_rate) if check_payment.other_currency else check_payment.amount" t-options='{"widget": "monetary", "display_currency": check_payment.company_currency_id}'/> |
158 | 158 | </td> |
159 | 159 | </tr> |
160 | 160 | </t> |
|
175 | 175 | <table class="table table-sm o_main_table" name="matching_table"> |
176 | 176 | <thead> |
177 | 177 | <tr> |
178 | | - <th><span>Comprobantes Imputados</span></th> |
179 | | - <th class="text-center"><span>Fecha Venc.</span></th> |
180 | | - <th class="text-right"><span>Importe Original</span></th> |
181 | | - <th class="text-right"><span>Importe Imputado</span></th> |
| 178 | + <th><strong><span>Comprobantes Imputados</span></strong></th> |
| 179 | + <th class="text-center"><strong><span>Fecha Venc.</span></strong></th> |
| 180 | + <th class="text-right"><strong><span>Importe Original</span></strong></th> |
| 181 | + <th class="text-right"><strong><span>Importe Imputado</span></strong></th> |
182 | 182 | </tr> |
183 | 183 | </thead> |
184 | 184 | <tbody> |
185 | | - <t t-foreach="payment_bundle.with_context(matched_payment_ids=payment_bundle.ids).mapped('matched_move_line_ids')" t-as="line"> |
| 185 | + <t t-foreach="payment_bundle.with_context(matched_payment_ids=payment_bundle.ids).mapped('matched_move_line_ids')" t-as="match_payment"> |
186 | 186 | <tr> |
187 | | - <td><span t-field='line.move_id.display_name'/></td> |
| 187 | + <td><span t-field='match_payment.move_id.display_name'/></td> |
188 | 188 | <td class="text-center"> |
189 | | - <span class="text-nowrap" t-field="line.date_maturity"/> |
| 189 | + <span class="text-nowrap" t-field="match_payment.date_maturity"/> |
190 | 190 | </td> |
191 | 191 | <td class="text-right o_price_total"> |
192 | | - <span class="text-nowrap" t-out="(o.partner_type == 'supplier' and -1.0 or 1.0) * line.balance" t-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/> |
| 192 | + <span class="text-nowrap" t-out="(o.partner_type == 'supplier' and -1.0 or 1.0) * match_payment.balance" t-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/> |
193 | 193 | </td> |
194 | 194 | <td class="text-right o_price_total"> |
195 | | - <span class="text-nowrap" t-out="(o.partner_type == 'supplier' and -1.0 or 1.0) * line.payment_matched_amount" t-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/> |
| 195 | + <span class="text-nowrap" t-out="(o.partner_type == 'supplier' and -1.0 or 1.0) * match_payment.payment_matched_amount" t-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/> |
196 | 196 | </td> |
197 | 197 | </tr> |
198 | 198 | </t> |
199 | | - <tr t-if="sum(payment_bundle.mapped('unmatched_amount'))"> |
| 199 | + <t t-set="unmatched_amount_sum" t-value="sum(payment_bundle.mapped('unmatched_amount'))" /> |
| 200 | + <tr t-if="unmatched_amount_sum"> |
200 | 201 | <td>A cuenta</td> |
201 | 202 | <td class="text-center"/> |
202 | 203 | <td class="text-right o_price_total"/> |
203 | 204 | <td class="text-right o_price_total"> |
204 | | - <span class="text-nowrap" t-out="sum(payment_bundle.mapped('unmatched_amount'))" t-options="{'widget': 'monetary', 'display_currency': o.company_currency_id}" /> |
| 205 | + <span class="text-nowrap" t-out="unmatched_amount_sum" t-options="{'widget': 'monetary', 'display_currency': o.company_currency_id}" /> |
205 | 206 | </td> |
206 | 207 | </tr> |
207 | 208 | </tbody> |
|
219 | 220 | <table class="table table-sm o_main_table" name="open_table" t-if="o.partner_type=='customer'" groups="l10n_ar_ux.group_include_pending_receivable_documents"> |
220 | 221 | <thead> |
221 | 222 | <tr> |
222 | | - <th><span>Comprobantes Pendientes al</span><span t-out="datetime.datetime.today()" t-options='{"widget": "date"}'/></th> |
223 | | - <th class="text-center"><span>Fecha Venc.</span></th> |
224 | | - <th class="text-right"><span>Importe Original</span></th> |
225 | | - <th class="text-right"><span>Saldo</span></th> |
| 223 | + |
| 224 | + <th><strong><span>Comprobantes Pendientes al </span><span t-out="datetime.datetime.today()" t-options='{"widget": "date"}'/></strong></th> |
| 225 | + <th class="text-center"><strong><span>Fecha Venc.</span></strong></th> |
| 226 | + <th class="text-right"><strong><span>Importe Original</span></strong></th> |
| 227 | + <th class="text-right"><strong><span>Saldo</span></strong></th> |
226 | 228 | </tr> |
227 | 229 | </thead> |
228 | 230 | <tbody> |
|
0 commit comments