Browse Source

Correctif edition product

feature/export_comptable
Fab 4 years ago
parent
commit
73bc8ae29d
5 changed files with 25 additions and 9 deletions
  1. +2
    -1
      ShopBundle/Resources/public/css/backend/custom.css
  2. +13
    -2
      ShopBundle/Resources/public/js/backend/script/default/vuejs-mixins.js
  3. +2
    -2
      ShopBundle/Resources/public/sass/backend/custom.scss
  4. +4
    -0
      ShopBundle/Resources/views/backend/productfamily/macros.html.twig
  5. +4
    -4
      ShopBundle/Resources/views/backend/productfamily/panel_products.html.twig

+ 2
- 1
ShopBundle/Resources/public/css/backend/custom.css View File

table.products-collection-table th.main-info, td.buyingPrice, td.multiplyingFactor, td.priceWithTax { table.products-collection-table th.main-info, td.buyingPrice, td.multiplyingFactor, td.priceWithTax {
background: #eeeeee; background: #eeeeee;
background-clip: padding-box; background-clip: padding-box;
text-decoration: underline;
} }


/* line 263, ../../sass/backend/custom.scss */ /* line 263, ../../sass/backend/custom.scss */
} }


/* Tickets */ /* Tickets */
/* line 294, ../../sass/backend/custom.scss */
/* line 296, ../../sass/backend/custom.scss */
#ticket-list .btn-sm { #ticket-list .btn-sm {
display: block; display: block;
} }

+ 13
- 2
ShopBundle/Resources/public/js/backend/script/default/vuejs-mixins.js View File

}, },
computed: { computed: {
marginProfit: function () { 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 () { 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 () { marginProfitWithReduction: function () {
var price = this.$parent.applyReduction(this.priceValue, this.priceWithTaxValue, this.taxRateValue, false); var price = this.$parent.applyReduction(this.priceValue, this.priceWithTaxValue, this.taxRateValue, false);
var price = this.$parent.applyReduction(this.priceValue, this.priceWithTaxValue, this.taxRateValue, false); var price = this.$parent.applyReduction(this.priceValue, this.priceWithTaxValue, this.taxRateValue, false);
return getMarginPercent(price, this.buyingPriceValue); return getMarginPercent(price, this.buyingPriceValue);
}, },
finalPrice: function () {
return parseFloat((this.priceByRefUnitValue * this.quantityValue) / this.unitCoefficient).toFixed(4);
},
finalPriceWithTax: function () { finalPriceWithTax: function () {
return getPriceWithTax(parseFloat((this.priceByRefUnitValue * this.quantityValue) / this.unitCoefficient).toFixed(4), this.taxRateValue); return getPriceWithTax(parseFloat((this.priceByRefUnitValue * this.quantityValue) / this.unitCoefficient).toFixed(4), this.taxRateValue);
}, },

+ 2
- 2
ShopBundle/Resources/public/sass/backend/custom.scss View File

#lc-product-family-edit .inherited {color: #888; font-style: italic; font-weight: initial;} #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 .value {min-width: 80%; margin: auto; min-height: 35px; cursor: pointer;}
#lc-product-family-edit .products-collection-table td .modal {text-align: left;} #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.products-collection-table tr.disabled{opacity: 0.5}
table.table-renewable-stock tr.product-family{border-top: 2px solid #888; } table.table-renewable-stock tr.product-family{border-top: 2px solid #888; }
.btn-sm { .btn-sm {
display: block ; display: block ;
} }
}
}

+ 4
- 0
ShopBundle/Resources/views/backend/productfamily/macros.html.twig View File

{{ _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.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') ~ '\'"') }} {{ _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') }}'"> <td class="priceWithTax" colspan="3" v-show="productFamily.behaviorPrice == '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_REFERENCE_UNIT') }}'">
{% verbatim %}{{ finalPriceWithTax }}{% endverbatim %}€ {% verbatim %}{{ finalPriceWithTax }}{% endverbatim %}€
<span class="text-danger" v-show="productFamily.reductionActive">{% verbatim %}{{ finalPriceWithTaxAndReduction }}{% endverbatim %}€</span> <span class="text-danger" v-show="productFamily.reductionActive">{% verbatim %}{{ finalPriceWithTaxAndReduction }}{% endverbatim %}€</span>

+ 4
- 4
ShopBundle/Resources/views/backend/productfamily/panel_products.html.twig View File

PV TTC / ${ getUnitReference() } PV TTC / ${ getUnitReference() }
</th> </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 PV HT
</th> </th>
<th colspan="3" class="price main-info"> <th colspan="3" class="price main-info">
${productFamily.priceByRefUnitWithTax} ${productFamily.priceByRefUnitWithTax}
</th> </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} ${productFamily.price}
</th> </th>
<th colspan="3" class="price main-info"> <th colspan="3" class="price main-info">

Loading…
Cancel
Save