change tooltip client descriptor btnFive
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
69530d3019
commit
433afb8fe8
|
@ -105,7 +105,7 @@
|
||||||
<div ng-transclude="btnFive">
|
<div ng-transclude="btnFive">
|
||||||
<vn-quick-link
|
<vn-quick-link
|
||||||
ng-if="$ctrl.client.supplier.nif"
|
ng-if="$ctrl.client.supplier.nif"
|
||||||
tooltip="Go to client"
|
tooltip="Go to supplier"
|
||||||
state="['supplier.card.summary', {id: $ctrl.client.supplier.id}]"
|
state="['supplier.card.summary', {id: $ctrl.client.supplier.id}]"
|
||||||
icon="icon-supplier">
|
icon="icon-supplier">
|
||||||
</vn-quick-link>
|
</vn-quick-link>
|
||||||
|
|
|
@ -3,5 +3,6 @@ View consumer report: Ver informe de consumo
|
||||||
From date: Fecha desde
|
From date: Fecha desde
|
||||||
To date: Fecha hasta
|
To date: Fecha hasta
|
||||||
Go to user: Ir al usuario
|
Go to user: Ir al usuario
|
||||||
|
Go to supplier: Ir al proveedor
|
||||||
Client invoices list: Listado de facturas del cliente
|
Client invoices list: Listado de facturas del cliente
|
||||||
Pay method: Forma de pago
|
Pay method: Forma de pago
|
|
@ -70,17 +70,14 @@ module.exports = Self => {
|
||||||
const models = Self.app.models;
|
const models = Self.app.models;
|
||||||
const model = models[modelName];
|
const model = models[modelName];
|
||||||
try {
|
try {
|
||||||
let result;
|
|
||||||
|
|
||||||
const promises = [];
|
const promises = [];
|
||||||
const value = {};
|
const value = {};
|
||||||
value[field] = newValue;
|
value[field] = newValue;
|
||||||
|
|
||||||
if (filter) {
|
if (filter) {
|
||||||
ctx.args.filter = {where: filter, limit: null};
|
ctx.args.filter = {where: filter, limit: null};
|
||||||
lines = await models.Buy.latestBuysFilter(ctx, null, myOptions);// ctx?
|
lines = await models.Buy.latestBuysFilter(ctx, null, myOptions);
|
||||||
}
|
}
|
||||||
// get lines
|
|
||||||
|
|
||||||
const targets = lines.map(line => {
|
const targets = lines.map(line => {
|
||||||
return line[identifier];
|
return line[identifier];
|
||||||
|
@ -88,7 +85,7 @@ module.exports = Self => {
|
||||||
for (let target of targets)
|
for (let target of targets)
|
||||||
promises.push(model.upsertWithWhere({id: target}, value, myOptions));
|
promises.push(model.upsertWithWhere({id: target}, value, myOptions));
|
||||||
|
|
||||||
result = await Promise.all(promises);
|
const result = await Promise.all(promises);
|
||||||
|
|
||||||
if (tx) await tx.commit();
|
if (tx) await tx.commit();
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ describe('Buy editLatestsBuys()', () => {
|
||||||
const options = {transaction: tx};
|
const options = {transaction: tx};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
let ctx = {
|
const ctx = {
|
||||||
args: {
|
args: {
|
||||||
search: 'Ranged weapon longbow 2m'
|
search: 'Ranged weapon longbow 2m'
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,35 @@ describe('Buy editLatestsBuys()', () => {
|
||||||
const newValue = 99;
|
const newValue = 99;
|
||||||
const lines = [{itemFk: original.itemFk, id: original.id}];
|
const lines = [{itemFk: original.itemFk, id: original.id}];
|
||||||
|
|
||||||
await models.Buy.editLatestBuys(field, newValue, lines, options);
|
await models.Buy.editLatestBuys(ctx, field, newValue, lines, null, options);
|
||||||
|
|
||||||
|
const [result] = await models.Buy.latestBuysFilter(ctx, null, options);
|
||||||
|
|
||||||
|
expect(result[field]).toEqual(newValue);
|
||||||
|
|
||||||
|
await tx.rollback();
|
||||||
|
} catch (e) {
|
||||||
|
await tx.rollback();
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should change the value of a given column for filter', async() => {
|
||||||
|
const tx = await models.Buy.beginTransaction({});
|
||||||
|
const options = {transaction: tx};
|
||||||
|
|
||||||
|
try {
|
||||||
|
const filter = {typeFk: 1};
|
||||||
|
const ctx = {
|
||||||
|
args: {
|
||||||
|
filter: filter
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const field = 'size';
|
||||||
|
const newValue = 88;
|
||||||
|
|
||||||
|
await models.Buy.editLatestBuys(ctx, field, newValue, null, filter, options);
|
||||||
|
|
||||||
const [result] = await models.Buy.latestBuysFilter(ctx, null, options);
|
const [result] = await models.Buy.latestBuysFilter(ctx, null, options);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue