refs #4645 valores ref cambiados
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Alexandre Riera 2022-10-26 12:48:48 +02:00
parent e80754f280
commit 405bc8765a
13 changed files with 81 additions and 30 deletions

View File

@ -1100,7 +1100,8 @@ export default {
anyBuyLine: 'vn-entry-summary tr.dark-row'
},
entryBasicData: {
reference: 'vn-entry-basic-data vn-textfield[ng-model="$ctrl.entry.ref"]',
reference: 'vn-entry-basic-data vn-textfield[ng-model="$ctrl.entry.reference"]',
invoiceNumber: 'vn-entry-basic-data vn-textfield[ng-model="$ctrl.entry.invoiceNumber"]',
notes: 'vn-entry-basic-data vn-textfield[ng-model="$ctrl.entry.notes"]',
observations: 'vn-entry-basic-data vn-textarea[ng-model="$ctrl.entry.observation"]',
supplier: 'vn-entry-basic-data vn-autocomplete[ng-model="$ctrl.entry.supplierFk"]',

View File

@ -19,6 +19,7 @@ describe('Entry basic data path', () => {
it('should edit the basic data', async() => {
await page.write(selectors.entryBasicData.reference, 'new movement 8');
await page.write(selectors.entryBasicData.invoiceNumber, 'new movement 8');
await page.write(selectors.entryBasicData.notes, 'new notes');
await page.write(selectors.entryBasicData.observations, ' edited');
await page.autocompleteSearch(selectors.entryBasicData.supplier, 'Plants nick');
@ -45,6 +46,13 @@ describe('Entry basic data path', () => {
expect(result).toEqual('new movement 8');
});
it('should confirm the invoiceNumber was edited', async() => {
await page.reloadSection('entry.card.basicData');
const result = await page.waitToGetProperty(selectors.entryBasicData.invoiceNumber, 'value');
expect(result).toEqual('new movement 8');
});
it('should confirm the note was edited', async() => {
const result = await page.waitToGetProperty(selectors.entryBasicData.notes, 'value');

View File

@ -154,7 +154,8 @@ module.exports = Self => {
e.id,
e.supplierFk,
e.dated,
e.ref,
e.ref reference,
e.ref invoiceNumber,
e.isBooked,
e.isExcludedFromAvailable,
e.notes,

View File

@ -12,10 +12,15 @@ module.exports = Self => {
http: {source: 'path'}
},
{
arg: 'ref',
arg: 'reference',
type: 'string',
description: 'The buyed boxes ids',
},
{
arg: 'invoiceNumber',
type: 'string',
description: 'The registered invoice number',
},
{
arg: 'observation',
type: 'string',
@ -63,7 +68,8 @@ module.exports = Self => {
await entry.updateAttributes({
observation: args.observation,
ref: args.ref
reference: args.reference,
invoiceNumber: args.invoiceNumber
}, myOptions);
const travel = entry.travel();

View File

@ -15,13 +15,15 @@ describe('entry import()', () => {
});
it('should import the buy rows', async() => {
const expectedRef = '1, 2';
const expectedReference = '1, 2';
const expectedInvoiceNumber = '1, 2';
const expectedObservation = '123456';
const ctx = {
req: activeCtx,
args: {
observation: expectedObservation,
ref: expectedRef,
reference: expectedReference,
invoiceNumber: expectedInvoiceNumber,
buys: [
{
itemFk: 1,
@ -58,7 +60,8 @@ describe('entry import()', () => {
}, options);
expect(updatedEntry.observation).toEqual(expectedObservation);
expect(updatedEntry.ref).toEqual(expectedRef);
expect(updatedEntry.reference).toEqual(expectedReference);
expect(updatedEntry.invoiceNumber).toEqual(expectedInvoiceNumber);
expect(entryBuys.length).toEqual(4);
await tx.rollback();

View File

@ -18,8 +18,17 @@
"dated": {
"type": "date"
},
"ref": {
"type": "string"
"reference": {
"type": "string",
"mysql": {
"columnName": "ref"
}
},
"invoiceNumber": {
"type": "string",
"mysql": {
"columnName": "ref"
}
},
"isBooked": {
"type": "boolean"

View File

@ -48,7 +48,7 @@
<vn-textfield
vn-one
label="Reference"
ng-model="$ctrl.entry.ref"
ng-model="$ctrl.entry.reference"
rule
vn-focus>
</vn-textfield>
@ -61,17 +61,25 @@
</vn-textfield>
</vn-horizontal>
<vn-horizontal>
<vn-textarea
<vn-textfield
vn-one
label="Observation"
ng-model="$ctrl.entry.observation"
rule>
</vn-textarea>
label="Invoice number"
ng-model="$ctrl.entry.invoiceNumber"
rule
vn-focus>
</vn-textfield>
<vn-autocomplete
url="Companies"
label="Company"
show-field="code"
value-field="id"
ng-model="$ctrl.entry.companyFk">
</vn-autocomplete>
</vn-horizontal>
<vn-horizontal>
<vn-autocomplete
vn-one
label="Currency"
vn-one
label="Currency"
ng-model="$ctrl.entry.currencyFk"
url="Currencies"
show-field="code"
@ -84,13 +92,14 @@
ng-model="$ctrl.entry.commission"
rule>
</vn-input-number>
<vn-autocomplete
url="Companies"
label="Company"
show-field="code"
value-field="id"
ng-model="$ctrl.entry.companyFk">
</vn-autocomplete>
</vn-horizontal>
<vn-horizontal>
<vn-textarea
vn-one
label="Observation"
ng-model="$ctrl.entry.observation"
rule>
</vn-textarea>
</vn-horizontal>
<vn-horizontal>
<vn-check

View File

@ -12,6 +12,7 @@
<vn-th field="id" number>Id</vn-th>
<vn-th field="landed" center expand>Landed</vn-th>
<vn-th>Reference</vn-th>
<vn-th>Invoice number</vn-th>
<vn-th field="supplierFk">Supplier</vn-th>
<vn-th field="isBooked" center>Booked</vn-th>
<vn-th field="isConfirmed" center>Confirmed</vn-th>
@ -45,7 +46,8 @@
{{::entry.landed | date:'dd/MM/yyyy'}}
</span>
</vn-td>
<vn-td expand>{{::entry.ref}}</vn-td>
<vn-td expand>{{::entry.reference}}</vn-td>
<vn-td expand>{{::entry.invoiceNumber}}</vn-td>
<vn-td expand>{{::entry.supplierName}}</vn-td>
<vn-td center><vn-check ng-model="entry.isBooked" disabled="true"></vn-check></vn-td>
<vn-td center><vn-check ng-model="entry.isConfirmed" disabled="true"></vn-check></vn-td>

View File

@ -14,4 +14,5 @@ Booked: Contabilizada
Is inventory: Inventario
Notes: Notas
Status: Estado
Selection: Selección
Selection: Selección
Invoice number: Núm. factura

View File

@ -13,9 +13,16 @@
<vn-textfield
vn-one
label="Reference"
ng-model="filter.ref">
ng-model="filter.reference">
</vn-textfield>
<vn-textfield
vn-one
label="Invoice number"
ng-model="filter.invoiceNumber">
</vn-textfield>
</vn-horizontal>
<vn-horizontal>
<vn-textfield
vn-one
label="Travel"
ng-model="filter.travelFk">

View File

@ -5,4 +5,5 @@ From: Desde
To: Hasta
Agency: Agencia
Warehouse: Almacén
Search entry by id or a suppliers by name or alias: Buscar entrada por id o proveedores por nombre y alias
Search entry by id or a suppliers by name or alias: Buscar entrada por id o proveedores por nombre y alias
Invoice number: Núm. factura

View File

@ -27,7 +27,10 @@
value="{{$ctrl.entryData.company.code}}">
</vn-label-value>
<vn-label-value label="Reference"
value="{{$ctrl.entryData.ref}}">
value="{{$ctrl.entryData.reference}}">
</vn-label-value>
<vn-label-value label="Invoice number"
value="{{$ctrl.entryData.invoiceNumber}}">
</vn-label-value>
<vn-label-value label="Notes"
value="{{$ctrl.entryData.notes}}">

View File

@ -8,4 +8,4 @@ Minimum price: Precio mínimo
Buys: Compras
Travel: Envio
Go to the entry: Ir a la entrada
Invoice number: Núm. factura