summaryrefslogtreecommitdiff
path: root/httemplate/view/cust_main
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2015-01-18 19:43:48 -0800
committerIvan Kohler <ivan@freeside.biz>2015-01-18 19:52:12 -0800
commit1553b7eca477f52824b6b352a0e87df68622411b (patch)
tree2d91aa37492805547ee420a6076b595b711a8278 /httemplate/view/cust_main
parent6d3897cc5511c4f39bf6f9c02432ba7e600bfe74 (diff)
one-time charges on quotations, RT#25561
Diffstat (limited to 'httemplate/view/cust_main')
-rw-r--r--httemplate/view/cust_main/one_time_charge_link.html91
-rwxr-xr-xhttemplate/view/cust_main/packages.html2
2 files changed, 1 insertions, 92 deletions
diff --git a/httemplate/view/cust_main/one_time_charge_link.html b/httemplate/view/cust_main/one_time_charge_link.html
deleted file mode 100644
index 1efd2d088..000000000
--- a/httemplate/view/cust_main/one_time_charge_link.html
+++ /dev/null
@@ -1,91 +0,0 @@
-<SCRIPT TYPE="text/javascript">
-
-function taxproductmagic(which) {
-
- var str = '';
- var elements = which.form.elements;
- for (var i = 0; i<elements.length; i++) {
-
- if (elements[i].name == 'taxproductnum'){
- document.getElementById('taxproductnum').value = elements[i].value;
- continue;
- }
- if (elements[i].name == 'taxproductnum_description'){
- continue;
- }
-
- if (str.length){str += ';';}
-
- var value = '';
- if ( elements[i].type == 'checkbox' || elements[i].type == 'radio' ) {
- if ( elements[i].checked == true ) {
- value = elements[i].value;
- //} else {
- // value = '';
- }
- } else {
- value = elements[i].value;
- }
- str += elements[i].name + '=' + escape(value);
-
- }
- document.getElementById('charge_storage').value = str;
- cClick();
- overlib( OLiframeContent('<% $p %>/browse/part_pkg_taxproduct.cgi?_type=select&id=taxproductnum&onclick=taxproductquickchargemagic&taxproductnum='+document.getElementById('taxproductnum').value, 1000, 400, 'tax_product_popup'), CAPTION, 'Select product', STICKY, AUTOSTATUSCAP, MIDX, 0, MIDY, 0, DRAGGABLE, CLOSECLICK);
-}
-
-function taxproductquickchargemagic() {
- var str = document.getElementById('charge_storage').value;
- if (str.length){str += ';';}
- str += 'magic=taxproductnum;taxproductnum=';
- str += escape(document.getElementById('taxproductnum').value);
- cClick();
- overlib( OLiframeContent('<% $p %>/edit/quick-charge.html?'+str, 545, 336, 'One-time charge'), CAPTION, 'One-time charge', STICKY, AUTOSTATUSCAP, MIDX, 0, MIDY, 0, DRAGGABLE, CLOSECLICK, BGCOLOR, '#333399', CGCOLOR, '#333399', CLOSETEXT, <% mt('Close') |js_string %>);
-
-}
-
-function taxoverridemagic(which) {
- var str = '';
- var elements = which.ownerDocument.QuickChargeForm.elements;
- for (var i = 0; i<elements.length; i++) {
- if (elements[i].name == 'tax_override'){
- document.getElementById('tax_override').value = elements[i].value;
- continue;
- }
- if (str.length){str += ';';}
- str += elements[i].name + '=' + escape(elements[i].value);
- }
- document.getElementById('charge_storage').value = str;
- cClick();
- overlib( OLiframeContent('<% $p %>/edit/part_pkg_taxoverride.html?element_name=tax_override;onclick=taxoverridequickchargemagic;selected='+document.getElementById('tax_override').value, 1100, 600, 'tax_product_popup'), CAPTION, 'Edit product tax overrides', STICKY, AUTOSTATUSCAP, MIDX, 0, MIDY, 0, DRAGGABLE, CLOSECLICK);
-}
-
-function taxoverridequickchargemagic() {
- var str = document.getElementById('charge_storage').value;
- if (str.length){str += ';';}
- str += 'magic=taxoverride;tax_override=';
- str += document.getElementById('tax_override').value;
- cClick();
- overlib( OLiframeContent('<% $p %>/edit/quick-charge.html?'+str, 545, 336, 'One-time charge'), CAPTION, 'One-time charge', STICKY, AUTOSTATUSCAP, MIDX, 0, MIDY, 0, DRAGGABLE, CLOSECLICK, BGCOLOR, '#333399', CGCOLOR, '#333399', CLOSETEXT, <% mt('Close') |js_string %>);
-
-}
-
-</SCRIPT>
-
-<FORM NAME='quickcharge' STYLE="margin:0; padding:0; display:inline"><INPUT NAME="taxproductnum" ID="taxproductnum" TYPE="hidden"><INPUT NAME="tax_override" ID="tax_override" TYPE="hidden"><INPUT NAME="charge_storage" ID="charge_storage" TYPE="hidden"><INPUT NAME="taxproductnum_description" ID="taxproductnum_description" TYPE="hidden"></FORM>
-
-<% include('/elements/popup_link.html', {
- 'action' => $p.'edit/quick-charge.html?custnum='. $cust_main->custnum,
- 'label' => emt('One-time charge'),
- 'actionlabel' => emt('One-time charge'),
- 'color' => '#333399',
- 'width' => 763,
- 'height' => 460, #more for more room for lines of add'l description?
- })
-%>
-
-<%init>
-
-my($cust_main) = @_;
-
-</%init>
diff --git a/httemplate/view/cust_main/packages.html b/httemplate/view/cust_main/packages.html
index 228b04e74..9a2332ba8 100755
--- a/httemplate/view/cust_main/packages.html
+++ b/httemplate/view/cust_main/packages.html
@@ -96,7 +96,7 @@ if ( el ) el.scrollIntoView(true);
% && $conf->config('payby-default') ne 'HIDE'
% ) {
<% $s++ ? ' | ' : '' %>
- <& one_time_charge_link.html, $cust_main &>
+ <& /elements/one_time_charge_link.html, 'custnum'=>$cust_main->custnum &>
% }
% if ( $curuser->access_right('Bulk move customer services') ) {