diff options
author | Mitch Jackson <mitch@freeside.biz> | 2019-01-19 07:41:08 -0500 |
---|---|---|
committer | Mitch Jackson <mitch@freeside.biz> | 2019-01-19 08:57:32 -0500 |
commit | 569f676f4a06512a46120e12edc6a6410e93ff93 (patch) | |
tree | fa6d58552c6d34b24cb7daf8a29430b70e8db2a8 /httemplate/edit/cust_location.cgi | |
parent | 39fe6499bd38e6e7c468f549b1d4919a7cf2c44d (diff) |
RT# 80488 Live look up of WA state tax district
When conf flag 'tax_district_method' is set, tax district
is queried for address before form is submitted
Affected Pages:
* New Customer
* Edit Customer
* Order Package
* Change Package
* Edit Package Location
Diffstat (limited to 'httemplate/edit/cust_location.cgi')
-rwxr-xr-x | httemplate/edit/cust_location.cgi | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/httemplate/edit/cust_location.cgi b/httemplate/edit/cust_location.cgi index 38816db7a..93311c5c3 100755 --- a/httemplate/edit/cust_location.cgi +++ b/httemplate/edit/cust_location.cgi @@ -17,10 +17,21 @@ ACTION="<% $p %>edit/process/cust_location.cgi" METHOD=POST> &> <& /elements/standardize_locations.html, 'form' => 'EditLocationForm', - 'callback' => 'document.EditLocationForm.submit();', + 'callback' => $conf->exists('tax_district_method') + ? 'wa_state_tax_district()' + : 'submit_continue()', 'with_census' => 1, 'with_census_functions' => 1, &> +<script> + <& /elements/wa_state_tax_district.js &> + + // wa_sate_tax_district() will call submit_continue() upon success, + // or submit_abort() upon error + function submit_continue() { + document.EditLocationForm.submit(); + } +</script> </TABLE> <BR> |