@@ -98,7 +98,7 @@ var app = new Vue({ | |||
getProductById: function(idProduct) { | |||
var app = this; | |||
for(var i = 0; i <= Object.keys(this.productsArray).length ; i++) { | |||
for(var i = 0; i <= Object.keys(this.productsArray).length + 1 ; i++) { | |||
if(app.productsArray[i] && app.productsArray[i].id == idProduct) { | |||
return app.productsArray[i]; | |||
} |
@@ -247,7 +247,7 @@ class Document extends ActiveRecordCommon | |||
return ''; | |||
} | |||
public function isValidClass($typeDocument) | |||
public static function isValidClass($typeDocument) | |||
{ | |||
return in_array($typeDocument, ['Invoice', 'DeliveryNote', 'Quotation']); | |||
} |