Skip to content

Commit

Permalink
[ETS-81] Fix Tax-Rates on shipping/return/cancel events
Browse files Browse the repository at this point in the history
  • Loading branch information
eiriarte-mendez committed Nov 26, 2018
1 parent 4128731 commit 835b30d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ Ext.define('Shopware.apps.Order.view.detail.ratepaydelivery', {
item['articlenumber'] = row.articleordernumber;
item['name'] = row.name;
item['price'] = row.price;
item['taxRate'] = firstArticle.raw.taxId;
item['taxRate'] = firstArticle.raw.taxRate;
item['maxQuantity'] = row.quantity;
item['quantity'] = row.quantityDeliver;
item['delivered'] = row.delivered;
Expand Down Expand Up @@ -391,7 +391,7 @@ Ext.define('Shopware.apps.Order.view.detail.ratepaydelivery', {
item['articlenumber'] = row.articleordernumber;
item['name'] = row.name;
item['price'] = row.price;
item['taxRate'] = firstArticle.raw.taxId;
item['taxRate'] = firstArticle.raw.taxRate;
item['quantity'] = row.quantity - row.quantityDeliver - row.cancelled - row.delivered;
item['delivered'] = row.delivered;
item['returned'] = row.returned;
Expand Down Expand Up @@ -441,7 +441,7 @@ Ext.define('Shopware.apps.Order.view.detail.ratepaydelivery', {
item['articlenumber'] = row.articleordernumber;
item['name'] = row.name;
item['price'] = row.price;
item['taxRate'] = firstArticle.raw.taxId;
item['taxRate'] = firstArticle.raw.taxRate;
item['quantity'] = row.quantity - row.quantityDeliver - row.cancelled - row.delivered;
item['delivered'] = row.delivered;
item['returned'] = row.returned;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ Ext.define('Shopware.apps.Order.view.detail.ratepayretoure', {
var items = new Array();
var id = me.record.get('id');
var error = false;

var firstArticle = me.record.getPositions().data.items[0];
for (i = 0; i < me.store.data.items.length; i++) {
var row = me.store.data.items[i].data;
var item = new Object();
Expand All @@ -158,7 +160,7 @@ Ext.define('Shopware.apps.Order.view.detail.ratepayretoure', {
item['articlenumber'] = row.articleordernumber;
item['name'] = row.name;
item['price'] = row.price;
item['taxRate'] = row.tax_rate;
item['taxRate'] = firstArticle.raw.taxRate; // row.tax_rate;
item['quantity'] = row.delivered - row.returned - row.quantityReturn;
item['delivered'] = row.delivered;
item['returned'] = row.returned;
Expand Down Expand Up @@ -199,6 +201,8 @@ Ext.define('Shopware.apps.Order.view.detail.ratepayretoure', {
var items = new Array();
var id = me.record.get('id');
var error = false;

var firstArticle = me.record.getPositions().data.items[0];
for (i = 0; i < me.store.data.items.length; i++) {
var row = me.store.data.items[i].data;
var item = new Object();
Expand All @@ -211,7 +215,7 @@ Ext.define('Shopware.apps.Order.view.detail.ratepayretoure', {
item['articlenumber'] = row.articleordernumber;
item['name'] = row.name;
item['price'] = row.price;
item['taxRate'] = row.tax_rate;
item['taxRate'] = firstArticle.raw.taxRate; // row.tax_rate;
item['quantity'] = row.delivered - row.returned - row.quantityReturn;
item['delivered'] = row.delivered;
item['returned'] = row.returned;
Expand Down

0 comments on commit 835b30d

Please sign in to comment.