-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
5106: feat(stock): receipt component stock movements r=jniles a=jniles Adds a component similar to `bhReceipt` specifically for stock movements. We cannot use `bhReceipt` because stock movements have wildly different receipts depending on the kind of stock movement. 5120: Fix stockImport procedure r=jniles a=mbayopanda This PR is about : - Update the `ImportStock` procedure to fix : - MySQL data too long error when the `stockLotQuantity` and `inventoryUnitCost` are not in the good format - Error related to `inventory_uuid` is null during the importation - Error related to `inventory_unit` with its `abbr` column which must be unique during the importation - Add inventories to `inventory_group` defined by its code instead of the inventory group name in the template file NOTE: - The CMM is not changed by the import since we are using the `stock_movement_status` table, the CMM defined in the template file is successfully saved in the `avg_consumption` column of the inventory. 5122: improvement(Break Even Report) r=jniles a=lomamech - Eliminate whitespace and not necessary `<hr>` - Remove property bold on checkboxes and radios buttons closes #4940 Co-authored-by: Jonathan Niles <jonathanwniles@gmail.com> Co-authored-by: mbayopanda <mbayopanda@gmail.com> Co-authored-by: Chris Lomame <lomamech@gmail.com>
- Loading branch information
Showing
14 changed files
with
274 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
const bhStockReceiptTemplate = ` | ||
<a ng-click="$ctrl.open()" href="" translate> | ||
{{ $ctrl.displayValue }} | ||
</a>`; | ||
|
||
angular.module('bhima.components') | ||
.component('bhStockReceipt', { | ||
template : bhStockReceiptTemplate, | ||
controller : bhStockReceiptController, | ||
bindings : { | ||
value : '<', | ||
displayValue : '<', | ||
fluxId : '<', | ||
}, | ||
}); | ||
|
||
bhStockReceiptController.$inject = ['ReceiptModal', '$log']; | ||
|
||
function bhStockReceiptController(ReceiptModal, $log) { | ||
const $ctrl = this; | ||
|
||
$ctrl.$onInit = () => { | ||
// make sure the receipt type exists before it is clicked | ||
const hasCallbackFn = ReceiptModal.getReceiptFnByFluxId($ctrl.fluxId); | ||
|
||
if (!hasCallbackFn) { | ||
$log.error(`Warning: Cannot find a stock receipt for flux ${$ctrl.fluxId} in ReceiptModalService!`); | ||
} | ||
}; | ||
|
||
$ctrl.open = () => ReceiptModal.getReceiptFnByFluxId($ctrl.fluxId)($ctrl.value); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
client/src/modules/stock/movements/templates/action.cell.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 6 additions & 2 deletions
8
client/src/modules/stock/movements/templates/reference.cell.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
<div class="ui-grid-cell-contents"> | ||
<a href ng-click="grid.appScope.openReceiptModal(row.entity.document_uuid, row.entity.flux_id)">{{row.entity.documentReference}}</a> | ||
<div class="ui-grid-cell-contents" ng-if="!row.groupHeader"> | ||
<bh-stock-receipt | ||
value="row.entity.document_uuid" | ||
flux-id="row.entity.flux_id" | ||
display-value="row.entity.documentReference"> | ||
</bh-stock-receipt> | ||
</div> |
Oops, something went wrong.