From: fomichev Date: Tue, 3 Dec 2024 10:57:11 +0000 (+0300) Subject: Показ цены и форматирование X-Git-Tag: 1.7~206^2~3 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=091b889a432f1b0eca96263a8cb60c422e7ea825;p=erp24_rep%2Fyii-erp24%2F.git Показ цены и форматирование --- diff --git a/erp24/controllers/ProductsController.php b/erp24/controllers/ProductsController.php index b89bb47f..b7269e4d 100755 --- a/erp24/controllers/ProductsController.php +++ b/erp24/controllers/ProductsController.php @@ -272,7 +272,7 @@ class ProductsController extends Controller ->all(); $prices = Prices::find() - ->select(['product_id', 'price']) + ->select(['price']) ->indexBy('product_id') ->column(); diff --git a/erp24/web/js/products/products-1c.js b/erp24/web/js/products/products-1c.js index 80cab8ac..472f6dde 100644 --- a/erp24/web/js/products/products-1c.js +++ b/erp24/web/js/products/products-1c.js @@ -161,16 +161,28 @@ function ajax_products_in_group(parent_id){ colorsHtml += `+ добавить сорта`; } } + const price = `
+ Цена: ${prices[row.id] || 'Нет цены'}
`; + + const removeProductButtons = row.entity_id + ? `
удалить продукт
+
удалить только связь
` + : ''; tableHtml += ` ${row.name} ${isHidden} - ${addCharButton} - ${colorsHtml} + + GUID ${row.id} - + + ${addCharButton} + + + ${price} + `; });