feat: añadido almacén por defecto
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
eefafb3ac2
commit
caf1dcd690
|
@ -18,12 +18,14 @@
|
|||
},
|
||||
"expired": {
|
||||
"type": "date"
|
||||
},
|
||||
"warehouseFk": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
|
||||
"scope": {
|
||||
"where" :{
|
||||
"expired": null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<vn-horizontal>
|
||||
<vn-one>
|
||||
<img style="width: 100%; display: block;"
|
||||
ng-src="{{$root.imagePath('catalog', '200x200', $ctrl.item.id)}}"
|
||||
ng-src="{{$root.imagePath('catalog', '200x200', $ctrl.item.id)}}"
|
||||
zoom-image="{{$root.imagePath('catalog', '1600x900', $ctrl.item.id)}}" on-error-src/>
|
||||
<vn-horizontal class="item-state">
|
||||
<vn-one>
|
||||
|
@ -20,46 +20,55 @@
|
|||
</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">
|
||||
<h4 ng-show="$ctrl.isBuyer">
|
||||
<a
|
||||
<a
|
||||
ui-sref="item.card.basicData({id:$ctrl.item.id})"
|
||||
target="_self">
|
||||
<span translate vn-tooltip="Go to">Basic data</span>
|
||||
</a>
|
||||
</h4>
|
||||
<h4
|
||||
translate
|
||||
translate
|
||||
ng-show="!$ctrl.isBuyer">
|
||||
Basic data
|
||||
</h4>
|
||||
<vn-label-value label="Name"
|
||||
value="{{$ctrl.summary.item.name}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Full name"
|
||||
<vn-label-value label="Full name"
|
||||
value="{{$ctrl.summary.item.longName}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Item family"
|
||||
<vn-label-value label="Item family"
|
||||
value="{{$ctrl.summary.item.itemType.name}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Size"
|
||||
<vn-label-value label="Size"
|
||||
value="{{$ctrl.summary.item.size}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Origin"
|
||||
<vn-label-value label="Origin"
|
||||
value="{{$ctrl.summary.item.origin.name}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="stems"
|
||||
<vn-label-value label="stems"
|
||||
value="{{$ctrl.summary.item.stems}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Multiplier"
|
||||
<vn-label-value label="Multiplier"
|
||||
value="{{$ctrl.summary.item.stemMultiplier}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Buyer">
|
||||
<span
|
||||
<span
|
||||
ng-click="workerDescriptor.show($event, $ctrl.summary.item.itemType.worker.userFk)"
|
||||
class="link">
|
||||
{{$ctrl.summary.item.itemType.worker.user.name}}
|
||||
|
@ -68,45 +77,45 @@
|
|||
</vn-one>
|
||||
<vn-one name="otherData">
|
||||
<h4 ng-show="$ctrl.isBuyer">
|
||||
<a
|
||||
<a
|
||||
ui-sref="item.card.basicData({id:$ctrl.item.id})"
|
||||
target="_self">
|
||||
<span translate vn-tooltip="Go to">Other data</span>
|
||||
</a>
|
||||
</h4>
|
||||
<h4
|
||||
translate
|
||||
translate
|
||||
ng-show="!$ctrl.isBuyer">
|
||||
Other data
|
||||
</h4>
|
||||
<vn-label-value label="Intrastat code"
|
||||
<vn-label-value label="Intrastat code"
|
||||
value="{{$ctrl.summary.item.intrastat.id}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Intrastat"
|
||||
<vn-label-value label="Intrastat"
|
||||
value="{{$ctrl.summary.item.intrastat.description}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Reference"
|
||||
<vn-label-value label="Reference"
|
||||
value="{{$ctrl.summary.item.comment}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Relevancy"
|
||||
<vn-label-value label="Relevancy"
|
||||
value="{{$ctrl.summary.item.relevancy}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Weight/Piece"
|
||||
<vn-label-value label="Weight/Piece"
|
||||
value="{{$ctrl.summary.item.weightByPiece}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Expense"
|
||||
<vn-label-value label="Expense"
|
||||
value="{{$ctrl.summary.item.expense.name}}">
|
||||
</vn-label-value>
|
||||
</vn-one>
|
||||
<vn-one name="tags">
|
||||
<h4 ng-show="$ctrl.isBuyer || $ctrl.isReplenisher">
|
||||
<a
|
||||
<a
|
||||
ui-sref="item.card.tags({id:$ctrl.item.id})"
|
||||
target="_self">
|
||||
<span translate vn-tooltip="Go to">Tags</span>
|
||||
</a>
|
||||
</h4>
|
||||
<h4
|
||||
<h4
|
||||
translate
|
||||
ng-show="!$ctrl.isBuyer && !$ctrl.isReplenisher">
|
||||
Tags
|
||||
|
@ -119,14 +128,14 @@
|
|||
</vn-one>
|
||||
<vn-one name="description" ng-if="$ctrl.summary.item.description">
|
||||
<h4 ng-show="$ctrl.isBuyer">
|
||||
<a
|
||||
<a
|
||||
ui-sref="item.card.basicData({id:$ctrl.item.id})"
|
||||
target="_self">
|
||||
<span translate vn-tooltip="Go to">Description</span>
|
||||
</a>
|
||||
</h4>
|
||||
<h4
|
||||
translate
|
||||
translate
|
||||
ng-show="!$ctrl.isBuyer">
|
||||
Description
|
||||
</h4>
|
||||
|
@ -136,13 +145,13 @@
|
|||
</vn-one>
|
||||
<vn-one name="tax">
|
||||
<h4 ng-show="$ctrl.isBuyer || $ctrl.isAdministrative">
|
||||
<a
|
||||
<a
|
||||
ui-sref="item.card.tax({id:$ctrl.item.id})"
|
||||
target="_self">
|
||||
<span translate vn-tooltip="Go to">Tax</span>
|
||||
</a>
|
||||
</h4>
|
||||
<h4
|
||||
<h4
|
||||
translate
|
||||
ng-show="!$ctrl.isBuyer && !$ctrl.isAdministrative">
|
||||
Tax
|
||||
|
@ -154,33 +163,33 @@
|
|||
</vn-one>
|
||||
<vn-one name="botanical">
|
||||
<h4 ng-show="$ctrl.isBuyer">
|
||||
<a
|
||||
<a
|
||||
ui-sref="item.card.botanical({id:$ctrl.item.id})"
|
||||
target="_self">
|
||||
<span translate vn-tooltip="Go to">Botanical</span>
|
||||
</a>
|
||||
</h4>
|
||||
<h4
|
||||
<h4
|
||||
translate
|
||||
ng-show="!$ctrl.isBuyer">
|
||||
Botanical
|
||||
</h4>
|
||||
<vn-label-value label="Genus"
|
||||
<vn-label-value label="Genus"
|
||||
value="{{$ctrl.summary.botanical.genus.name}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Specie"
|
||||
<vn-label-value label="Specie"
|
||||
value="{{$ctrl.summary.botanical.specie.name}}">
|
||||
</vn-label-value>
|
||||
</vn-one>
|
||||
<vn-one name="barcode">
|
||||
<h4 ng-show="$ctrl.isBuyer || $ctrl.isReplenisher">
|
||||
<a
|
||||
<a
|
||||
ui-sref="item.card.itemBarcode({id:$ctrl.item.id})"
|
||||
target="_self">
|
||||
<span translate vn-tooltip="Go to">Barcode</span>
|
||||
</a>
|
||||
</h4>
|
||||
<h4
|
||||
<h4
|
||||
translate
|
||||
ng-show="!$ctrl.isBuyer && !$ctrl.isReplenisher">
|
||||
Barcode
|
||||
|
@ -191,6 +200,6 @@
|
|||
</vn-one>
|
||||
</vn-horizontal>
|
||||
</vn-card>
|
||||
<vn-worker-descriptor-popover
|
||||
<vn-worker-descriptor-popover
|
||||
vn-id="workerDescriptor">
|
||||
</vn-worker-descriptor-popover>
|
||||
</vn-worker-descriptor-popover>
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
WarehouseFk: >
|
||||
Calculated on the warehouse of {{ name }}
|
|
@ -1,3 +1,5 @@
|
|||
Barcode: Códigos de barras
|
||||
Other data: Otros datos
|
||||
Go to the item: Ir al artículo
|
||||
Go to the item: Ir al artículo
|
||||
WarehouseFk: >
|
||||
Calculado sobre el almacén de {{ name }}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<vn-card class="summary">
|
||||
<h5>
|
||||
<a
|
||||
<a
|
||||
ng-if="::$ctrl.summary.id"
|
||||
vn-tooltip="Go to the ticket"
|
||||
ui-sref="ticket.card.summary({id: {{::$ctrl.summary.id}}})"
|
||||
|
@ -8,10 +8,10 @@
|
|||
<vn-icon-button icon="launch"></vn-icon-button>
|
||||
</a>
|
||||
<span>
|
||||
Ticket #{{$ctrl.summary.id}} - {{$ctrl.summary.client.name}}
|
||||
Ticket #{{$ctrl.summary.id}} - {{$ctrl.summary.client.name}}
|
||||
({{$ctrl.summary.client.id}}) - {{$ctrl.summary.nickname}}
|
||||
</span>
|
||||
<vn-button-menu
|
||||
<vn-button-menu
|
||||
disabled="!$ctrl.isEditable"
|
||||
class="message"
|
||||
label="Change state"
|
||||
|
@ -19,25 +19,25 @@
|
|||
url="States/editableStates"
|
||||
on-change="$ctrl.changeState(value)">
|
||||
</vn-button-menu>
|
||||
<vn-ticket-descriptor-menu
|
||||
<vn-ticket-descriptor-menu
|
||||
ng-if="!$ctrl.isOnTicketCard"
|
||||
ticket-id="$ctrl.summary.id"
|
||||
ticket-id="$ctrl.summary.id"
|
||||
parent-reload="$ctrl.reload()"
|
||||
/>
|
||||
</h5>
|
||||
<vn-horizontal>
|
||||
<vn-one>
|
||||
<vn-label-value label="State"
|
||||
<vn-label-value label="State"
|
||||
value="{{$ctrl.summary.ticketState.state.name}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Salesperson">
|
||||
<span
|
||||
<span
|
||||
ng-click="workerDescriptor.show($event, $ctrl.summary.client.salesPersonFk)"
|
||||
class="link">
|
||||
{{$ctrl.summary.client.salesPersonUser.name}}
|
||||
</span>
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Agency"
|
||||
<vn-label-value label="Agency"
|
||||
value="{{$ctrl.summary.agencyMode.name}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Zone">
|
||||
|
@ -47,11 +47,11 @@
|
|||
{{$ctrl.summary.zone.name}}
|
||||
</span>
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Warehouse"
|
||||
<vn-label-value label="Warehouse"
|
||||
value="{{$ctrl.summary.warehouse.name}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Route">
|
||||
<span
|
||||
<span
|
||||
ng-click="routeDescriptor.show($event, $ctrl.summary.routeFk)"
|
||||
class="link">
|
||||
{{$ctrl.summary.routeFk}}
|
||||
|
@ -66,17 +66,17 @@
|
|||
</vn-label-value>
|
||||
</vn-one>
|
||||
<vn-two>
|
||||
<vn-label-value label="Shipped"
|
||||
<vn-label-value label="Shipped"
|
||||
value="{{$ctrl.summary.shipped | date: 'dd/MM/yyyy HH:mm'}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Landed"
|
||||
<vn-label-value label="Landed"
|
||||
value="{{$ctrl.summary.landed | date: 'dd/MM/yyyy'}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Package size"
|
||||
<vn-label-value label="Package size"
|
||||
value="{{$ctrl.summary.packages}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Address phone"
|
||||
ng-if="$ctrl.summary.address.phone != null"
|
||||
ng-if="$ctrl.summary.address.phone != null"
|
||||
value="{{$ctrl.summary.address.phone}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Address mobile"
|
||||
|
@ -109,7 +109,7 @@
|
|||
</vn-one>
|
||||
<vn-auto name="sales">
|
||||
<h4>
|
||||
<a
|
||||
<a
|
||||
ui-sref="ticket.card.sale({id:$ctrl.ticket.id})"
|
||||
target="_self">
|
||||
<span translate vn-tooltip="Go to">Sale</span>
|
||||
|
@ -146,13 +146,13 @@
|
|||
vn-tooltip="{{::$ctrl.$t('Claim')}}: {{::sale.claimBeginning.claimFk}}">
|
||||
</vn-icon>
|
||||
</a>
|
||||
<vn-icon
|
||||
ng-show="::(sale.visible < 0)"
|
||||
<vn-icon
|
||||
ng-show="::(sale.visible < 0)"
|
||||
color-main
|
||||
icon="warning"
|
||||
vn-tooltip="Visible: {{::sale.visible || 0}}">
|
||||
</vn-icon>
|
||||
<vn-icon ng-show="sale.reserved"
|
||||
<vn-icon ng-show="sale.reserved"
|
||||
icon="icon-reserve"
|
||||
translate-attr="{title: 'Reserved'}">
|
||||
</vn-icon>
|
||||
|
@ -170,22 +170,22 @@
|
|||
</vn-icon>
|
||||
</vn-td>
|
||||
<vn-td number shrink>
|
||||
<span
|
||||
<span
|
||||
ng-click="itemDescriptor.show($event, sale.itemFk, sale.id, $ctrl.ticket.shipped)"
|
||||
class="link">
|
||||
{{sale.itemFk | zeroFill:6}}
|
||||
</span>
|
||||
</vn-td>
|
||||
<vn-td number shrink>
|
||||
<vn-chip
|
||||
class="transparent"
|
||||
<vn-chip
|
||||
class="transparent"
|
||||
ng-class="{'alert': sale.visible < 0}">
|
||||
{{::sale.visible}}
|
||||
</vn-chip>
|
||||
</vn-td>
|
||||
<vn-td number shrink>
|
||||
<vn-chip
|
||||
class="transparent"
|
||||
<vn-chip
|
||||
class="transparent"
|
||||
ng-class="{'alert': sale.available < 0}">
|
||||
{{::sale.available}}
|
||||
</vn-chip>
|
||||
|
@ -216,7 +216,7 @@
|
|||
</vn-auto>
|
||||
<vn-one ng-if="$ctrl.summary.packagings.length != 0">
|
||||
<h4>
|
||||
<a
|
||||
<a
|
||||
ui-sref="ticket.card.package({id:$ctrl.ticket.id})"
|
||||
target="_self">
|
||||
<span translate vn-tooltip="Go to">Packages</span>
|
||||
|
@ -241,7 +241,7 @@
|
|||
</vn-one>
|
||||
<vn-one class="services" ng-if="$ctrl.summary.services.length != 0">
|
||||
<h4>
|
||||
<a
|
||||
<a
|
||||
ui-sref="ticket.card.service({id:$ctrl.ticket.id})"
|
||||
target="_self">
|
||||
<span translate vn-tooltip="Go to">Service</span>
|
||||
|
@ -276,7 +276,7 @@
|
|||
<vn-horizontal>
|
||||
<vn-auto ng-if="$ctrl.summary.requests.length != 0">
|
||||
<h4>
|
||||
<a
|
||||
<a
|
||||
ui-sref="ticket.card.request.index({id:$ctrl.ticket.id})"
|
||||
target="_self">
|
||||
<span translate vn-tooltip="Go to">Purchase request</span>
|
||||
|
@ -304,7 +304,7 @@
|
|||
<vn-td number>{{::request.quantity}}</vn-td>
|
||||
<vn-td number>{{::request.price}}</vn-td>
|
||||
<vn-td number>
|
||||
<span
|
||||
<span
|
||||
ng-show="::request.saleFk"
|
||||
ng-click="itemDescriptor.show($event, request.sale.itemFk, request.sale.id)"
|
||||
class="link">
|
||||
|
@ -336,9 +336,9 @@
|
|||
<vn-invoice-out-descriptor-popover
|
||||
vn-id="invoice-out-descriptor">
|
||||
</vn-invoice-out-descriptor-popover>
|
||||
<vn-worker-descriptor-popover
|
||||
<vn-worker-descriptor-popover
|
||||
vn-id="workerDescriptor">
|
||||
</vn-worker-descriptor-popover>
|
||||
<vn-zone-descriptor-popover
|
||||
<vn-zone-descriptor-popover
|
||||
vn-id="zoneDescriptor">
|
||||
</vn-zone-descriptor-popover>
|
||||
</vn-zone-descriptor-popover>
|
||||
|
|
Loading…
Reference in New Issue