Kaynağa Gözat

Form produits intégration prix par unité de référence (travail en cours)

feature/export_comptable
Fab 4 yıl önce
ebeveyn
işleme
648bdf77ce
5 değiştirilmiş dosya ile 68 ekleme ve 40 silme
  1. +2
    -1
      ShopBundle/Resources/public/css/backend/custom.css
  2. +2
    -1
      ShopBundle/Resources/public/js/backend/script/default/utils.js
  3. +49
    -23
      ShopBundle/Resources/public/js/backend/script/productfamily/vuejs-product-family.js
  4. +1
    -1
      ShopBundle/Resources/views/backend/default/block/macros.html.twig
  5. +14
    -14
      ShopBundle/Resources/views/backend/productfamily/panel_products.html.twig

+ 2
- 1
ShopBundle/Resources/public/css/backend/custom.css Dosyayı Görüntüle

@@ -186,13 +186,14 @@ table th .select2-container--default .select2-selection--single{padding:0.3rem 0
.products-collection-table .btn-empty-field{position: absolute; right: 3px; font-size: 0.7rem; top: 5px; padding: 0px;}
#lc-product-family-edit .products-collection-table {table-layout:fixed;}
#lc-product-family-edit .products-collection-table tr{border-bottom: 1px solid #dee2e6;}
#lc-product-family-edit .products-collection-table th{font-size:13px; border-left: 1px solid #dee2e6; border-top: 1px solid #dee2e6; text-align: center;}
#lc-product-family-edit .products-collection-table th{font-size:13px; border-left: 1px solid #dee2e6; border-top: 1px solid #dee2e6; text-align: center; min-width: }
#lc-product-family-edit .products-collection-table th span {white-space: initial;}
#lc-product-family-edit .products-collection-table th:last-child{border-right: 1px solid #dee2e6;}
#lc-product-family-edit .products-collection-table td{border-left: 1px solid #dee2e6; text-align: center; font-size: 13px;}
#lc-product-family-edit .products-collection-table td:last-child{border-right: 1px solid #dee2e6;}
#lc-product-family-edit .btn-add-product {margin: 20px 0; float: right;}
#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: 20px; cursor: pointer;}

/* DeliveryZone */


+ 2
- 1
ShopBundle/Resources/public/js/backend/script/default/utils.js Dosyayı Görüntüle

@@ -69,7 +69,8 @@ function formatNumber(number, toFixed){
else return null;
}
function formatNumberWithoutFixed(number){
if(number)return Number(number.replace(',', '.'));
if(typeof number == 'string')number = number.replace(',', '.');
if(number)return Number(number);
else return null;
}


+ 49
- 23
ShopBundle/Resources/public/js/backend/script/productfamily/vuejs-product-family.js Dosyayı Görüntüle

@@ -213,28 +213,53 @@ appProductFamily = new Vue({
delimiters: ['${', '}'],
computed: {
productFamily: function () {
return {
'title': this.title,
'behaviorCountStock': this.behaviorCountStock,
'behaviorPrice': this.$refs.productUnitPrice.behaviorPrice,
'unit': this.$refs.productUnitPrice.unit,
'unitWording': this.$refs.productUnitPrice.unitWording,
'quantity': this.$refs.productUnitPrice.quantity,
'price': this.$refs.productUnitPrice.price,
'priceWithTax': this.$refs.productUnitPrice.priceWithTax,
'buyingPrice': this.$refs.productUnitPrice.buyingPrice,
'buyingPriceWithTax': this.$refs.productUnitPrice.buyingPriceWithTax,
'buyingPriceByRefUnit': this.$refs.productUnitPrice.buyingPriceByRefUnit,
'buyingPriceByRefUnitWithTax': this.$refs.productUnitPrice.buyingPriceByRefUnitWithTax,
'priceByRefUnit': this.$refs.productUnitPrice.priceByRefUnit,
'priceByRefUnitWithTax': this.$refs.productUnitPrice.priceByRefUnitWithTax,
'taxRate': this.$refs.productUnitPrice.taxRate,
'supplierTaxRate': this.$refs.productUnitPrice.supplierTaxRate,
'multiplyingFactor': this.$refs.productUnitPrice.multiplyingFactor,
'taxRateValue': this.$refs.productUnitPrice.taxRateValue,
'propertyExpirationDate': this.propertyExpirationDate,
'behaviorExpirationDate': this.behaviorExpirationDate
};
if(this.isMounted) {
return {
'title': this.title,
'behaviorCountStock': this.behaviorCountStock,
'behaviorPrice': this.$refs.productUnitPrice.behaviorPrice,
'unit': this.$refs.productUnitPrice.unit, //this.getProductUnitPrice('unit'),
'unitWording': this.$refs.productUnitPrice.unitWording,
'quantity': this.$refs.productUnitPrice.quantity,
'price': this.$refs.productUnitPrice.price,
'priceWithTax': this.$refs.productUnitPrice.priceWithTax,
'buyingPrice': this.$refs.productUnitPrice.buyingPrice,
'buyingPriceWithTax': this.$refs.productUnitPrice.buyingPriceWithTax,
'buyingPriceByRefUnit': this.$refs.productUnitPrice.buyingPriceByRefUnit,
'buyingPriceByRefUnitWithTax': this.$refs.productUnitPrice.buyingPriceByRefUnitWithTax,
'priceByRefUnit': this.$refs.productUnitPrice.priceByRefUnit,
'priceByRefUnitWithTax': this.$refs.productUnitPrice.priceByRefUnitWithTax,
'taxRate': this.$refs.productUnitPrice.taxRate,
'supplierTaxRate': this.$refs.productUnitPrice.supplierTaxRate,
'multiplyingFactor': this.$refs.productUnitPrice.multiplyingFactor,
'taxRateValue': this.$refs.productUnitPrice.taxRateValue,
'propertyExpirationDate': this.propertyExpirationDate,
'behaviorExpirationDate': this.behaviorExpirationDate
};
}else{
return {
'title': null,
'behaviorCountStock': null,
'behaviorPrice': null,
'unit': null,
'unitWording': null,
'quantity': null,
'price': null,
'priceWithTax':null,
'buyingPrice': null,
'buyingPriceWithTax': null,
'buyingPriceByRefUnit': null,
'buyingPriceByRefUnitWithTax': null,
'priceByRefUnit': null,
'priceByRefUnitWithTax': null,
'taxRate': null,
'supplierTaxRate': null,
'multiplyingFactor': null,
'taxRateValue': null,
'propertyExpirationDate': this.propertyExpirationDate,
'behaviorExpirationDate': this.behaviorExpirationDate
};
}
},
unitReference: function () {
this.getUnitReference();
@@ -244,6 +269,7 @@ appProductFamily = new Vue({

return Object.assign(
{
isMounted:false,
indexFormProduct: 0,
title: null,
isNovelty: null,
@@ -289,12 +315,12 @@ appProductFamily = new Vue({
}, window.appProductFamilyValues);
},
mounted: function () {
this.isMounted = true;
$(".vuejs-checkbox-switch input").each(function () {
setBootstrapSwitch($(this));
});
},
methods: {

changeSection: function (section) {
this.updateChild();
this.currentSection = section.name;

+ 1
- 1
ShopBundle/Resources/views/backend/default/block/macros.html.twig Dosyayı Görüntüle

@@ -24,7 +24,7 @@
{% if fieldDisplay == false %}{% set fieldDisplay = fieldName %}{% endif %}

<td {{ attr|raw }} colspan="{{ colspan }}" class="{{ fieldName }}" >
<div v-show="{{ fieldName }}Inherited == false" v-on:click="{{ fieldName }}Inherited = true">
<div class="value" v-show="{{ fieldName }}Inherited == false" v-on:click="{{ fieldName }}Inherited = true">
<div v-if="{{ fieldName }}">
{% verbatim %}{{ {% endverbatim %}{{ fieldDisplay }} {% verbatim %}}}{% endverbatim %}{{ displaySuffix }}
</div>

+ 14
- 14
ShopBundle/Resources/views/backend/productfamily/panel_products.html.twig Dosyayı Görüntüle

@@ -141,49 +141,49 @@
</tbody>
<tfoot>
<th>
Rappel
</th>
<th colspan="2" class="string">
${title}
</th>
<th colspan="1" class="string ">
{#${productFamily.quantity}#}
${productFamily.quantity}
</th>
<th colspan="2" class="quantity">
Unité
${productFamily.unit}
</th>
<th v-show="getBehaviorPrice() == 'by-reference-unit'" colspan="2" class="buyingPriceByRefUnit">
PA HT / ${ getUnitReference() }
${productFamily.buyingPriceByUnitRef}
</th>
<th v-show="getBehaviorPrice() == 'by-reference-unit'" colspan="2" class="priceByRefUnit">
PA TTC / ${ getUnitReference() }
${productFamily.buyingPriceByUnitRefWithTax}
</th>

<th colspan="2" class="price" v-show="getBehaviorPrice() =='by-piece'">
PA HT
${productFamily.buyingPrice}
</th>
<th colspan="2" class="price" v-show="getBehaviorPrice() =='by-piece'">
PA TTC
${productFamily.buyingPriceWithTax}
</th>
<th colspan="2" class="">
Coef
${productFamily.multiplyingFactor}
</th>


<th v-show="getBehaviorPrice() == 'by-reference-unit'" colspan="2" class="">
PV HT / ${ getUnitReference() }
${productFamily.priceByUnitRef}
</th>
<th v-show="getBehaviorPrice() == 'by-reference-unit'" colspan="2" class="price">
PV TTC / ${ getUnitReference() }
${productFamily.priceByUnitRefWithTax}
</th>

<th colspan="2" class="price" v-show="getBehaviorPrice() =='by-piece'">
PV HT
${productFamily.price}
</th>
<th colspan="2" class="price">
PV TTC
${productFamily.priceWithTax}
</th>


<th v-show="behaviorCountStock== 'by-product'">
Stock
</th>
@@ -191,10 +191,10 @@
Stock par défaut
</th>
<th colspan="2" class="" v-show="behaviorExpirationDate== 'by-product'">
<span style="text-transform: uppercase"> ${typeExpirationDate}</span>
${typeExpirationDate}
</th>
<th class="">
Action
</th>
</tfoot>
</table>

Yükleniyor…
İptal
Kaydet