Ver código fonte

Retocar informe de comisión de nandetv y flashnet

SEBAS 1 ano atrás
pai
commit
7028584ca4
4 arquivos alterados com 4 adições e 2 exclusões
  1. BIN
      __init__.pyc
  2. BIN
      controllers.pyc
  3. BIN
      models.pyc
  4. 4 2
      static/src/js/reports/report_customer_payment.js

BIN
__init__.pyc


BIN
controllers.pyc


BIN
models.pyc


+ 4 - 2
static/src/js/reports/report_customer_payment.js

@@ -326,10 +326,12 @@ function report_customer_payment (reporting){
             var invoice;
             var amount_in;
             _.each(AccountVoucher, function(item){
+
                 var total_price = 0;
                 var total_comision = 0;
                 var tcomision = 0;
                 var total_sale = 0;
+                total_sale = (item.amount);
                 var AccountInvoice = self.getAccountInvoice(item.reference);
                 _.each(AccountInvoice,function(item2) {
                     var AccountInvoiceLine = self.getAccountInvoiceLine(item2.id);
@@ -337,13 +339,13 @@ function report_customer_payment (reporting){
 
                         if(item2.type == 'out_invoice'){
                             total_comision = line_item.product_id.comision_vendedor;
-                            total_sale = (line_item.price_unit);
+
                             total_price = total_sale * line_item.quantity;
                             tcomision = (total_price*total_comision)/100;
                         }
                         if(item2.type == 'out_refund'){
                           total_comision = line_item.product_id.comision_vendedor;
-                          total_sale = (line_item.price_unit);
+                
                           total_price = -(total_sale * line_item.quantity);
                           tcomision = - ((total_price*total_comision)/100);
                         }