add discount to product sell js
This commit is contained in:
@@ -60,7 +60,6 @@ class ProductSaleForm extends Model
|
||||
[['id_currency' ], 'validateCurrency'],
|
||||
[['id_account' ], 'validateAccount'],
|
||||
[['id_discount' ], 'validateDiscount'],
|
||||
[['id_discount' ], 'validateDiscount'],
|
||||
];
|
||||
}
|
||||
|
||||
@@ -130,6 +129,10 @@ class ProductSaleForm extends Model
|
||||
return false;
|
||||
}
|
||||
|
||||
// protected function applyDiscount(){
|
||||
// Discount::applyDiscount($this->, $discount);
|
||||
// }
|
||||
|
||||
protected function saveTransfer(){
|
||||
|
||||
$this->transfer = Transfer::createProductTransfer($this->account, $this->discount, $this->currency, $this->count, $this->product);
|
||||
|
||||
@@ -368,7 +368,7 @@ function ProductSell(o){
|
||||
function findDiscount(id_discount){
|
||||
var discount;
|
||||
discount = null;
|
||||
$.each( app.defaults.discounts , function(e,i){
|
||||
$.each( app.defaults.discounts , function(i,e){
|
||||
if ( e.id_discount == id_discount ){
|
||||
discount = e;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user