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"
|
2023-03-15 07:40:53 +00:00
|
|
|
on-data-change="$ctrl.reCheck()"
|
2022-01-25 13:27:30 +00:00
|
|
|
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>
|
2023-03-15 07:40:53 +00:00
|
|
|
<smart-table
|
2022-02-21 14:11:39 +00:00
|
|
|
model="model"
|
2023-03-15 07:40:53 +00:00
|
|
|
options="$ctrl.smartTableOptions"
|
2022-02-21 14:11:39 +00:00
|
|
|
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>
|
2023-03-15 07:40:53 +00:00
|
|
|
<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">
|
2023-03-15 07:40:53 +00:00
|
|
|
<vn-button
|
2022-01-25 13:27:30 +00:00
|
|
|
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>
|
2023-03-15 07:40:53 +00:00
|
|
|
<vn-multi-check
|
2022-02-21 14:11:39 +00:00
|
|
|
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>
|
2023-05-23 07:02:05 +00:00
|
|
|
<th field="countryFk">
|
|
|
|
<span translate>Country</span>
|
|
|
|
</th>
|
2023-05-23 09:26:31 +00:00
|
|
|
<th field="payMethodFk"
|
|
|
|
vn-tooltip="Pay Method">
|
2023-05-23 07:02:05 +00:00
|
|
|
<span translate>P.Method</span>
|
|
|
|
</th>
|
2023-03-15 07:40:53 +00:00
|
|
|
<th
|
|
|
|
field="amount"
|
2022-02-21 14:11:39 +00:00
|
|
|
vn-tooltip="Balance due">
|
|
|
|
<span translate>Balance D.</span>
|
|
|
|
</th>
|
2023-03-15 07:40:53 +00:00
|
|
|
<th
|
|
|
|
field="workerFk"
|
2022-02-21 14:11:39 +00:00
|
|
|
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>
|
2023-03-15 07:40:53 +00:00
|
|
|
<th
|
2022-02-22 07:58:22 +00:00
|
|
|
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>
|
2023-03-15 07:40:53 +00:00
|
|
|
<th
|
2022-02-21 14:11:39 +00:00
|
|
|
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>
|
2023-03-15 07:40:53 +00:00
|
|
|
<vn-check
|
2022-02-21 14:11:39 +00:00
|
|
|
ng-model="defaulter.checked"
|
2023-03-15 07:40:53 +00:00
|
|
|
on-change="$ctrl.saveChecked(defaulter.clientFk)"
|
2022-02-21 14:11:39 +00:00
|
|
|
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>
|
2023-05-23 09:26:31 +00:00
|
|
|
<td>
|
|
|
|
{{::defaulter.countryFk}}
|
|
|
|
</td>
|
2023-05-23 09:32:26 +00:00
|
|
|
<td>
|
|
|
|
{{::defaulter.payMethodFk}}
|
|
|
|
</td>
|
2022-02-21 14:11:39 +00:00
|
|
|
<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>
|
|
|
|
|
2023-03-15 07:40:53 +00:00
|
|
|
<!-- Dialog of add notes button -->
|
2022-01-25 13:27:30 +00:00
|
|
|
<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"
|
2023-03-15 07:40:53 +00:00
|
|
|
label="Message"
|
2022-01-25 13:27:30 +00:00
|
|
|
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>
|