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

132 lines
5.1 KiB
HTML

<vn-crud-model
vn-id="model"
url="receipts/filter"
limit="20"
data="$ctrl.balances">
</vn-crud-model>
<vn-crud-model
vn-id="riskModel"
url="ClientRisks"
filter="$ctrl.filter"
data="$ctrl.clientRisks">
</vn-crud-model>
<div class="vn-w-lg">
<vn-card class="vn-pa-md vn-mb-md">
<vn-horizontal
style="align-items: center;">
<vn-one></vn-one>
<vn-one>
<vn-autocomplete
vn-id="company"
class="dense"
ng-model="$ctrl.companyId"
url="Companies"
show-field="code"
value-field="id"
label="Company">
</vn-autocomplete>
</vn-one>
<vn-one>
<div class="totalBox" ng-if="$ctrl.clientRisks.length">
<h6 translate>Total by company</h6>
<vn-auto ng-repeat="riskByCompany in $ctrl.clientRisks">
<vn-label-value
label="{{riskByCompany.company.code}}"
value="{{riskByCompany.amount | currency: 'EUR':2}}">
</vn-label-value>
</vn-auto>
</div>
</vn-one>
</vn-horizontal>
</vn-card>
<vn-data-viewer model="model">
<vn-card>
<vn-table model="model">
<vn-thead>
<vn-tr>
<vn-th>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>
<span title="{{::balance.payed | date:'dd/MM/yyyy'}}">
{{::balance.payed | date:'dd/MM/yyyy'}}
</span>
</vn-td>
<vn-td>
<span title="{{::balance.created | date:'dd/MM/yyyy HH:mm'}}">
{{::balance.created | date:'dd/MM/yyyy HH:mm'}}
</span>
</vn-td>
<vn-td>
<span
class="link"
ng-click="$ctrl.showWorkerDescriptor($event, balance.workerFk)">
{{::balance.userNickname}}
</span>
</vn-td>
<vn-td expand>
<span
title="{{balance.isInvoice ? 'BILL' : balance.ref | translate: {ref: balance.ref} }}"
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 expand>{{::balance.debit | currency: 'EUR':2}}</vn-td>
<vn-td number expand>{{::balance.credit | currency: 'EUR':2}}</vn-td>
<vn-td number expand>{{balance.balance | currency: 'EUR':2}}</vn-td>
<vn-td center shrink>
<vn-check
ng-model="balance.isConciliate"
disabled="true">
</vn-check>
</vn-td>
<vn-td center shrink>
<a ng-show="balance.hasPdf"
target="_blank"
href="InvoiceOuts/{{::balance.id}}/download?access_token={{::$ctrl.accessToken}}">
<vn-icon-button
icon="cloud_download"
title="{{'Download PDF' | translate}}">
</vn-icon-button>
</a>
</vn-td>
</vn-tr>
</vn-tbody>
</vn-table>
</vn-card>
</vn-data-viewer>
</div>
<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-balance-create
vn-id="balanceCreateDialog">
</vn-client-balance-create>
<vn-worker-descriptor-popover
vn-id="workerDescriptor"
worker-fk="$ctrl.selectedWorker">
</vn-worker-descriptor-popover>
<vn-invoice-out-descriptor-popover
vn-id="invoiceOutDescriptor"
invoice-out-id="$ctrl.selectedInvoiceOut">
</vn-invoice-out-descriptor-popover>