Browse Source

[Administration] Gestion des accessoires

feature/rotating_product
Guillaume Bourgeois 4 months ago
parent
commit
95967a5ed6
5 changed files with 139 additions and 118 deletions
  1. +18
    -6
      backend/views/distribution/index.php
  2. +88
    -88
      backend/web/css/screen.css
  3. +14
    -5
      backend/web/js/vuejs/distribution-index.js
  4. +16
    -16
      backend/web/sass/distribution/_index.scss
  5. +3
    -3
      domain/Product/Accessory/Accessory.php

+ 18
- 6
backend/views/distribution/index.php View File

<td>Actif</td> <td>Actif</td>
<td>Nom</td> <td>Nom</td>
<td class="quantity-ordered">Commandé</td> <td class="quantity-ordered">Commandé</td>
<td class="quantity-remaining">Reste</td>
<td class="quantity-max">Maximum</td> <td class="quantity-max">Maximum</td>
</tr> </tr>
</thead> </thead>
</td> </td>
<td>{{ product.name }}</td> <td>{{ product.name }}</td>
<td class="quantity-ordered"> <td class="quantity-ordered">
<span v-if="isProductMaximumQuantityExceeded(product)" class="glyphicon glyphicon-alert"></span>
{{ product.quantity_ordered ? product.quantity_ordered + ' '+ ((product.unit == 'piece') ? ' p.' : ' '+(product.unit == 'g' || product.unit == 'kg') ? 'kg' : 'litre(s)') : '&empty;' }} {{ product.quantity_ordered ? product.quantity_ordered + ' '+ ((product.unit == 'piece') ? ' p.' : ' '+(product.unit == 'g' || product.unit == 'kg') ? 'kg' : 'litre(s)') : '&empty;' }}
</td> </td>

<td class="quantity-remaining">
<span class="infinite" v-if="(getProductQuantityRemainingGlobal(product) === null)">&infin;</span>
<span class="negative" v-else-if="getProductQuantityRemainingGlobal(product) <= 0">
{{ getProductQuantityRemainingGlobal(product) }} {{ product.unit == 'piece' ? ' p.' : ' '+(product.unit == 'g' || product.unit == 'kg') ? 'kg' : 'litre(s)' }}
<span class="glyphicon glyphicon-alert" v-if="getProductQuantityRemainingGlobal(product) < 0"></span>
</span>
<span class="has-quantity" v-else>{{ getProductQuantityRemainingGlobal(product) }} {{ product.unit == 'piece' ? ' p.' : ' '+(product.unit == 'g' || product.unit == 'kg') ? 'kg' : 'litre(s)' }}</span>
</td>

<td class="quantity-max"> <td class="quantity-max">
<div class="input-group"> <div class="input-group">
<input type="text" class="form-control quantity-max" placeholder="&infin;" :data-id-product="product.id" v-model="getProductDistribution(product).quantity_max" @keyup="productQuantityMaxChange" /> <input type="text" class="form-control quantity-max" placeholder="&infin;" :data-id-product="product.id" v-model="getProductDistribution(product).quantity_max" @keyup="productQuantityMaxChange" />
</span> </span>
</div> </div>
</td> </td>
<td class="quantity-remaining infinite" v-if="(getProductQuantityRemaining(order, product) === null) || order.productOrder[product.id].unit != product.unit">&infin;</td>
<td class="quantity-remaining negative" v-else-if="getProductQuantityRemaining(order, product) <= 0">
{{ getProductQuantityRemaining(order, product) }} {{ order.productOrder[product.id].unit == 'piece' ? ' p.' : ' '+(order.productOrder[product.id].unit == 'g' || order.productOrder[product.id].unit == 'kg') ? 'kg' : 'litre(s)' }}
<span class="glyphicon glyphicon-alert" v-if="getProductQuantityRemaining(order, product) < 0"></span>
<td class="quantity-remaining">
<span class="infinite" v-if="(getProductQuantityRemaining(order, product) === null) || order.productOrder[product.id].unit != product.unit">&infin;</span>
<span class="negative" v-else-if="getProductQuantityRemaining(order, product) <= 0">
{{ getProductQuantityRemaining(order, product) }} {{ order.productOrder[product.id].unit == 'piece' ? ' p.' : ' '+(order.productOrder[product.id].unit == 'g' || order.productOrder[product.id].unit == 'kg') ? 'kg' : 'litre(s)' }}
<span class="glyphicon glyphicon-alert" v-if="getProductQuantityRemaining(order, product) < 0"></span>
</span>
<span class="has-quantity" v-else>{{ getProductQuantityRemaining(order, product) }} {{ order.productOrder[product.id].unit == 'piece' ? ' p.' : ' '+(order.productOrder[product.id].unit == 'g' || order.productOrder[product.id].unit == 'kg') ? 'kg' : 'litre(s)' }}</span>
</td> </td>
<td class="quantity-remaining has-quantity" v-else>{{ getProductQuantityRemaining(order, product) }} {{ order.productOrder[product.id].unit == 'piece' ? ' p.' : ' '+(order.productOrder[product.id].unit == 'g' || order.productOrder[product.id].unit == 'kg') ? 'kg' : 'litre(s)' }}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>

+ 88
- 88
backend/web/css/screen.css View File

.distribution-index #calendar .vc-day.is-not-in-month .vc-highlights * { .distribution-index #calendar .vc-day.is-not-in-month .vc-highlights * {
opacity: 1 !important; opacity: 1 !important;
} }
/* line 97, ../sass/distribution/_index.scss */
/* line 96, ../sass/distribution/_index.scss */
.distribution-index table td.quantity-remaining {
text-align: right;
}
/* line 99, ../sass/distribution/_index.scss */
.distribution-index table td.quantity-remaining .has-quantity, .distribution-index table td.quantity-remaining .infinite {
color: #00A65A;
}
/* line 103, ../sass/distribution/_index.scss */
.distribution-index table td.quantity-remaining .negative {
color: #DD4B39;
}
/* line 107, ../sass/distribution/_index.scss */
.distribution-index table td.quantity-remaining .infinite, .distribution-index table td.quantity-remaining .empty {
font-size: 18px;
}
/* line 113, ../sass/distribution/_index.scss */
.distribution-index #products td.quantities { .distribution-index #products td.quantities {
width: 100px; width: 100px;
text-align: right; text-align: right;
} }
/* line 102, ../sass/distribution/_index.scss */
/* line 118, ../sass/distribution/_index.scss */
.distribution-index #products input.quantity-max { .distribution-index #products input.quantity-max {
width: 50px; width: 50px;
text-align: center; text-align: center;
display: inline; display: inline;
} }
/* line 110, ../sass/distribution/_index.scss */
/* line 126, ../sass/distribution/_index.scss */
.distribution-index #infos-top .col-md-4 { .distribution-index #infos-top .col-md-4 {
padding: 0px; padding: 0px;
} }
/* line 116, ../sass/distribution/_index.scss */
/* line 132, ../sass/distribution/_index.scss */
.distribution-index #infos-top .info-box { .distribution-index #infos-top .info-box {
min-height: 96px; min-height: 96px;
height: 96px; height: 96px;
} }
/* line 120, ../sass/distribution/_index.scss */
/* line 136, ../sass/distribution/_index.scss */
.distribution-index #infos-top .info-box .info-box-icon { .distribution-index #infos-top .info-box .info-box-icon {
height: 96px; height: 96px;
width: 50px; width: 50px;
line-height: 96px; line-height: 96px;
} }
/* line 125, ../sass/distribution/_index.scss */
/* line 141, ../sass/distribution/_index.scss */
.distribution-index #infos-top .info-box .info-box-icon i.fa { .distribution-index #infos-top .info-box .info-box-icon i.fa {
font-size: 30px; font-size: 30px;
} }
/* line 130, ../sass/distribution/_index.scss */
/* line 146, ../sass/distribution/_index.scss */
.distribution-index #infos-top .info-box .info-box-content { .distribution-index #infos-top .info-box .info-box-content {
margin-left: 55px; margin-left: 55px;
} }
/* line 133, ../sass/distribution/_index.scss */
/* line 149, ../sass/distribution/_index.scss */
.distribution-index #infos-top .info-box .info-box-content .info-box-text { .distribution-index #infos-top .info-box .info-box-content .info-box-text {
font-size: 12px; font-size: 12px;
} }
/* line 136, ../sass/distribution/_index.scss */
/* line 152, ../sass/distribution/_index.scss */
.distribution-index #infos-top .info-box .info-box-content .info-box-text .btn { .distribution-index #infos-top .info-box .info-box-content .info-box-text .btn {
font-size: 12px; font-size: 12px;
text-transform: uppercase; text-transform: uppercase;
} }
/* line 142, ../sass/distribution/_index.scss */
/* line 158, ../sass/distribution/_index.scss */
.distribution-index #infos-top .info-box .info-box-content .info-box-number { .distribution-index #infos-top .info-box .info-box-content .info-box-number {
font-size: 14px; font-size: 14px;
} }
/* line 149, ../sass/distribution/_index.scss */
/* line 165, ../sass/distribution/_index.scss */
.distribution-index #infos-top #info-box-distribution .btn-active-week { .distribution-index #infos-top #info-box-distribution .btn-active-week {
float: right; float: right;
} }
/* line 155, ../sass/distribution/_index.scss */
/* line 171, ../sass/distribution/_index.scss */
.distribution-index #infos-top #summary-ca-weight .normal { .distribution-index #infos-top #summary-ca-weight .normal {
font-weight: normal; font-weight: normal;
} }
/* line 165, ../sass/distribution/_index.scss */
/* line 181, ../sass/distribution/_index.scss */
.distribution-index #modal-products table.table thead tr td { .distribution-index #modal-products table.table thead tr td {
font-weight: bold; font-weight: bold;
} }
/* line 171, ../sass/distribution/_index.scss */
/* line 187, ../sass/distribution/_index.scss */
.distribution-index #modal-products table.table td.quantity-ordered, .distribution-index #modal-products table.table td.quantity-ordered,
.distribution-index #modal-products table.table td.quantity-max { .distribution-index #modal-products table.table td.quantity-max {
text-align: center; text-align: center;
} }
/* line 176, ../sass/distribution/_index.scss */
/* line 192, ../sass/distribution/_index.scss */
.distribution-index #modal-products table.table td.quantity-ordered { .distribution-index #modal-products table.table td.quantity-ordered {
width: 50px; width: 50px;
} }
/* line 180, ../sass/distribution/_index.scss */
/* line 196, ../sass/distribution/_index.scss */
.distribution-index #modal-products table.table td.quantity-max { .distribution-index #modal-products table.table td.quantity-max {
width: 120px; width: 120px;
} }
/* line 183, ../sass/distribution/_index.scss */
/* line 199, ../sass/distribution/_index.scss */
.distribution-index #modal-products table.table td.quantity-max input { .distribution-index #modal-products table.table td.quantity-max input {
text-align: center; text-align: center;
min-width: 50px; min-width: 50px;
} }
/* line 188, ../sass/distribution/_index.scss */
/* line 204, ../sass/distribution/_index.scss */
.distribution-index #modal-products table.table td.quantity-max .limit-quantity-accessories { .distribution-index #modal-products table.table td.quantity-max .limit-quantity-accessories {
margin-top: 7px; margin-top: 7px;
font-size: 12px; font-size: 12px;
} }
/* line 192, ../sass/distribution/_index.scss */
/* line 208, ../sass/distribution/_index.scss */
.distribution-index #modal-products table.table td.quantity-max .limit-quantity-accessories .quantity { .distribution-index #modal-products table.table td.quantity-max .limit-quantity-accessories .quantity {
font-weight: bold; font-weight: bold;
} }
/* line 200, ../sass/distribution/_index.scss */
/* line 216, ../sass/distribution/_index.scss */
.distribution-index #orders { .distribution-index #orders {
position: relative; position: relative;
} }
/* line 205, ../sass/distribution/_index.scss */
/* line 221, ../sass/distribution/_index.scss */
.distribution-index #orders .panel-heading .buttons .btn { .distribution-index #orders .panel-heading .buttons .btn {
position: relative; position: relative;
top: -19px; top: -19px;
float: right; float: right;
margin-left: 10px; margin-left: 10px;
} }
/* line 214, ../sass/distribution/_index.scss */
/* line 230, ../sass/distribution/_index.scss */
.distribution-index #orders #wrapper-nav-points-sale { .distribution-index #orders #wrapper-nav-points-sale {
margin-bottom: 10px; margin-bottom: 10px;
} }
/* line 217, ../sass/distribution/_index.scss */
/* line 233, ../sass/distribution/_index.scss */
.distribution-index #orders #wrapper-nav-points-sale ul#nav-points-sale { .distribution-index #orders #wrapper-nav-points-sale ul#nav-points-sale {
margin: 0px; margin: 0px;
padding: 0px; padding: 0px;
list-style-type: none; list-style-type: none;
} }
/* line 222, ../sass/distribution/_index.scss */
/* line 238, ../sass/distribution/_index.scss */
.distribution-index #orders #wrapper-nav-points-sale ul#nav-points-sale li { .distribution-index #orders #wrapper-nav-points-sale ul#nav-points-sale li {
float: left; float: left;
margin-right: 10px; margin-right: 10px;
margin-bottom: 10px; margin-bottom: 10px;
} }
/* line 228, ../sass/distribution/_index.scss */
/* line 244, ../sass/distribution/_index.scss */
.distribution-index #orders #wrapper-nav-points-sale ul#nav-points-sale li a .label { .distribution-index #orders #wrapper-nav-points-sale ul#nav-points-sale li a .label {
background-color: white; background-color: white;
border: solid 1px #e0e0e0; border: solid 1px #e0e0e0;
-webkit-border-radius: 10px; -webkit-border-radius: 10px;
border-radius: 10px; border-radius: 10px;
} }
/* line 239, ../sass/distribution/_index.scss */
/* line 255, ../sass/distribution/_index.scss */
.distribution-index #orders #buttons-top-orders { .distribution-index #orders #buttons-top-orders {
background-color: #F5F5F5; background-color: #F5F5F5;
padding: 10px 20px; padding: 10px 20px;
border-radius: 5px; border-radius: 5px;
margin-bottom: 20px; margin-bottom: 20px;
} }
/* line 250, ../sass/distribution/_index.scss */
/* line 266, ../sass/distribution/_index.scss */
.distribution-index #orders #buttons-top-orders .right { .distribution-index #orders #buttons-top-orders .right {
float: right; float: right;
} }
/* line 254, ../sass/distribution/_index.scss */
/* line 270, ../sass/distribution/_index.scss */
.distribution-index #orders #buttons-top-orders .dropdown { .distribution-index #orders #buttons-top-orders .dropdown {
display: inline-block; display: inline-block;
} }
/* line 259, ../sass/distribution/_index.scss */
/* line 275, ../sass/distribution/_index.scss */
.distribution-index #orders .point-sale-totals { .distribution-index #orders .point-sale-totals {
background-color: white; background-color: white;
padding: 10px 20px; padding: 10px 20px;
border-radius: 5px; border-radius: 5px;
margin-bottom: 20px; margin-bottom: 20px;
} }
/* line 266, ../sass/distribution/_index.scss */
/* line 282, ../sass/distribution/_index.scss */
.distribution-index #orders .point-sale-totals .title { .distribution-index #orders .point-sale-totals .title {
color: gray; color: gray;
font-size: 13px; font-size: 13px;
margin-right: 13px; margin-right: 13px;
text-transform: uppercase; text-transform: uppercase;
} }
/* line 276, ../sass/distribution/_index.scss */
/* line 292, ../sass/distribution/_index.scss */
.distribution-index #orders table td.column-user { .distribution-index #orders table td.column-user {
position: relative; position: relative;
} }
/* line 279, ../sass/distribution/_index.scss */
/* line 295, ../sass/distribution/_index.scss */
.distribution-index #orders table td.column-user:hover .shortcuts { .distribution-index #orders table td.column-user:hover .shortcuts {
display: block; display: block;
} }
/* line 283, ../sass/distribution/_index.scss */
/* line 299, ../sass/distribution/_index.scss */
.distribution-index #orders table td.column-user a { .distribution-index #orders table td.column-user a {
color: #333; color: #333;
} }
/* line 286, ../sass/distribution/_index.scss */
/* line 302, ../sass/distribution/_index.scss */
.distribution-index #orders table td.column-user a:hover { .distribution-index #orders table td.column-user a:hover {
text-decoration: underline; text-decoration: underline;
} }
/* line 291, ../sass/distribution/_index.scss */
/* line 307, ../sass/distribution/_index.scss */
.distribution-index #orders table td.column-user .shortcuts { .distribution-index #orders table td.column-user .shortcuts {
display: none; display: none;
float: right; float: right;
top: 1px; top: 1px;
right: 1px; right: 1px;
} }
/* line 299, ../sass/distribution/_index.scss */
/* line 315, ../sass/distribution/_index.scss */
.distribution-index #orders table td.column-user .user-trust-alert { .distribution-index #orders table td.column-user .user-trust-alert {
color: red; color: red;
} }
/* line 304, ../sass/distribution/_index.scss */
/* line 320, ../sass/distribution/_index.scss */
.distribution-index #orders table td.column-delivery-note { .distribution-index #orders table td.column-delivery-note {
position: relative; position: relative;
} }
/* line 308, ../sass/distribution/_index.scss */
/* line 324, ../sass/distribution/_index.scss */
.distribution-index #orders table td.tiller { .distribution-index #orders table td.tiller {
width: 60px; width: 60px;
} }
/* line 311, ../sass/distribution/_index.scss */
/* line 327, ../sass/distribution/_index.scss */
.distribution-index #orders table td.tiller label { .distribution-index #orders table td.tiller label {
font-size: 12px; font-size: 12px;
cursor: pointer; cursor: pointer;
top: -2px; top: -2px;
font-weight: normal; font-weight: normal;
} }
/* line 320, ../sass/distribution/_index.scss */
/* line 336, ../sass/distribution/_index.scss */
.distribution-index #orders table td.column-actions { .distribution-index #orders table td.column-actions {
position: relative; position: relative;
text-align: right; text-align: right;
} }
/* line 324, ../sass/distribution/_index.scss */
/* line 340, ../sass/distribution/_index.scss */
.distribution-index #orders table td.column-actions .wrapper-button-dropdown { .distribution-index #orders table td.column-actions .wrapper-button-dropdown {
display: inline-block; display: inline-block;
} }
/* line 328, ../sass/distribution/_index.scss */
/* line 344, ../sass/distribution/_index.scss */
.distribution-index #orders table td.column-actions .dropdown-menu { .distribution-index #orders table td.column-actions .dropdown-menu {
left: -70px; left: -70px;
width: 227px; width: 227px;
} }
/* line 333, ../sass/distribution/_index.scss */
/* line 349, ../sass/distribution/_index.scss */
.distribution-index #orders table td.column-actions .modal-form-order, .distribution-index #orders table td.column-actions .modal-form-order,
.distribution-index #orders table td.column-actions .modal-payment { .distribution-index #orders table td.column-actions .modal-payment {
text-align: left; text-align: left;
} }
/* line 338, ../sass/distribution/_index.scss */
/* line 354, ../sass/distribution/_index.scss */
.distribution-index #orders table td.column-actions .add-subscription { .distribution-index #orders table td.column-actions .add-subscription {
position: relative; position: relative;
} }
/* line 341, ../sass/distribution/_index.scss */
/* line 357, ../sass/distribution/_index.scss */
.distribution-index #orders table td.column-actions .add-subscription .glyphicon-plus { .distribution-index #orders table td.column-actions .add-subscription .glyphicon-plus {
position: absolute; position: absolute;
top: 4px; top: 4px;
right: 4px; right: 4px;
font-size: 7px; font-size: 7px;
} }
/* line 350, ../sass/distribution/_index.scss */
/* line 366, ../sass/distribution/_index.scss */
.distribution-index #orders table td.column-state-payment { .distribution-index #orders table td.column-state-payment {
width: 133px; width: 133px;
} }
/* line 356, ../sass/distribution/_index.scss */
/* line 372, ../sass/distribution/_index.scss */
.distribution-index #orders table td.column-credit a.positive { .distribution-index #orders table td.column-credit a.positive {
color: green; color: green;
} }
/* line 359, ../sass/distribution/_index.scss */
/* line 375, ../sass/distribution/_index.scss */
.distribution-index #orders table td.column-credit a.negative { .distribution-index #orders table td.column-credit a.negative {
color: red; color: red;
} }
/* line 365, ../sass/distribution/_index.scss */
/* line 381, ../sass/distribution/_index.scss */
.distribution-index #orders table .state-payment-mobile { .distribution-index #orders table .state-payment-mobile {
display: none; display: none;
} }
/* line 369, ../sass/distribution/_index.scss */
/* line 385, ../sass/distribution/_index.scss */
.distribution-index #orders table td.column-payment { .distribution-index #orders table td.column-payment {
position: relative; position: relative;
} }
/* line 372, ../sass/distribution/_index.scss */
/* line 388, ../sass/distribution/_index.scss */
.distribution-index #orders table td.column-payment div.btn-group { .distribution-index #orders table td.column-payment div.btn-group {
width: 125px; width: 125px;
} }
/* line 378, ../sass/distribution/_index.scss */
/* line 394, ../sass/distribution/_index.scss */
.distribution-index #orders table tr.view ul { .distribution-index #orders table tr.view ul {
list-style-type: none; list-style-type: none;
margin-left: 0px; margin-left: 0px;
padding-left: 15px; padding-left: 15px;
} }
/* line 388, ../sass/distribution/_index.scss */
/* line 404, ../sass/distribution/_index.scss */
.distribution-index #orders table tr.view .comment { .distribution-index #orders table tr.view .comment {
margin-top: 20px; margin-top: 20px;
} }
/* line 392, ../sass/distribution/_index.scss */
/* line 408, ../sass/distribution/_index.scss */
.distribution-index #orders table tr.view .delivery { .distribution-index #orders table tr.view .delivery {
margin-top: 20px; margin-top: 20px;
} }
/* line 401, ../sass/distribution/_index.scss */
/* line 417, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order .modal-container { .distribution-index .modal-form-order .modal-container {
width: 100%; width: 100%;
padding: 0px; padding: 0px;
} }
/* line 405, ../sass/distribution/_index.scss */
/* line 421, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order .modal-container .modal-body { .distribution-index .modal-form-order .modal-container .modal-body {
padding-right: 15px; padding-right: 15px;
} }
/* line 408, ../sass/distribution/_index.scss */
/* line 424, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order .modal-container .modal-body table { .distribution-index .modal-form-order .modal-container .modal-body table {
margin-bottom: 150px; margin-bottom: 150px;
} }
/* line 413, ../sass/distribution/_index.scss */
/* line 429, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order .modal-container .modal-footer { .distribution-index .modal-form-order .modal-container .modal-footer {
border-top-color: #f4f4f4; border-top-color: #f4f4f4;
position: fixed; position: fixed;
text-align: center; text-align: center;
border-top: solid 1px #e0e0e0; border-top: solid 1px #e0e0e0;
} }
/* line 425, ../sass/distribution/_index.scss */
/* line 441, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order .modal-container .modal-footer .actions-form button { .distribution-index .modal-form-order .modal-container .modal-footer .actions-form button {
float: none; float: none;
} }
/* line 429, ../sass/distribution/_index.scss */
/* line 445, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order .modal-container .modal-footer .actions-form div.right { .distribution-index .modal-form-order .modal-container .modal-footer .actions-form div.right {
float: right; float: right;
} }
/* line 436, ../sass/distribution/_index.scss */
/* line 452, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order .btn-credit { .distribution-index .modal-form-order .btn-credit {
float: right; float: right;
} }
/* line 442, ../sass/distribution/_index.scss */
/* line 458, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products .product-ordered td { .distribution-index .modal-form-order table.table-products .product-ordered td {
background-color: #e9e9e9; background-color: #e9e9e9;
} }
/* line 446, ../sass/distribution/_index.scss */
/* line 462, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products .product-ordered input.input-quantity { .distribution-index .modal-form-order table.table-products .product-ordered input.input-quantity {
font-size: 16px; font-size: 16px;
font-weight: bold; font-weight: bold;
} }
/* line 452, ../sass/distribution/_index.scss */
/* line 468, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products td.price { .distribution-index .modal-form-order table.table-products td.price {
width: 150px; width: 150px;
} }
/* line 455, ../sass/distribution/_index.scss */
/* line 471, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products td.price input { .distribution-index .modal-form-order table.table-products td.price input {
text-align: center; text-align: center;
} }
/* line 459, ../sass/distribution/_index.scss */
/* line 475, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products td.price .input-group-addon { .distribution-index .modal-form-order table.table-products td.price .input-group-addon {
background-color: #eee; background-color: #eee;
} }
/* line 463, ../sass/distribution/_index.scss */
/* line 479, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products td.price .invoice-price { .distribution-index .modal-form-order table.table-products td.price .invoice-price {
margin-top: 8px; margin-top: 8px;
} }
/* line 465, ../sass/distribution/_index.scss */
/* line 481, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products td.price .invoice-price .label-invoice-price { .distribution-index .modal-form-order table.table-products td.price .invoice-price .label-invoice-price {
font-size: 11px; font-size: 11px;
font-weight: bold; font-weight: bold;
color: gray; color: gray;
} }
/* line 473, ../sass/distribution/_index.scss */
/* line 489, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products td.quantity { .distribution-index .modal-form-order table.table-products td.quantity {
width: 165px; width: 165px;
} }
/* line 476, ../sass/distribution/_index.scss */
/* line 492, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products td.quantity input { .distribution-index .modal-form-order table.table-products td.quantity input {
text-align: center; text-align: center;
color: black; color: black;
} }
/* line 481, ../sass/distribution/_index.scss */
/* line 497, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products td.quantity .form-control { .distribution-index .modal-form-order table.table-products td.quantity .form-control {
border-right: 0px none; border-right: 0px none;
padding-right: 4px; padding-right: 4px;
} }
/* line 486, ../sass/distribution/_index.scss */
/* line 502, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products td.quantity .input-group-addon { .distribution-index .modal-form-order table.table-products td.quantity .input-group-addon {
padding: 5px; padding: 5px;
padding-left: 0px; padding-left: 0px;
border-left: 0px none; border-left: 0px none;
border-right: 0px none; border-right: 0px none;
} }
/* line 495, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products td.quantity-remaining {
text-align: right;
}
/* line 498, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products td.quantity-remaining.quantity-remaining, .distribution-index .modal-form-order table.table-products td.quantity-remaining.infinite {
color: #00A65A;
}
/* line 502, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products td.quantity-remaining.negative {
color: #DD4B39;
}
/* line 506, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products td.quantity-remaining.infinite, .distribution-index .modal-form-order table.table-products td.quantity-remaining.empty {
font-size: 18px;
}
/* line 513, ../sass/distribution/_index.scss */ /* line 513, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order .actions-form button { .distribution-index .modal-form-order .actions-form button {
margin-left: 15px; margin-left: 15px;

+ 14
- 5
backend/web/js/vuejs/distribution-index.js View File

} }
}); });
}, },
getProductQuantityRemainingGlobal: function(product) {
var app = this;

var productQuantityRemaining = product.quantity_remaining;

// format
if (productQuantityRemaining && product.unit != 'piece') {
productQuantityRemaining = productQuantityRemaining.toFixed(2);
}

return productQuantityRemaining;
},
initCountActiveProducts: function () { initCountActiveProducts: function () {
this.countActiveProducts = 0; this.countActiveProducts = 0;
for (var i = 0; i < this.products.length; i++) { for (var i = 0; i < this.products.length; i++) {
return false; return false;
}, },
isProductMaximumQuantityExceeded: function (product) { isProductMaximumQuantityExceeded: function (product) {
return
this.getProductDistribution(product)
&& this.getProductDistribution(product).quantity_max
&& product.quantity_ordered
&& product.quantity_ordered > this.getProductDistribution(product).quantity_max;
return product.quantity_remaining
&& product.quantity_remaining < 0;
}, },
pointSaleActiveClick: function (event) { pointSaleActiveClick: function (event) {
var idPointSale = event.currentTarget.getAttribute('data-id-point-sale'); var idPointSale = event.currentTarget.getAttribute('data-id-point-sale');

+ 16
- 16
backend/web/sass/distribution/_index.scss View File

} }
} }


table td.quantity-remaining {
text-align: right;

.has-quantity, .infinite {
color: #00A65A;
}

.negative {
color: #DD4B39;
}

.infinite, .empty {
font-size: 18px;
}
}

#products { #products {
td.quantities { td.quantities {
width: 100px; width: 100px;
border-right: 0px none; border-right: 0px none;
} }
} }

td.quantity-remaining {
text-align: right;

&.quantity-remaining, &.infinite {
color: #00A65A;
}

&.negative {
color: #DD4B39;
}

&.infinite, &.empty {
font-size: 18px;
}
}
} }


.actions-form { .actions-form {

+ 3
- 3
domain/Product/Accessory/Accessory.php View File

public function rules() public function rules()
{ {
return [ return [
[['name', 'id_producer'], 'required'],
[['name', 'id_producer', 'quantity'], 'required'],
[['name'], 'string', 'max' => 255], [['name'], 'string', 'max' => 255],
[['quantity', 'id_producer'], 'integer'], [['quantity', 'id_producer'], 'integer'],
[['selected_products_ids'], 'safe'], [['selected_products_ids'], 'safe'],
return $this; return $this;
} }


public function getQuantity(): ?int
public function getQuantity(): int
{ {
return $this->quantity; return $this->quantity;
} }


public function setQuantity(?int $quantity): self
public function setQuantity(int $quantity): self
{ {
$this->quantity = $quantity; $this->quantity = $quantity;
return $this; return $this;

Loading…
Cancel
Save