chore: remove unused code
This commit is contained in:
parent
96feae608d
commit
c1afc95e3c
@ -28,16 +28,6 @@
|
|||||||
"public/js/payment/payments.js",
|
"public/js/payment/payments.js",
|
||||||
"public/js/controllers/taxes_and_totals.js",
|
"public/js/controllers/taxes_and_totals.js",
|
||||||
"public/js/controllers/transaction.js",
|
"public/js/controllers/transaction.js",
|
||||||
"public/js/pos/pos.html",
|
|
||||||
"public/js/pos/pos_bill_item.html",
|
|
||||||
"public/js/pos/pos_bill_item_new.html",
|
|
||||||
"public/js/pos/pos_selected_item.html",
|
|
||||||
"public/js/pos/pos_item.html",
|
|
||||||
"public/js/pos/pos_tax_row.html",
|
|
||||||
"public/js/pos/customer_toolbar.html",
|
|
||||||
"public/js/pos/pos_invoice_list.html",
|
|
||||||
"public/js/payment/pos_payment.html",
|
|
||||||
"public/js/payment/payment_details.html",
|
|
||||||
"public/js/templates/item_selector.html",
|
"public/js/templates/item_selector.html",
|
||||||
"public/js/templates/employees_to_mark_attendance.html",
|
"public/js/templates/employees_to_mark_attendance.html",
|
||||||
"public/js/utils/item_selector.js",
|
"public/js/utils/item_selector.js",
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
<div class="row pos-payment-row" type="{{type}}" idx={{idx}}>
|
|
||||||
<div class="col-xs-6" style="padding:20px">{{mode_of_payment}}</div>
|
|
||||||
<div class="col-xs-6">
|
|
||||||
<div class="input-group">
|
|
||||||
<input disabled class="form-control text-right amount" idx="{{idx}}" type="text" value="{%= format_currency(amount, currency) %}">
|
|
||||||
<span class="input-group-btn">
|
|
||||||
<button type="button" class="btn btn-default clr" idx="{{idx}}" style="border:1px solid #d1d8dd">C</button>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
@ -1,239 +0,0 @@
|
|||||||
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
|
||||||
// License: GNU General Public License v3. See license.txt
|
|
||||||
|
|
||||||
erpnext.payments = erpnext.stock.StockController.extend({
|
|
||||||
make_payment: function() {
|
|
||||||
var me = this;
|
|
||||||
|
|
||||||
this.dialog = new frappe.ui.Dialog({
|
|
||||||
title: 'Payment'
|
|
||||||
});
|
|
||||||
|
|
||||||
this.dialog.show();
|
|
||||||
this.$body = this.dialog.body;
|
|
||||||
this.set_payment_primary_action();
|
|
||||||
this.make_keyboard();
|
|
||||||
this.select_text()
|
|
||||||
},
|
|
||||||
|
|
||||||
select_text: function(){
|
|
||||||
var me = this;
|
|
||||||
$(this.$body).find('.form-control').click(function(){
|
|
||||||
$(this).select();
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
set_payment_primary_action: function(){
|
|
||||||
var me = this;
|
|
||||||
|
|
||||||
this.dialog.set_primary_action(__("Submit"), function() {
|
|
||||||
// Allow no ZERO payment
|
|
||||||
$.each(me.frm.doc.payments, function (index, data) {
|
|
||||||
if (data.amount != 0) {
|
|
||||||
me.dialog.hide();
|
|
||||||
me.submit_invoice();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
make_keyboard: function(){
|
|
||||||
var me = this;
|
|
||||||
$(this.$body).empty();
|
|
||||||
$(this.$body).html(frappe.render_template('pos_payment', this.frm.doc))
|
|
||||||
this.show_payment_details();
|
|
||||||
this.bind_keyboard_event()
|
|
||||||
this.clear_amount()
|
|
||||||
},
|
|
||||||
|
|
||||||
make_multimode_payment: function(){
|
|
||||||
var me = this;
|
|
||||||
|
|
||||||
if(this.frm.doc.change_amount > 0){
|
|
||||||
me.payment_val = me.doc.outstanding_amount
|
|
||||||
}
|
|
||||||
|
|
||||||
this.payments = frappe.model.add_child(this.frm.doc, 'Multi Mode Payment', "payments");
|
|
||||||
this.payments.mode_of_payment = this.dialog.fields_dict.mode_of_payment.get_value();
|
|
||||||
this.payments.amount = flt(this.payment_val);
|
|
||||||
},
|
|
||||||
|
|
||||||
show_payment_details: function(){
|
|
||||||
var me = this;
|
|
||||||
var multimode_payments = $(this.$body).find('.multimode-payments').empty();
|
|
||||||
if(this.frm.doc.payments.length){
|
|
||||||
$.each(this.frm.doc.payments, function(index, data){
|
|
||||||
$(frappe.render_template('payment_details', {
|
|
||||||
mode_of_payment: data.mode_of_payment,
|
|
||||||
amount: data.amount,
|
|
||||||
idx: data.idx,
|
|
||||||
currency: me.frm.doc.currency,
|
|
||||||
type: data.type
|
|
||||||
})).appendTo(multimode_payments)
|
|
||||||
|
|
||||||
if (data.type == 'Cash' && data.amount == me.frm.doc.paid_amount) {
|
|
||||||
me.idx = data.idx;
|
|
||||||
me.selected_mode = $(me.$body).find(repl("input[idx='%(idx)s']",{'idx': me.idx}));
|
|
||||||
me.highlight_selected_row();
|
|
||||||
me.bind_amount_change_event();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}else{
|
|
||||||
$("<p>No payment mode selected in pos profile</p>").appendTo(multimode_payments)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
set_outstanding_amount: function(){
|
|
||||||
this.selected_mode = $(this.$body).find(repl("input[idx='%(idx)s']",{'idx': this.idx}));
|
|
||||||
this.highlight_selected_row()
|
|
||||||
this.payment_val = 0.0
|
|
||||||
if(this.frm.doc.outstanding_amount > 0 && flt(this.selected_mode.val()) == 0.0){
|
|
||||||
//When user first time click on row
|
|
||||||
this.payment_val = flt(this.frm.doc.outstanding_amount / this.frm.doc.conversion_rate, precision("outstanding_amount"))
|
|
||||||
this.selected_mode.val(format_currency(this.payment_val, this.frm.doc.currency));
|
|
||||||
this.update_payment_amount()
|
|
||||||
}else if(flt(this.selected_mode.val()) > 0){
|
|
||||||
//If user click on existing row which has value
|
|
||||||
this.payment_val = flt(this.selected_mode.val());
|
|
||||||
}
|
|
||||||
this.selected_mode.select()
|
|
||||||
this.bind_amount_change_event();
|
|
||||||
},
|
|
||||||
|
|
||||||
bind_keyboard_event: function(){
|
|
||||||
var me = this;
|
|
||||||
this.payment_val = '';
|
|
||||||
this.bind_form_control_event();
|
|
||||||
this.bind_numeric_keys_event();
|
|
||||||
},
|
|
||||||
|
|
||||||
bind_form_control_event: function(){
|
|
||||||
var me = this;
|
|
||||||
$(this.$body).find('.pos-payment-row').click(function(){
|
|
||||||
me.idx = $(this).attr("idx");
|
|
||||||
me.set_outstanding_amount()
|
|
||||||
})
|
|
||||||
|
|
||||||
$(this.$body).find('.form-control').click(function(){
|
|
||||||
me.idx = $(this).attr("idx");
|
|
||||||
me.set_outstanding_amount();
|
|
||||||
me.update_paid_amount(true);
|
|
||||||
})
|
|
||||||
|
|
||||||
$(this.$body).find('.write_off_amount').change(function(){
|
|
||||||
me.write_off_amount(flt($(this).val()), precision("write_off_amount"));
|
|
||||||
})
|
|
||||||
|
|
||||||
$(this.$body).find('.change_amount').change(function(){
|
|
||||||
me.change_amount(flt($(this).val()), precision("change_amount"));
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
highlight_selected_row: function(){
|
|
||||||
var me = this;
|
|
||||||
var selected_row = $(this.$body).find(repl(".pos-payment-row[idx='%(idx)s']",{'idx': this.idx}));
|
|
||||||
$(this.$body).find('.pos-payment-row').removeClass('selected-payment-mode')
|
|
||||||
selected_row.addClass('selected-payment-mode')
|
|
||||||
$(this.$body).find('.amount').attr('disabled', true);
|
|
||||||
this.selected_mode.attr('disabled', false);
|
|
||||||
},
|
|
||||||
|
|
||||||
bind_numeric_keys_event: function(){
|
|
||||||
var me = this;
|
|
||||||
$(this.$body).find('.pos-keyboard-key').click(function(){
|
|
||||||
me.payment_val += $(this).text();
|
|
||||||
me.selected_mode.val(format_currency(me.payment_val, me.frm.doc.currency))
|
|
||||||
me.idx = me.selected_mode.attr("idx")
|
|
||||||
me.update_paid_amount()
|
|
||||||
})
|
|
||||||
|
|
||||||
$(this.$body).find('.delete-btn').click(function(){
|
|
||||||
me.payment_val = cstr(flt(me.selected_mode.val())).slice(0, -1);
|
|
||||||
me.selected_mode.val(format_currency(me.payment_val, me.frm.doc.currency));
|
|
||||||
me.idx = me.selected_mode.attr("idx")
|
|
||||||
me.update_paid_amount();
|
|
||||||
})
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
bind_amount_change_event: function(){
|
|
||||||
var me = this;
|
|
||||||
this.selected_mode.change(function(){
|
|
||||||
me.payment_val = flt($(this).val()) || 0.0;
|
|
||||||
me.selected_mode.val(format_currency(me.payment_val, me.frm.doc.currency))
|
|
||||||
me.idx = me.selected_mode.attr("idx")
|
|
||||||
me.update_payment_amount()
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
clear_amount: function() {
|
|
||||||
var me = this;
|
|
||||||
$(this.$body).find('.clr').click(function(e){
|
|
||||||
e.stopPropagation();
|
|
||||||
me.idx = $(this).attr("idx");
|
|
||||||
me.selected_mode = $(me.$body).find(repl("input[idx='%(idx)s']",{'idx': me.idx}));
|
|
||||||
me.payment_val = 0.0;
|
|
||||||
me.selected_mode.val(0.0);
|
|
||||||
me.highlight_selected_row();
|
|
||||||
me.update_payment_amount();
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
write_off_amount: function(write_off_amount) {
|
|
||||||
var me = this;
|
|
||||||
|
|
||||||
this.frm.doc.write_off_amount = flt(write_off_amount, precision("write_off_amount"));
|
|
||||||
this.frm.doc.base_write_off_amount = flt(this.frm.doc.write_off_amount * this.frm.doc.conversion_rate,
|
|
||||||
precision("base_write_off_amount"));
|
|
||||||
this.calculate_outstanding_amount(false)
|
|
||||||
this.show_amounts()
|
|
||||||
},
|
|
||||||
|
|
||||||
change_amount: function(change_amount) {
|
|
||||||
var me = this;
|
|
||||||
|
|
||||||
this.frm.doc.change_amount = flt(change_amount, precision("change_amount"));
|
|
||||||
this.calculate_write_off_amount()
|
|
||||||
this.show_amounts()
|
|
||||||
},
|
|
||||||
|
|
||||||
update_paid_amount: function(update_write_off) {
|
|
||||||
var me = this;
|
|
||||||
if(in_list(['change_amount', 'write_off_amount'], this.idx)){
|
|
||||||
var value = me.selected_mode.val();
|
|
||||||
if(me.idx == 'change_amount'){
|
|
||||||
me.change_amount(value)
|
|
||||||
} else{
|
|
||||||
if(flt(value) == 0 && update_write_off && me.frm.doc.outstanding_amount > 0) {
|
|
||||||
value = flt(me.frm.doc.outstanding_amount / me.frm.doc.conversion_rate, precision(me.idx));
|
|
||||||
}
|
|
||||||
me.write_off_amount(value)
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
this.update_payment_amount()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
update_payment_amount: function(){
|
|
||||||
var me = this;
|
|
||||||
|
|
||||||
$.each(this.frm.doc.payments, function(index, data){
|
|
||||||
if(cint(me.idx) == cint(data.idx)){
|
|
||||||
data.amount = flt(me.selected_mode.val(), 2)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
this.calculate_outstanding_amount(false);
|
|
||||||
this.show_amounts();
|
|
||||||
},
|
|
||||||
|
|
||||||
show_amounts: function(){
|
|
||||||
var me = this;
|
|
||||||
$(this.$body).find(".write_off_amount").val(format_currency(this.frm.doc.write_off_amount, this.frm.doc.currency));
|
|
||||||
$(this.$body).find('.paid_amount').text(format_currency(this.frm.doc.paid_amount, this.frm.doc.currency));
|
|
||||||
$(this.$body).find('.change_amount').val(format_currency(this.frm.doc.change_amount, this.frm.doc.currency))
|
|
||||||
$(this.$body).find('.outstanding_amount').text(format_currency(this.frm.doc.outstanding_amount, frappe.get_doc(":Company", this.frm.doc.company).default_currency))
|
|
||||||
this.update_invoice();
|
|
||||||
}
|
|
||||||
})
|
|
@ -1,42 +0,0 @@
|
|||||||
<div class="pos_payment row">
|
|
||||||
<div class="row" style="padding: 0px 30px;">
|
|
||||||
<h3>{{ __("Total Amount") }}: <span class="label label-default" style="font-size:20px;padding:5px">{%= format_currency(grand_total, currency) %}</span></h3>
|
|
||||||
</div>
|
|
||||||
<div class="row amount-row">
|
|
||||||
<div class="col-xs-6 col-sm-3 text-center">
|
|
||||||
<p class="amount-label"> {{ __("Paid") }} <h3 class="paid_amount">{%= format_currency(paid_amount, currency) %}</h3></p>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-6 col-sm-3 text-center">
|
|
||||||
<p class="amount-label"> {{ __("Outstanding") }} <h3 class="outstanding_amount">{%= format_currency(outstanding_amount, currency) %} </h3></p>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-6 col-sm-3 text-center">
|
|
||||||
<p class="amount-label"> {{ __("Change") }} <input class="form-control text-right change_amount bold" type="text" idx="change_amount" value="{{format_number(change_amount, null, 2)}}">
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-6 col-sm-3 text-center">
|
|
||||||
<p class="amount-label"> {{ __("Write off") }} <input class="form-control text-right write_off_amount bold" type="text" idx="write_off_amount" value="{{format_number(write_off_amount, null, 2)}}">
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-6 ">
|
|
||||||
<div class ="row multimode-payments" style = "margin-right:10px">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-6 payment-toolbar">
|
|
||||||
{% for(var i=0; i<3; i++) { %}
|
|
||||||
<div class="row">
|
|
||||||
{% for(var j=i*3; j<(i+1)*3; j++) { %}
|
|
||||||
<button type="button" class="btn btn-default pos-keyboard-key">{{j+1}}</button>
|
|
||||||
{% } %}
|
|
||||||
</div>
|
|
||||||
{% } %}
|
|
||||||
<div class="row">
|
|
||||||
<button type="button" class="btn btn-default delete-btn">{{ __("Del") }}</button>
|
|
||||||
<button type="button" class="btn btn-default pos-keyboard-key">0</button>
|
|
||||||
<button type="button" class="btn btn-default pos-keyboard-key">.</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
@ -1,330 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/*! Clusterize.js - v0.17.6 - 2017-03-05
|
|
||||||
* http://NeXTs.github.com/Clusterize.js/
|
|
||||||
* Copyright (c) 2015 Denis Lukov; Licensed GPLv3 */
|
|
||||||
|
|
||||||
;(function(name, definition) {
|
|
||||||
if (typeof module != 'undefined') module.exports = definition();
|
|
||||||
else if (typeof define == 'function' && typeof define.amd == 'object') define(definition);
|
|
||||||
else this[name] = definition();
|
|
||||||
}('Clusterize', function() {
|
|
||||||
"use strict"
|
|
||||||
|
|
||||||
// detect ie9 and lower
|
|
||||||
// https://gist.github.com/padolsey/527683#comment-786682
|
|
||||||
var ie = (function(){
|
|
||||||
for( var v = 3,
|
|
||||||
el = document.createElement('b'),
|
|
||||||
all = el.all || [];
|
|
||||||
el.innerHTML = '<!--[if gt IE ' + (++v) + ']><i><![endif]-->',
|
|
||||||
all[0];
|
|
||||||
){}
|
|
||||||
return v > 4 ? v : document.documentMode;
|
|
||||||
}()),
|
|
||||||
is_mac = navigator.platform.toLowerCase().indexOf('mac') + 1;
|
|
||||||
var Clusterize = function(data) {
|
|
||||||
if( ! (this instanceof Clusterize))
|
|
||||||
return new Clusterize(data);
|
|
||||||
var self = this;
|
|
||||||
|
|
||||||
var defaults = {
|
|
||||||
rows_in_block: 50,
|
|
||||||
blocks_in_cluster: 4,
|
|
||||||
tag: null,
|
|
||||||
show_no_data_row: true,
|
|
||||||
no_data_class: 'clusterize-no-data',
|
|
||||||
no_data_text: 'No data',
|
|
||||||
keep_parity: true,
|
|
||||||
callbacks: {}
|
|
||||||
}
|
|
||||||
|
|
||||||
// public parameters
|
|
||||||
self.options = {};
|
|
||||||
var options = ['rows_in_block', 'blocks_in_cluster', 'show_no_data_row', 'no_data_class', 'no_data_text', 'keep_parity', 'tag', 'callbacks'];
|
|
||||||
for(var i = 0, option; option = options[i]; i++) {
|
|
||||||
self.options[option] = typeof data[option] != 'undefined' && data[option] != null
|
|
||||||
? data[option]
|
|
||||||
: defaults[option];
|
|
||||||
}
|
|
||||||
|
|
||||||
var elems = ['scroll', 'content'];
|
|
||||||
for(var i = 0, elem; elem = elems[i]; i++) {
|
|
||||||
self[elem + '_elem'] = data[elem + 'Id']
|
|
||||||
? document.getElementById(data[elem + 'Id'])
|
|
||||||
: data[elem + 'Elem'];
|
|
||||||
if( ! self[elem + '_elem'])
|
|
||||||
throw new Error("Error! Could not find " + elem + " element");
|
|
||||||
}
|
|
||||||
|
|
||||||
// tabindex forces the browser to keep focus on the scrolling list, fixes #11
|
|
||||||
if( ! self.content_elem.hasAttribute('tabindex'))
|
|
||||||
self.content_elem.setAttribute('tabindex', 0);
|
|
||||||
|
|
||||||
// private parameters
|
|
||||||
var rows = isArray(data.rows)
|
|
||||||
? data.rows
|
|
||||||
: self.fetchMarkup(),
|
|
||||||
cache = {},
|
|
||||||
scroll_top = self.scroll_elem.scrollTop;
|
|
||||||
|
|
||||||
// append initial data
|
|
||||||
self.insertToDOM(rows, cache);
|
|
||||||
|
|
||||||
// restore the scroll position
|
|
||||||
self.scroll_elem.scrollTop = scroll_top;
|
|
||||||
|
|
||||||
// adding scroll handler
|
|
||||||
var last_cluster = false,
|
|
||||||
scroll_debounce = 0,
|
|
||||||
pointer_events_set = false,
|
|
||||||
scrollEv = function() {
|
|
||||||
// fixes scrolling issue on Mac #3
|
|
||||||
if (is_mac) {
|
|
||||||
if( ! pointer_events_set) self.content_elem.style.pointerEvents = 'none';
|
|
||||||
pointer_events_set = true;
|
|
||||||
clearTimeout(scroll_debounce);
|
|
||||||
scroll_debounce = setTimeout(function () {
|
|
||||||
self.content_elem.style.pointerEvents = 'auto';
|
|
||||||
pointer_events_set = false;
|
|
||||||
}, 50);
|
|
||||||
}
|
|
||||||
if (last_cluster != (last_cluster = self.getClusterNum()))
|
|
||||||
self.insertToDOM(rows, cache);
|
|
||||||
if (self.options.callbacks.scrollingProgress)
|
|
||||||
self.options.callbacks.scrollingProgress(self.getScrollProgress());
|
|
||||||
},
|
|
||||||
resize_debounce = 0,
|
|
||||||
resizeEv = function() {
|
|
||||||
clearTimeout(resize_debounce);
|
|
||||||
resize_debounce = setTimeout(self.refresh, 100);
|
|
||||||
}
|
|
||||||
on('scroll', self.scroll_elem, scrollEv);
|
|
||||||
on('resize', window, resizeEv);
|
|
||||||
|
|
||||||
// public methods
|
|
||||||
self.destroy = function(clean) {
|
|
||||||
off('scroll', self.scroll_elem, scrollEv);
|
|
||||||
off('resize', window, resizeEv);
|
|
||||||
self.html((clean ? self.generateEmptyRow() : rows).join(''));
|
|
||||||
}
|
|
||||||
self.refresh = function(force) {
|
|
||||||
if(self.getRowsHeight(rows) || force) self.update(rows);
|
|
||||||
}
|
|
||||||
self.update = function(new_rows) {
|
|
||||||
rows = isArray(new_rows)
|
|
||||||
? new_rows
|
|
||||||
: [];
|
|
||||||
var scroll_top = self.scroll_elem.scrollTop;
|
|
||||||
// fixes #39
|
|
||||||
if(rows.length * self.options.item_height < scroll_top) {
|
|
||||||
self.scroll_elem.scrollTop = 0;
|
|
||||||
last_cluster = 0;
|
|
||||||
}
|
|
||||||
self.insertToDOM(rows, cache);
|
|
||||||
self.scroll_elem.scrollTop = scroll_top;
|
|
||||||
}
|
|
||||||
self.clear = function() {
|
|
||||||
self.update([]);
|
|
||||||
}
|
|
||||||
self.getRowsAmount = function() {
|
|
||||||
return rows.length;
|
|
||||||
}
|
|
||||||
self.getScrollProgress = function() {
|
|
||||||
return this.options.scroll_top / (rows.length * this.options.item_height) * 100 || 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
var add = function(where, _new_rows) {
|
|
||||||
var new_rows = isArray(_new_rows)
|
|
||||||
? _new_rows
|
|
||||||
: [];
|
|
||||||
if( ! new_rows.length) return;
|
|
||||||
rows = where == 'append'
|
|
||||||
? rows.concat(new_rows)
|
|
||||||
: new_rows.concat(rows);
|
|
||||||
self.insertToDOM(rows, cache);
|
|
||||||
}
|
|
||||||
self.append = function(rows) {
|
|
||||||
add('append', rows);
|
|
||||||
}
|
|
||||||
self.prepend = function(rows) {
|
|
||||||
add('prepend', rows);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Clusterize.prototype = {
|
|
||||||
constructor: Clusterize,
|
|
||||||
// fetch existing markup
|
|
||||||
fetchMarkup: function() {
|
|
||||||
var rows = [], rows_nodes = this.getChildNodes(this.content_elem);
|
|
||||||
while (rows_nodes.length) {
|
|
||||||
rows.push(rows_nodes.shift().outerHTML);
|
|
||||||
}
|
|
||||||
return rows;
|
|
||||||
},
|
|
||||||
// get tag name, content tag name, tag height, calc cluster height
|
|
||||||
exploreEnvironment: function(rows, cache) {
|
|
||||||
var opts = this.options;
|
|
||||||
opts.content_tag = this.content_elem.tagName.toLowerCase();
|
|
||||||
if( ! rows.length) return;
|
|
||||||
if(ie && ie <= 9 && ! opts.tag) opts.tag = rows[0].match(/<([^>\s/]*)/)[1].toLowerCase();
|
|
||||||
if(this.content_elem.children.length <= 1) cache.data = this.html(rows[0] + rows[0] + rows[0]);
|
|
||||||
if( ! opts.tag) opts.tag = this.content_elem.children[0].tagName.toLowerCase();
|
|
||||||
this.getRowsHeight(rows);
|
|
||||||
},
|
|
||||||
getRowsHeight: function(rows) {
|
|
||||||
var opts = this.options,
|
|
||||||
prev_item_height = opts.item_height;
|
|
||||||
opts.cluster_height = 0;
|
|
||||||
if( ! rows.length) return;
|
|
||||||
var nodes = this.content_elem.children;
|
|
||||||
var node = nodes[Math.floor(nodes.length / 2)];
|
|
||||||
opts.item_height = node.offsetHeight;
|
|
||||||
// consider table's border-spacing
|
|
||||||
if(opts.tag == 'tr' && getStyle('borderCollapse', this.content_elem) != 'collapse')
|
|
||||||
opts.item_height += parseInt(getStyle('borderSpacing', this.content_elem), 10) || 0;
|
|
||||||
// consider margins (and margins collapsing)
|
|
||||||
if(opts.tag != 'tr') {
|
|
||||||
var marginTop = parseInt(getStyle('marginTop', node), 10) || 0;
|
|
||||||
var marginBottom = parseInt(getStyle('marginBottom', node), 10) || 0;
|
|
||||||
opts.item_height += Math.max(marginTop, marginBottom);
|
|
||||||
}
|
|
||||||
opts.block_height = opts.item_height * opts.rows_in_block;
|
|
||||||
opts.rows_in_cluster = opts.blocks_in_cluster * opts.rows_in_block;
|
|
||||||
opts.cluster_height = opts.blocks_in_cluster * opts.block_height;
|
|
||||||
return prev_item_height != opts.item_height;
|
|
||||||
},
|
|
||||||
// get current cluster number
|
|
||||||
getClusterNum: function () {
|
|
||||||
this.options.scroll_top = this.scroll_elem.scrollTop;
|
|
||||||
return Math.floor(this.options.scroll_top / (this.options.cluster_height - this.options.block_height)) || 0;
|
|
||||||
},
|
|
||||||
// generate empty row if no data provided
|
|
||||||
generateEmptyRow: function() {
|
|
||||||
var opts = this.options;
|
|
||||||
if( ! opts.tag || ! opts.show_no_data_row) return [];
|
|
||||||
var empty_row = document.createElement(opts.tag),
|
|
||||||
no_data_content = document.createTextNode(opts.no_data_text), td;
|
|
||||||
empty_row.className = opts.no_data_class;
|
|
||||||
if(opts.tag == 'tr') {
|
|
||||||
td = document.createElement('td');
|
|
||||||
// fixes #53
|
|
||||||
td.colSpan = 100;
|
|
||||||
td.appendChild(no_data_content);
|
|
||||||
}
|
|
||||||
empty_row.appendChild(td || no_data_content);
|
|
||||||
return [empty_row.outerHTML];
|
|
||||||
},
|
|
||||||
// generate cluster for current scroll position
|
|
||||||
generate: function (rows, cluster_num) {
|
|
||||||
var opts = this.options,
|
|
||||||
rows_len = rows.length;
|
|
||||||
if (rows_len < opts.rows_in_block) {
|
|
||||||
return {
|
|
||||||
top_offset: 0,
|
|
||||||
bottom_offset: 0,
|
|
||||||
rows_above: 0,
|
|
||||||
rows: rows_len ? rows : this.generateEmptyRow()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
var items_start = Math.max((opts.rows_in_cluster - opts.rows_in_block) * cluster_num, 0),
|
|
||||||
items_end = items_start + opts.rows_in_cluster,
|
|
||||||
top_offset = Math.max(items_start * opts.item_height, 0),
|
|
||||||
bottom_offset = Math.max((rows_len - items_end) * opts.item_height, 0),
|
|
||||||
this_cluster_rows = [],
|
|
||||||
rows_above = items_start;
|
|
||||||
if(top_offset < 1) {
|
|
||||||
rows_above++;
|
|
||||||
}
|
|
||||||
for (var i = items_start; i < items_end; i++) {
|
|
||||||
rows[i] && this_cluster_rows.push(rows[i]);
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
top_offset: top_offset,
|
|
||||||
bottom_offset: bottom_offset,
|
|
||||||
rows_above: rows_above,
|
|
||||||
rows: this_cluster_rows
|
|
||||||
}
|
|
||||||
},
|
|
||||||
renderExtraTag: function(class_name, height) {
|
|
||||||
var tag = document.createElement(this.options.tag),
|
|
||||||
clusterize_prefix = 'clusterize-';
|
|
||||||
tag.className = [clusterize_prefix + 'extra-row', clusterize_prefix + class_name].join(' ');
|
|
||||||
height && (tag.style.height = height + 'px');
|
|
||||||
return tag.outerHTML;
|
|
||||||
},
|
|
||||||
// if necessary verify data changed and insert to DOM
|
|
||||||
insertToDOM: function(rows, cache) {
|
|
||||||
// explore row's height
|
|
||||||
if( ! this.options.cluster_height) {
|
|
||||||
this.exploreEnvironment(rows, cache);
|
|
||||||
}
|
|
||||||
var data = this.generate(rows, this.getClusterNum()),
|
|
||||||
this_cluster_rows = data.rows.join(''),
|
|
||||||
this_cluster_content_changed = this.checkChanges('data', this_cluster_rows, cache),
|
|
||||||
top_offset_changed = this.checkChanges('top', data.top_offset, cache),
|
|
||||||
only_bottom_offset_changed = this.checkChanges('bottom', data.bottom_offset, cache),
|
|
||||||
callbacks = this.options.callbacks,
|
|
||||||
layout = [];
|
|
||||||
|
|
||||||
if(this_cluster_content_changed || top_offset_changed) {
|
|
||||||
if(data.top_offset) {
|
|
||||||
this.options.keep_parity && layout.push(this.renderExtraTag('keep-parity'));
|
|
||||||
layout.push(this.renderExtraTag('top-space', data.top_offset));
|
|
||||||
}
|
|
||||||
layout.push(this_cluster_rows);
|
|
||||||
data.bottom_offset && layout.push(this.renderExtraTag('bottom-space', data.bottom_offset));
|
|
||||||
callbacks.clusterWillChange && callbacks.clusterWillChange();
|
|
||||||
this.html(layout.join(''));
|
|
||||||
this.options.content_tag == 'ol' && this.content_elem.setAttribute('start', data.rows_above);
|
|
||||||
callbacks.clusterChanged && callbacks.clusterChanged();
|
|
||||||
} else if(only_bottom_offset_changed) {
|
|
||||||
this.content_elem.lastChild.style.height = data.bottom_offset + 'px';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// unfortunately ie <= 9 does not allow to use innerHTML for table elements, so make a workaround
|
|
||||||
html: function(data) {
|
|
||||||
var content_elem = this.content_elem;
|
|
||||||
if(ie && ie <= 9 && this.options.tag == 'tr') {
|
|
||||||
var div = document.createElement('div'), last;
|
|
||||||
div.innerHTML = '<table><tbody>' + data + '</tbody></table>';
|
|
||||||
while((last = content_elem.lastChild)) {
|
|
||||||
content_elem.removeChild(last);
|
|
||||||
}
|
|
||||||
var rows_nodes = this.getChildNodes(div.firstChild.firstChild);
|
|
||||||
while (rows_nodes.length) {
|
|
||||||
content_elem.appendChild(rows_nodes.shift());
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
content_elem.innerHTML = data;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
getChildNodes: function(tag) {
|
|
||||||
var child_nodes = tag.children, nodes = [];
|
|
||||||
for (var i = 0, ii = child_nodes.length; i < ii; i++) {
|
|
||||||
nodes.push(child_nodes[i]);
|
|
||||||
}
|
|
||||||
return nodes;
|
|
||||||
},
|
|
||||||
checkChanges: function(type, value, cache) {
|
|
||||||
var changed = value != cache[type];
|
|
||||||
cache[type] = value;
|
|
||||||
return changed;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// support functions
|
|
||||||
function on(evt, element, fnc) {
|
|
||||||
return element.addEventListener ? element.addEventListener(evt, fnc, false) : element.attachEvent("on" + evt, fnc);
|
|
||||||
}
|
|
||||||
function off(evt, element, fnc) {
|
|
||||||
return element.removeEventListener ? element.removeEventListener(evt, fnc, false) : element.detachEvent("on" + evt, fnc);
|
|
||||||
}
|
|
||||||
function isArray(arr) {
|
|
||||||
return Object.prototype.toString.call(arr) === '[object Array]';
|
|
||||||
}
|
|
||||||
function getStyle(prop, elem) {
|
|
||||||
return window.getComputedStyle ? window.getComputedStyle(elem)[prop] : elem.currentStyle[prop];
|
|
||||||
}
|
|
||||||
|
|
||||||
return Clusterize;
|
|
||||||
}));
|
|
@ -1,16 +0,0 @@
|
|||||||
<div class="pos-bill-toolbar col-xs-9" style="display: flex; width: 70%;">
|
|
||||||
<div class="party-area" style="flex: 1;">
|
|
||||||
<span class="edit-customer-btn text-muted" style="display: inline;">
|
|
||||||
<a class="btn-open no-decoration" title="Edit Customer">
|
|
||||||
<i class="octicon octicon-pencil"></i>
|
|
||||||
</a>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<button class="btn btn-default list-customers-btn" style="margin-left: 12px">
|
|
||||||
<i class="octicon octicon-organization"></i>
|
|
||||||
</button>
|
|
||||||
</button> {% if (allow_delete) { %}
|
|
||||||
<button class="btn btn-default btn-danger" style="margin: 0 5px 0 5px">
|
|
||||||
<i class="octicon octicon-trashcan"></i>
|
|
||||||
</button> {% } %}
|
|
||||||
</div>
|
|
@ -1,136 +0,0 @@
|
|||||||
<div class="pos">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-5 pos-bill-wrapper">
|
|
||||||
<div class="col-sm-12"><h6 class="form-section-heading uppercase">{{ __("Item Cart") }}</h6></div>
|
|
||||||
<div class="pos-bill">
|
|
||||||
<div class="item-cart">
|
|
||||||
<div class="pos-list-row pos-bill-header text-muted h6">
|
|
||||||
<span class="cell subject">
|
|
||||||
<!--<input class="list-select-all" type="checkbox" title="{%= __("Select All") %}">-->
|
|
||||||
{{ __("Item Name")}}
|
|
||||||
</span>
|
|
||||||
<span class="cell text-right">{{ __("Quantity") }}</span>
|
|
||||||
<span class="cell text-right">{{ __("Discount") }}</span>
|
|
||||||
<span class="cell text-right">{{ __("Rate") }}</span>
|
|
||||||
</div>
|
|
||||||
<div class="item-cart-items">
|
|
||||||
<div class="no-items-message text-extra-muted">
|
|
||||||
<span class="text-center">
|
|
||||||
<i class="fa fa-2x fa-shopping-cart"></i>
|
|
||||||
<p>{{ __("Tap items to add them here") }}</p>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<div class="items">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="totals-area">
|
|
||||||
<div class="pos-list-row net-total-area">
|
|
||||||
<div class="cell"></div>
|
|
||||||
<div class="cell text-right">{%= __("Net Total") %}</div>
|
|
||||||
<div class="cell price-cell bold net-total text-right"></div>
|
|
||||||
</div>
|
|
||||||
<div class="pos-list-row tax-area">
|
|
||||||
<div class="cell"></div>
|
|
||||||
<div class="cell text-right">{%= __("Taxes") %}</div>
|
|
||||||
<div class="cell price-cell text-right tax-table">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% if(allow_user_to_edit_discount) { %}
|
|
||||||
<div class="pos-list-row discount-amount-area">
|
|
||||||
<div class="cell"></div>
|
|
||||||
<div class="cell text-right">{%= __("Discount") %}</div>
|
|
||||||
<div class="cell price-cell discount-field-col">
|
|
||||||
<div class="input-group input-group-sm">
|
|
||||||
<span class="input-group-addon">%</span>
|
|
||||||
<input type="text" class="form-control discount-percentage text-right">
|
|
||||||
</div>
|
|
||||||
<div class="input-group input-group-sm">
|
|
||||||
<span class="input-group-addon">{%= get_currency_symbol(currency) %}</span>
|
|
||||||
<input type="text" class="form-control discount-amount text-right" placeholder="{%= 0.00 %}">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% } %}
|
|
||||||
<div class="pos-list-row grand-total-area collapse-btn" style="border-bottom:1px solid #d1d8dd;">
|
|
||||||
<div class="cell">
|
|
||||||
<a class="">
|
|
||||||
<i class="octicon octicon-chevron-down"></i>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="cell text-right bold">{%= __("Grand Total") %}</div>
|
|
||||||
<div class="cell price-cell grand-total text-right lead"></div>
|
|
||||||
</div>
|
|
||||||
<div class="pos-list-row qty-total-area collapse-btn" style="border-bottom:1px solid #d1d8dd;">
|
|
||||||
<div class="cell">
|
|
||||||
<a class="">
|
|
||||||
<i class="octicon octicon-chevron-down"></i>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="cell text-right bold">{%= __("Qty Total") %}</div>
|
|
||||||
<div class="cell price-cell qty-total text-right lead"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row" style="margin-top: 30px">
|
|
||||||
<div class="col-sm-6 selected-item">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-6 numeric_keypad hidden-xs" style="display:none">
|
|
||||||
{% var chartData = ["Qty", "Disc", "Price"] %} {% for(var i=0; i
|
|
||||||
<3; i++) { %} <div class="row text-right">
|
|
||||||
{% for(var j=i*3; j
|
|
||||||
<(i+1)*3; j++) { %} <button type="button" class="btn btn-default numeric-keypad" val="{{j+1}}">{{j+1}}</button>
|
|
||||||
{% } %}
|
|
||||||
<button type="button" {% if((!allow_user_to_edit_rate && __(chartData[i]) == __("Price")) || (!allow_user_to_edit_discount && __(chartData[i]) == __("Disc"))) { %} disabled {% } %} id="pos-item-{{ chartData[i].toLowerCase() }}" class="btn text-center btn-default numeric-keypad pos-operation">{{ __(chartData[i]) }}</button>
|
|
||||||
</div>
|
|
||||||
{% } %}
|
|
||||||
<div class="row text-right">
|
|
||||||
<button type="button" class="btn btn-default numeric-keypad numeric-del">{{ __("Del") }}</button>
|
|
||||||
<button type="button" class="btn btn-default numeric-keypad" val="0">0</button>
|
|
||||||
<button type="button" class="btn btn-default numeric-keypad" val=".">.</button>
|
|
||||||
<button type="button" class="btn btn-primary numeric-keypad pos-pay">{{ __("Pay") }}</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-5 list-customers">
|
|
||||||
<div class="col-sm-12"><h6 class="form-section-heading uppercase">{{ __("Customers in Queue") }}</h6></div>
|
|
||||||
<div class="pos-list-row pos-bill-header">
|
|
||||||
<div class="cell subject"><input class="list-select-all" type="checkbox">{{ __("Customer") }}</div>
|
|
||||||
<div class="cell text-left">{{ __("Status") }}</div>
|
|
||||||
<div class="cell text-right">{{ __("Amount") }}</div>
|
|
||||||
<div class="cell text-right">{{ __("Grand Total") }}</div>
|
|
||||||
</div>
|
|
||||||
<div class="list-customers-table border-left border-right border-bottom">
|
|
||||||
<div class="no-items-message text-extra-muted">
|
|
||||||
<span class="text-center">
|
|
||||||
<i class="fa fa-2x fa-user"></i>
|
|
||||||
<p>{{ __("No Customers yet!") }}</p>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-7 pos-items-section">
|
|
||||||
<div class="col-sm-12"><h6 class="form-section-heading uppercase">{{ __("Stock Items") }}</h6></div>
|
|
||||||
<div class="row pos-item-area">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<span id="customer-results" style="color:#68a;"></span>
|
|
||||||
<div class="item-list-area">
|
|
||||||
<div class="pos-list-row pos-bill-header text-muted h6">
|
|
||||||
<div class="cell subject search-item-group">
|
|
||||||
<div class="dropdown">
|
|
||||||
<a class="text-muted dropdown-toggle" data-toggle="dropdown"><span class="dropdown-text">{{ __("All Item Groups") }}</span><i class="caret"></i></a>
|
|
||||||
<ul class="dropdown-menu">
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="cell search-item"></div>
|
|
||||||
</div>
|
|
||||||
<div class="app-listing item-list image-view-container">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
@ -1,34 +0,0 @@
|
|||||||
<div class="row pos-bill-row pos-bill-item" data-item-code="{%= item_code %}">
|
|
||||||
<div class="col-xs-4"><h6>{%= item_code || "" %}{%= __(item_name) || "" %}</h6></div>
|
|
||||||
<div class="col-xs-3">
|
|
||||||
<div class="row pos-qty-row">
|
|
||||||
<div class="col-xs-2 text-center pos-qty-btn" data-action="decrease-qty"><i class="fa fa-minus text-muted" style="font-size:12px"></i></div>
|
|
||||||
<div class="col-xs-8">
|
|
||||||
<div>
|
|
||||||
<input type="tel" value="{%= qty %}" class="form-control pos-item-qty text-right">
|
|
||||||
</div>
|
|
||||||
{% if(actual_qty != null) { %}
|
|
||||||
<div style="margin-top: 5px;" class="text-muted small text-right">
|
|
||||||
{%= __("In Stock: ") %} <span>{%= actual_qty || 0.0 %}</span>
|
|
||||||
</div>
|
|
||||||
{% } %}
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-2 text-center pos-qty-btn" data-action="increase-qty"><i class="fa fa-plus text-muted" style="font-size:12px"></i></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-2 text-right">
|
|
||||||
<div class="row input-sm">
|
|
||||||
<input type="tel" value="{%= discount_percentage %}" class="form-control text-right pos-item-disc">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-3 text-right">
|
|
||||||
<div class="text-muted" style="margin-top: 5px;">
|
|
||||||
{% if(enabled) { %}
|
|
||||||
<input type="tel" value="{%= rate %}" class="form-control input-sm pos-item-price text-right">
|
|
||||||
{% } else { %}
|
|
||||||
<h6>{%= format_currency(rate) %}</h6>
|
|
||||||
{% } %}
|
|
||||||
</div>
|
|
||||||
<p><h6>{%= amount %}</h6></p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
@ -1,9 +0,0 @@
|
|||||||
<div class="pos-list-row pos-bill-item {{ selected_class }}" data-item-code="{{ item_code }}">
|
|
||||||
<div class="cell subject">
|
|
||||||
<!--<input class="list-row-checkbox" type="checkbox" data-name="{{item_code}}">-->
|
|
||||||
<a class="grey list-id" title="{{ item_name }}">{{ strip_html(__(item_name)) || item_code }}</a>
|
|
||||||
</div>
|
|
||||||
<div class="cell text-right">{%= qty %}</div>
|
|
||||||
<div class="cell text-right">{%= discount_percentage %}</div>
|
|
||||||
<div class="cell text-right">{%= format_currency(rate) %}</div>
|
|
||||||
</div>
|
|
@ -1,9 +0,0 @@
|
|||||||
<div class="pos-list-row" invoice-name = "{{name}}">
|
|
||||||
<div class="list-column cell subject" invoice-name = "{{name}}">
|
|
||||||
<input class="list-delete text-left" type="checkbox" style = "margin-right:5px">
|
|
||||||
<a class="grey list-id text-left customer-row" title="{{ customer }}">{%= customer %}</a>
|
|
||||||
</div>
|
|
||||||
<div class="list-column cell text-left customer-row"><span class="indicator {{data.indicator}}">{{ data.status }}</span></div>
|
|
||||||
<div class="list-column cell text-right customer-row">{%= paid_amount %}</div>
|
|
||||||
<div class="list-column cell text-right customer-row">{%= grand_total %}</div>
|
|
||||||
</div>
|
|
@ -1,32 +0,0 @@
|
|||||||
<div class="pos-item-wrapper image-view-item" data-item-code="{{item_code}}">
|
|
||||||
<div class="image-view-header doclist-row">
|
|
||||||
<div class="list-value">
|
|
||||||
<a class="grey list-id" data-name="{{item_code}}" title="{{ item_name || item_code}}">{{item_name || item_code}}<br>({{ __(item_stock) }})</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="image-view-body">
|
|
||||||
<a data-item-code="{{ item_code }}"
|
|
||||||
title="{{ item_name || item_code }}"
|
|
||||||
>
|
|
||||||
<div class="image-field"
|
|
||||||
style="
|
|
||||||
{% if (!item_image) { %}
|
|
||||||
background-color: #fafbfc;
|
|
||||||
{% } %}
|
|
||||||
border: 0px;"
|
|
||||||
>
|
|
||||||
{% if (!item_image) { %}
|
|
||||||
<span class="placeholder-text">
|
|
||||||
{%= frappe.get_abbr(item_name || item_code) %}
|
|
||||||
</span>
|
|
||||||
{% } %}
|
|
||||||
{% if (item_image) { %}
|
|
||||||
<img src="{{ item_image }}" alt="{{item_name || item_code}}">
|
|
||||||
{% } %}
|
|
||||||
</div>
|
|
||||||
<span class="price-info">
|
|
||||||
{{item_price}} / {{item_uom}}
|
|
||||||
</span>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
@ -1,22 +0,0 @@
|
|||||||
<div class="pos-selected-item-action" data-item-code="{%= item_code %}" data-idx="{%= idx %}">
|
|
||||||
<div class="pos-list-row">
|
|
||||||
<div class="cell">{{ __("Quantity") }}:</div>
|
|
||||||
<input type="tel" class="form-control cell pos-item-qty" value="{%= qty %}"/>
|
|
||||||
</div>
|
|
||||||
<div class="pos-list-row">
|
|
||||||
<div class="cell">{{ __("Price List Rate") }}:</div>
|
|
||||||
<input type="tel" class="form-control cell" disabled value="{%= price_list_rate %}"/>
|
|
||||||
</div>
|
|
||||||
<div class="pos-list-row">
|
|
||||||
<div class="cell">{{ __("Discount") }}: %</div>
|
|
||||||
<input type="tel" class="form-control cell pos-item-disc" {% if !allow_user_to_edit_discount %} disabled {% endif %} value="{%= discount_percentage %}">
|
|
||||||
</div>
|
|
||||||
<div class="pos-list-row">
|
|
||||||
<div class="cell">{{ __("Price") }}:</div>
|
|
||||||
<input type="tel" class="form-control cell pos-item-price" {% if !allow_user_to_edit_rate %} disabled {% endif %} value="{%= rate %}"/>
|
|
||||||
</div>
|
|
||||||
<div class="pos-list-row">
|
|
||||||
<div class="cell">{{ __("Amount") }}:</div>
|
|
||||||
<input type="tel" class="form-control cell pos-amount" disabled value="{%= amount %}"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
@ -1,4 +0,0 @@
|
|||||||
<div class="pos-list-row" style="padding-right: 0;">
|
|
||||||
<div class="cell">{%= description %}</div>
|
|
||||||
<div class="cell text-right bold">{%= tax_amount %}</div>
|
|
||||||
</div>
|
|
Loading…
x
Reference in New Issue
Block a user