1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-08-07 18:25:45 +08:00

Add converted order total (#1072)

Co-authored-by: elsiosanchez <elsiossanches@gmail.com>
This commit is contained in:
Elsio Sanchez 2021-08-19 07:57:28 -04:00 committed by GitHub
parent aa36f5911c
commit 90deabf9d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 14 additions and 11 deletions

View File

@ -638,7 +638,7 @@ export default {
if (!this.isEmptyValue(this.convertionsList)) {
let rate
payment.forEach((pay) => {
rate = this.convertionsList.find(currency => currency.currencyTo.uuid === pay.currencyUuid)
rate = this.convertionsList.find(currency => !this.isEmptyValue(currency.currencyTo) && currency.currencyTo.uuid === pay.currencyUuid)
if (!rate) {
if (this.currentPointOfSales.priceList.currency.uuid !== pay.currencyUuid) {
this.searchConversion(pay.currencyUuid)

View File

@ -184,7 +184,7 @@ export default {
formatDate,
formatPrice,
iSOCode(value) {
const currencyPay = this.convertionsList.find(currency => currency.currencyTo.uuid === value.currencyUuid)
const currencyPay = this.convertionsList.find(currency => !this.isEmptyValue(currency.currencyTo) && currency.currencyTo.uuid === value.currencyUuid)
if (!currencyPay) {
return ''
}

View File

@ -696,7 +696,7 @@ export default {
}
}).catch(() => {
}).finally(() => {
this.$store.commit('setListPayments', [])
this.$store.commit('setListPayments', {})
const { templateBusinessPartner } = this.currentPointOfSales
this.$store.commit('updateValuesOfContainer', {
containerUuid: this.metadata.containerUuid,

View File

@ -62,7 +62,7 @@
@command="changeDocumentType"
>
<span>
<icon class="el-icon-document" />
<el-icon class="el-icon-document" />
<b style="cursor: pointer"> {{ currentDocumentType.name }} </b>
</span>
<el-dropdown-menu slot="dropdown">
@ -335,14 +335,15 @@
<p class="total">{{ $t('form.pos.order.seller') }}:<b style="float: right;">
{{ currentOrder.salesRepresentative.name }}
</b></p>
<p class="total"> {{ $t('form.pos.order.subTotal') }}:<b class="order-info">{{ formatPrice(currentOrder.totalLines, pointOfSalesCurrency.iSOCode) }}</b></p>
<p class="total"> {{ $t('form.pos.order.tax') }}:<b style="float: right;">{{ getOrderTax(pointOfSalesCurrency.iSOCode) }}</b> </p>
<p class="total"> {{ $t('form.pos.order.subTotal') }}:<b v-if="!isEmptyValue(currentOrder.uuid)" class="order-info">{{ formatPrice(currentOrder.totalLines, pointOfSalesCurrency.iSOCode) }}</b></p>
<p class="total"> {{ $t('form.pos.order.tax') }}:<b v-if="!isEmptyValue(currentOrder.uuid)" style="float: right;">{{ getOrderTax(pointOfSalesCurrency.iSOCode) }}</b> </p>
<p class="total">
<b>
{{ $t('form.pos.order.total') }}:
</b>
<b style="float: right;">
<el-popover
v-if="!isEmptyValue(currentOrder.uuid)"
:v-model="seeConversion"
placement="top-start"
trigger="click"
@ -361,27 +362,29 @@
</el-popover>
</b>
</p>
<p v-if="!isEmptyValue(currentPointOfSales.displayCurrency)" class="total"> <b> {{ $t('form.pos.collect.convertedAmount') }}: </b> <b v-if="!isEmptyValue(currentOrder.uuid)" style="float: right;">{{ formatPrice(currentOrder.grandTotal / totalAmountConverted, currentPointOfSales.displayCurrency.iso_code) }}</b> </p>
</span>
<span v-if="!isMobile" style="float: right;padding-right: 3%;">
<p class="total">{{ $t('form.pos.order.order') }}: <b class="order-info">{{ currentOrder.documentNo }}</b></p>
<p class="total">
{{ $t('form.pos.order.date') }}:
<b class="order-info">
<b v-if="!isEmptyValue(currentOrder.uuid)" class="order-info">
{{ orderDate }}
</b>
</p>
<p class="total">{{ $t('form.pos.order.type') }}:<b class="order-info">{{ currentOrder.documentType.name }}</b></p>
<p class="total">
{{ $t('form.pos.order.itemQuantity') }}
<b class="order-info">
<b v-if="!isEmptyValue(currentOrder.uuid)" class="order-info">
{{ getItemQuantity }}
</b>
</p>
<p class="total">
{{ $t('form.pos.order.numberLines') }}
<b class="order-info">
<b v-if="!isEmptyValue(currentOrder.uuid)" class="order-info">
{{ numberOfLines }}
</b></p>
</b>
</p>
</span>
</el-footer>
</el-container>

View File

@ -593,7 +593,7 @@ export default {
}
}).catch(() => {
}).finally(() => {
this.$store.commit('setListPayments', [])
this.$store.commit('setListPayments', {})
const { templateBusinessPartner } = this.currentPointOfSales
this.$store.commit('updateValuesOfContainer', {
containerUuid: this.metadata.containerUuid,