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> </span>
</vn-td> </vn-td>
<vn-td expand> <vn-td expand>
<div ng-show="::balance.ref">
<span <span
ng-if="balance.isInvoice" title="{{balance.isInvoice ? 'BILL' : balance.ref | translate: {ref: balance.ref} }}"
title="{{'BILL' | translate: {ref: balance.ref} }}" ng-class="{'link': balance.isInvoice}"
vn-click-stop="invoiceOutDescriptor.show($event, balance)" ng-click="$ctrl.showInvoiceOutDescriptor($event, balance)"
ng-class="link"> ng-show="balance.ref">
{{'BILL' | translate: {ref: balance.ref} }} {{balance.isInvoice ? 'BILL' : balance.ref | translate: {ref: balance.ref} }}
</span> </span>
<span
ng-if="!balance.isInvoice"
title="{{::balance.ref}}">
{{::balance.ref}}
</span>
</div>
</vn-td> </vn-td>
<vn-td number>{{::balance.bankFk}}</vn-td> <vn-td number>{{::balance.bankFk}}</vn-td>
<vn-td number expand>{{::balance.debit | currency: 'EUR':2}}</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']; Controller.$inject = ['$element', '$scope'];

View File

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