";
$output .= "| ".$i18n->get('price')." | ".$product->get('price')." |
";
+ my $useSalesTax = $product->get('useSalesTax')
+ ? $i18n->get(138, 'WebGUI')
+ : $i18n->get(139, 'WebGUI');
+ $output .= "| ".$i18n->get('useSalesTax')." | ".$useSalesTax." |
";
$output .= "| ".$i18n->get('weight')." | ".$product->get('weight')." |
";
$output .= "| ".$i18n->get('sku')." | ".$product->get('sku')." |
";
$output .= "| ".$i18n->get('description')." | ".$product->get('description')." |
";
diff --git a/lib/WebGUI/Operation/Subscription.pm b/lib/WebGUI/Operation/Subscription.pm
index a7a9957aa..a3e77a840 100644
--- a/lib/WebGUI/Operation/Subscription.pm
+++ b/lib/WebGUI/Operation/Subscription.pm
@@ -338,6 +338,12 @@ sub www_editSubscription {
-hoverHelp => $i18n->get('subscription price description'),
-value => $properties->{price} || '0.00'
);
+ $f->yesNo(
+ -name => 'useSalesTax',
+ -label => $i18n->get('useSalesTax'),
+ -hoverHelp => $i18n->get('useSalesTax description'),
+ -value => $properties->{useSalesTax} || 0,
+ );
$f->textarea(
-name => 'description',
-label => $i18n->get('subscription description'),
@@ -393,7 +399,7 @@ sub www_editSubscriptionSave {
return $session->privilege->adminOnly() unless ($session->user->isInGroup(3));
my $properties = {};
- @relevantFields = qw(subscriptionId name price description subscriptionGroup duration executeOnSubscription karma);
+ @relevantFields = qw(subscriptionId name useSalesTax price description subscriptionGroup duration executeOnSubscription karma);
foreach (@relevantFields) {
$properties->{$_} = $session->form->process($_) if (defined $session->form->process($_));
}
diff --git a/lib/WebGUI/Subscription.pm b/lib/WebGUI/Subscription.pm
index 016e818cd..a46c3e5ea 100644
--- a/lib/WebGUI/Subscription.pm
+++ b/lib/WebGUI/Subscription.pm
@@ -177,7 +177,7 @@ sub set {
$properties = shift;
foreach (keys(%{$properties})) {
- if (isIn($_, qw(name price description subscriptionGroup duration executeOnSubscription karma))) {
+ if (isIn($_, qw(name price useSalesTax description subscriptionGroup duration executeOnSubscription karma))) {
$self->{_properties}{$_} = $value;
push(@fieldsToUpdate, $_);
}
diff --git a/lib/WebGUI/i18n/English/Asset_EventManagementSystem.pm b/lib/WebGUI/i18n/English/Asset_EventManagementSystem.pm
index cc3776f81..21ae11408 100644
--- a/lib/WebGUI/i18n/English/Asset_EventManagementSystem.pm
+++ b/lib/WebGUI/i18n/English/Asset_EventManagementSystem.pm
@@ -187,6 +187,16 @@ our $I18N = { ##hashref of hashes
lastUpdated => 1138312761,
},
+ 'add/edit useSalesTax' => {
+ message => q|Use Sales Tax?|,
+ lastUpdated => 1160109884,
+ },
+
+ 'add/edit useSalesTax description' => {
+ message => q|Should this event have sales tax applied to it?|,
+ lastUpdated => 1160109886,
+ },
+
'add/edit event maximum attendees' => {
message => q|Maximum Attendees|,
lastUpdated => 1138312761,
diff --git a/lib/WebGUI/i18n/English/Commerce.pm b/lib/WebGUI/i18n/English/Commerce.pm
index 1b63727e1..438265aa6 100755
--- a/lib/WebGUI/i18n/English/Commerce.pm
+++ b/lib/WebGUI/i18n/English/Commerce.pm
@@ -332,10 +332,6 @@ our $I18N = {
context => q|The body of the help page of the list pending transactions screen.|
},
-
-
-
-
'help cancel checkout template title' => {
message => q|Cancel checkout template|,
lastUpdated => 0,
@@ -370,28 +366,43 @@ our $I18N = {
},
'quantity' => {
- message => q| The quantity of the current item in the shopping cart.
|,
- lastUpdated => 1149221320,
+ message => q|The quantity of the current item in the shopping cart.
|,
+ lastUpdated => 1161319738,
},
'period' => {
- message => q| The period of the recurring payment.
|,
- lastUpdated => 1149221320,
+ message => q|The period of the recurring payment.
|,
+ lastUpdated => 1161319740,
},
'name' => {
- message => q| The name of this item.
|,
- lastUpdated => 1149221320,
+ message => q|The name of this item.
|,
+ lastUpdated => 1161319741,
},
'price' => {
- message => q| The price of one item.
|,
- lastUpdated => 1149221320,
+ message => q|The price of one item.
|,
+ lastUpdated => 1161319747,
},
'totalPrice' => {
- message => q| The price of the quantity of this item. (totalPrice = quantity * price)|,
- lastUpdated => 1149221320,
+ message => q|The price of the quantity of this item. (totalPrice = quantity * price)|,
+ lastUpdated => 1161319749,
+ },
+
+ 'salesTax' => {
+ message => q|The amount of sales tax for this item.|,
+ lastUpdated => 1161319799,
+ },
+
+ 'salesTaxRate' => {
+ message => q|The sales tax rate, as determined by the user's homeState in their profile.|,
+ lastUpdated => 1161319799,
+ },
+
+ 'totalSalesTax' => {
+ message => q|The sum of all sales taxes applied to eligible items.|,
+ lastUpdated => 1161319799,
},
'recurringItems' => {
@@ -400,8 +411,8 @@ our $I18N = {
},
'recurringItemLoop' => {
- message => q|A loop containing the recurring items in the shopping cart. For available template variables seen normalItemLoop|,
- lastUpdated => 1149221320,
+ message => q|A loop containing the recurring items in the shopping cart. For available template variables see
normalItemLoop|,
+ lastUpdated => 1161320125,
},
'form' => {
@@ -437,23 +448,23 @@ our $I18N = {
},
'purchaseDescription' => {
- message => q| The description of this transaction.
|,
- lastUpdated => 1149221449,
+ message => q|The description of this transaction.
|,
+ lastUpdated => 1161319762,
},
'status' => {
- message => q| The status of this item.
|,
- lastUpdated => 1149221449,
+ message => q|The status of this item.
|,
+ lastUpdated => 1161319763,
},
'error' => {
- message => q| The error text returned from the payment plugin.
|,
- lastUpdated => 1149221449,
+ message => q|The error text returned from the payment plugin.
|,
+ lastUpdated => 1161319765,
},
'errorCode' => {
- message => q| The error code returned from the payment plugin.
|,
- lastUpdated => 1149221449,
+ message => q|The error code returned from the payment plugin.
|,
+ lastUpdated => 1161319767,
},
@@ -570,6 +581,24 @@ our $I18N = {
context => q|The label of the SHipping tab in the commerce settings manager.|
},
+ 'salesTax tab' => {
+ message => q|SalesTax|,
+ lastUpdated => 1159845482,
+ context => q|The label of the sales tax tab in the commerce settings manager.|
+ },
+
+ 'enable sales tax' => {
+ message => q|Enable Sales Tax?|,
+ lastUpdated => 1160189717,
+ context => q|The label field in the commerce setting for enabling sales tax.|
+ },
+
+ 'enable sales tax description' => {
+ message => q|Set this to "Yes" if you would like Sales Tax enabled in the Commerce System. Sales Tax will be applied to any product, subscription or EMS event that has it enabled.|,
+ lastUpdated => 1160189808,
+ context => q|The label field in the commerce setting for enabling sales tax.|
+ },
+
'shipping plugin label' => {
message => q|Shipping plugin|,
lastUpdated => 0,
diff --git a/lib/WebGUI/i18n/English/ProductManager.pm b/lib/WebGUI/i18n/English/ProductManager.pm
index fd233165b..3869e0fc5 100644
--- a/lib/WebGUI/i18n/English/ProductManager.pm
+++ b/lib/WebGUI/i18n/English/ProductManager.pm
@@ -279,6 +279,16 @@ left of it. Use the delete button to remove it.
lastUpdated => 1120449422,
},
+ 'useSalesTax' => {
+ message => q|Use Sales Tax?|,
+ lastUpdated => 1159844899,
+ },
+
+ 'useSalesTax description' => {
+ message => q|Should this product have sales tax applied to it?|,
+ lastUpdated => 1159844899,
+ },
+
'weight description' => {
message => q|The default weight of the product.|,
lastUpdated => 1120449422,
diff --git a/lib/WebGUI/i18n/English/Subscription.pm b/lib/WebGUI/i18n/English/Subscription.pm
index db6b097fb..10174d5bc 100755
--- a/lib/WebGUI/i18n/English/Subscription.pm
+++ b/lib/WebGUI/i18n/English/Subscription.pm
@@ -118,6 +118,16 @@ our $I18N = {
lastUpdated => 1120861450,
},
+ 'useSalesTax' => {
+ message => q|Use Sales Tax?|,
+ lastUpdated => 1159845025,
+ },
+
+ 'useSalesTax description' => {
+ message => q|Should this subscription have sales tax applied to it?|,
+ lastUpdated => 1159845045,
+ },
+
'subscription description description' => {
message => q|
Detailed description of the subscription.
|,
lastUpdated => 1120861450,
diff --git a/lib/WebGUI/i18n/English/WebGUI.pm b/lib/WebGUI/i18n/English/WebGUI.pm
index 50c2b792f..8bdd8aeb9 100644
--- a/lib/WebGUI/i18n/English/WebGUI.pm
+++ b/lib/WebGUI/i18n/English/WebGUI.pm
@@ -4007,11 +4007,16 @@ Get a copy of wget and use this: wget -p -r --html-extension -k http://the
message => q|Country|,
lastUpdated => 0,
},
-
+
'noldaplink' => {
- message => q|No LDAP Connection|,
+ message => q|No LDAP Connection|,
lastUpdated => 0,
- }
+ },
+
+ 'Select State' => {
+ message => q|Select State|,
+ lastUpdated => 1161388472,
+ },
};
diff --git a/www/extras/operations/salesTaxAjax.js b/www/extras/operations/salesTaxAjax.js
new file mode 100755
index 000000000..4099aa40a
--- /dev/null
+++ b/www/extras/operations/salesTaxAjax.js
@@ -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;
+ }
+ });
+}
+
+
+
+