fix error

This commit is contained in:
Bernat Exposito Domenech 2020-05-18 14:58:06 +02:00
parent 37d5cf5975
commit 369d8d59d8
2 changed files with 5 additions and 4 deletions

View File

@ -38,9 +38,9 @@
</span>
</vn-label-value>
<vn-label-value label="Invoice">
<span
ng-click="$ctrl.showInvoiceOutDescriptor($event)"
class="link">
<span
ng-class="{link: $ctrl.summary.refFk}"
ng-click="$ctrl.showInvoiceOutDescriptor($event, $ctrl.summary.refFk)">
{{$ctrl.summary.refFk | dashIfEmpty}}
</span>
</vn-label-value>

View File

@ -44,7 +44,8 @@ class Controller extends Section {
this.$.routeDescriptor.show();
}
showInvoiceOutDescriptor(event) {
showInvoiceOutDescriptor(event, refFk) {
if (!refFk) return;
this.$.invoiceOutDescriptor.invoiceOutId = this.summary.invoiceOut.id;
this.$.invoiceOutDescriptor.parent = event.target;
this.$.invoiceOutDescriptor.show();