Skip to content

Commit

Permalink
Release 0.8.1
Browse files Browse the repository at this point in the history
Merge pull request #233 from vrlkacha/0.8.1
  • Loading branch information
vrlk authored Sep 25, 2016
2 parents 36b14d3 + 022ddf3 commit cbb5d89
Show file tree
Hide file tree
Showing 4 changed files with 1,240 additions and 325 deletions.
8 changes: 7 additions & 1 deletion src/app/components/invoices/invoice.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Controller for Invoice
* @author ndkcha
* @since 0.5.0
* @version 0.8.0
* @version 0.8.1
*/

/// <reference path="../../../typings/main.d.ts" />
Expand Down Expand Up @@ -322,6 +322,8 @@
vm.service = res.service;
oVehicleReg = vm.vehicle.reg;
oServiceOdo = vm.service.odo;
if (vm.service.inventories != undefined)
Object.keys(vm.service.inventories).forEach(iterateInventories);
if (vm.service.status.toLowerCase() == 'due') {
if (vm.service.partialpayment == undefined) {
vm.service.partialpayment = {
Expand All @@ -348,6 +350,10 @@
vm.isSubtotalVisible = (vm.isDiscountVisible || vm.isRoundOffVisible);
amInvoice.getWorkshopDetails(res.channel).then(workshopsuccess).catch(failure);
amInvoice.getInvoiceSettings(res.channel).then(settingssuccess).catch(failure);

function iterateInventories(inventory) {
vm.service.inventories[inventory].total = parseFloat(vm.service.inventories[inventory].qty) * parseFloat(vm.service.inventories[inventory].amount);
}
}

function settingssuccess(res) {
Expand Down
Loading

0 comments on commit cbb5d89

Please sign in to comment.