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',
|
||||
type: 'number'
|
||||
},
|
||||
{
|
||||
arg: 'hasIncoterms',
|
||||
type: 'boolean'
|
||||
}
|
||||
],
|
||||
returns: {
|
||||
|
|
|
@ -32,10 +32,10 @@
|
|||
"model": "Sample",
|
||||
"foreignKey": "typeFk"
|
||||
},
|
||||
"worker": {
|
||||
"user": {
|
||||
"type": "belongsTo",
|
||||
"model": "Worker",
|
||||
"foreignKey": "workerFk"
|
||||
"model": "Account",
|
||||
"foreignKey": "userFk"
|
||||
},
|
||||
"account": {
|
||||
"type": "belongsTo",
|
||||
|
|
|
@ -98,6 +98,9 @@
|
|||
"hasCoreVnh": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"hasIncoterms": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"isTaxDataChecked":{
|
||||
"type": "boolean"
|
||||
},
|
||||
|
|
|
@ -185,6 +185,14 @@
|
|||
vn-acl="administrative">
|
||||
</vn-check>
|
||||
</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-button-bar>
|
||||
<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 transaction type: Tipo de transacción Sage
|
||||
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>
|
||||
<span
|
||||
ng-click="workerDescriptor.show($event, sample.worker.id)"
|
||||
class="link">
|
||||
{{::sample.worker.user.name}}
|
||||
ng-click="workerDescriptor.show($event, sample.user.id)"
|
||||
ng-class="{'link': sample.user}">
|
||||
{{::sample.user.name || 'System' | translate}}
|
||||
</span>
|
||||
</vn-td>
|
||||
<vn-td>{{::sample.company.code}}</vn-td>
|
||||
|
|
|
@ -12,15 +12,9 @@ class Controller extends Section {
|
|||
fields: ['code', 'description']
|
||||
}
|
||||
}, {
|
||||
relation: 'worker',
|
||||
relation: 'user',
|
||||
scope: {
|
||||
fields: ['userFk'],
|
||||
include: {
|
||||
relation: 'user',
|
||||
scope: {
|
||||
fields: ['name']
|
||||
}
|
||||
}
|
||||
fields: ['id', 'name']
|
||||
}
|
||||
}, {
|
||||
relation: 'company',
|
||||
|
|
|
@ -15,6 +15,7 @@ module.exports = async function(request, response, next) {
|
|||
SELECT
|
||||
t.id,
|
||||
t.clientFk,
|
||||
t.companyFk,
|
||||
c.name clientName,
|
||||
c.email recipient,
|
||||
c.salesPersonFk,
|
||||
|
|
|
@ -23,6 +23,7 @@ module.exports = async function(request, response, next) {
|
|||
SELECT
|
||||
t.id,
|
||||
t.clientFk,
|
||||
t.companyFk,
|
||||
c.name clientName,
|
||||
c.email recipient,
|
||||
c.salesPersonFk,
|
||||
|
|
|
@ -17,6 +17,7 @@ module.exports = async function(request, response, next) {
|
|||
SELECT
|
||||
t.id,
|
||||
t.clientFk,
|
||||
t.companyFk,
|
||||
c.name clientName,
|
||||
c.email recipient,
|
||||
c.salesPersonFk,
|
||||
|
|
|
@ -16,6 +16,7 @@ module.exports = async function(request, response, next) {
|
|||
SELECT
|
||||
t.id,
|
||||
t.clientFk,
|
||||
t.companyFk,
|
||||
c.name clientName,
|
||||
c.email recipient,
|
||||
c.salesPersonFk,
|
||||
|
|
|
@ -94,8 +94,10 @@ module.exports = {
|
|||
const {firstOrder} = await db.findOne(`
|
||||
SELECT COUNT(*) as firstOrder
|
||||
FROM ticket t
|
||||
JOIN client c ON c.id = t.clientFk
|
||||
WHERE t.clientFk = ?
|
||||
AND NOT t.isDeleted
|
||||
AND c.isVies
|
||||
`, [ticket.clientFk]);
|
||||
|
||||
if (firstOrder == 1) {
|
||||
|
@ -108,6 +110,15 @@ module.exports = {
|
|||
|
||||
const email = new Email('incoterms-authorization', args);
|
||||
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) {
|
||||
// Domain not found
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
subject: Orden de recogida
|
||||
title: Orden de recogida
|
||||
subject: Autorización incoterms
|
||||
title: Autorización incoterms
|
||||
description:
|
||||
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>
|
||||
</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>
|
||||
<!-- Footer block -->
|
||||
|
|
|
@ -3,7 +3,7 @@ const reportHeader = new Component('report-header');
|
|||
const reportFooter = new Component('report-footer');
|
||||
|
||||
module.exports = {
|
||||
name: 'cmr-authorization',
|
||||
name: 'incoterms-authorization',
|
||||
async serverPrefetch() {
|
||||
this.ticket = await this.findOneFromDef('ticket', [this.ticketId]);
|
||||
if (!this.ticket)
|
||||
|
|
Loading…
Reference in New Issue