5043-mock_Date #1260

Merged
alexm merged 21 commits from 5043-mock_Date into dev 2023-02-03 10:57:51 +00:00
10 changed files with 79 additions and 75 deletions
Showing only changes of commit 2528b2d3ad - Show all commits

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 - (Trabajadores -> Nuevo trabajador) Nueva sección
### Changed ### 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 ### Fixed
- (Artículos -> Etiquetas) Permite intercambiar la relevancia entre dos etiquetas. - (Artículos -> Etiquetas) Permite intercambiar la relevancia entre dos etiquetas.
- (Tickets -> Añadir pago) Eliminado "null" en las referencias
## [2302.01] - 2023-01-26 ## [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() => { it('should go to the next month, go to current month and go 1 month in the past', async() => {
let date = Date.vnNew(); let date = Date.vnNew();
date.setDate(1);
date.setMonth(date.getMonth() + 1); date.setMonth(date.getMonth() + 1);
let month = date.toLocaleString('default', {month: 'long'}); let month = date.toLocaleString('default', {month: 'long'});
@ -32,6 +33,7 @@ describe('Worker time control path', () => {
expect(result).toContain(month); expect(result).toContain(month);
date = Date.vnNew(); date = Date.vnNew();
date.setDate(1);
month = date.toLocaleString('default', {month: 'long'}); month = date.toLocaleString('default', {month: 'long'});
await page.click(selectors.workerTimeControl.previousMonthButton); await page.click(selectors.workerTimeControl.previousMonthButton);
@ -40,6 +42,7 @@ describe('Worker time control path', () => {
expect(result).toContain(month); expect(result).toContain(month);
date = Date.vnNew(); date = Date.vnNew();
date.setDate(1);
date.setMonth(date.getMonth() - 1); date.setMonth(date.getMonth() - 1);
const timestamp = Math.round(date.getTime() / 1000); const timestamp = Math.round(date.getTime() / 1000);
month = date.toLocaleString('default', {month: 'long'}); month = date.toLocaleString('default', {month: 'long'});

View File

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

View File

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

View File

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

View File

@ -1,5 +1,5 @@
Edit buy(s): Editar compra(s) Edit buy(s): Editar compra(s)
Buying value: Precio Buying value: Coste
Freight value: Porte Freight value: Porte
Commission value: Comisión Commission value: Comisión
Package value: Embalaje Package value: Embalaje

View File

@ -114,8 +114,7 @@
<th translate center field="grouping">Grouping</th> <th translate center field="grouping">Grouping</th>
<th translate center field="buyingValue">Buying value</th> <th translate center field="buyingValue">Buying value</th>
<th translate center field="price3">Import</th> <th translate center field="price3">Import</th>
<th translate center expand field="price2">Grouping price</th> <th translate center expand field="price">PVP</th>
<th translate center expand field="price3">Packing price</th>
</tr> </tr>
</thead> </thead>
<tbody ng-repeat="line in buys"> <tbody ng-repeat="line in buys">
@ -136,8 +135,7 @@
</vn-td> </vn-td>
<td center title="{{::line.buyingValue | currency: 'EUR':2}}">{{::line.buyingValue | currency: 'EUR':2}}</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.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="Grouping / Packing">{{::line.price2 | currency: 'EUR':2 | dashIfEmpty}} / {{::line.price3 | currency: 'EUR':2 | dashIfEmpty}}</td>
<td center title="{{::line.price3 | currency: 'EUR':2}}">{{::line.price3 | currency: 'EUR':2}}</td>
</tr> </tr>
<tr class="dark-row"> <tr class="dark-row">
<td shrink> <td shrink>

View File

@ -35,8 +35,7 @@
<vn-th field="warehouseFk">Warehouse</vn-th> <vn-th field="warehouseFk">Warehouse</vn-th>
<vn-th field="landed">Landed</vn-th> <vn-th field="landed">Landed</vn-th>
<vn-th number>Entry</vn-th> <vn-th number>Entry</vn-th>
<vn-th number vn-tooltip="Price Per Unit">P.P.U</vn-th> <vn-th vn-tooltip="Grouping / Packing">PVP</vn-th>
<vn-th number vn-tooltip="Price Per Package">P.P.P</vn-th>
<vn-th number class="expendable">Label</vn-th> <vn-th number class="expendable">Label</vn-th>
<vn-th number>Packing</vn-th> <vn-th number>Packing</vn-th>
<vn-th number>Grouping</vn-th> <vn-th number>Grouping</vn-th>
@ -65,8 +64,9 @@
{{::entry.entryFk | dashIfEmpty}} {{::entry.entryFk | dashIfEmpty}}
</span> </span>
</vn-td> </vn-td>
<vn-td number>{{::entry.price2 | dashIfEmpty}}</vn-td> <vn-td title="{{::entry.price2 | currency: 'EUR':2 | dashIfEmpty}} / {{::entry.price3 | currency: 'EUR':2 | dashIfEmpty}}">
<vn-td number>{{::entry.price3 | dashIfEmpty}}</vn-td> {{::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 class="expendable">{{entry.stickers | dashIfEmpty}}</vn-td>
<vn-td number> <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}">
@ -84,11 +84,11 @@
class="expendable"> class="expendable">
<span <span
vn-tooltip=" vn-tooltip="
{{::$ctrl.$t('Cost')}}: {{::entry.buyingValue| dashIfEmpty}}<br> {{::$ctrl.$t('Cost')}}: {{::entry.buyingValue | currency: 'EUR':2 | dashIfEmpty}}<br>
{{::$ctrl.$t('Package')}}: {{::entry.packageValue| dashIfEmpty}}<br> {{::$ctrl.$t('Package')}}: {{::entry.packageValue | currency: 'EUR':2 | dashIfEmpty}}<br>
{{::$ctrl.$t('Freight')}}: {{::entry.freightValue| dashIfEmpty}}<br> {{::$ctrl.$t('Freight')}}: {{::entry.freightValue | currency: 'EUR':2 | dashIfEmpty}}<br>
{{::$ctrl.$t('Comission')}}: {{::entry.comissionValue| dashIfEmpty}}"> {{::$ctrl.$t('Comission')}}: {{::entry.comissionValue | currency: 'EUR':2 | dashIfEmpty}}">
{{::entry.cost | dashIfEmpty}} {{::entry.cost | currency: 'EUR':2 | dashIfEmpty}}
</span> </span>
</vn-td> </vn-td>
<vn-td number>{{::entry.weight | dashIfEmpty}}</vn-td> <vn-td number>{{::entry.weight | dashIfEmpty}}</vn-td>

View File

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

View File

@ -16,6 +16,7 @@
class="message" class="message"
label="Change state" label="Change state"
value-field="code" value-field="code"
fields="['id', 'name', 'alertLevel', 'code']"
url="States/editableStates" url="States/editableStates"
on-change="$ctrl.changeState(value)"> on-change="$ctrl.changeState(value)">
</vn-button-menu> </vn-button-menu>