|
@@ -147,7 +147,7 @@ function report_stock (reporting){
|
|
|
}
|
|
|
return quantProduct;
|
|
|
},
|
|
|
- BuildTable : function(StockQuant,StockLocation){
|
|
|
+ BuildTable : function(stockQuant,stockLocation){
|
|
|
var self = this;
|
|
|
var data=[];
|
|
|
var itemLocation;
|
|
@@ -158,10 +158,8 @@ function report_stock (reporting){
|
|
|
var quantity = 0;
|
|
|
var total=0;
|
|
|
ProductProduct = self.getProductProduct(self.ProductProduct, self.StockQuant);
|
|
|
-
|
|
|
_.each(ProductProduct, function(item){
|
|
|
itemProduct = item;
|
|
|
-
|
|
|
itemQuant = self.getStockQuant( itemProduct.id, self.StockQuant);
|
|
|
if (itemQuant.length > 0){
|
|
|
quantity = _.reduce(_.map(itemQuant,function(item){
|
|
@@ -182,7 +180,6 @@ function report_stock (reporting){
|
|
|
valuation: accounting.formatNumber(total,0,".",","),
|
|
|
category_id : itemProduct.categ_id[0],
|
|
|
location_id : product.location_id[0],
|
|
|
- location_name: product.location_id[1],
|
|
|
total : total
|
|
|
});
|
|
|
}
|
|
@@ -230,18 +227,6 @@ function report_stock (reporting){
|
|
|
return inv.id == product[0];
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
- var amount_total_total = _.reduce(_.map(content,function(map){
|
|
|
- return(map.total);
|
|
|
- }),function(memo, num){
|
|
|
- return memo + num;
|
|
|
- },0);
|
|
|
-
|
|
|
- content.push({
|
|
|
- product: "Total",
|
|
|
- valuation: accounting.formatNumber((amount_total_total),0,".",","),
|
|
|
- });
|
|
|
-
|
|
|
self.loadTable(content)
|
|
|
},
|
|
|
loadTable:function(rowsTable){
|
|
@@ -305,12 +290,11 @@ function report_stock (reporting){
|
|
|
styles: { overflow: 'linebreak', fontSize:8 , columnWidth: 'wrap'},
|
|
|
columnStyles:{
|
|
|
product :{columnWidth: '8px'},
|
|
|
+
|
|
|
qty : {halign:'center'},
|
|
|
standard_price : {halign:'right'},
|
|
|
lst_price : {halign:'right'},
|
|
|
valuation : {halign:'right'},
|
|
|
- category_name :{columnWidth: '8px'},
|
|
|
- location_name :{columnWidth: '8px'},
|
|
|
},
|
|
|
margin: { top: 16, horizontal: 7},
|
|
|
addPageContent: function (data) {
|