refs #5949 itemRecycle
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Carlos Satorres 2023-07-11 07:37:51 +02:00
parent 60f70ac2b4
commit d1c8f0ff11
5 changed files with 70 additions and 32 deletions

View File

@ -0,0 +1,2 @@
ALTER TABLE `vn`.`item` ADD recycledPlastic INT NULL;
ALTER TABLE `vn`.`item` ADD nonRecycledPlastic INT NULL;

View File

@ -145,7 +145,7 @@ module.exports = Self => {
const stmts = []; const stmts = [];
const stmt = new ParameterizedSQL( const stmt = new ParameterizedSQL(
`SELECT `SELECT
i.id, i.id,
i.image, i.image,
i.name, i.name,
@ -164,6 +164,8 @@ module.exports = Self => {
i.stemMultiplier, i.stemMultiplier,
i.typeFk, i.typeFk,
i.isFloramondo, i.isFloramondo,
i.recycledPlastic,
i.nonRecycledPlastic,
pr.name AS producer, pr.name AS producer,
it.name AS typeName, it.name AS typeName,
it.workerFk AS buyerFk, it.workerFk AS buyerFk,

View File

@ -125,6 +125,12 @@
"minPrice": { "minPrice": {
"type": "number" "type": "number"
}, },
"recycledPlastic": {
"type": "number"
},
"nonRecycledPlastic": {
"type": "number"
},
"packingOut": { "packingOut": {
"type": "number" "type": "number"
}, },

View File

@ -82,6 +82,8 @@
vn-name="expence" vn-name="expence"
initial-data="$ctrl.item.expense"> initial-data="$ctrl.item.expense">
</vn-autocomplete> </vn-autocomplete>
</vn-horizontal>
<vn-horizontal>
<vn-autocomplete <vn-autocomplete
data="originsData" data="originsData"
label="Origin" label="Origin"
@ -91,21 +93,6 @@
vn-name="origin" vn-name="origin"
initial-data="$ctrl.item.origin"> initial-data="$ctrl.item.origin">
</vn-autocomplete> </vn-autocomplete>
<vn-textfield
label="Reference"
ng-model="$ctrl.item.comment"
vn-name="comment"
rule>
</vn-textfield>
</vn-horizontal>
<vn-horizontal>
<vn-input-number
min="0"
label="Relevancy"
ng-model="$ctrl.item.relevancy"
vn-name="relevancy"
rule>
</vn-input-number>
<vn-input-number <vn-input-number
min="0" min="0"
label="Size" label="Size"
@ -113,6 +100,21 @@
vn-name="size" vn-name="size"
rule> rule>
</vn-input-number> </vn-input-number>
<vn-textfield
label="Reference"
ng-model="$ctrl.item.comment"
vn-name="comment"
rule>
</vn-textfield>
<vn-input-number
min="0"
label="Relevancy"
ng-model="$ctrl.item.relevancy"
vn-name="relevancy"
rule>
</vn-input-number>
</vn-horizontal>
<vn-horizontal>
<vn-input-number <vn-input-number
min="0" min="0"
label="stems" label="stems"
@ -126,22 +128,6 @@
ng-model="$ctrl.item.stemMultiplier" ng-model="$ctrl.item.stemMultiplier"
vn-name="stemMultiplier"> vn-name="stemMultiplier">
</vn-input-number> </vn-input-number>
</vn-horizontal>
<vn-horizontal>
<vn-input-number
min="0"
label="Weight/Piece"
ng-model="$ctrl.item.weightByPiece"
vn-name="weightByPiece"
rule>
</vn-input-number>
<vn-input-number
min="0"
label="Units/Box"
ng-model="$ctrl.item.packingOut"
vn-name="packingOut"
rule>
</vn-input-number>
<vn-autocomplete <vn-autocomplete
label="Generic" label="Generic"
url="Items/withName" url="Items/withName"
@ -167,6 +153,36 @@
</append> </append>
</vn-autocomplete> </vn-autocomplete>
</vn-horizontal> </vn-horizontal>
<vn-horizontal>
<vn-input-number
min="0"
label="Weight/Piece"
ng-model="$ctrl.item.weightByPiece"
vn-name="weightByPiece"
rule>
</vn-input-number>
<vn-input-number
min="0"
label="Units/Box"
ng-model="$ctrl.item.packingOut"
vn-name="packingOut"
rule>
</vn-input-number>
<vn-input-number
min="0"
label="Plastico reciclado"
ng-model="$ctrl.item.recycledPlastic"
vn-name="recycledPlastic "
rule>
</vn-input-number>
<vn-input-number
min="0"
label="Plastico no reciclado"
ng-model="$ctrl.item.nonRecycledPlastic"
vn-name="nonRecycledPlastic"
rule>
</vn-input-number>
</vn-horizontal>
<vn-horizontal> <vn-horizontal>
<vn-textarea <vn-textarea
label="Description" label="Description"

View File

@ -113,9 +113,21 @@
<vn-label-value label="Weight/Piece" <vn-label-value label="Weight/Piece"
value="{{$ctrl.summary.item.weightByPiece}}"> value="{{$ctrl.summary.item.weightByPiece}}">
</vn-label-value> </vn-label-value>
<vn-label-value label="Unidades/Caja"
value="{{$ctrl.summary.item.packingOut}}">
</vn-label-value>
<vn-label-value label="Expense" <vn-label-value label="Expense"
value="{{$ctrl.summary.item.expense.name}}"> value="{{$ctrl.summary.item.expense.name}}">
</vn-label-value> </vn-label-value>
<vn-label-value label="Genérico"
value="{{$ctrl.summary.item.genericFk}}">
</vn-label-value>
<vn-label-value label="Plástico reciclado"
value="{{$ctrl.summary.item.recycledPlastic}}">
</vn-label-value>
<vn-label-value label="Plástico no reciclado"
value="{{$ctrl.summary.item.nonRecycledPlastic}}">
</vn-label-value>
</vn-one> </vn-one>
<vn-one name="tags"> <vn-one name="tags">
<h4 ng-show="$ctrl.isBuyer || $ctrl.isReplenisher"> <h4 ng-show="$ctrl.isBuyer || $ctrl.isReplenisher">