2940-invoiceInTax-section #680
|
@ -32,11 +32,6 @@
|
|||
}
|
||||
},
|
||||
"relations": {
|
||||
"sageWithholding": {
|
||||
"type": "belongsTo",
|
||||
"model": "SageWithholding",
|
||||
"foreignKey": "withholdingSageFk"
|
||||
},
|
||||
"invoiceIn": {
|
||||
"type": "belongsTo",
|
||||
"model": "InvoiceIn",
|
||||
|
|
|
@ -13,6 +13,9 @@ class Controller extends ModuleCard {
|
|||
},
|
||||
{
|
||||
relation: 'company'
|
||||
},
|
||||
{
|
||||
relation: 'currency'
|
||||
}
|
||||
]};
|
||||
|
||||
|
|
|
@ -43,40 +43,46 @@
|
|||
</vn-check>
|
||||
</vn-vertical>
|
||||
</vn-one>
|
||||
<vn-one class="taxes">
|
||||
<p><vn-label translate>Subtotal</vn-label> {{$ctrl.summary.totalWithoutVat | currency: 'EUR':2}}</p>
|
||||
<p><vn-label translate>VAT</vn-label> {{$ctrl.summary.totalWithVat - $ctrl.summary.totalWithoutVat | currency: 'EUR':2}}</p>
|
||||
<p><vn-label><strong>Total</strong></vn-label> <strong>{{$ctrl.summary.totalWithVat | currency: 'EUR':2}}</strong></p>
|
||||
</vn-one>
|
||||
</vn-horizontal>
|
||||
</vn-auto>
|
||||
|
||||
<vn-one ng-if="$ctrl.summary.invoiceInTax.length != 0">
|
||||
joan marked this conversation as resolved
Outdated
|
||||
<h4>
|
||||
<a
|
||||
ui-sref="invoiceIn.card.tax({id:$ctrl.invoiceIn.id})"
|
||||
target="_self">
|
||||
<span translate vn-tooltip="Go to">Vat</span>
|
||||
</a>
|
||||
</h4>
|
||||
<vn-table model="model">
|
||||
<vn-thead>
|
||||
<vn-tr>
|
||||
<vn-th number>Expense</vn-th>
|
||||
<vn-th shrink>Taxable base</vn-th>
|
||||
<vn-th>Sage vat</vn-th>
|
||||
<vn-th>Sage transaction</vn-th>
|
||||
<vn-th number>Rate</vn-th>
|
||||
<vn-th number>Foreign value</vn-th>
|
||||
</vn-tr>
|
||||
</vn-thead>
|
||||
<vn-tbody>
|
||||
<vn-tr ng-repeat="tax in $ctrl.summary.invoiceInTax">
|
||||
<vn-td number expand>{{::tax.expenseFk}}</vn-td>
|
||||
<vn-td>{{::tax.taxableBase | currency: 'EUR':2}}</vn-td>
|
||||
<vn-td>{{::tax.taxTypeSage.vat}}</vn-td>
|
||||
<vn-td>{{::tax.transactionTypeSage.transaction}}</vn-td>
|
||||
<vn-td number shrink>{{::0.2 | percentage}}</vn-td>
|
||||
<vn-td number shrink>{{::tax.foreignValue | currency: 'USD':2}}</vn-td>
|
||||
</vn-tr>
|
||||
</vn-tbody>
|
||||
</vn-table>
|
||||
</vn-one>
|
||||
</vn-horizontal>
|
||||
<vn-one ng-if="$ctrl.summary.invoiceInTax.length != 0">
|
||||
<h4>
|
||||
<a
|
||||
ui-sref="invoiceIn.card.tax({id:$ctrl.invoiceIn.id})"
|
||||
target="_self">
|
||||
<span translate vn-tooltip="Go to">Vat</span>
|
||||
</a>
|
||||
</h4>
|
||||
<vn-table model="model">
|
||||
<vn-thead>
|
||||
<vn-tr>
|
||||
<vn-th number>Expense</vn-th>
|
||||
<vn-th shrink>Taxable base</vn-th>
|
||||
<vn-th>Sage vat</vn-th>
|
||||
<vn-th>Sage transaction</vn-th>
|
||||
<vn-th number>Rate</vn-th>
|
||||
<vn-th number>Foreign value</vn-th>
|
||||
</vn-tr>
|
||||
</vn-thead>
|
||||
<vn-tbody>
|
||||
<vn-tr ng-repeat="tax in $ctrl.summary.invoiceInTax">
|
||||
<vn-td number expand>{{::tax.expenseFk}}</vn-td>
|
||||
<vn-td>{{::tax.taxableBase | currency: 'EUR':2}}</vn-td>
|
||||
<vn-td>{{::tax.taxTypeSage.vat}}</vn-td>
|
||||
<vn-td>{{::tax.transactionTypeSage.transaction}}</vn-td>
|
||||
<vn-td number shrink>{{::0.2 | percentage}}</vn-td>
|
||||
<vn-td number shrink>{{::tax.foreignValue | currency: 'USD':2}}</vn-td>
|
||||
</vn-tr>
|
||||
</vn-tbody>
|
||||
</vn-table>
|
||||
</vn-one>
|
||||
</vn-card>
|
||||
joan marked this conversation as resolved
Outdated
carlosjr
commented
is 0.2 an static value? also using :: before static values is incorrect. is 0.2 an static value?
also using :: before static values is incorrect.
|
||||
<vn-supplier-descriptor-popover
|
||||
vn-id="supplierDescriptor">
|
||||
|
|
|
@ -1,5 +1,14 @@
|
|||
@import "variables";
|
||||
@import "./variables";
|
||||
@import "./effects";
|
||||
joan marked this conversation as resolved
Outdated
carlosjr
commented
this import doesn't seem to be needed this import doesn't seem to be needed
|
||||
|
||||
vn-invoice-in-summary .summary {
|
||||
width: $width-lg;
|
||||
max-width: $width-xl;
|
||||
|
||||
|
||||
taxes {
|
||||
border: $border-thin-light;
|
||||
text-align: right;
|
||||
padding: 8px;
|
||||
|
||||
}
|
||||
}
|
|
@ -23,7 +23,7 @@
|
|||
</vn-crud-model>
|
||||
<vn-watcher
|
||||
vn-id="watcher"
|
||||
data="$ctrl.invoiceInTax"
|
||||
data="$ctrl.taxes"
|
||||
form="form">
|
||||
</vn-watcher>
|
||||
<form name="form" ng-submit="$ctrl.onSubmit()" class="vn-w-xl">
|
||||
|
@ -65,7 +65,8 @@
|
|||
type="number"
|
||||
label="total">
|
||||
</vn-input-number>
|
||||
<vn-input-number vn-one
|
||||
<vn-input-number vn-one
|
||||
disabled="$ctrl.currency.code == 'EUR'"
|
||||
type="number"
|
||||
label="foreignValue"
|
||||
ng-model="invoiceInTax.foreignValue"
|
||||
|
|
Loading…
Reference in New Issue
extraction to a getter would be nice, making it more readable.
Also using translate-attr with spanish tittle is inconsistent.