Please enable JavaScript.
Coggle requires JavaScript to display documents.
InvoiceEditController (Init (userService.getCurrentUser() (vm.user, vm…
InvoiceEditController
Init
$scope.model = invoice
getApprovers()
~
invoiceService.getApprover()
.then
vm.users[]
~
invoiceService.getCompanies()
vm.companies
companySelected()
~
companySelected()
vm.vendors
= invoiceSerive.getVendors(
vm.current.CompanyId
)
vm.vendors
= invoiceSerive.getVendors(
vm.current.CompanyId
)
vm.afes
= invoiceService.getAfes(
vm.current.CompanyId
)
invoiceService.getBillableAccounts()
.then
vm.billableAccounts[]
vm.editableLineItems
combineLineItemsAccounts()
1 more item...
~
workflowService.getWorkflows()
vm.workflows
vm.workflow
setInvoiceWorkflow()
~
setInvoiceWorkflow()
if ( !state.edit )
vm.current.WorkflowId
= vm.workflow.Id
vm.current.CurrentStateId
= vm.worklow.Transitions[0].CurrentState.Id
if (state.edit)
vm.current.WorkflowId
vm.workflow
if
state.edit === true
vm.users
= invoiceService.getUsers()
vm.invoiceLineItems
= lineItems;
state.add === true &&& invoice.InvoiceLineItems
vm.invoiceLineItems
= invoice.InvoiceLineItems
vm.editableLineItems
= invoice.InvoiceLineItems.map
$scope.$watch
function() deals with doi not 100% sure this is even in use...
$scope.$watch
vm.current.VendorId
userService.getCurrentUser()
vm.user
vm.current.ApproverId
vm.current.CompanyId
userService.getUserSources()
.then
vm.userSources
if ( vm.state.edit )
validateLineItems(
invoice
)
vm.currentVendorId
= vm.current.VendorId
invoiceService.getVendorDetails(
vm.current.VendorId
)
.then
vm.current.RemitTo
if ( invoice.WorkFlowId )
vm.current.ReceivedDate
= invoice.ReceivedDate
invoiceService.getVendorDetails
.then
vm.current.RemitTo
vm.sources
= invoiceService.getSources()
vm.costCenters
= invoiceService.getVendors(
invoice.CompanyId
);
refreshDocuments();
vm.vendors
= invoiesService.getVendors(
invoice.CompanyId
)
vm.current
= extendWithBreezeDataProperties( {},
invoice
}