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' anyBuyLine: 'vn-entry-summary tr.dark-row'
}, },
entryBasicData: { 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"]', notes: 'vn-entry-basic-data vn-textfield[ng-model="$ctrl.entry.notes"]',
observations: 'vn-entry-basic-data vn-textarea[ng-model="$ctrl.entry.observation"]', observations: 'vn-entry-basic-data vn-textarea[ng-model="$ctrl.entry.observation"]',
supplier: 'vn-entry-basic-data vn-autocomplete[ng-model="$ctrl.entry.supplierFk"]', 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() => { it('should edit the basic data', async() => {
await page.write(selectors.entryBasicData.reference, 'new movement 8'); 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.notes, 'new notes');
await page.write(selectors.entryBasicData.observations, ' edited'); await page.write(selectors.entryBasicData.observations, ' edited');
await page.autocompleteSearch(selectors.entryBasicData.supplier, 'Plants nick'); await page.autocompleteSearch(selectors.entryBasicData.supplier, 'Plants nick');
@ -45,6 +46,13 @@ describe('Entry basic data path', () => {
expect(result).toEqual('new movement 8'); 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() => { it('should confirm the note was edited', async() => {
const result = await page.waitToGetProperty(selectors.entryBasicData.notes, 'value'); const result = await page.waitToGetProperty(selectors.entryBasicData.notes, 'value');

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -6,3 +6,4 @@ To: Hasta
Agency: Agencia Agency: Agencia
Warehouse: Almacén 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}}"> value="{{$ctrl.entryData.company.code}}">
</vn-label-value> </vn-label-value>
<vn-label-value label="Reference" <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>
<vn-label-value label="Notes" <vn-label-value label="Notes"
value="{{$ctrl.entryData.notes}}"> value="{{$ctrl.entryData.notes}}">

View File

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