add customer cart
This commit is contained in:
@@ -20,6 +20,7 @@ function ProductSell(o){
|
||||
/**list of sold items by current user*/
|
||||
sold_items: [],
|
||||
discounts: [],
|
||||
customer_cart: []
|
||||
};
|
||||
|
||||
init();
|
||||
@@ -37,6 +38,7 @@ function ProductSell(o){
|
||||
addBehaviorCountChangedListener();
|
||||
addBehaviourDisocuntChanged();
|
||||
createUserSoldItemsTable();
|
||||
createCustomerCartTable();
|
||||
addBehaviourBtnPaid();
|
||||
productChanged();
|
||||
addDocumentKeypressedListener();
|
||||
@@ -269,6 +271,10 @@ function ProductSell(o){
|
||||
function addBehaviourBtnSellAndAppendToBill(){
|
||||
$('#btn_sell_append').on('click',submitSellAndAppend);
|
||||
}
|
||||
|
||||
function addBehaviourBtnAddToCustomerCart(){
|
||||
$('#btn_add_to_customer_cart').on('click',submitAddToCustomerCart);
|
||||
}
|
||||
|
||||
function submitSell(){
|
||||
$('#productsaleform-append_to_sold_list').val('');
|
||||
@@ -280,6 +286,11 @@ function ProductSell(o){
|
||||
}
|
||||
|
||||
|
||||
function submitAddToCustomerCart(){
|
||||
$('#productsaleform-append_to_sold_list').val('append');
|
||||
$('#product_form').submit();
|
||||
}
|
||||
|
||||
function refreshSoldUseritems(){
|
||||
$('.sold-items-container').transferList('option','transfers' , app.defaults.sold_items );
|
||||
}
|
||||
@@ -364,6 +375,11 @@ function ProductSell(o){
|
||||
'transfers' : app.defaults.sold_items
|
||||
});
|
||||
}
|
||||
function createCustomerCartTable(){
|
||||
$('.customer-cart').transferList({
|
||||
'transfers' : app.defaults.customer_cart
|
||||
});
|
||||
}
|
||||
|
||||
function findDiscount(id_discount){
|
||||
var discount;
|
||||
|
||||
Reference in New Issue
Block a user