refs #5172 added default icon
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Alexandre Riera 2023-02-13 13:04:22 +01:00
parent ebee9144b4
commit 4c7aae95aa
4 changed files with 21 additions and 8 deletions

View File

@ -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;
};

View File

@ -18,26 +18,26 @@
<slot-body>
<div class="attributes">
<vn-label-value
label="Pay method"
label="Pay method"
value="{{$ctrl.client.payMethod.name}}">
</vn-label-value>
<vn-label-value
label="Credit"
label="Credit"
value="{{$ctrl.client.credit | currency: 'EUR': 2}}">
</vn-label-value>
<vn-label-value
label="Secured credit"
label="Secured credit"
value="{{$ctrl.client.creditInsurance | currency: 'EUR': 2}}">
</vn-label-value>
<vn-label-value
label="Risk"
label="Risk"
value="{{$ctrl.client.debt | currency: 'EUR':2}}"
ng-class="{alert: $ctrl.client.debt > $ctrl.client.credit}"
info="Invoices minus payments plus orders not yet invoiced">
info="Invoices minus payments plus orders not yet invoiced">
</vn-label-value>
<vn-label-value
label="Sales person">
<span
<span
ng-click="workerDescriptor.show($event, $ctrl.client.salesPersonFk)"
class="link">
{{$ctrl.client.salesPersonUser.name}}
@ -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">
@ -118,7 +123,7 @@
on-send="$ctrl.onSmsSend($sms)"
sms="$ctrl.newSMS">
</vn-sms-dialog>
<vn-worker-descriptor-popover
<vn-worker-descriptor-popover
vn-id="workerDescriptor">
</vn-worker-descriptor-popover>
<vn-popup vn-id="summary">

View File

@ -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', {

View File

@ -5,4 +5,6 @@ To date: Fecha hasta
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
Pay method: Forma de pago
Unpaid Dated: "Fecha: {{dated | date:'dd/MM/yyyy'}}"
Unpaid Amount: "Importe: {{amount | currency: 'EUR':2}}"