Skip to content

Commit

Permalink
Provide Product Original Values (fix #323)
Browse files Browse the repository at this point in the history
  • Loading branch information
Blair2004 committed Sep 24, 2021
1 parent d734fd1 commit df763bb
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/Services/OrdersService.php
Original file line number Diff line number Diff line change
Expand Up @@ -1018,11 +1018,11 @@ private function __saveOrderProducts($order, $products)
$orderProduct->unit_quantity_id = $product[ 'unit_quantity_id' ];
$orderProduct->unit_name = $product[ 'unit_name' ] ?? Unit::find( $product[ 'unit_id' ] )->name;
$orderProduct->unit_id = $product[ 'unit_id' ];
$orderProduct->mode = $product[ 'mode' ];
$orderProduct->mode = $product[ 'mode' ] ?? 'normal';
$orderProduct->product_id = $product[ 'product' ]->id ?? 0;
$orderProduct->product_category_id = $product[ 'product' ]->category_id ?? 0;
$orderProduct->name = $product[ 'product' ]->name ?? $product[ 'name' ] ?? __( 'Unamed Product' );
$orderProduct->quantity = $product[ 'quantity'];
$orderProduct->quantity = $product[ 'quantity' ];

/**
* We might need to have another consideration
Expand Down
2 changes: 1 addition & 1 deletion public/css/app.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/js/pos-init.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion resources/ts/popups/ns-pos-units.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export default {
__,
displayRightPrice( item ){
return POS.getSalePrice( item );
return POS.getSalePrice( item, this.$popupParams.product.$original() );
},
loadUnits() {
Expand Down

0 comments on commit df763bb

Please sign in to comment.