derp
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
6586595976
commit
a5f3580b17
|
@ -0,0 +1,3 @@
|
||||||
|
alter table `vn`.`client`
|
||||||
|
add hasIncoterms tinyint(1) default 0 not null comment 'Received incoterms authorization from client';
|
||||||
|
|
|
@ -95,6 +95,10 @@ module.exports = Self => {
|
||||||
{
|
{
|
||||||
arg: 'despiteOfClient',
|
arg: 'despiteOfClient',
|
||||||
type: 'number'
|
type: 'number'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
arg: 'hasIncoterms',
|
||||||
|
type: 'boolean'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
returns: {
|
returns: {
|
||||||
|
|
|
@ -32,10 +32,10 @@
|
||||||
"model": "Sample",
|
"model": "Sample",
|
||||||
"foreignKey": "typeFk"
|
"foreignKey": "typeFk"
|
||||||
},
|
},
|
||||||
"worker": {
|
"user": {
|
||||||
"type": "belongsTo",
|
"type": "belongsTo",
|
||||||
"model": "Worker",
|
"model": "Account",
|
||||||
"foreignKey": "workerFk"
|
"foreignKey": "userFk"
|
||||||
},
|
},
|
||||||
"account": {
|
"account": {
|
||||||
"type": "belongsTo",
|
"type": "belongsTo",
|
||||||
|
|
|
@ -98,6 +98,9 @@
|
||||||
"hasCoreVnh": {
|
"hasCoreVnh": {
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
|
"hasIncoterms": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
"isTaxDataChecked":{
|
"isTaxDataChecked":{
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
|
|
|
@ -185,6 +185,14 @@
|
||||||
vn-acl="administrative">
|
vn-acl="administrative">
|
||||||
</vn-check>
|
</vn-check>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
|
<vn-horizontal>
|
||||||
|
<vn-check
|
||||||
|
vn-one
|
||||||
|
label="Incoterms authorization"
|
||||||
|
ng-model="$ctrl.client.hasIncoterms"
|
||||||
|
vn-acl="administrative">
|
||||||
|
</vn-check>
|
||||||
|
</vn-horizontal>
|
||||||
</vn-card>
|
</vn-card>
|
||||||
<vn-button-bar>
|
<vn-button-bar>
|
||||||
<vn-submit
|
<vn-submit
|
||||||
|
|
|
@ -9,4 +9,5 @@ Found a client with this phone or email: El cliente con id <a href="#!/client/{{
|
||||||
Sage tax type: Tipo de impuesto Sage
|
Sage tax type: Tipo de impuesto Sage
|
||||||
Sage transaction type: Tipo de transacción Sage
|
Sage transaction type: Tipo de transacción Sage
|
||||||
Previous client: Cliente anterior
|
Previous client: Cliente anterior
|
||||||
In case of a company succession, specify the grantor company: En el caso de que haya habido una sucesión de empresa, indicar la empresa cedente
|
In case of a company succession, specify the grantor company: En el caso de que haya habido una sucesión de empresa, indicar la empresa cedente
|
||||||
|
Incoterms authorization: Autorización incoterms
|
|
@ -30,9 +30,9 @@
|
||||||
</vn-td>
|
</vn-td>
|
||||||
<vn-td>
|
<vn-td>
|
||||||
<span
|
<span
|
||||||
ng-click="workerDescriptor.show($event, sample.worker.id)"
|
ng-click="workerDescriptor.show($event, sample.user.id)"
|
||||||
class="link">
|
ng-class="{'link': sample.user}">
|
||||||
{{::sample.worker.user.name}}
|
{{::sample.user.name || 'System' | translate}}
|
||||||
</span>
|
</span>
|
||||||
</vn-td>
|
</vn-td>
|
||||||
<vn-td>{{::sample.company.code}}</vn-td>
|
<vn-td>{{::sample.company.code}}</vn-td>
|
||||||
|
|
|
@ -12,15 +12,9 @@ class Controller extends Section {
|
||||||
fields: ['code', 'description']
|
fields: ['code', 'description']
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
relation: 'worker',
|
relation: 'user',
|
||||||
scope: {
|
scope: {
|
||||||
fields: ['userFk'],
|
fields: ['id', 'name']
|
||||||
include: {
|
|
||||||
relation: 'user',
|
|
||||||
scope: {
|
|
||||||
fields: ['name']
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
relation: 'company',
|
relation: 'company',
|
||||||
|
|
|
@ -15,6 +15,7 @@ module.exports = async function(request, response, next) {
|
||||||
SELECT
|
SELECT
|
||||||
t.id,
|
t.id,
|
||||||
t.clientFk,
|
t.clientFk,
|
||||||
|
t.companyFk,
|
||||||
c.name clientName,
|
c.name clientName,
|
||||||
c.email recipient,
|
c.email recipient,
|
||||||
c.salesPersonFk,
|
c.salesPersonFk,
|
||||||
|
|
|
@ -23,6 +23,7 @@ module.exports = async function(request, response, next) {
|
||||||
SELECT
|
SELECT
|
||||||
t.id,
|
t.id,
|
||||||
t.clientFk,
|
t.clientFk,
|
||||||
|
t.companyFk,
|
||||||
c.name clientName,
|
c.name clientName,
|
||||||
c.email recipient,
|
c.email recipient,
|
||||||
c.salesPersonFk,
|
c.salesPersonFk,
|
||||||
|
|
|
@ -17,6 +17,7 @@ module.exports = async function(request, response, next) {
|
||||||
SELECT
|
SELECT
|
||||||
t.id,
|
t.id,
|
||||||
t.clientFk,
|
t.clientFk,
|
||||||
|
t.companyFk,
|
||||||
c.name clientName,
|
c.name clientName,
|
||||||
c.email recipient,
|
c.email recipient,
|
||||||
c.salesPersonFk,
|
c.salesPersonFk,
|
||||||
|
|
|
@ -16,6 +16,7 @@ module.exports = async function(request, response, next) {
|
||||||
SELECT
|
SELECT
|
||||||
t.id,
|
t.id,
|
||||||
t.clientFk,
|
t.clientFk,
|
||||||
|
t.companyFk,
|
||||||
c.name clientName,
|
c.name clientName,
|
||||||
c.email recipient,
|
c.email recipient,
|
||||||
c.salesPersonFk,
|
c.salesPersonFk,
|
||||||
|
|
|
@ -94,8 +94,10 @@ module.exports = {
|
||||||
const {firstOrder} = await db.findOne(`
|
const {firstOrder} = await db.findOne(`
|
||||||
SELECT COUNT(*) as firstOrder
|
SELECT COUNT(*) as firstOrder
|
||||||
FROM ticket t
|
FROM ticket t
|
||||||
|
JOIN client c ON c.id = t.clientFk
|
||||||
WHERE t.clientFk = ?
|
WHERE t.clientFk = ?
|
||||||
AND NOT t.isDeleted
|
AND NOT t.isDeleted
|
||||||
|
AND c.isVies
|
||||||
`, [ticket.clientFk]);
|
`, [ticket.clientFk]);
|
||||||
|
|
||||||
if (firstOrder == 1) {
|
if (firstOrder == 1) {
|
||||||
|
@ -108,6 +110,15 @@ module.exports = {
|
||||||
|
|
||||||
const email = new Email('incoterms-authorization', args);
|
const email = new Email('incoterms-authorization', args);
|
||||||
await email.send();
|
await email.send();
|
||||||
|
|
||||||
|
const sample = await db.findOne(
|
||||||
|
`SELECT id
|
||||||
|
FROM sample
|
||||||
|
WHERE code = 'incoterms-authorization'`);
|
||||||
|
|
||||||
|
await db.rawSql(`
|
||||||
|
INSERT INTO clientSample (clientFk, typeFk, companyFk) VALUES(?, ?, ?)
|
||||||
|
`, [ticket.clientFk, sample.id, ticket.companyFk])
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// Domain not found
|
// Domain not found
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
subject: Orden de recogida
|
subject: Autorización incoterms
|
||||||
title: Orden de recogida
|
title: Autorización incoterms
|
||||||
description:
|
description:
|
||||||
dear: Estimado cliente
|
dear: Estimado cliente
|
||||||
instructions: Aqui tienes tu orden de recogida.
|
instructions: A continuación le adjuntamos la autorización incoterms que deberá entregar rellenada y firmada.
|
|
@ -68,22 +68,6 @@
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="signature">
|
|
||||||
<p>{{$t('issued', [
|
|
||||||
'Algemesí',
|
|
||||||
invoice.issued.getDate(),
|
|
||||||
$t('months')[invoice.issued.getMonth()],
|
|
||||||
invoice.issued.getFullYear()])
|
|
||||||
}}
|
|
||||||
</p>
|
|
||||||
<p><em>({{$t('signature')}})</em></p>
|
|
||||||
<img v-bind:src="getReportSrc('signature.png')">
|
|
||||||
<p>
|
|
||||||
<div>{{$t('signer.name')}}: JUAN VICENTE FERRER ROIG</div>
|
|
||||||
<div>{{$t('signer.ID')}}: 73943586N</div>
|
|
||||||
<div>{{$t('signer.position')}}: ADMINISTRADOR</div>
|
|
||||||
</p>
|
|
||||||
</div> -->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Footer block -->
|
<!-- Footer block -->
|
||||||
|
|
|
@ -3,7 +3,7 @@ const reportHeader = new Component('report-header');
|
||||||
const reportFooter = new Component('report-footer');
|
const reportFooter = new Component('report-footer');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'cmr-authorization',
|
name: 'incoterms-authorization',
|
||||||
async serverPrefetch() {
|
async serverPrefetch() {
|
||||||
this.ticket = await this.findOneFromDef('ticket', [this.ticketId]);
|
this.ticket = await this.findOneFromDef('ticket', [this.ticketId]);
|
||||||
if (!this.ticket)
|
if (!this.ticket)
|
||||||
|
|
Loading…
Reference in New Issue