fix show.descriptor
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Bernat Exposito Domenech 2020-06-08 07:52:23 +02:00
parent 6db9f71867
commit 56c9b08101
3 changed files with 15 additions and 15 deletions

View File

@ -72,20 +72,13 @@
</span>
</vn-td>
<vn-td expand>
<div ng-show="::balance.ref">
<span
ng-if="balance.isInvoice"
title="{{'BILL' | translate: {ref: balance.ref} }}"
vn-click-stop="invoiceOutDescriptor.show($event, balance)"
ng-class="link">
{{'BILL' | translate: {ref: balance.ref} }}
title="{{balance.isInvoice ? 'BILL' : balance.ref | translate: {ref: balance.ref} }}"
ng-class="{'link': balance.isInvoice}"
ng-click="$ctrl.showInvoiceOutDescriptor($event, balance)"
ng-show="balance.ref">
{{balance.isInvoice ? 'BILL' : balance.ref | translate: {ref: balance.ref} }}
</span>
<span
ng-if="!balance.isInvoice"
title="{{::balance.ref}}">
{{::balance.ref}}
</span>
</div>
</vn-td>
<vn-td number>{{::balance.bankFk}}</vn-td>
<vn-td number expand>{{::balance.debit | currency: 'EUR':2}}</vn-td>

View File

@ -72,6 +72,13 @@ class Controller extends Section {
}
});
}
showInvoiceOutDescriptor(event, balance) {
if (!balance.isInvoice) return;
if (event.defaultPrevented) return;
this.$.invoiceOutDescriptor.show(event.target, balance.id);
}
}
Controller.$inject = ['$element', '$scope'];

View File

@ -29,7 +29,7 @@
</vn-td>
<vn-td number>
<span
ng-click="$ctrl.showDescriptor($event, sale)"
ng-click="descriptor.show($event, sale.id)"
class="link">
{{::sale.itemFk | zeroFill:6}}
</span>