->andFilterWhere(['=', 'cp.address_city', $filters['city']])
->andFilterWhere(['=', 'cp.address_region', $filters['region']])
->andFilterWhere(['=', 'cp.address_district', $filters['district']])
- ->andFilterWhere(['=', 'cp.store_type', $filters['store_type']])
- ->andFilterWhere(['=', 'a.capacity_type', $filters['capacity_type']]);
+ ->andFilterWhere(['=', 'cp.store_type', $filters['store_type']]);
+ //->andFilterWhere(['=', 'a.capacity_type', $filters['capacity_type']]);
if (!empty($filters['territorial_manager'])) {
$territorialManagerStoreIds = StoreDynamic::find()
];
}
+ if (!empty($filters['capacity_type']) && $filters['capacity_type'] == 'min') {
+ $quantity = round((int)$model['modify'] * 0.3, 2);
+ } else {
+ $quantity = (int)$model['modify'];
+ }
$result[$productId]['values'][] = [
'id' => $model['plan_id'],
- 'quantity' => (int)$model['modify'],
+ 'quantity' => $quantity,
'store_id' => (int)$model['store_id'],
'title' => !empty($model['details']) ? json_decode($model['details'], true) : null,
];
use yii\data\ArrayDataProvider;
-
+$this->registerCssFile(Yii::getAlias('@web') . '/css/autoplannogramma/index.css');
$tooltipText = "Оффлайн: 50 Флаумак (off-line): 20 Флаумак (on-line): 10 Флаумак (market): 10 Изумительная (off-line): 30 Списания: 20";
$this->registerJsFile('/js/autoplannogramma/autoplannogramma.js', ['position' => View::POS_END]);
?>
--- /dev/null
+.auto-input-bg {
+ background-color: #5b9aff !important;
+ color: #fff !important;
+ border: 1px solid #5b9aff !important;
+}
+
+.corrected-input-bg {
+ background-color: #9dff5b !important;
+ color: #fff !important;
+ border: 1px solid #9dff5b !important;
+}
\ No newline at end of file
$(document).ready(function () {
$('.btn-apply').trigger('click');
+ $('#polnogramma-type').on('change', function () {
+ console.log('Выбрано:', $(this).val());
+
+ });
});
filters.month = getMonthByWeek(week, year, true);
filters.category = category;
filters.subcategory = subcategory;
-
+ console.log(filters.capacity_type);
$('.loader-overlay').removeClass('d-none');
$.ajax({
<td data-store-id="${storeId}">
<div class="d-flex align-items-center">
<input type="number"
- class="btn btn-primary input w-100"
+ class="btn input w-100 auto-input-bg"
value="${val.quantity}"
data-id="${val.id}"
data-guid="${item.product_id || ''}"