瀏覽代碼

fix: sale master

Muhammad Iqbal Afandi 3 年之前
父節點
當前提交
63a5b52948

+ 1
- 1
app/Http/Controllers/PurchaseController.php 查看文件

@@ -196,7 +196,7 @@ class PurchaseController extends Controller
196 196
             ),
197 197
             "productPurchase" => Inertia::lazy(
198 198
                 fn() => PurchaseDetail::historyProductPurchase(
199
-                    request()->only("productNumber", "supplierId")
199
+                    request()->only("product_number", "supplier_id")
200 200
                 )
201 201
                     ->orderBy("price", "desc")
202 202
                     ->get()

+ 1
- 1
app/Http/Controllers/SalesController.php 查看文件

@@ -71,7 +71,7 @@ class SalesController extends Controller
71 71
             ),
72 72
             "stockProducts" => Inertia::lazy(
73 73
                 fn() => StockProduct::search([
74
-                    "search" => request("stockProduct"),
74
+                    "search" => request("stock_product"),
75 75
                 ])
76 76
                     ->get()
77 77
                     ->transform(

+ 2
- 0
resources/js/pages/Purchases/Create.vue 查看文件

@@ -104,6 +104,7 @@ const { onShowCreateProduct, onShowCreateSupplier } = useDialog()
104 104
                       label="Supplier"
105 105
                       placeholder="supplier"
106 106
                       field="name"
107
+                      param="supplier"
107 108
                       refresh-data="suppliers"
108 109
                       :error="form.errors.suppliers_id"
109 110
                       :suggestions="suppliers"
@@ -145,6 +146,7 @@ const { onShowCreateProduct, onShowCreateSupplier } = useDialog()
145 146
                       label="Produk"
146 147
                       placeholder="produk"
147 148
                       field="name"
149
+                      param="product"
148 150
                       refresh-data="products"
149 151
                       :disabled="!form.supplier?.id"
150 152
                       :error="form.errors.product"

+ 1
- 0
resources/js/pages/Purchases/Edit.vue 查看文件

@@ -115,6 +115,7 @@ const { onShowCreateProduct } = useDialog()
115 115
                       label="Produk"
116 116
                       placeholder="produk"
117 117
                       field="name"
118
+                      param="product"
118 119
                       refresh-data="products"
119 120
                       :disabled="!form.supplier?.id"
120 121
                       :error="form.errors.product"

+ 3
- 1
resources/js/pages/Sales/Create.vue 查看文件

@@ -125,6 +125,7 @@ const { onShowCustomerCreate } = useDialog()
125 125
                       label="Pelanggan"
126 126
                       placeholder="pelanggan"
127 127
                       field="name"
128
+                      param="customer"
128 129
                       refresh-data="customers"
129 130
                       v-model="form.customer"
130 131
                       :error="form.errors.customer_id"
@@ -162,13 +163,14 @@ const { onShowCustomerCreate } = useDialog()
162 163
                 <div class="grid">
163 164
                   <div class="col-12 md:col-6">
164 165
                     <AppAutoComplete
165
-                      :disabled="!form.customer?.id"
166 166
                       empty
167 167
                       label="Produk"
168 168
                       placeholder="produk"
169 169
                       field="name"
170
+                      param="stock_product"
170 171
                       refresh-data="stockProducts"
171 172
                       v-model="form.product"
173
+                      :disabled="!form.customer?.id"
172 174
                       :error="form.errors.product"
173 175
                       :suggestions="stockProducts"
174 176
                     >