2022-01-25 13:27:30 +00:00
|
|
|
<vn-crud-model
|
|
|
|
vn-id="model"
|
|
|
|
url="Defaulters/filter"
|
|
|
|
filter="::$ctrl.filter"
|
|
|
|
limit="20"
|
2022-05-12 12:18:16 +00:00
|
|
|
order="amount DESC"
|
2022-01-25 13:27:30 +00:00
|
|
|
data="defaulters"
|
|
|
|
auto-load="true">
|
|
|
|
</vn-crud-model>
|
|
|
|
<vn-portal slot="topbar">
|
|
|
|
<vn-searchbar
|
|
|
|
vn-focus
|
|
|
|
placeholder="Search client"
|
|
|
|
info="Search client by id or name"
|
|
|
|
auto-state="false"
|
|
|
|
model="model">
|
|
|
|
</vn-searchbar>
|
|
|
|
</vn-portal>
|
2022-02-21 14:11:39 +00:00
|
|
|
<vn-card>
|
|
|
|
<smart-table
|
|
|
|
model="model"
|
|
|
|
options="$ctrl.smartTableOptions"
|
|
|
|
expr-builder="$ctrl.exprBuilder(param, value)">
|
|
|
|
<slot-actions>
|
|
|
|
<div>
|
2022-01-31 07:17:15 +00:00
|
|
|
<div class="totalBox" style="text-align: center;">
|
|
|
|
<h6 translate>Total</h6>
|
|
|
|
<vn-label-value
|
|
|
|
label="Balance due"
|
2022-06-13 05:44:21 +00:00
|
|
|
value="{{$ctrl.balanceDueTotal | currency: 'EUR': 2}}">
|
2022-01-31 07:17:15 +00:00
|
|
|
</vn-label-value>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="vn-pa-md">
|
2022-01-25 13:27:30 +00:00
|
|
|
<vn-button
|
|
|
|
ng-show="$ctrl.checked.length > 0"
|
|
|
|
ng-click="notesDialog.show()"
|
|
|
|
name="notesDialog"
|
|
|
|
vn-tooltip="Add observation"
|
|
|
|
icon="icon-notes">
|
|
|
|
</vn-button>
|
2022-01-31 07:17:15 +00:00
|
|
|
</div>
|
2022-02-21 14:11:39 +00:00
|
|
|
</slot-actions>
|
|
|
|
<slot-table>
|
|
|
|
<table>
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th shrink>
|
|
|
|
<vn-multi-check
|
|
|
|
model="model">
|
|
|
|
</vn-multi-check>
|
|
|
|
</th>
|
2022-04-08 06:52:21 +00:00
|
|
|
<th field="clientFk">
|
2022-02-21 14:11:39 +00:00
|
|
|
<span translate>Client</span>
|
|
|
|
</th>
|
|
|
|
<th field="salesPersonFk">
|
|
|
|
<span translate>Comercial</span>
|
|
|
|
</th>
|
|
|
|
<th
|
|
|
|
field="amount"
|
|
|
|
vn-tooltip="Balance due">
|
|
|
|
<span translate>Balance D.</span>
|
|
|
|
</th>
|
|
|
|
<th
|
|
|
|
field="workerFk"
|
|
|
|
vn-tooltip="Worker who made the last observation">
|
|
|
|
<span translate>Author</span>
|
|
|
|
</th>
|
2022-02-22 07:58:22 +00:00
|
|
|
<th field="observation" expand>
|
2022-02-21 14:11:39 +00:00
|
|
|
<span translate>Last observation</span>
|
|
|
|
</th>
|
2022-02-22 07:58:22 +00:00
|
|
|
<th
|
|
|
|
vn-tooltip="Last observation date"
|
2022-05-12 12:18:16 +00:00
|
|
|
field="created">
|
|
|
|
<span translate>L. O. Date</span>
|
2022-02-22 07:58:22 +00:00
|
|
|
</th>
|
2022-02-21 14:11:39 +00:00
|
|
|
<th
|
|
|
|
vn-tooltip="Credit insurance"
|
2022-05-12 12:18:16 +00:00
|
|
|
field="creditInsurance"
|
|
|
|
shrink>
|
2022-02-21 14:11:39 +00:00
|
|
|
<span translate>Credit I.</span>
|
|
|
|
</th>
|
|
|
|
<th field="defaulterSinced">
|
|
|
|
<span translate>From</span>
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<tr ng-repeat="defaulter in defaulters">
|
|
|
|
<td shrink>
|
|
|
|
<vn-check
|
|
|
|
ng-model="defaulter.checked"
|
|
|
|
vn-click-stop>
|
|
|
|
</vn-check>
|
|
|
|
</td>
|
|
|
|
<td title="{{::defaulter.clientName}}">
|
|
|
|
<span
|
|
|
|
vn-click-stop="clientDescriptor.show($event, defaulter.clientFk)"
|
|
|
|
title ="{{::defaulter.clientName}}"
|
|
|
|
class="link">
|
|
|
|
{{::defaulter.clientName}}
|
|
|
|
</span>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<span
|
|
|
|
title="{{::defaulter.salesPersonName}}"
|
|
|
|
vn-click-stop="workerDescriptor.show($event, defaulter.salesPersonFk)"
|
|
|
|
class="link">
|
|
|
|
{{::defaulter.salesPersonName | dashIfEmpty}}
|
|
|
|
</span>
|
|
|
|
</td>
|
|
|
|
<td>{{::defaulter.amount | currency: 'EUR': 2}}</td>
|
|
|
|
<td>
|
|
|
|
<span
|
|
|
|
title="{{::defaulter.workerName}}"
|
|
|
|
vn-click-stop="workerDescriptor.show($event, defaulter.workerFk)"
|
|
|
|
class="link">
|
|
|
|
{{::defaulter.workerName | dashIfEmpty}}
|
|
|
|
</span>
|
|
|
|
</td>
|
2022-02-22 07:58:22 +00:00
|
|
|
<td expand>
|
|
|
|
<vn-textarea
|
|
|
|
vn-three
|
2022-02-21 14:11:39 +00:00
|
|
|
disabled="true"
|
|
|
|
ng-model="defaulter.observation">
|
2022-02-22 07:58:22 +00:00
|
|
|
</vn-textarea>
|
|
|
|
</td>
|
2022-05-12 12:18:16 +00:00
|
|
|
<td shrink-date>
|
2022-02-22 07:58:22 +00:00
|
|
|
<span class="chip {{::$ctrl.chipColor(defaulter.created)}}">
|
|
|
|
{{::defaulter.created | date: 'dd/MM/yyyy'}}
|
|
|
|
</span>
|
2022-02-21 14:11:39 +00:00
|
|
|
</td>
|
2022-05-12 12:18:16 +00:00
|
|
|
<td shrink>{{::defaulter.creditInsurance | currency: 'EUR': 2}}</td>
|
|
|
|
<td shrink-date>{{::defaulter.defaulterSinced | date: 'dd/MM/yyyy'}}</td>
|
2022-02-21 14:11:39 +00:00
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</slot-table>
|
|
|
|
</smart-table>
|
|
|
|
</vn-card>
|
2022-01-25 13:27:30 +00:00
|
|
|
<vn-client-descriptor-popover
|
2022-02-21 14:11:39 +00:00
|
|
|
vn-id="client-descriptor">
|
2022-01-25 13:27:30 +00:00
|
|
|
</vn-client-descriptor-popover>
|
|
|
|
<vn-worker-descriptor-popover
|
2022-02-21 14:11:39 +00:00
|
|
|
vn-id="worker-descriptor">
|
2022-01-25 13:27:30 +00:00
|
|
|
</vn-worker-descriptor-popover>
|
|
|
|
<vn-popup vn-id="dialog-summary-client">
|
|
|
|
<vn-client-summary
|
|
|
|
client="$ctrl.clientSelected">
|
|
|
|
</vn-client-summary>
|
|
|
|
</vn-popup>
|
|
|
|
|
|
|
|
<!-- Dialog of add notes button -->
|
|
|
|
<vn-dialog
|
|
|
|
vn-id="notesDialog"
|
|
|
|
on-accept="$ctrl.onResponse()">
|
|
|
|
<tpl-body>
|
|
|
|
<section class="SMSDialog">
|
|
|
|
<h5 class="vn-py-sm">{{$ctrl.$t('Add observation to all selected clients', {total: $ctrl.checked.length})}}</h5>
|
|
|
|
<vn-horizontal>
|
|
|
|
<vn-textarea vn-one
|
|
|
|
vn-id="message"
|
|
|
|
label="Message"
|
|
|
|
ng-model="$ctrl.defaulter.observation"
|
|
|
|
rows="3"
|
|
|
|
required="true"
|
|
|
|
rule>
|
|
|
|
</vn-textarea>
|
|
|
|
</vn-horizontal>
|
|
|
|
</section>
|
|
|
|
</tpl-body>
|
|
|
|
<tpl-buttons>
|
|
|
|
<input type="button" response="cancel" translate-attr="{value: 'Cancel'}"/>
|
|
|
|
<button response="accept" translate>Save</button>
|
|
|
|
</tpl-buttons>
|
|
|
|
</vn-dialog>
|