Procházet zdrojové kódy

Agregar cobrador en el report de comisiones.

sebas před 3 roky
rodič
revize
323b0c5f07

+ 2 - 8
models.py

@@ -117,14 +117,8 @@ class AccountVoucher(models.Model):
 				'number':voucher.number,
 				'seq_invoice':voucher.seq_invoice,
 				'date': voucher.date,
-				'employee_id': [
-					voucher.employee_id.id,
-					voucher.employee_id.name
-				],
-				'employee_id2': [
-					voucher.employee_id2.id,
-					voucher.employee_id2.name
-				],
+				'employee_id': voucher.employee_id,
+				'employee_id2': voucher.employee_id2,
 				'journal_id': [
 					voucher.journal_id.id,
 					voucher.journal_id.name

+ 3 - 3
static/src/js/reports/report_customer_payment.js

@@ -166,7 +166,7 @@ function report_customer_payment (reporting){
                 if(desde){
                     var date = desde.split('/')
                     date = (date[2]+"-"+date[1]+"-"+date[0]);
-                    domain.push(['date_voucher','>=',date]);
+                    domain.push(['date','>=',date]);
                 }
 
                 if(hasta){
@@ -361,8 +361,8 @@ function report_customer_payment (reporting){
                             amount_in: accounting.formatMoney(total_price,'', CurrencyBase.decimal_places, CurrencyBase.thousands_separator, CurrencyBase.decimal_separator),
                             total_comision: accounting.formatMoney(tcomision,'', CurrencyBase.decimal_places, CurrencyBase.thousands_separator, CurrencyBase.decimal_separator),
                             date: item.date,
-                            empl_name: self.valorNull(item.employee_id[1]),
-                            employee_name: self.valorNull(item.employee_id2[1]),
+                            empl_name: self.valorNull(item.employee_id),
+                            employee_name: self.valorNull(item.employee_id2),
                             journal_id: item.journal_id[0],
                             partner_id: item.partner_id[0],
 

+ 3 - 3
static/src/reports/report_customer_payment.xml

@@ -109,12 +109,12 @@
                                     data-align="right"
                                     data-footer-formatter="totalUtilityFormatter"
                                     >Comisión</th>
-                                <th data-field="empl_name"
+                                <!-- <th data-field="empl_name"
                                     data-align="left"
-                                    >Cob. Orig.</th>
+                                    >Cob. Orig.</th> -->
                                 <th data-field="employee_name"
                                     data-align="left"
-                                    >Cob. Real</th>
+                                    >Cobrador</th>
                             </tr>
                         </thead>
                     </table>