Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Commit

Permalink
Added expense account to adjustments
Browse files Browse the repository at this point in the history
Resolves #83
  • Loading branch information
jkleinsc committed Apr 8, 2015
1 parent 7e93a9f commit 1d3b496
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app/inventory/adjust/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ export default AbstractEditController.extend({
name: 'Write Off',
type: 'Write Off'
}],

expenseAccountList: Ember.computed.alias('controllers.inventory.expenseAccountList'),

title: 'Adjustment',

Expand Down
3 changes: 2 additions & 1 deletion app/inventory/adjust/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<p class="form-control-static">{{quantity}}</p>
</div>
<div class="row">
{{em-select class="col-sm-3" label="Adjustment Type"
{{em-select class="col-sm-4" label="Adjustment Type"
property="transactionType" content=adjustmentTypes
optionValuePath="content.type" optionLabelPath="content.name"
}}
Expand All @@ -21,5 +21,6 @@
{{em-text label="Reason" property="reason" rows=3 }}
<div class="row">
{{date-picker property="dateCompleted" label="Adjustment Date" class="col-sm-4"}}
{{select-or-typeahead property="expenseAccount" label="Expense Account" list=expenseAccountList selection=expenseAccount class="col-sm-8"}}
</div>
{{/em-form}}
1 change: 1 addition & 0 deletions app/inventory/edit/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ export default AbstractEditController.extend(InventoryLocations, InventoryTypeLi
request = this.get('store').createRecord('inv-request', {
adjustPurchases: true,
dateCompleted: inventoryLocation.get('dateCompleted'),
expenseAccount: inventoryLocation.get('expenseAccount'),
inventoryItem: inventoryItem,
quantity: adjustmentQuantity,
transactionType: transactionType,
Expand Down
2 changes: 2 additions & 0 deletions app/inventory/edit/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@
<th>Date Completed</th>
<th>Quantity</th>
<th>Transaction</th>
<th>Expense Account</th>
<th>Details</th>
</tr>
{{#if haveTransactions}}
Expand All @@ -123,6 +124,7 @@
<td>{{date-format dateCompleted}}</td>
<td>{{quantity}}</td>
<td>{{transactionType}}</td>
<td>{{expenseAccount}}</td>
<td>
{{#if isAdjustment}}
{{#if haveReason}}
Expand Down

0 comments on commit 1d3b496

Please sign in to comment.