diff --git a/app/Cart/TransactionDraft.php b/app/Cart/TransactionDraft.php
index 4c00da7..f6635d4 100644
--- a/app/Cart/TransactionDraft.php
+++ b/app/Cart/TransactionDraft.php
@@ -142,6 +142,7 @@ abstract class TransactionDraft
$items[] = [
'id' => $item->product->id,
'name' => $item->name,
+ 'unit' => $item->unit,
'price' => $item->price,
'qty' => $item->qty,
'item_discount' => $item->item_discount,
diff --git a/resources/lang/id/cart.php b/resources/lang/id/cart.php
index b253138..3dd47a2 100644
--- a/resources/lang/id/cart.php
+++ b/resources/lang/id/cart.php
@@ -3,4 +3,5 @@
return [
// Labels
'product_search' => 'Cari Produk',
+ 'list' => 'Transaksi',
];
diff --git a/resources/lang/id/unit.php b/resources/lang/id/unit.php
index 80801be..3368d7a 100644
--- a/resources/lang/id/unit.php
+++ b/resources/lang/id/unit.php
@@ -6,6 +6,7 @@ return [
'list' => 'Daftar Satuan',
'empty' => 'Belum ada Satuan',
'products_count' => 'Jumlah Produk',
+ 'product_unit' => 'Satuan Produk',
'back_to_index' => 'Kembali ke daftar Satuan',
// Actions
diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php
index 6a73265..46ea1ca 100644
--- a/resources/views/auth/login.blade.php
+++ b/resources/views/auth/login.blade.php
@@ -52,13 +52,4 @@
-@if (count($errors) > 0)
-
-
- @foreach ($errors->all() as $error)
- - {{ $error }}
- @endforeach
-
-
-@endif
@endsection
diff --git a/resources/views/layouts/partials/top-nav.blade.php b/resources/views/layouts/partials/top-nav.blade.php
index 526b462..2a36487 100644
--- a/resources/views/layouts/partials/top-nav.blade.php
+++ b/resources/views/layouts/partials/top-nav.blade.php
@@ -17,6 +17,9 @@
+
+ - {{ link_to_route('cart.index', trans('cart.list')) }}
+
@@ -28,8 +31,15 @@
- - {{ link_to_route('products.index', trans('product.list')) }}
- - {{ link_to_route('units.index', trans('unit.list')) }}
+ -
+
+ Produk
+
+
+
-
{{ Auth::user()->name }}
diff --git a/tests/Feature/TransactionEntryTest.php b/tests/Feature/TransactionEntryTest.php
index d21365e..ac587b2 100644
--- a/tests/Feature/TransactionEntryTest.php
+++ b/tests/Feature/TransactionEntryTest.php
@@ -239,7 +239,7 @@ class TransactionEntryTest extends BrowserKitTestCase
$this->seeInDatabase('transactions', [
'invoice_no' => date('ym').'0001',
- 'items' => '[{"id":'.$product1->id.',"name":"'.$product1->name.'","price":1000,"qty":1,"item_discount":0,"item_discount_subtotal":0,"subtotal":1000},{"id":'.$product2->id.',"name":"'.$product2->name.'","price":2000,"qty":3,"item_discount":0,"item_discount_subtotal":0,"subtotal":6000}]',
+ 'items' => '[{"id":'.$product1->id.',"name":"'.$product1->name.'","unit":"'.$product1->unit->name.'","price":1000,"qty":1,"item_discount":0,"item_discount_subtotal":0,"subtotal":1000},{"id":'.$product2->id.',"name":"'.$product2->name.'","unit":"'.$product2->unit->name.'","price":2000,"qty":3,"item_discount":0,"item_discount_subtotal":0,"subtotal":6000}]',
'customer' => '{"name":"Nafies","phone":"081234567890"}',
'payment' => 10000,
'total' => 7000,
diff --git a/tests/Unit/Integration/TransactionDraftTest.php b/tests/Unit/Integration/TransactionDraftTest.php
index 9f80786..158a411 100644
--- a/tests/Unit/Integration/TransactionDraftTest.php
+++ b/tests/Unit/Integration/TransactionDraftTest.php
@@ -215,7 +215,7 @@ class TransactionDraftTest extends TestCase
$this->assertDatabaseHas('transactions', [
'invoice_no' => date('ym').'0001',
- 'items' => '[{"id":'.$product1->id.',"name":"'.$product1->name.'","price":1000,"qty":1,"item_discount":0,"item_discount_subtotal":0,"subtotal":1000},{"id":'.$product2->id.',"name":"'.$product2->name.'","price":2000,"qty":3,"item_discount":0,"item_discount_subtotal":0,"subtotal":6000}]',
+ 'items' => '[{"id":'.$product1->id.',"name":"'.$product1->name.'","unit":"'.$product1->unit->name.'","price":1000,"qty":1,"item_discount":0,"item_discount_subtotal":0,"subtotal":1000},{"id":'.$product2->id.',"name":"'.$product2->name.'","unit":"'.$product2->unit->name.'","price":2000,"qty":3,"item_discount":0,"item_discount_subtotal":0,"subtotal":6000}]',
'customer' => '{"name":"Nafies","phone":"081234567890"}',
'payment' => 10000,
'total' => 7000,