fix remove correct po item

This commit is contained in:
edmondlang
2023-10-04 23:21:00 +08:00
parent a0f600037b
commit 49d4110241
2 changed files with 2 additions and 1 deletions
@@ -16,6 +16,7 @@ class TransactionDetailResource extends JsonResource
{
return [
'id' => $this->id,
'stockCode' => $this->product_code,
'description' => $this->product_name,
'quantity' => $this->quantity,
@@ -19,7 +19,7 @@
</div>
<div class="row">
<div class="col">
<div class="row" v-for="(product, index) in products">
<div class="row" v-for="(product, index) in products" :key="product.id">
<div class="col p-b-10 p-t-10 " :class="[{'b-grey' : index !== Object.keys(products).length - 1}, {'b-b' : index !== Object.keys(products).length - 1}]">
<purchase-order-item-form-component :data="product" :index="index" :currency="data.fixed_currency.short_code" :editable="!submitted" :section="section" @change="updateProduct($event, index)" v-on:remove="removeProduct(index)"></purchase-order-item-form-component>
</div>