feat: añadido almacén por defecto
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Vicent Llopis 2023-01-25 15:19:33 +01:00
parent eefafb3ac2
commit caf1dcd690
6 changed files with 85 additions and 68 deletions

View File

@ -18,9 +18,11 @@
},
"expired": {
"type": "date"
},
"warehouseFk": {
"type": "number"
}
},
"scope": {
"where" :{
"expired": null

View File

@ -99,8 +99,10 @@ module.exports = Self => {
[summary.botanical] = res[2];
const userConfig = await models.UserConfig.getUserConfig(ctx, myOptions);
console.log(userConfig.warehouseFk);
const company = await models.Company.findOne({where: {code: 'VNL'}}, myOptions);
res = await models.Item.getVisibleAvailable(summary.item.id, userConfig.warehouseFk, undefined, myOptions);
res = await models.Item.getVisibleAvailable(summary.item.id, company.warehouseFk, undefined, myOptions);
summary.available = res.available;
summary.visible = res.visible;

View File

@ -20,8 +20,17 @@
</vn-one>
<vn-one>
<p translate>Available</p>
<p>{{$ctrl.summary.available}}</p>
</vn-one>
<p>{{$ctrl.summary.available}}
<vn-icon
icon="info_outline"
vn-tooltip="{{'WarehouseFk' | translate:$ctrl.passRequirements}}"
pointer>
</vn-icon>
</p>
<!-- <div
info="Search ACL by model name">
'test'
</div> -->
</vn-horizontal>
</vn-one>
<vn-one name="basicData">

View File

@ -0,0 +1,2 @@
WarehouseFk: >
Calculated on the warehouse of {{ name }}

View File

@ -1,3 +1,5 @@
Barcode: Códigos de barras
Other data: Otros datos
Go to the item: Ir al artículo
WarehouseFk: >
Calculado sobre el almacén de {{ name }}