2022-01-25 13:27:30 +00:00
|
|
|
<vn-crud-model
|
|
|
|
vn-id="model"
|
|
|
|
url="Defaulters/filter"
|
|
|
|
filter="::$ctrl.filter"
|
|
|
|
limit="20"
|
|
|
|
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-02-21 14:11:39 +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"
|
|
|
|
field="created"
|
|
|
|
shrink-datetime>
|
|
|
|
<span translate>Last observation D.</span>
|
|
|
|
</th>
|
2022-02-21 14:11:39 +00:00
|
|
|
<th
|
|
|
|
vn-tooltip="Credit insurance"
|
|
|
|
field="creditInsurance" >
|
|
|
|
<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>
|
|
|
|
<td shrink-datetime>
|
|
|
|
<span class="chip {{::$ctrl.chipColor(defaulter.created)}}">
|
|
|
|
{{::defaulter.created | date: 'dd/MM/yyyy'}}
|
|
|
|
</span>
|
2022-02-21 14:11:39 +00:00
|
|
|
</td>
|
|
|
|
<td>{{::defaulter.creditInsurance | currency: 'EUR': 2}}</td>
|
|
|
|
<td>{{::defaulter.defaulterSinced | date: 'dd/MM/yyyy'}}</td>
|
|
|
|
</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>
|