This commit is contained in:
parent
ebee9144b4
commit
4c7aae95aa
|
@ -80,6 +80,7 @@ module.exports = function(Self) {
|
|||
const data = await Self.rawSql(query, [id, date], myOptions);
|
||||
|
||||
client.debt = data[0].debt;
|
||||
client.unpaid = await Self.app.models.ClientUnpaid.findOne({id}, myOptions);
|
||||
|
||||
return client;
|
||||
};
|
||||
|
|
|
@ -70,6 +70,11 @@
|
|||
icon="icon-no036"
|
||||
ng-if="$ctrl.client.isTaxDataChecked == false">
|
||||
</vn-icon>
|
||||
<vn-icon
|
||||
vn-tooltip="{{$ctrl.clientUnpaid()}}"
|
||||
icon="contact_support"
|
||||
ng-if="$ctrl.client.unpaid != null">
|
||||
</vn-icon>
|
||||
</div>
|
||||
<div class="quicklinks">
|
||||
<div ng-transclude="btnOne">
|
||||
|
|
|
@ -44,6 +44,11 @@ class Controller extends Descriptor {
|
|||
return this.$http.post(`Clients/${this.id}/sendSms`, sms)
|
||||
.then(() => this.vnApp.showSuccess(this.$t('SMS sent')));
|
||||
}
|
||||
|
||||
clientUnpaid() {
|
||||
return this.$t(`Unpaid Dated`, {dated: this.client.unpaid.dated}) +
|
||||
'<br/>' + this.$t(`Unpaid Amount`, {amount: this.client.unpaid.amount});
|
||||
}
|
||||
}
|
||||
|
||||
ngModule.vnComponent('vnClientDescriptor', {
|
||||
|
|
|
@ -6,3 +6,5 @@ Go to user: Ir al usuario
|
|||
Go to supplier: Ir al proveedor
|
||||
Client invoices list: Listado de facturas del cliente
|
||||
Pay method: Forma de pago
|
||||
Unpaid Dated: "Fecha: {{dated | date:'dd/MM/yyyy'}}"
|
||||
Unpaid Amount: "Importe: {{amount | currency: 'EUR':2}}"
|
||||
|
|
Loading…
Reference in New Issue