refs #4515 orgnaized form fields
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Pablo Natek 2023-09-12 15:16:18 +02:00
parent fe9cf24905
commit 3595deb36a
2 changed files with 16 additions and 14 deletions

View File

@ -7,7 +7,7 @@ UPDATE `vn`.`item` i
AND `size` IS NOT NULL AND `size` IS NOT NULL
GROUP BY typeFk GROUP BY typeFk
) sub ON sub.typeFk = i.typeFk ) sub ON sub.typeFk = i.typeFk
SET i.`size` = CAST(sub.`size` AS SIGNED) SET i.`size` = sub.`size`
WHERE i.`size` IS NULL; WHERE i.`size` IS NULL;
ALTER TABLE `vn`.`item` MODIFY COLUMN `size` int(10) NOT NULL; ALTER TABLE `vn`.`item` MODIFY COLUMN `size` int(10) NOT NULL;
@ -22,7 +22,7 @@ UPDATE `vn`.`item` i
AND `size` IS NOT NULL AND `size` IS NOT NULL
GROUP BY typeFk GROUP BY typeFk
) sub ON sub.typeFk = i.typeFk ) sub ON sub.typeFk = i.typeFk
SET i.weightByPiece = CAST(sub.grams * `size` AS SIGNED) SET i.weightByPiece = sub.grams * `size`
WHERE weightByPiece IS NULL WHERE weightByPiece IS NULL
OR weightByPiece = 0; OR weightByPiece = 0;

View File

@ -37,18 +37,6 @@
value-field="priority" value-field="priority"
vn-name="priority"> vn-name="priority">
</vn-autocomplete> </vn-autocomplete>
<vn-input-number
type="number"
label="Weight/Piece"
ng-model="$ctrl.item.weightByPiece"
rule>
</vn-input-number>
<vn-input-number
type="number"
label="Size"
ng-model="$ctrl.item.size"
rule>
</vn-input-number>
</vn-horizontal> </vn-horizontal>
<vn-horizontal> <vn-horizontal>
<vn-autocomplete <vn-autocomplete
@ -84,6 +72,20 @@
</tpl-item> </tpl-item>
</vn-autocomplete> </vn-autocomplete>
</vn-horizontal> </vn-horizontal>
<vn-horizontal>
<vn-input-number
type="number"
label="Weight/Piece"
ng-model="$ctrl.item.weightByPiece"
rule>
</vn-input-number>
<vn-input-number
type="number"
label="Size"
ng-model="$ctrl.item.size"
rule>
</vn-input-number>
</vn-horizontal>
<vn-horizontal> <vn-horizontal>
<vn-autocomplete <vn-autocomplete
data="originsData" data="originsData"