salix/modules/invoiceOut/front/global-invoicing/index.html

121 lines
4.1 KiB
HTML
Raw Normal View History

2022-12-27 12:50:10 +00:00
<h3 ng-if="$ctrl.packageInvoicing" translate style="text-align: center;">{{'Calculating packages to invoice...'}}</h3>
<vn-card class="vn-w-lg">
<vn-table ng-if="data.length">
<vn-thead>
<vn-tr>
<vn-th field="id">Id</vn-th>
<vn-th field="id">Address</vn-th>
<vn-th field="name">Status</vn-th>
</vn-tr>
</vn-thead>
<vn-tbody>
<vn-tr
ng-repeat="client in data">
<vn-td>
<span
vn-click-stop="clientDescriptor.show($event, client.id)"
class="link">
{{::client.id}}
</span>
</vn-td>
<vn-td>
{{::client.address}}
</vn-td>
<vn-td>
<vn-spinner
ng-if="client.status == 'waiting'"
enable="true">
</vn-spinner>
<vn-icon
ng-if="client.status == 'ok'"
icon="check">
</vn-icon>
<vn-icon
class="error"
ng-if="client.status == 'error'"
icon="error">
</vn-icon>
</vn-td>
</vn-tr>
</vn-tbody>
</vn-table>
</vn-card>
2022-12-27 11:21:04 +00:00
<vn-side-menu side="right">
<vn-crud-model
auto-load="true"
url="InvoiceOutSerials"
data="invoiceOutSerials"
order="code">
</vn-crud-model>
<vn-crud-model
auto-load="true"
url="Companies"
data="companies"
order="code">
</vn-crud-model>
<form class="vn-pa-md">
<vn-vertical>
<vn-date-picker
vn-one
label="Invoice date"
ng-model="$ctrl.invoice.invoiceDate">
</vn-date-picker>
<vn-date-picker
vn-one
label="Max date"
ng-model="$ctrl.invoice.maxShipped">
</vn-date-picker>
<vn-radio
label="All clients"
val="allClients"
ng-model="$ctrl.clientsNumber"
ng-click="$ctrl.$onInit()">
</vn-radio>
<vn-radio
label="Clients range"
val="clientsRange"
ng-model="$ctrl.clientsNumber">
</vn-radio>
2022-12-29 06:20:07 +00:00
</vn-vertical>
2022-12-27 11:21:04 +00:00
<vn-vertical ng-show="$ctrl.clientsNumber == 'clientsRange'">
<vn-autocomplete
url="Clients"
label="From client"
search-function="{or: [{id: $search}, {name: {like: '%'+$search+'%'}}]}"
order="id"
show-field="name"
value-field="id"
ng-model="$ctrl.invoice.fromClientId">
<tpl-item>{{::id}} - {{::name}}</tpl-item>
</vn-autocomplete>
<vn-autocomplete
url="Clients"
label="To client"
search-function="{or: [{id: $search}, {name: {like: '%'+$search+'%'}}]}"
order="id"
show-field="name"
value-field="id"
ng-model="$ctrl.invoice.toClientId">
<tpl-item>{{::id}} - {{::name}}</tpl-item>
</vn-autocomplete>
</vn-vertical>
<vn-horizontal>
<vn-autocomplete
url="Companies"
label="Company"
show-field="code"
value-field="id"
ng-model="$ctrl.invoice.companyFk">
</vn-autocomplete>
</vn-horizontal>
<vn-submit vn-id="invoiceButton" ng-click="$ctrl.makeInvoice()" label="Invoice" class="vn-mt-sm" ></vn-submit>
2022-12-27 12:50:10 +00:00
<vn-button ng-click="$ctrl.clean()" label="Clean" class="vn-mt-sm" disabled="!data.length"></vn-button>
2022-12-27 11:21:04 +00:00
</form>
</vn-side-menu>
<vn-client-descriptor-popover
vn-id="clientDescriptor">
</vn-client-descriptor-popover>