Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 5043-mock_Date
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Alex Moreno 2023-02-01 07:10:51 +01:00
commit 2528b2d3ad
10 changed files with 79 additions and 75 deletions

View File

@ -12,11 +12,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- (Trabajadores -> Nuevo trabajador) Nueva sección
### Changed
-
- (Entradas -> Compras) Cambiados los campos "Precio Grouping/Packing" por "PVP" y "Precio" por "Coste"
- (Artículos -> Últimas entradas) Cambiados los campos "P.P.U." y "P.P.P." por "PVP"
### Fixed
- (Artículos -> Etiquetas) Permite intercambiar la relevancia entre dos etiquetas.
- (Tickets -> Añadir pago) Eliminado "null" en las referencias
## [2302.01] - 2023-01-26

View File

@ -23,6 +23,7 @@ describe('Worker time control path', () => {
it('should go to the next month, go to current month and go 1 month in the past', async() => {
let date = Date.vnNew();
date.setDate(1);
date.setMonth(date.getMonth() + 1);
let month = date.toLocaleString('default', {month: 'long'});
@ -32,6 +33,7 @@ describe('Worker time control path', () => {
expect(result).toContain(month);
date = Date.vnNew();
date.setDate(1);
month = date.toLocaleString('default', {month: 'long'});
await page.click(selectors.workerTimeControl.previousMonthButton);
@ -40,6 +42,7 @@ describe('Worker time control path', () => {
expect(result).toContain(month);
date = Date.vnNew();
date.setDate(1);
date.setMonth(date.getMonth() - 1);
const timestamp = Math.round(date.getTime() / 1000);
month = date.toLocaleString('default', {month: 'long'});

View File

@ -87,6 +87,7 @@ ngModule.vnComponent('vnButtonMenu', {
selectFields: '<?',
initialData: '<?',
showFilter: '<?',
fields: '<?',
field: '=?',
url: '@?',
data: '<?',

View File

@ -42,6 +42,7 @@ vn-log {
& > td.after,
& > th.after {
width: 40%;
white-space: pre-line;
}
}
}

View File

@ -59,13 +59,11 @@ class Controller extends Dialog {
if (value) {
const accountingType = value.accountingType;
if (this.originalDescription) {
this.receipt.description =
`${accountingType && accountingType.receiptDescription}, ${this.originalDescription}`;
} else {
this.receipt.description =
`${accountingType && accountingType.receiptDescription}`;
}
if (accountingType.receiptDescription != null) {
this.receipt.description = accountingType.receiptDescription;
if (this.originalDescription) this.receipt.description += `, ${this.originalDescription}`;
} else if (this.originalDescription)
this.receipt.description = this.originalDescription;
this.maxAmount = accountingType && accountingType.maxAmount;
this.receipt.payed = Date.vnNew();

View File

@ -1,5 +1,5 @@
Edit buy(s): Editar compra(s)
Buying value: Precio
Buying value: Coste
Freight value: Porte
Commission value: Comisión
Package value: Embalaje
@ -16,4 +16,4 @@ Field to edit: Campo a editar
PackageName: Cubo
Edit: Editar
buy(s): compra(s)
Package out: Embalaje envíos
Package out: Embalaje envíos

View File

@ -38,7 +38,7 @@
</vn-one>
<vn-one>
<vn-label-value label="Reference">
<span
<span
ng-click="travelDescriptor.show($event, $ctrl.entryData.travel.id)"
class="link">
{{$ctrl.entryData.travel.ref}}
@ -114,8 +114,7 @@
<th translate center field="grouping">Grouping</th>
<th translate center field="buyingValue">Buying value</th>
<th translate center field="price3">Import</th>
<th translate center expand field="price2">Grouping price</th>
<th translate center expand field="price3">Packing price</th>
<th translate center expand field="price">PVP</th>
</tr>
</thead>
<tbody ng-repeat="line in buys">
@ -125,19 +124,18 @@
<td center title="{{::line.packageFk | dashIfEmpty}}">{{::line.packageFk | dashIfEmpty}}</td>
<td center title="{{::line.weight}}">{{::line.weight}}</td>
<td center>
<vn-chip class="transparent" translate-attr="line.groupingMode == 2 ? {title: 'Minimun amount'} : {title: 'Packing'}" ng-class="{'message': line.groupingMode == 2}">
<vn-chip class="transparent" translate-attr="line.groupingMode == 2 ? {title: 'Minimun amount'} : {title: 'Packing'}" ng-class="{'message': line.groupingMode == 2}">
<span>{{::line.packing | dashIfEmpty}}</span>
</vn-chip>
</td>
<td center>
<vn-chip class="transparent" translate-attr="line.groupingMode == 1 ? {title: 'Minimun amount'} : {title: 'Grouping'}" ng-class="{'message': line.groupingMode == 1}">
<vn-chip class="transparent" translate-attr="line.groupingMode == 1 ? {title: 'Minimun amount'} : {title: 'Grouping'}" ng-class="{'message': line.groupingMode == 1}">
<span>{{::line.grouping | dashIfEmpty}}</span>
</vn-chip>
</vn-td>
<td center title="{{::line.buyingValue | currency: 'EUR':2}}">{{::line.buyingValue | currency: 'EUR':2}}</td>
<td center title="{{::line.quantity * line.buyingValue | currency: 'EUR':2}}">{{::line.quantity * line.buyingValue | currency: 'EUR':2}}</td>
<td center title="{{::line.price2 | currency: 'EUR':2}}">{{::line.price2 | currency: 'EUR':2}}</td>
<td center title="{{::line.price3 | currency: 'EUR':2}}">{{::line.price3 | currency: 'EUR':2}}</td>
<td center title="Grouping / Packing">{{::line.price2 | currency: 'EUR':2 | dashIfEmpty}} / {{::line.price3 | currency: 'EUR':2 | dashIfEmpty}}</td>
</tr>
<tr class="dark-row">
<td shrink>
@ -195,7 +193,7 @@
vn-id="item-descriptor"
warehouse-fk="$ctrl.vnConfig.warehouseFk">
</vn-item-descriptor-popover>
<vn-travel-descriptor-popover
<vn-travel-descriptor-popover
vn-id="travelDescriptor">
</vn-travel-descriptor-popover>

View File

@ -9,15 +9,15 @@
</vn-crud-model>
<vn-card class="vn-w-md vn-pa-md">
<vn-horizontal>
<vn-horizontal>
<vn-date-picker class="vn-pa-xs"
vn-one
label="Since"
vn-one
label="Since"
ng-model="$ctrl.dateFrom">
</vn-date-picker>
<vn-date-picker class="vn-pa-xs"
vn-one
label="To"
vn-one
label="To"
ng-model="$ctrl.dateTo">
</vn-date-picker>
</vn-horizontal>
@ -35,8 +35,7 @@
<vn-th field="warehouseFk">Warehouse</vn-th>
<vn-th field="landed">Landed</vn-th>
<vn-th number>Entry</vn-th>
<vn-th number vn-tooltip="Price Per Unit">P.P.U</vn-th>
<vn-th number vn-tooltip="Price Per Package">P.P.P</vn-th>
<vn-th vn-tooltip="Grouping / Packing">PVP</vn-th>
<vn-th number class="expendable">Label</vn-th>
<vn-th number>Packing</vn-th>
<vn-th number>Grouping</vn-th>
@ -51,7 +50,7 @@
<vn-tbody>
<vn-tr ng-repeat="entry in entries">
<vn-td center>
<vn-check
<vn-check
ng-model="entry.isIgnored"
disabled="true">
</vn-check>
@ -65,30 +64,31 @@
{{::entry.entryFk | dashIfEmpty}}
</span>
</vn-td>
<vn-td number>{{::entry.price2 | dashIfEmpty}}</vn-td>
<vn-td number>{{::entry.price3 | dashIfEmpty}}</vn-td>
<vn-td title="{{::entry.price2 | currency: 'EUR':2 | dashIfEmpty}} / {{::entry.price3 | currency: 'EUR':2 | dashIfEmpty}}">
{{::entry.price2 | currency: 'EUR':2 | dashIfEmpty}} / {{::entry.price3 | currency: 'EUR':2 | dashIfEmpty}}
</vn-td>
<vn-td number class="expendable">{{entry.stickers | dashIfEmpty}}</vn-td>
<vn-td number>
<vn-chip translate-attr="{title: 'Packing'}" ng-class="{'message': entry.groupingMode == 2}">
<vn-chip translate-attr="{title: 'Packing'}" ng-class="{'message': entry.groupingMode == 2}">
<span>{{::entry.packing | dashIfEmpty}}</span>
</vn-chip>
</vn-td>
<vn-td number>
<vn-chip translate-attr="{title: 'Grouping'}" ng-class="{'message': entry.groupingMode == 1}">
<vn-chip translate-attr="{title: 'Grouping'}" ng-class="{'message': entry.groupingMode == 1}">
<span>{{::entry.grouping | dashIfEmpty}}</span>
</vn-chip>
</vn-td>
<vn-td number class="expendable">{{::entry.stems | dashIfEmpty}}</vn-td>
<vn-td number>{{::entry.quantity}}</vn-td>
<vn-td number
<vn-td number
class="expendable">
<span
vn-tooltip="
{{::$ctrl.$t('Cost')}}: {{::entry.buyingValue| dashIfEmpty}}<br>
{{::$ctrl.$t('Package')}}: {{::entry.packageValue| dashIfEmpty}}<br>
{{::$ctrl.$t('Freight')}}: {{::entry.freightValue| dashIfEmpty}}<br>
{{::$ctrl.$t('Comission')}}: {{::entry.comissionValue| dashIfEmpty}}">
{{::entry.cost | dashIfEmpty}}
{{::$ctrl.$t('Cost')}}: {{::entry.buyingValue | currency: 'EUR':2 | dashIfEmpty}}<br>
{{::$ctrl.$t('Package')}}: {{::entry.packageValue | currency: 'EUR':2 | dashIfEmpty}}<br>
{{::$ctrl.$t('Freight')}}: {{::entry.freightValue | currency: 'EUR':2 | dashIfEmpty}}<br>
{{::$ctrl.$t('Comission')}}: {{::entry.comissionValue | currency: 'EUR':2 | dashIfEmpty}}">
{{::entry.cost | currency: 'EUR':2 | dashIfEmpty}}
</span>
</vn-td>
<vn-td number>{{::entry.weight | dashIfEmpty}}</vn-td>
@ -113,24 +113,24 @@
ng-click="contextmenu.filterBySelection()">
Filter by selection
</vn-item>
<vn-item translate
ng-if="contextmenu.isFilterAllowed()"
<vn-item translate
ng-if="contextmenu.isFilterAllowed()"
ng-click="contextmenu.excludeSelection()">
Exclude selection
</vn-item>
<vn-item translate
ng-if="contextmenu.isFilterAllowed()"
<vn-item translate
ng-if="contextmenu.isFilterAllowed()"
ng-click="contextmenu.removeFilter()">
Remove filter
</vn-item>
<vn-item translate
<vn-item translate
ng-click="contextmenu.removeAllFilters()">
Remove all filters
</vn-item>
<vn-item translate
ng-if="contextmenu.isActionAllowed()"
<vn-item translate
ng-if="contextmenu.isActionAllowed()"
ng-click="contextmenu.copyValue()">
Copy value
</vn-item>
</slot-menu>
</vn-contextmenu>
</vn-contextmenu>

View File

@ -22,6 +22,7 @@
disabled="!$ctrl.isEditable"
label="State"
value-field="code"
fields="['id', 'name', 'alertLevel', 'code']"
url="States/editableStates"
on-change="$ctrl.changeState(value)">
</vn-button-menu>

View File

@ -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,36 +8,37 @@
<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"
value-field="code"
fields="['id', 'name', 'alertLevel', 'code']"
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 +48,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 +67,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 +110,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 +147,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 +171,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 +217,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 +242,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 +277,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 +305,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 +337,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>