@@ -756,6 +756,7 @@ table th .select2-container--default .select2-selection--single { | |||
table.products-collection-table th.main-info, td.buyingPrice, td.multiplyingFactor, td.priceWithTax { | |||
background: #eeeeee; | |||
background-clip: padding-box; | |||
text-decoration: underline; | |||
} | |||
/* line 263, ../../sass/backend/custom.scss */ | |||
@@ -839,7 +840,7 @@ table.table-renewable-stock tr.product-family { | |||
} | |||
/* Tickets */ | |||
/* line 294, ../../sass/backend/custom.scss */ | |||
/* line 296, ../../sass/backend/custom.scss */ | |||
#ticket-list .btn-sm { | |||
display: block; | |||
} |
@@ -18,10 +18,18 @@ let mixinPrice = { | |||
}, | |||
computed: { | |||
marginProfit: function () { | |||
return getMargin(this.priceValue,this.buyingPriceValue); | |||
if (this.behaviorPriceValue == 'by-piece') { | |||
return getMargin(this.priceValue,this.buyingPriceValue); | |||
} else if (this.behaviorPriceValue == 'by-reference-unit') { | |||
return getMargin(this.finalPrice,this.finalBuyingPrice); | |||
} | |||
}, | |||
marginProfitPercent:function () { | |||
return getMarginPercent(this.priceValue, this.buyingPriceValue); | |||
if (this.behaviorPriceValue == 'by-piece') { | |||
return getMarginPercent(this.priceValue,this.buyingPriceValue); | |||
} else if (this.behaviorPriceValue == 'by-reference-unit') { | |||
return getMarginPercent(this.finalPrice,this.finalBuyingPrice); | |||
} | |||
}, | |||
marginProfitWithReduction: function () { | |||
var price = this.$parent.applyReduction(this.priceValue, this.priceWithTaxValue, this.taxRateValue, false); | |||
@@ -31,6 +39,9 @@ let mixinPrice = { | |||
var price = this.$parent.applyReduction(this.priceValue, this.priceWithTaxValue, this.taxRateValue, false); | |||
return getMarginPercent(price, this.buyingPriceValue); | |||
}, | |||
finalPrice: function () { | |||
return parseFloat((this.priceByRefUnitValue * this.quantityValue) / this.unitCoefficient).toFixed(4); | |||
}, | |||
finalPriceWithTax: function () { | |||
return getPriceWithTax(parseFloat((this.priceByRefUnitValue * this.quantityValue) / this.unitCoefficient).toFixed(4), this.taxRateValue); | |||
}, |
@@ -258,7 +258,7 @@ table th .select2-container--default .select2-selection--single{padding:0.3rem 0 | |||
#lc-product-family-edit .inherited {color: #888; font-style: italic; font-weight: initial;} | |||
#lc-product-family-edit .products-collection-table td .value {min-width: 80%; margin: auto; min-height: 35px; cursor: pointer;} | |||
#lc-product-family-edit .products-collection-table td .modal {text-align: left;} | |||
table.products-collection-table th.main-info, td.buyingPrice, td.multiplyingFactor, td.priceWithTax{background: #eeeeee; background-clip: padding-box} | |||
table.products-collection-table th.main-info, td.buyingPrice, td.multiplyingFactor, td.priceWithTax{background: #eeeeee; background-clip: padding-box; text-decoration: underline;} | |||
table.products-collection-table tr.disabled{opacity: 0.5} | |||
table.table-renewable-stock tr.product-family{border-top: 2px solid #888; } | |||
@@ -296,4 +296,4 @@ table.table-renewable-stock tr.product-family{border-top: 2px solid #888; } | |||
.btn-sm { | |||
display: block ; | |||
} | |||
} | |||
} |
@@ -84,6 +84,10 @@ | |||
{{ _self.product_field(3, product.priceByRefUnit, 'priceByRefUnit',false, '€', 'v-show="productFamily.behaviorPrice == \'' ~ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_REFERENCE_UNIT') ~ '\'"') }} | |||
{{ _self.product_field(3, product.priceByRefUnitWithTax, 'priceByRefUnitWithTax',false, '€', 'v-show="productFamily.behaviorPrice == \'' ~ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_REFERENCE_UNIT') ~ '\'"') }} | |||
<td class="price" colspan="3" v-show="productFamily.behaviorPrice == '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_REFERENCE_UNIT') }}'"> | |||
{% verbatim %}{{ finalPrice }}{% endverbatim %}€ | |||
</td> | |||
<td class="priceWithTax" colspan="3" v-show="productFamily.behaviorPrice == '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_REFERENCE_UNIT') }}'"> | |||
{% verbatim %}{{ finalPriceWithTax }}{% endverbatim %}€ | |||
<span class="text-danger" v-show="productFamily.reductionActive">{% verbatim %}{{ finalPriceWithTaxAndReduction }}{% endverbatim %}€</span> |
@@ -52,8 +52,8 @@ | |||
PV TTC / ${ getUnitReference() } | |||
</th> | |||
<th colspan="3" class="price" | |||
v-show="getBehaviorPrice() =='{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_PIECE') }}'"> | |||
<th colspan="3" class="price"> | |||
{# v-show="getBehaviorPrice() =='{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_PIECE') }}'">#} | |||
PV HT | |||
</th> | |||
<th colspan="3" class="price main-info"> | |||
@@ -136,8 +136,8 @@ | |||
${productFamily.priceByRefUnitWithTax} | |||
</th> | |||
<th colspan="3" class="price" | |||
v-show="getBehaviorPrice() =='{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_PIECE') }}'"> | |||
<th colspan="3" class="price"> | |||
{# v-show="getBehaviorPrice() =='{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_PIECE') }}'">#} | |||
${productFamily.price} | |||
</th> | |||
<th colspan="3" class="price main-info"> |