sales tax
This commit is contained in:
parent
4deff2a0a9
commit
f3ab99bc02
23 changed files with 607 additions and 111 deletions
38
www/extras/operations/salesTaxAjax.js
Executable file
38
www/extras/operations/salesTaxAjax.js
Executable file
|
|
@ -0,0 +1,38 @@
|
|||
//----------------------------------------------------------------------
|
||||
function deleteState (e,entryId) {
|
||||
//Do nothing with e
|
||||
paint('delete',entryId);
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
function addState () {
|
||||
if(document.getElementById('stateChooser_formId').value == "Select State") {
|
||||
alert("You have not selected a state"); //optional
|
||||
return;
|
||||
}
|
||||
if(document.getElementById('taxRate_formId').value == "") {
|
||||
alert("You have not entered a tax rate"); //optional
|
||||
return;
|
||||
}
|
||||
paint('add');
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
function paint (submitType,entryId) {
|
||||
AjaxRequest.post({
|
||||
'op':'salesTaxTable',
|
||||
'addDelete':submitType,
|
||||
'taxRate':document.getElementById('taxRate_formId').value,
|
||||
'entryId':entryId,
|
||||
'addStateId':document.getElementById('stateChooser_formId').value,
|
||||
'onSuccess':function(req){
|
||||
document.getElementById('salesTaxFormDiv').innerHTML = req.responseText;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue