salix/modules/client/front/risk/index/index.html

125 lines
4.9 KiB
HTML

<vn-crud-model
vn-id="model"
url="/client/api/receipts/filter"
params="$ctrl.params"
limit="20"
data="$ctrl.balances">
</vn-crud-model>
<vn-crud-model
vn-id="riskModel"
url="/client/api/ClientRisks"
filter="$ctrl.filter"
data="$ctrl.riskTotal">
</vn-crud-model>
<vn-vertical>
<vn-card pad-large>
<vn-horizontal>
<vn-one>
</vn-one>
<vn-one>
<vn-autocomplete vn-one
vn-id="company"
field="$ctrl.companyFk"
on-change="$ctrl.setOrder(value)"
url="/client/api/Companies"
show-field="code"
value-field="id"
label="Select company">
</vn-autocomplete>
</vn-one>
<vn-one>
<div class="totalBox" ng-if="$ctrl.riskTotal.length">
<h6 translate>Total by company</h6>
<vn-auto ng-repeat="riskByCompany in $ctrl.riskTotal">
<vn-label-value
label="{{riskByCompany.company.code}}"
value="{{riskByCompany.amount | currency: 'EUR':2}}">
</vn-label-value>
</vn-auto>
</div>
</vn-one>
</vn-horizontal>
<vn-vertical>
<vn-table model="model">
<vn-thead>
<vn-tr>
<vn-th default-order>Date</vn-th>
<vn-th>Creation date</vn-th>
<vn-th>Employee</vn-th>
<vn-th>Reference</vn-th>
<vn-th number>Bank</vn-th>
<vn-th number>Debit</vn-th>
<vn-th number>Havings</vn-th>
<vn-th number>Balance</vn-th>
<vn-th center>Conciliated</vn-th>
<vn-th></vn-th>
</vn-tr>
</vn-thead>
<vn-tbody>
<vn-tr ng-repeat="balance in $ctrl.balances">
<vn-td>{{::balance.payed | dateTime:'dd/MM/yyyy'}}</vn-td>
<vn-td>{{::balance.created | dateTime:'dd/MM/yyyy HH:mm'}}</vn-td>
<vn-td>
<span
class="link"
ng-click="$ctrl.showWorkerDescriptor($event, balance.userId)">
{{::balance.userNickname}}
</span>
</vn-td>
<vn-td>
<span
ng-class="{'link': balance.isInvoice}"
ng-click="$ctrl.showInvoiceOutDescriptor($event, balance)"
ng-show="balance.ref">{{balance.isInvoice ? 'BILL' : balance.ref | translate: {ref: balance.ref} }}
</span>
</vn-td>
<vn-td number>{{::balance.bankFk}}</vn-td>
<vn-td number>{{::balance.debit | currency: 'EUR':2}}</vn-td>
<vn-td number>{{::balance.credit | currency: 'EUR':2}}</vn-td>
<vn-td number>{{balance.balance | currency: 'EUR':2}}</vn-td>
<vn-td center>
<vn-check
field="balance.isConciliate"
disabled="true">
</vn-check>
</vn-td>
<vn-td center>
<a ng-show="balance.pdf"
target="_blank"
href="api/InvoiceOuts/{{::balance.id}}/download?access_token={{::$ctrl.accessToken}}">
<vn-icon-button
icon="cloud_download"
title="Download PDF">
</vn-icon-button>
</a>
</vn-td>
</vn-tr>
</vn-tbody>
</vn-table>
</vn-vertical>
<vn-pagination model="model"></vn-pagination>
</vn-card>
</vn-vertical>
<vn-float-button
vn-acl="administrative"
vn-acl-action="remove"
icon="add"
vn-tooltip="New payment"
vn-bind="+"
fixed-bottom-right
ng-click="$ctrl.openCreateDialog()">
</vn-float-button>
<vn-client-risk-create vn-id="riskCreateDialog">
</vn-client-risk-create>
<vn-worker-descriptor-popover
vn-id="workerDescriptor"
user-id="$ctrl.selectedWorker">
</vn-worker-descriptor-popover>
<vn-invoice-out-descriptor-popover
vn-id="invoiceOutDescriptor"
invoice-out-id="$ctrl.selectedInvoiceOut">
</vn-invoice-out-descriptor-popover>