E-Invoice - New request from Anitha billing address should follow einvoice address if exist at Pending Invoice tab at payment and billing page

This commit is contained in:
Dillon Ngo
2025-07-24 06:18:14 +08:00
parent e3afc2b008
commit 549bf98725
2 changed files with 25 additions and 4 deletions
@@ -132,7 +132,7 @@
<div class="row m-b-15">
<div class="col">
<validation-wrapper-component :validator="$v.parameters.atLeastOneSelected">
<label>Available to receive goods on: </label>
<label>Available to receive goods on: </label>
<div class="row">
<div class="col-12 col-md pb-3 pb-md-0">
<div class="row justify-content-center m-t-10 m-b-10" @click="parameters.receive_goods_working_hours = !parameters.receive_goods_working_hours">
@@ -203,6 +203,10 @@
type: {
type: Number,
default: 2
},
einvoiceAddress: {
type: Object,
default: null
}
},
data() {
@@ -224,7 +228,7 @@
receive_goods_on_saturday: false,
}
}
}
},
created(){
if(this.data){
@@ -242,6 +246,13 @@
this.parameters.receive_goods_after_hours = this.data.receive_goods_after_hours ? this.data.receive_goods_after_hours : false;
this.parameters.receive_goods_on_saturday = this.data.receive_goods_on_saturday ? this.data.receive_goods_on_saturday : false;
}
if(this.einvoiceAddress){
this.parameters.street_one = this.einvoiceAddress.street_one;
this.parameters.street_two = this.einvoiceAddress.street_two;
this.parameters.district_id = this.einvoiceAddress.district.id;
this.parameters.post_code = this.einvoiceAddress.post_code;
}
},
watch: {
'id': function () {
@@ -83,7 +83,12 @@
<div v-if="!item.order.company_module.billingAddress">
<div class="btn btn-primary btn-xs pointer requestModal btn-block" data-type="billingAddressComponent">Add Billing Address</div>
<modal-component class="animate__animated animate__fast animate__fadeIn" size="extra-large" styleType="fill-in" type="billingAddressComponent">
<address-form-component :id="item.order.company_module.id" :section="section" :type=1></address-form-component>
<address-form-component
:id="item.order.company_module.id"
:section="section"
:type=1
:einvoice-address="item.order.company_module.address_einvoice">
</address-form-component>
</modal-component>
</div>
<div class="row" v-if="item.order.company_module.billingAddress">
@@ -94,7 +99,12 @@
<modal-component class="animate__animated animate__fast animate__fadeIn" size="extra-large" styleType="fill-in" type="editBillingAddress">
<div class="row">
<div class="col bg-white">
<address-form-component :id="item.order.company_module.id" :data="item.order.company_module.billingAddress" section="editBillingAddress"></address-form-component>
<address-form-component
:id="item.order.company_module.id"
:data="item.order.company_module.billingAddress"
section="editBillingAddress"
:einvoice-address="item.order.company_module.address_einvoice">
</address-form-component>
</div>
</div>
</modal-component>