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

163 lines
6.5 KiB
HTML
Raw Normal View History

2022-11-02 12:59:13 +00:00
<vn-crud-model
vn-id="model"
url="Receipts/filter"
limit="20"
data="$ctrl.balances">
2018-10-19 06:40:32 +00:00
</vn-crud-model>
2022-11-02 12:59:13 +00:00
<vn-crud-model
vn-id="riskModel"
url="ClientRisks"
filter="$ctrl.filter"
data="$ctrl.clientRisks">
2018-10-19 06:40:32 +00:00
</vn-crud-model>
2022-11-02 12:59:13 +00:00
<vn-crud-model
auto-load="true"
url="Companies"
data="companies"
order="code">
2020-09-17 18:12:52 +00:00
</vn-crud-model>
2020-03-30 15:30:03 +00:00
<vn-side-menu side="right">
<div class="vn-pa-md">
2022-11-02 12:59:13 +00:00
<vn-autocomplete
vn-one
vn-id="company"
ng-model="$ctrl.companyId"
data="companies"
show-field="code"
value-field="id"
label="Company">
2020-03-30 15:30:03 +00:00
</vn-autocomplete>
2022-11-02 12:59:13 +00:00
<div
class="totalBox"
style="text-align: center;"
ng-if="$ctrl.clientRisks.length">
2020-03-30 15:30:03 +00:00
<h6 translate>Total by company</h6>
2022-11-02 12:59:13 +00:00
<vn-label-value
ng-repeat="riskByCompany in $ctrl.clientRisks"
label="{{riskByCompany.company.code}}"
2020-03-30 15:30:03 +00:00
value="{{riskByCompany.amount | currency: 'EUR':2}}">
</vn-label-value>
</div>
</div>
</vn-side-menu>
2019-10-02 17:24:42 +00:00
<div class="vn-w-lg">
<vn-data-viewer model="model">
<vn-card>
2022-11-02 12:59:13 +00:00
<vn-table model="model">
<vn-thead>
<vn-tr>
<vn-th expand>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 expand>
<span title="{{::balance.payed | date:'dd/MM/yyyy'}}">
{{::balance.payed | date:'dd/MM/yyyy'}}
</span>
</vn-td>
<vn-td shrink-datetime>
<span title="{{::balance.created | date:'dd/MM/yyyy HH:mm'}}">
{{::balance.created | date:'dd/MM/yyyy HH:mm'}}
</span>
</vn-td>
<vn-td>
<span
vn-click-stop="workerDescriptor.show($event, balance.workerFk)"
class="link">
{{::balance.userName}}
</span>
</vn-td>
<vn-td-editable disabled="balance.isInvoice || !$ctrl.isAdministrative" expand>
<text>
<div ng-show="::balance.description">
<span
ng-if="balance.isInvoice"
title="{{'BILL' | translate: {ref: balance.description} }}"
vn-click-stop="$ctrl.showInvoiceOutDescriptor($event, balance)"
class="link">
{{'BILL' | translate: {ref: balance.description} }}
</span>
<span
ng-if="!balance.isInvoice"
title="{{::balance.description}}">
{{balance.description}}
</span>
</div>
</text>
<field>
<vn-textfield vn-acl="administrative" class="dense" vn-focus
ng-model="balance.description"
on-change="$ctrl.changeDescription(balance)">
</vn-textfield>
</field>
</vn-td-editable>
<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="api/InvoiceOuts/{{::balance.id}}/download?access_token={{::$ctrl.vnToken.token}}">
<vn-icon-button
icon="cloud_download"
title="{{'Download PDF' | translate}}">
</vn-icon-button>
</a>
</vn-td>
2022-10-28 12:49:22 +00:00
<vn-td center shrink ng-if="!balance.isInvoice">
2022-11-02 12:59:13 +00:00
<vn-icon-button
vn-dialog="send_compensation"
icon="outgoing_mail"
2022-10-28 12:49:22 +00:00
title="{{'Send compensation' | translate}}">
2019-10-01 14:17:57 +00:00
</vn-icon-button>
2022-10-28 12:49:22 +00:00
</vn-td>
2022-11-02 12:59:13 +00:00
<vn-confirm
vn-id="send_compensation"
on-accept="$ctrl.sendEmail(balance)"
2022-10-28 12:49:22 +00:00
question="¿Desea informar de la compensacion al cliente por correo?"
message="Send compensation">
</vn-confirm>
</vn-tr>
</vn-tbody>
</vn-table>
2019-10-02 17:24:42 +00:00
</vn-card>
</vn-data-viewer>
2019-10-01 14:17:57 +00:00
</div>
2022-11-02 12:59:13 +00:00
<vn-float-button
vn-acl="salesAssistant"
vn-acl-action="remove"
icon="add"
vn-tooltip="New payment"
vn-bind="+"
fixed-bottom-right
ng-click="balanceCreate.show()">
2019-02-05 15:46:02 +00:00
</vn-float-button>
2022-11-02 12:59:13 +00:00
<vn-client-balance-create
vn-id="balance-create"
on-accept="$ctrl.getData()"
company-fk="$ctrl.companyId"
2021-02-01 09:51:17 +00:00
client-fk="$ctrl.$params.id">
</vn-client-balance-create>
2022-11-02 12:59:13 +00:00
<vn-worker-descriptor-popover
vn-id="workerDescriptor">
2019-04-05 11:20:34 +00:00
</vn-worker-descriptor-popover>
2022-11-02 12:59:13 +00:00
<vn-invoice-out-descriptor-popover
vn-id="invoiceOutDescriptor">
2019-04-05 11:20:34 +00:00
</vn-invoice-out-descriptor-popover>