added shipping notes for warehouse e shop
This commit is contained in:
@@ -42,6 +42,7 @@ class WarehouseEShopOrderController extends TTCrud {
|
|||||||
|
|
||||||
protected array $additionalActions = [['key' => 'openHistory', 'title' => 'Historie', 'class' => 'fas fa-history text-primary'],
|
protected array $additionalActions = [['key' => 'openHistory', 'title' => 'Historie', 'class' => 'fas fa-history text-primary'],
|
||||||
['key' => 'showTrackingHistory', 'title' => 'Tracking Historie', 'class' => 'fas fa-truck text-primary'],
|
['key' => 'showTrackingHistory', 'title' => 'Tracking Historie', 'class' => 'fas fa-truck text-primary'],
|
||||||
|
['key' => 'createShippingNote', 'title' => 'Lieferschein erstellen', 'class' => 'fas fa-file-invoice text-primary'],
|
||||||
['key' => 'openSingleOrderEmail', 'title' => 'Bestellbestätigung', 'class' => 'fas fa-envelope text-primary'],];
|
['key' => 'openSingleOrderEmail', 'title' => 'Bestellbestätigung', 'class' => 'fas fa-envelope text-primary'],];
|
||||||
|
|
||||||
protected array $infoMessages = ['create' => 'Bestellung wurde erfolgreich erstellt, sie erhalten in Kürze eine Bestätigungsmail',
|
protected array $infoMessages = ['create' => 'Bestellung wurde erfolgreich erstellt, sie erhalten in Kürze eine Bestätigungsmail',
|
||||||
@@ -61,6 +62,75 @@ class WarehouseEShopOrderController extends TTCrud {
|
|||||||
$this->columns[10]['modal']['items'] = $users;
|
$this->columns[10]['modal']['items'] = $users;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function createShippingNote() {
|
||||||
|
$id = $this->request->id;
|
||||||
|
if (!$id) {
|
||||||
|
self::returnJson(['success' => false, 'message' => 'Keine ID angegeben']);
|
||||||
|
die();
|
||||||
|
}
|
||||||
|
|
||||||
|
$existingShippingNote = WarehouseShippingNoteModel::getAll(['eShopOrderId' => $id]);
|
||||||
|
if (!empty($existingShippingNote)) {
|
||||||
|
self::returnJson(['success' => false, 'message' => 'Für diese Bestellung existiert bereits ein Lieferschein', 'shippingNoteId' => $existingShippingNote[0]->id]);
|
||||||
|
die();
|
||||||
|
}
|
||||||
|
|
||||||
|
$order = WarehouseEShopOrderModel::get($id);
|
||||||
|
$orderItems = WarehouseEShopOrderItemModel::getAll(['orderId' => $id]);
|
||||||
|
|
||||||
|
$articles = WarehouseArticleModel::getAll();
|
||||||
|
$articlePackets = WarehouseArticlePacketModel::getAll();
|
||||||
|
|
||||||
|
$positions = [];
|
||||||
|
foreach ($orderItems as $item) {
|
||||||
|
$newEntry = [];
|
||||||
|
$article = $item->articleId ? array_search($item->articleId, array_column($articles, 'id')) : null;
|
||||||
|
$articlePacket = $item->articlePacketId ? array_search($item->articlePacketId, array_column($articlePackets, 'id')) : null;
|
||||||
|
|
||||||
|
$articleTitle = $item->articleId ? $articles[$article]->title : $articlePackets[$articlePacket]->title;
|
||||||
|
$quantity = $item->quantity;
|
||||||
|
$price = 0;
|
||||||
|
if ($item->articleId) {
|
||||||
|
$cheapestSellPrice = json_decode($articles[$article]->cheapestSellPrice, true);
|
||||||
|
foreach ($cheapestSellPrice as $price) {
|
||||||
|
if ($price['title'] === 'Energie Steiermark') {
|
||||||
|
$price = $price['price'];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$price = $articlePackets[$articlePacket]->overrideSellPrice ?? $articlePackets[$articlePacket]->calculatedSellPrice;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($item->articleId) {
|
||||||
|
$newEntry['article'] = $item->articleId;
|
||||||
|
} else {
|
||||||
|
$newEntry['articlePacket'] = $item->articlePacketId;
|
||||||
|
}
|
||||||
|
$newEntry['amount'] = $quantity;
|
||||||
|
$newEntry['price'] = $price;
|
||||||
|
|
||||||
|
$positions[] = $newEntry;
|
||||||
|
}
|
||||||
|
|
||||||
|
$positions = json_encode($positions);
|
||||||
|
|
||||||
|
$shippingNoteId = WarehouseShippingNoteModel::create(['billingAddressId' => 3265,
|
||||||
|
'deliveryAddressName' => $order->deliveryAddressName,
|
||||||
|
'deliveryAddressLine' => $order->deliveryAddressLine,
|
||||||
|
'deliveryAddressPLZ' => $order->deliveryAddressPLZ,
|
||||||
|
'deliveryAddressCity' => $order->deliveryAddressCity,
|
||||||
|
'status' => 'new',
|
||||||
|
'positions' => $positions,
|
||||||
|
'textElements' => '[]',
|
||||||
|
'eShopOrderId' => $id,
|
||||||
|
'create' => time(),
|
||||||
|
'createBy' => $this->user->id]);
|
||||||
|
|
||||||
|
self::returnJson(['success' => true, 'message' => 'Lieferschein wurde erstellt', 'shippingNoteId' => $shippingNoteId]);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
protected function singleOrderEmailAction() {
|
protected function singleOrderEmailAction() {
|
||||||
// this has dryRun and id in get parameter create a E-Mail Body like the things below
|
// this has dryRun and id in get parameter create a E-Mail Body like the things below
|
||||||
$isDryRun = $this->request->dryRun ?? false;
|
$isDryRun = $this->request->dryRun ?? false;
|
||||||
@@ -110,7 +180,6 @@ class WarehouseEShopOrderController extends TTCrud {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
protected function CSVExportNewOrdersMarkAcceptedAction($returnCSV = false, $orderIds = []) {
|
protected function CSVExportNewOrdersMarkAcceptedAction($returnCSV = false, $orderIds = []) {
|
||||||
ini_set('display_errors', 1);
|
ini_set('display_errors', 1);
|
||||||
ini_set('display_startup_errors', 1);
|
ini_set('display_startup_errors', 1);
|
||||||
@@ -318,6 +387,18 @@ class WarehouseEShopOrderController extends TTCrud {
|
|||||||
self::returnJson((new WarehouseHistoryController)->getHistory($this->request->id, $this->mod, $this->columns));
|
self::returnJson((new WarehouseHistoryController)->getHistory($this->request->id, $this->mod, $this->columns));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function fetchGLSTrackingAction() {
|
||||||
|
$orderId = $this->request->id;
|
||||||
|
|
||||||
|
$order = WarehouseEShopOrderModel::get($orderId);
|
||||||
|
$trackingNumber = $order->trackingNumber;
|
||||||
|
$plz = $order->deliveryAddressPLZ;
|
||||||
|
|
||||||
|
$tracking = $this->GLSTrackingApi($trackingNumber, $plz);
|
||||||
|
$this->checkAndUpdateTrackingState($tracking, $orderId);
|
||||||
|
die($tracking);
|
||||||
|
}
|
||||||
|
|
||||||
protected function GLSTrackingApi($trackingNumber, $plz) {
|
protected function GLSTrackingApi($trackingNumber, $plz) {
|
||||||
$url = "https://gls-group.eu/app/service/open/rest/AT/de/rstt028/$trackingNumber?postalCode=$plz";
|
$url = "https://gls-group.eu/app/service/open/rest/AT/de/rstt028/$trackingNumber?postalCode=$plz";
|
||||||
return file_get_contents($url);
|
return file_get_contents($url);
|
||||||
@@ -342,18 +423,6 @@ class WarehouseEShopOrderController extends TTCrud {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function fetchGLSTrackingAction() {
|
|
||||||
$orderId = $this->request->id;
|
|
||||||
|
|
||||||
$order = WarehouseEShopOrderModel::get($orderId);
|
|
||||||
$trackingNumber = $order->trackingNumber;
|
|
||||||
$plz = $order->deliveryAddressPLZ;
|
|
||||||
|
|
||||||
$tracking = $this->GLSTrackingApi($trackingNumber, $plz);
|
|
||||||
$this->checkAndUpdateTrackingState($tracking, $orderId);
|
|
||||||
die($tracking);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function readGLSEmailAction() {
|
protected function readGLSEmailAction() {
|
||||||
$host = '{mail.xinon.at:993/imap/ssl/novalidate-cert}INBOX';
|
$host = '{mail.xinon.at:993/imap/ssl/novalidate-cert}INBOX';
|
||||||
$mbox = imap_open($host, 'eshop-versand@xinon.at', 'savemanfb545aw');
|
$mbox = imap_open($host, 'eshop-versand@xinon.at', 'savemanfb545aw');
|
||||||
@@ -408,7 +477,9 @@ class WarehouseEShopOrderController extends TTCrud {
|
|||||||
// END TRACKING NUMBER PARSING
|
// END TRACKING NUMBER PARSING
|
||||||
|
|
||||||
|
|
||||||
$orders = WarehouseEShopOrderModel::getAll(['deliveryAddressLine' => $addressLine, 'deliveryAddressPLZ' => $plz, 'deliveryAddressCity' => $city]);
|
$orders = WarehouseEShopOrderModel::getAll(['deliveryAddressLine' => $addressLine,
|
||||||
|
'deliveryAddressPLZ' => $plz,
|
||||||
|
'deliveryAddressCity' => $city]);
|
||||||
if (empty($orders)) {
|
if (empty($orders)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -182,11 +182,19 @@ class WarehouseShippingNoteController extends TTCrud {
|
|||||||
|
|
||||||
// loop through all positions and add articleTitle and articleDescription to each position entry
|
// loop through all positions and add articleTitle and articleDescription to each position entry
|
||||||
foreach (json_decode($shippingNote->positions, true) as $position) {
|
foreach (json_decode($shippingNote->positions, true) as $position) {
|
||||||
$article = WarehouseArticleModel::get($position['article']);
|
if (isset($position['article'])) {
|
||||||
$position['articleTitle'] = $article->title;
|
$article = WarehouseArticleModel::get($position['article']);
|
||||||
$position['articleDescription'] = $article->description;
|
$position['articleTitle'] = $article->title;
|
||||||
$position['articleUnit'] = $article->unit;
|
$position['articleDescription'] = $article->description === $article->title ? "" : $article->description;
|
||||||
$positions[] = $position;
|
$position['articleUnit'] = $article->unit;
|
||||||
|
$positions[] = $position;
|
||||||
|
} elseif (isset($position['articlePacket'])) {
|
||||||
|
$articlePacket = WarehouseArticlePacketModel::get($position['articlePacket']);
|
||||||
|
$position['articleTitle'] = $articlePacket->title;
|
||||||
|
$position['articleDescription'] = $articlePacket->description === $articlePacket->title ? "" : $articlePacket->description;
|
||||||
|
$position['articleUnit'] = 'Stk.';
|
||||||
|
$positions[] = $position;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$textElements = [];
|
$textElements = [];
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ class WarehouseShippingNoteModel extends TTCrudBaseModel {
|
|||||||
public string $status; // 'new'|'accepted'|'invoiced'
|
public string $status; // 'new'|'accepted'|'invoiced'
|
||||||
public string $positions;
|
public string $positions;
|
||||||
public string $textElements;
|
public string $textElements;
|
||||||
|
public ?int $eShopOrderId;
|
||||||
public int $create;
|
public int $create;
|
||||||
public int $createBy;
|
public int $createBy;
|
||||||
}
|
}
|
||||||
|
|||||||
23
db/migrations/20241010100000_shipping_note_add_order_id.php
Normal file
23
db/migrations/20241010100000_shipping_note_add_order_id.php
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
<?php /** @noinspection ALL */
|
||||||
|
|
||||||
|
declare(strict_types = 1);
|
||||||
|
|
||||||
|
use Phinx\Migration\AbstractMigration;
|
||||||
|
|
||||||
|
final class ShippingNoteAddOrderId extends AbstractMigration {
|
||||||
|
public function up(): void {
|
||||||
|
if ($this->getEnvironment() == "thetool") {
|
||||||
|
$WarehouseShippingNote = $this->table("WarehouseShippingNote");
|
||||||
|
$WarehouseShippingNote->addColumn('eShopOrderId', 'integer', ['null' => true]);
|
||||||
|
$WarehouseShippingNote->update();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(): void {
|
||||||
|
if ($this->getEnvironment() == "thetool") {
|
||||||
|
$WarehouseShippingNote = $this->table("WarehouseShippingNote");
|
||||||
|
$WarehouseShippingNote->removeColumn('eShopOrderId');
|
||||||
|
$WarehouseShippingNote->update();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,6 +5,7 @@ Vue.component('warehouse-e-shop-order', {
|
|||||||
<tt-card>
|
<tt-card>
|
||||||
<tt-table-crud @openHistory="historyModal = true; historyModalId = $event.id"
|
<tt-table-crud @openHistory="historyModal = true; historyModalId = $event.id"
|
||||||
@openSingleOrderEmail="openSingleOrderEmailModal = true; singleOrderEmailModalId = $event.id"
|
@openSingleOrderEmail="openSingleOrderEmailModal = true; singleOrderEmailModalId = $event.id"
|
||||||
|
@createShippingNote="createShippingNote($event.id)"
|
||||||
@showTrackingHistory="openTrackingHistoryModal = true; trackingHistoryModalId = $event.id"
|
@showTrackingHistory="openTrackingHistoryModal = true; trackingHistoryModalId = $event.id"
|
||||||
ref="table">
|
ref="table">
|
||||||
|
|
||||||
@@ -84,6 +85,14 @@ Vue.component('warehouse-e-shop-order', {
|
|||||||
const response = await axios.get(`${window['TT_CONFIG']['BASE_PATH']}/WarehouseEShopOrder/getAllItemsPerOrder`);
|
const response = await axios.get(`${window['TT_CONFIG']['BASE_PATH']}/WarehouseEShopOrder/getAllItemsPerOrder`);
|
||||||
this.articleItems = response.data;
|
this.articleItems = response.data;
|
||||||
}, methods: {
|
}, methods: {
|
||||||
|
async createShippingNote(id) {
|
||||||
|
const response = await axios.get(`${window['TT_CONFIG']['BASE_PATH']}/WarehouseEShopOrder/createShippingNote?id=${id}`);
|
||||||
|
|
||||||
|
window.notify(response.data.success === true ? 'success' : 'info', response.data.message);
|
||||||
|
if (response.data.shippingNoteId) {
|
||||||
|
window.open(`${window['TT_CONFIG']['BASE_PATH']}/WarehouseShippingNote/createPDF?id=${response.data.shippingNoteId}&price=true`, '_blank');
|
||||||
|
}
|
||||||
|
},
|
||||||
async sendSingleOrderEmail() {
|
async sendSingleOrderEmail() {
|
||||||
const response = await axios.get(`${window['TT_CONFIG']['BASE_PATH']}/WarehouseEShopOrder/singleOrderEmail?id=${this.singleOrderEmailModalId}`);
|
const response = await axios.get(`${window['TT_CONFIG']['BASE_PATH']}/WarehouseEShopOrder/singleOrderEmail?id=${this.singleOrderEmailModalId}`);
|
||||||
if (response.data.message) {
|
if (response.data.message) {
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ Vue.component('warehouse-shipping-note-positions', {
|
|||||||
positions: Array
|
positions: Array
|
||||||
}, data() {
|
}, data() {
|
||||||
return {
|
return {
|
||||||
articleData: {}, loading: false
|
articleData: {}, loading: false, articlePacketData: {}
|
||||||
}
|
}
|
||||||
}, template: `
|
}, template: `
|
||||||
<div>
|
<div>
|
||||||
@@ -30,15 +30,20 @@ Vue.component('warehouse-shipping-note-positions', {
|
|||||||
|
|
||||||
<ul v-if="!loading">
|
<ul v-if="!loading">
|
||||||
<li v-for="position in positions">
|
<li v-for="position in positions">
|
||||||
<span>{{ position.amount }}x {{ articleData[position.article]?.text }}</span>
|
<span>{{ position.amount }}x {{ position.article ? articleData[position.article]?.text : articlePacketData[position.articlePacket]?.text }}</span>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
`, async mounted() {
|
`, async mounted() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
for (const position of this.positions) {
|
for (const position of this.positions) {
|
||||||
const response = await axios.get(window.TT_CONFIG["BASE_PATH"] + '/WarehouseArticle/autoComplete?searchedID=' + position.article);
|
if (position.article) {
|
||||||
this.$set(this.articleData, position.article, response.data[0]);
|
const response = await axios.get(window.TT_CONFIG["BASE_PATH"] + '/WarehouseArticle/autoComplete?searchedID=' + position.article);
|
||||||
|
this.$set(this.articleData, position.article, response.data[0]);
|
||||||
|
} else if (position.articlePacket) {
|
||||||
|
const response = await axios.get(window.TT_CONFIG["BASE_PATH"] + '/WarehouseArticlePacket/autoComplete?searchedID=' + position.articlePacket);
|
||||||
|
this.$set(this.articlePacketData, position.articlePacket, response.data[0]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
}
|
}
|
||||||
@@ -58,7 +63,9 @@ Vue.component('warehouse-shipping-note', {
|
|||||||
:api-url="window.TT_CONFIG['BASE_PATH'] + '/Address/Api?do=findAddress'"
|
:api-url="window.TT_CONFIG['BASE_PATH'] + '/Address/Api?do=findAddress'"
|
||||||
label="Rechnungsadresse" sm row/>
|
label="Rechnungsadresse" sm row/>
|
||||||
|
|
||||||
<tt-select v-model="crudModalSelectDeliveryAddressMode" :options="crudModalSelectDeliveryAddressModeItems" label="Lieferadresse Art" sm
|
<tt-select
|
||||||
|
v-if="crudModalId === 'create'"
|
||||||
|
v-model="crudModalSelectDeliveryAddressMode" :options="crudModalSelectDeliveryAddressModeItems" label="Lieferadresse Art" sm
|
||||||
row/>
|
row/>
|
||||||
|
|
||||||
<template v-if="crudModalSelectDeliveryAddressMode === 'existing'">
|
<template v-if="crudModalSelectDeliveryAddressMode === 'existing'">
|
||||||
@@ -109,7 +116,7 @@ Vue.component('warehouse-shipping-note', {
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="(position, index) in crudModalData.positions">
|
<tr v-for="(position, index) in crudModalData.positions">
|
||||||
<td>{{ index + 1 }}</td>
|
<td>{{ index + 1 }}</td>
|
||||||
<td>{{ articleNames[position.article] }}</td>
|
<td>{{ position.article ? articleNames[position.article] : articlePacketNames[position.articlePacket] }}</td>
|
||||||
<td>{{ position.amount }}</td>
|
<td>{{ position.amount }}</td>
|
||||||
<td>{{ (position.price?.toFixed(2)) }} €</td>
|
<td>{{ (position.price?.toFixed(2)) }} €</td>
|
||||||
<td>
|
<td>
|
||||||
@@ -164,6 +171,7 @@ Vue.component('warehouse-shipping-note', {
|
|||||||
crudModalAddPositionAmount: '',
|
crudModalAddPositionAmount: '',
|
||||||
crudModalAddPositionPrice: '',
|
crudModalAddPositionPrice: '',
|
||||||
articleNames: {},
|
articleNames: {},
|
||||||
|
articlePacketNames: {},
|
||||||
textElements: [],
|
textElements: [],
|
||||||
}
|
}
|
||||||
}, async mounted() {
|
}, async mounted() {
|
||||||
@@ -207,6 +215,7 @@ Vue.component('warehouse-shipping-note', {
|
|||||||
this.crudModalData = defaultCrudModalData
|
this.crudModalData = defaultCrudModalData
|
||||||
this.crudModal = true
|
this.crudModal = true
|
||||||
} else {
|
} else {
|
||||||
|
this.crudModalSelectDeliveryAddressMode = 'new';
|
||||||
const disconnectedData = JSON.parse(JSON.stringify(data));
|
const disconnectedData = JSON.parse(JSON.stringify(data));
|
||||||
|
|
||||||
if (disconnectedData.status !== 'new') {
|
if (disconnectedData.status !== 'new') {
|
||||||
@@ -217,7 +226,8 @@ Vue.component('warehouse-shipping-note', {
|
|||||||
disconnectedData.textElements = JSON.parse(disconnectedData.textElements);
|
disconnectedData.textElements = JSON.parse(disconnectedData.textElements);
|
||||||
disconnectedData.positions = JSON.parse(disconnectedData.positions);
|
disconnectedData.positions = JSON.parse(disconnectedData.positions);
|
||||||
for (const position of disconnectedData.positions) {
|
for (const position of disconnectedData.positions) {
|
||||||
await this.fetchArticleNames(position.article);
|
if (position.article) await this.fetchArticleNames(position.article);
|
||||||
|
if (position.articlePacket) await this.fetchArticlePacketNames(position.articlePacket);
|
||||||
}
|
}
|
||||||
this.crudModalId = 'update'
|
this.crudModalId = 'update'
|
||||||
this.crudModalData = disconnectedData
|
this.crudModalData = disconnectedData
|
||||||
@@ -254,6 +264,9 @@ Vue.component('warehouse-shipping-note', {
|
|||||||
}, async fetchArticleNames(articleId) {
|
}, async fetchArticleNames(articleId) {
|
||||||
const response = await axios.get(window.TT_CONFIG["BASE_PATH"] + '/WarehouseArticle/autoComplete?searchedID=' + articleId);
|
const response = await axios.get(window.TT_CONFIG["BASE_PATH"] + '/WarehouseArticle/autoComplete?searchedID=' + articleId);
|
||||||
this.$set(this.articleNames, articleId, response.data[0].text);
|
this.$set(this.articleNames, articleId, response.data[0].text);
|
||||||
|
}, async fetchArticlePacketNames(articlePacketId) {
|
||||||
|
const response = await axios.get(window.TT_CONFIG["BASE_PATH"] + '/WarehouseArticlePacket/autoComplete?searchedID=' + articlePacketId);
|
||||||
|
this.$set(this.articlePacketNames, articlePacketId, response.data[0].text);
|
||||||
}, async createOrUpdate() {
|
}, async createOrUpdate() {
|
||||||
const response = await axios.post(this.crudModalId === 'create' ? window['TT_CONFIG']['CREATE_URL'] : window['TT_CONFIG']['UPDATE_URL'],
|
const response = await axios.post(this.crudModalId === 'create' ? window['TT_CONFIG']['CREATE_URL'] : window['TT_CONFIG']['UPDATE_URL'],
|
||||||
this.crudModalData);
|
this.crudModalData);
|
||||||
@@ -266,7 +279,7 @@ Vue.component('warehouse-shipping-note', {
|
|||||||
response.data.errors ? Object.values(response.data.errors).join('<br>') : response.data.message || 'Ein Fehler ist aufgetreten');
|
response.data.errors ? Object.values(response.data.errors).join('<br>') : response.data.message || 'Ein Fehler ist aufgetreten');
|
||||||
}
|
}
|
||||||
}, async fetchDeliveryAddresses() {
|
}, async fetchDeliveryAddresses() {
|
||||||
if (!this.crudModalData.billingAddressId || this.crudModalSelectDeliveryAddressMode !== 'existing') return;
|
if (!this.crudModalData.billingAddressId || this.crudModalSelectDeliveryAddressMode !== 'existing' && this.crudModalSelectDeliveryAddressMode !== 'billing') return;
|
||||||
|
|
||||||
if (this.crudModalSelectDeliveryAddressMode === 'billing') {
|
if (this.crudModalSelectDeliveryAddressMode === 'billing') {
|
||||||
const response = await axios.get(window.TT_CONFIG["BASE_PATH"] + '/Address/api?do=getAddress&id=' + this.crudModalData.billingAddressId);
|
const response = await axios.get(window.TT_CONFIG["BASE_PATH"] + '/Address/api?do=getAddress&id=' + this.crudModalData.billingAddressId);
|
||||||
|
|||||||
Reference in New Issue
Block a user