|
37 | 37 | <div style="margin-left: 3px">
|
38 | 38 | <span >All Category</span>
|
39 | 39 | @foreach ($Category as $Category_item)
|
40 |
| - <span class="btn btn-primary">{{ $Category_item->category_name }}</span> |
| 40 | + <span class="btn btn-primary " style="margin-top: 2px">{{ $Category_item->category_name }}</span> |
41 | 41 | @endforeach
|
42 | 42 |
|
43 | 43 | </div>
|
|
47 | 47 | <div class="row">
|
48 | 48 | <div class="col-md-5">
|
49 | 49 | <div class="panel">
|
50 |
| - <div class="row"> |
51 |
| - <div class="col-sm-7"> |
52 |
| - <select class="form-control"> |
53 |
| - @foreach ($Customer as $customer) |
54 |
| - <option>{{ $customer->name }}</option> |
55 |
| - @endforeach |
56 |
| - </select> |
57 |
| - </div> |
58 |
| - |
59 |
| - <button class="btn btn-primary waves-effect waves-light" data-toggle="modal" data-target="#custom-width-modal">Add Cusstomer</button> |
60 | 50 |
|
61 |
| - </div> |
62 | 51 | <br>
|
63 | 52 | <div class="price_card text-center">
|
64 | 53 | <table class="table table-striped table-bordered">
|
|
72 | 61 | </tr>
|
73 | 62 | </thead>
|
74 | 63 | <tbody>
|
75 |
| - <tr> |
76 |
| - <td>Name</td> |
77 |
| - <td> |
78 |
| - <form action="" method="post" style="margin-top: -20px"> |
79 |
| - <input type="text" min="1" style="width: 40%"> |
80 |
| - <button type="submit"> <i class="md md-done"></i></button> |
81 |
| - </form> |
82 |
| - </td> |
83 |
| - <td>100</td> |
84 |
| - <td>100</td> |
85 |
| - <td> |
86 |
| - <a class="btn btn-icon waves-effect waves-light btn-danger "> <i class="fa fa-remove"></i> </a> |
87 |
| - </td> |
88 |
| - </tr> |
| 64 | + {{-- show cart item start--}} |
| 65 | + <?php |
| 66 | + $cart_item_show = Cart::content(); |
| 67 | + ?> |
| 68 | + {{-- show cart item End--}} |
| 69 | + @foreach ($cart_item_show as $cart_item) |
| 70 | + <tr> |
| 71 | + <td>{{ $cart_item->name }}</td> |
| 72 | + <td> |
| 73 | + <form action="{{ route('update.cart',$cart_item->rowId) }}" method="post" style="margin-top: -20px"> |
| 74 | + @csrf |
| 75 | + <input type="number" min="1" style="width: 40%" value="{{ $cart_item->qty }}" name="qty"> |
| 76 | + <button type="submit"> <i class="md md-done"></i></button> |
| 77 | + </form> |
| 78 | + </td> |
| 79 | + <td>{{ $cart_item->price }}</td> |
| 80 | + <td>{{ $cart_item->price*$cart_item->qty }}</td> |
| 81 | + <td> |
| 82 | + <a href="{{ route('remove.cart.item',$cart_item->rowId) }}" class="btn btn-icon waves-effect waves-light btn-danger "> <i class="fa fa-remove"></i> </a> |
| 83 | + </td> |
| 84 | + </tr> |
| 85 | + @endforeach |
89 | 86 | </tbody>
|
90 | 87 | </table>
|
91 | 88 |
|
92 | 89 | <div class="pricing-header bg-primary">
|
93 |
| - <span>Total Quentaty :</span><br> |
94 |
| - <span>Total Price :</span><br> |
95 |
| - <button class="btn btn-danger waves-effect waves-light w-md">Invoic</button> |
| 90 | + <span>Total Quentaty : {{ Cart::count(); }}</span><br> |
| 91 | + <span>Price : {{ Cart::subtotal(); }}</span><br> |
| 92 | + <span>Vat : {{ Cart::tax(); }} (5%)</span><br> |
| 93 | + <span>Total Price : {{ Cart::total(); }}</span><br> |
| 94 | + |
| 95 | + |
96 | 96 |
|
97 | 97 | </div>
|
| 98 | + |
| 99 | + |
98 | 100 | </div>
|
| 101 | + <form action="{{ route('cart.invoice') }}" method="post"> |
| 102 | + @csrf |
| 103 | + <div class="row"> |
| 104 | + @if ($errors->any()) |
| 105 | + @foreach ($errors->all() as $error) |
| 106 | + <ul> |
| 107 | + <li> |
| 108 | + <p class="text-light">{{ $error }}</p> |
| 109 | + </li> |
| 110 | + </ul> |
| 111 | + @endforeach |
| 112 | + @endif |
| 113 | + <div class="col-sm-7"> |
| 114 | + <select class="form-control" name="cus_id"> |
| 115 | + <option >Select Customer</option> |
| 116 | + @foreach ($Customer as $customer) |
| 117 | + <option value="{{ $customer->id }}">{{ $customer->name }}</option> |
| 118 | + @endforeach |
| 119 | + </select> |
| 120 | + </div> |
| 121 | + |
| 122 | + <button class="btn btn-primary waves-effect waves-light" data-toggle="modal" data-target="#custom-width-modal">Add Cusstomer</button> |
| 123 | + |
| 124 | + </div> |
| 125 | + <button type="submit" class="btn btn-danger waves-effect waves-light" style="margin-left: 40%;margin-top: 5%;margin-bottom: 2%;">Invoice</button> |
| 126 | + </form> |
| 127 | + |
99 | 128 | </div>
|
| 129 | + |
100 | 130 | </div>
|
101 | 131 | <!-- sample modal content -->
|
102 | 132 | <div id="custom-width-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="custom-width-modalLabel" aria-hidden="true" style="display: none;">
|
|
193 | 223 | <th>Category</th>
|
194 | 224 | <th>Code</th>
|
195 | 225 | <th>Price </th>
|
196 |
| - |
| 226 | + <th>Action</th> |
197 | 227 | </tr>
|
198 | 228 | </thead>
|
199 | 229 | @foreach ($product as $item)
|
| 230 | + |
200 | 231 | <tr>
|
201 |
| - <td> |
202 |
| - <a href="" style="font-size: 20px;" class="m-b-4"><i class="md md-add"></i></a> |
203 |
| - <img style="width: 60px; height: 60px; " src="{{ asset('upload/product_image') }}/{{ $item->product_image }}" > |
204 |
| - </td> |
205 |
| - <td>{{ $item->product_name }}</td> |
206 |
| - <td>{{ $item->category_name }}</td> |
207 |
| - <td>{{ $item->product_code }}</td> |
208 |
| - <td>{{ $item->seling_price }}</td> |
| 232 | + <form action="{{ route('add.cart') }}" method="post" enctype="multipart/form-data"> |
| 233 | + @csrf |
| 234 | + <input type="hidden" name="id" value="{{ $item->id }}"> |
| 235 | + <input type="hidden" name="name" value="{{ $item->product_name }}"> |
| 236 | + <input type="hidden" name="qty" value="1"> |
| 237 | + <input type="hidden" name="price" value="{{ $item->seling_price }}"> |
| 238 | + <td> |
| 239 | + <img style="width: 60px; height: 60px; " src="{{ asset('upload/product_image') }}/{{ $item->product_image }}" > |
| 240 | + </td> |
| 241 | + <td>{{ $item->product_name }}</td> |
| 242 | + <td>{{ $item->category_name }}</td> |
| 243 | + <td>{{ $item->product_code }}</td> |
| 244 | + <td>{{ $item->seling_price }}</td> |
| 245 | + <td> <button type="submit" class="btn btn-primary"><i class="md md-add"></i></button></td> |
| 246 | + </form> |
209 | 247 | </tr>
|
| 248 | + |
210 | 249 | @endforeach
|
211 | 250 |
|
212 | 251 | <tbody>
|
|
0 commit comments