Merge branch 'dev' into 4797-lilium-worker-notifications
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
commit
4c4f39282e
|
@ -16,7 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
### 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
|
||||
|
||||
|
|
|
@ -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 = new Date();
|
||||
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 = new Date();
|
||||
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 = new Date();
|
||||
date.setDate(1);
|
||||
date.setMonth(date.getMonth() - 1);
|
||||
const timestamp = Math.round(date.getTime() / 1000);
|
||||
month = date.toLocaleString('default', {month: 'long'});
|
||||
|
|
|
@ -87,6 +87,7 @@ ngModule.vnComponent('vnButtonMenu', {
|
|||
selectFields: '<?',
|
||||
initialData: '<?',
|
||||
showFilter: '<?',
|
||||
fields: '<?',
|
||||
field: '=?',
|
||||
url: '@?',
|
||||
data: '<?',
|
||||
|
|
|
@ -42,6 +42,7 @@ vn-log {
|
|||
& > td.after,
|
||||
& > th.after {
|
||||
width: 40%;
|
||||
white-space: pre-line;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 = new Date();
|
||||
|
|
|
@ -47,44 +47,32 @@ module.exports = function(Self) {
|
|||
}
|
||||
|
||||
try {
|
||||
const promises = [];
|
||||
|
||||
if (args.deletes) {
|
||||
for (const itemTagId of args.deletes) {
|
||||
const itemTagDeleted = models.ItemTag.destroyById(itemTagId, myOptions);
|
||||
promises.push(itemTagDeleted);
|
||||
}
|
||||
for (const itemTagId of args.deletes)
|
||||
await models.ItemTag.destroyById(itemTagId, myOptions);
|
||||
}
|
||||
|
||||
if (args.updates) {
|
||||
for (const row of args.updates) {
|
||||
if (row.data.priority) {
|
||||
const itemTag = await models.ItemTag.findById(row.where.id, null, myOptions);
|
||||
const itemTagUpdatedPriority = itemTag.updateAttributes({
|
||||
await itemTag.updateAttributes({
|
||||
priority: row.data.priority + args.maxPriority
|
||||
}, myOptions);
|
||||
promises.push(itemTagUpdatedPriority);
|
||||
}
|
||||
}
|
||||
for (const row of args.updates) {
|
||||
const itemTag = await models.ItemTag.findById(row.where.id, null, myOptions);
|
||||
const itemTagUpdated = itemTag.updateAttributes(row.data, myOptions);
|
||||
promises.push(itemTagUpdated);
|
||||
await itemTag.updateAttributes(row.data, myOptions);
|
||||
}
|
||||
}
|
||||
|
||||
if (args.creates) {
|
||||
for (const itemTag of args.creates) {
|
||||
const newItemTag = models.ItemTag.create(itemTag, myOptions);
|
||||
promises.push(newItemTag);
|
||||
for (const itemTag of args.creates)
|
||||
await models.ItemTag.create(itemTag, myOptions);
|
||||
}
|
||||
}
|
||||
|
||||
const resolvedPromises = await Promise.all(promises);
|
||||
|
||||
if (tx) await tx.commit();
|
||||
|
||||
return resolvedPromises;
|
||||
} catch (e) {
|
||||
if (tx) await tx.rollback();
|
||||
throw e;
|
||||
|
|
|
@ -12,9 +12,8 @@ describe('tag onSubmit()', () => {
|
|||
deletes: deletes
|
||||
}
|
||||
};
|
||||
const result = await models.Tag.onSubmit(ctx, options);
|
||||
await models.Tag.onSubmit(ctx, options);
|
||||
|
||||
expect(result.length).toEqual(1);
|
||||
await tx.rollback();
|
||||
} catch (e) {
|
||||
await tx.rollback();
|
||||
|
@ -33,9 +32,8 @@ describe('tag onSubmit()', () => {
|
|||
updates: updates
|
||||
}
|
||||
};
|
||||
const result = await models.Tag.onSubmit(ctx, options);
|
||||
await models.Tag.onSubmit(ctx, options);
|
||||
|
||||
expect(result.length).toEqual(1);
|
||||
await tx.rollback();
|
||||
} catch (e) {
|
||||
await tx.rollback();
|
||||
|
@ -62,9 +60,8 @@ describe('tag onSubmit()', () => {
|
|||
creates: creates
|
||||
}
|
||||
};
|
||||
const result = await models.Tag.onSubmit(ctx, options);
|
||||
await models.Tag.onSubmit(ctx, options);
|
||||
|
||||
expect(result.length).toEqual(1);
|
||||
await tx.rollback();
|
||||
} catch (e) {
|
||||
await tx.rollback();
|
||||
|
@ -88,9 +85,8 @@ describe('tag onSubmit()', () => {
|
|||
|
||||
}
|
||||
};
|
||||
const result = await models.Tag.onSubmit(ctx, options);
|
||||
await models.Tag.onSubmit(ctx, options);
|
||||
|
||||
expect(result.length).toEqual(4);
|
||||
await tx.rollback();
|
||||
} catch (e) {
|
||||
await tx.rollback();
|
||||
|
|
|
@ -24,36 +24,42 @@
|
|||
</vn-textfield>
|
||||
<vn-input-number
|
||||
type="number"
|
||||
step="0.01"
|
||||
label="Minimum M3"
|
||||
ng-model="supplierAgencyTerm.minimumM3"
|
||||
rule>
|
||||
</vn-input-number>
|
||||
<vn-input-number
|
||||
type="number"
|
||||
step="0.01"
|
||||
label="Package Price"
|
||||
ng-model="supplierAgencyTerm.packagePrice"
|
||||
rule>
|
||||
</vn-input-number>
|
||||
<vn-input-number
|
||||
type="number"
|
||||
step="0.01"
|
||||
label="Km Price"
|
||||
ng-model="supplierAgencyTerm.kmPrice"
|
||||
rule>
|
||||
</vn-input-number>
|
||||
<vn-input-number
|
||||
type="number"
|
||||
step="0.01"
|
||||
label="M3 Price"
|
||||
ng-model="supplierAgencyTerm.m3Price"
|
||||
rule>
|
||||
</vn-input-number>
|
||||
<vn-input-number
|
||||
type="number"
|
||||
step="0.01"
|
||||
label="Route Price"
|
||||
ng-model="supplierAgencyTerm.routePrice"
|
||||
rule>
|
||||
</vn-input-number>
|
||||
<vn-input-number
|
||||
type="number"
|
||||
step="0.01"
|
||||
label="Minimum Km"
|
||||
ng-model="supplierAgencyTerm.minimumKm"
|
||||
rule>
|
||||
|
|
|
@ -24,7 +24,7 @@ module.exports = Self => {
|
|||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
||||
let statesList = await models.State.find({where: filter.where}, myOptions);
|
||||
let statesList = await models.State.find(filter, myOptions);
|
||||
const isProduction = await models.Account.hasRole(userId, 'production', myOptions);
|
||||
const isSalesPerson = await models.Account.hasRole(userId, 'salesPerson', myOptions);
|
||||
const isAdministrative = await models.Account.hasRole(userId, 'administrative', myOptions);
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
class="message"
|
||||
label="Change state"
|
||||
value-field="code"
|
||||
fields="['id', 'name', 'alertLevel', 'code']"
|
||||
url="States/editableStates"
|
||||
on-change="$ctrl.changeState(value)">
|
||||
</vn-button-menu>
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
<div class="content">
|
||||
<h1 class="title centered uppercase">{{$t('title')}}</h1>
|
||||
<p class="centered">
|
||||
Recibo de <strong class="uppercase">{{client.socialName}}</strong>, la cantidad de
|
||||
<strong>{{receipt.amountPaid}} €</strong> en concepto de 'entrega a cuenta', quedando pendiente en
|
||||
la cuenta del cliente un saldo de <strong>{{receipt.amountUnpaid}} €</strong>.
|
||||
Recibo de <strong class="uppercase">{{client.socialName}}</strong>,
|
||||
la cantidad de <strong>{{receipt.amountPaid}} €</strong>
|
||||
en concepto de 'entrega a cuenta'.
|
||||
</p>
|
||||
<div class="signature">
|
||||
<img v-bind:src="getReportSrc('signature.png')" />
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
SELECT
|
||||
r.id,
|
||||
r.amountPaid,
|
||||
cr.amount AS amountUnpaid,
|
||||
r.payed,
|
||||
r.companyFk
|
||||
FROM receipt r
|
||||
|
|
Loading…
Reference in New Issue