refs #5120 refactor: no utilizar receipt directamente
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Vicent Llopis 2023-03-15 10:22:34 +01:00
parent 29df1ba894
commit da5886243e
2 changed files with 9 additions and 5 deletions

View File

@ -7,18 +7,18 @@
<h3 style="text-align: center; margin-top: 8%">{{$t('Compensation') | uppercase}}</h3> <h3 style="text-align: center; margin-top: 8%">{{$t('Compensation') | uppercase}}</h3>
<p style="margin-top: 8%">{{$t('In one hand')}}:</p> <p style="margin-top: 8%">{{$t('In one hand')}}:</p>
<p style="text-align: justify"> <p style="text-align: justify">
{{receipt.supplier().name}} {{$t('CIF')}} {{receipt.supplier().nif}} {{$t('Home')}} {{receipt.supplier().street}}, {{company.name}} {{$t('CIF')}} {{company.nif}} {{$t('Home')}} {{company.street}},
{{receipt.supplier().city}}. {{company.city}}.
</p> </p>
<p style="margin-top: 5%">{{$t('In other hand')}}:</p> <p style="margin-top: 5%">{{$t('In other hand')}}:</p>
<p style="text-align: justify"> <p style="text-align: justify">
{{$t('Sr')}} {{receipt.client().name}} {{$t('NIF')}} {{receipt.client().fi}} {{$t('Home')}} {{receipt.client().street}}, {{$t('Sr')}} {{client.name}} {{$t('NIF')}} {{client.fi}} {{$t('Home')}} {{client.street}},
{{receipt.client().city}}. {{client.city}}.
</p> </p>
<h4 style="text-align: center; margin-top: 10%">{{$t('Agree') | uppercase}}</h4> <h4 style="text-align: center; margin-top: 10%">{{$t('Agree') | uppercase}}</h4>
<p style="margin-top: 8%; text-align: justify"> <p style="margin-top: 8%; text-align: justify">
{{$t('Date')}} {{formatDate(receipt.payed, '%d-%m-%Y')}} {{$t('Compensate')}} {{receipt.amountPaid}} € {{$t('Date')}} {{formatDate(receipt.payed, '%d-%m-%Y')}} {{$t('Compensate')}} {{receipt.amountPaid}} €
{{$t('From client')}} {{receipt.client().name}} {{$t('Against the balance of')}}: {{receipt.description}}. {{$t('From client')}} {{client.name}} {{$t('Against the balance of')}}: {{receipt.description}}.
</p> </p>
<p style="margin-top: 8%"> <p style="margin-top: 8%">
{{$t('Reception')}} <span style="color: blue">administracion@verdnatura.es</span> {{$t('Reception')}} <span style="color: blue">administracion@verdnatura.es</span>

View File

@ -22,6 +22,10 @@ module.exports = {
], ],
where: {id: this.id} where: {id: this.id}
}); });
console.log(this.receipt);
this.client = this.receipt.client();
this.company = this.receipt.supplier();
this.checkMainEntity(this.receipt); this.checkMainEntity(this.receipt);
}, },
props: { props: {