Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

Commit

Permalink
POS Loading Complete Order (#2617)
Browse files Browse the repository at this point in the history
  • Loading branch information
elsiosanchez authored Sep 11, 2024
1 parent a16cad5 commit 0845e1c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/components/ADempiere/Form/VPOS2/Options/salesOrder.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,20 @@ along with this program. If not, see <https:www.gnu.org/licenses/>.
:body-style="{ padding: '10px' }"
>
<p
v-if="!isLoadingCompleteOrder"
:class="isDisableClass"
>
<i class="el-icon-success" />
<br>
{{ $t('form.pos.optionsPoinSales.salesOrder.completePreparedOrder') }}
</p>
<p
v-else
class="card-options-buttons"
>
<i class="el-icon-loading" />
<br>
</p>
</el-card>
</div>
</el-col>
Expand Down Expand Up @@ -554,6 +562,7 @@ export default defineComponent({
const isShowApplyDiscount = ref(false)
const isLoadingCancelSaleTransaction = ref(false)
const isLoadingPrintTicket = ref(false)
const isLoadingCompleteOrder = ref(false)
const isLoadingPreviewDocument = ref(false)
const isLoadingCopyOrder = ref(false)
const isLoadingCancelOrder = ref(false)
Expand Down Expand Up @@ -697,7 +706,12 @@ export default defineComponent({

function completePreparedOrder() {
if (isEmptyValue(currentOrder.value.id)) return
if (isLoadingCompleteOrder.value) return
isLoadingCompleteOrder.value = true
store.dispatch('process', {})
.then(() => {
isLoadingCompleteOrder.value = false
})
}

function cancelSaleTransaction() {
Expand Down Expand Up @@ -893,6 +907,7 @@ export default defineComponent({
isShowApplyDiscount,
isLoadingPrintTicket,
isLoadingCancelOrder,
isLoadingCompleteOrder,
showApplyDiscountOnOrder,
isLoadingPreviewDocument,
showApplyDiscountToAllLines,
Expand Down

0 comments on commit 0845e1c

Please sign in to comment.