diff --git a/css/style.css b/css/style.css index f36dfe9..aa69a67 100644 --- a/css/style.css +++ b/css/style.css @@ -118,7 +118,7 @@ body{ } div.container{ - width: 800px; + width: 850px; } #imgInp{ diff --git a/images/Add item.png b/images/Add item.png new file mode 100644 index 0000000..4bbbfa8 Binary files /dev/null and b/images/Add item.png differ diff --git a/images/Trash item.png b/images/Trash item.png new file mode 100644 index 0000000..9f26da1 Binary files /dev/null and b/images/Trash item.png differ diff --git a/index.html b/index.html index 2dc999d..2a05208 100644 --- a/index.html +++ b/index.html @@ -41,7 +41,7 @@
- +
@@ -55,16 +55,17 @@
 
-
Description
+
Description
Quantity
Cost {{currencySymbol}}
+
Discount {{currencySymbol}}
Total
- [X] +
-
+
@@ -73,17 +74,20 @@
+
+ +
- {{item.cost * item.qty | currency: currencySymbol}} + {{(item.cost - item.discount) * item.qty | currency: currencySymbol}}
- [+] +
-
Sub Total
+
Sub Total
{{invoiceSubTotal() | currency: currencySymbol}}
@@ -91,7 +95,7 @@
{{calculateTax() | currency: currencySymbol}}
-
Grand Total:
+
Grand Total:
{{calculateGrandTotal() | currency: currencySymbol}}
@@ -103,7 +107,7 @@
-
+
Jasdeep Singh & Manpreet Singh Made with diff --git a/js/main.js b/js/main.js index d17b9af..592ae05 100644 --- a/js/main.js +++ b/js/main.js @@ -22,7 +22,7 @@ angular.module('invoicing', []) postal: 'M5S 1B6' }, items:[ - { qty: 10, description: 'Gadget', cost: 9.95 } + { qty: 0, description: '', cost: 0, discount: 0 } ] }) @@ -93,6 +93,10 @@ angular.module('invoicing', []) service.all = function() { return [ + { + name: 'Indian Rupee (₹)', + symbol: '₹' + }, { name: 'British Pound (£)', symbol: '£' @@ -105,10 +109,7 @@ angular.module('invoicing', []) name: 'Euro (€)', symbol: '€' }, - { - name: 'Indian Rupee (₹)', - symbol: '₹' - }, + { name: 'Norwegian krone (kr)', symbol: 'kr ' @@ -129,7 +130,7 @@ angular.module('invoicing', []) function($scope, $http, DEFAULT_INVOICE, DEFAULT_LOGO, LocalStorage, Currency) { // Set defaults - $scope.currencySymbol = '$'; + $scope.currencySymbol = '₹'; $scope.logoRemoved = false; $scope.printMode = false; @@ -151,7 +152,7 @@ angular.module('invoicing', []) })() // Adds an item to the invoice's items $scope.addItem = function() { - $scope.invoice.items.push({ qty:0, cost:0, description:"" }); + $scope.invoice.items.push({ qty:0, cost:0, description:"",discount:0 }); } // Toggle's the logo @@ -179,7 +180,7 @@ angular.module('invoicing', []) $scope.invoiceSubTotal = function() { var total = 0.00; angular.forEach($scope.invoice.items, function(item, key){ - total += (item.qty * item.cost); + total += (item.qty * (item.cost - item.discount)); }); return total; };