feat(invoiceIn): add email
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
7cb8175b73
commit
e8500f926c
|
@ -35,19 +35,16 @@ module.exports = Self => {
|
|||
}
|
||||
});
|
||||
|
||||
Self.invoiceInEmail = async(ctx, id) => {
|
||||
Self.invoiceInEmail = async ctx => {
|
||||
const args = Object.assign({}, ctx.args);
|
||||
const params = {
|
||||
recipient: 'alexm@verdnatura.es', // args.recipient,
|
||||
recipient: args.recipient,
|
||||
lang: ctx.req.getLocale()
|
||||
};
|
||||
|
||||
console.log(id);
|
||||
|
||||
delete args.ctx;
|
||||
for (const param in args)
|
||||
params[param] = args[param];
|
||||
console.log(params);
|
||||
|
||||
const email = new Email('invoiceIn', params);
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@ class Controller extends Descriptor {
|
|||
|
||||
set invoiceIn(value) {
|
||||
this.entity = value;
|
||||
console.log(value);
|
||||
}
|
||||
|
||||
get entryFilter() {
|
||||
|
|
|
@ -4,14 +4,6 @@ const emailFooter = new Component('email-footer');
|
|||
|
||||
module.exports = {
|
||||
name: 'invoiceIn',
|
||||
async serverPrefetch() {
|
||||
this.invoice = await this.fetchInvoice(this.id);
|
||||
},
|
||||
methods: {
|
||||
fetchInvoice(reference) {
|
||||
return this.findOneFromDef('invoice', [reference]);
|
||||
},
|
||||
},
|
||||
components: {
|
||||
'email-header': emailHeader.build(),
|
||||
'email-footer': emailFooter.build()
|
||||
|
|
|
@ -202,7 +202,7 @@
|
|||
<!-- Footer block -->
|
||||
<report-footer id="pageFooter"
|
||||
v-bind:company-code="invoice.companyCode"
|
||||
v-bind:left-text="$t('invoice', [invoice.id])"
|
||||
v-bind:left-text="$t('invoiceId')"
|
||||
v-bind:center-text="invoice.name"
|
||||
v-bind="$props">
|
||||
</report-footer>
|
||||
|
|
|
@ -6,8 +6,7 @@ SELECT
|
|||
s.street AS postalAddress,
|
||||
s.nif,
|
||||
s.phone,
|
||||
p.name payMethod,
|
||||
c.companyCode
|
||||
p.name payMethod
|
||||
FROM invoiceIn i
|
||||
JOIN supplier s ON s.id = i.supplierFk
|
||||
JOIN company c ON c.id = i.companyFk
|
||||
|
|
Loading…
Reference in New Issue