Subversion-Projekte lars-tiefland.webanos.marine-sales.de

Revision

Revision 249 | Revision 253 | Zur aktuellen Revision | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 249 Revision 252
Zeile 14... Zeile 14...
14
    use Illuminate\Http\Response;
14
    use Illuminate\Http\Response;
Zeile 15... Zeile 15...
15
 
15
 
16
    class SupplierShippingController extends Controller
16
    class SupplierShippingController extends Controller
17
    {
17
    {
18
        public function __construct()
18
        public function __construct()
19
	{
19
        {
20
            $inselversand = array(
20
            $inselversand = array(
21
                "keine Berücksichtigung",
21
                "keine Berücksichtigung",
22
                "kein Inselversand",
22
                "kein Inselversand",
23
                "nur Inselversand",
23
                "nur Inselversand",
24
	    );
24
            );
25
            \View::share( "inselversand", $inselversand );
25
            \View::share( "inselversand", $inselversand );
26
            $shippingGroups = ShippingGroup::all();
26
            $shippingGroups = ShippingGroup::all();
27
            $versandgruppen = array();
27
            $versandgruppen = array();
28
            foreach( $shippingGroups as $shippingGroup )
28
            foreach ( $shippingGroups as $shippingGroup )
29
            {
29
            {
30
                $versandgruppen[$shippingGroup->id] = $shippingGroup->name;
30
                $versandgruppen[$shippingGroup->id] = $shippingGroup->name;
31
            }
31
            }
-
 
32
            \View::share( "versandgruppen", $versandgruppen );
32
            \View::share( "versandgruppen", $versandgruppen );
33
        }
33
	}
34
 
34
        /**
35
        /**
35
         * Display a listing of the resource.
36
         * Display a listing of the resource.
36
         *
37
         *
37
         * @param Supplier $supplier
38
         * @param Supplier $supplier
38
         * @return Application|Factory|View
39
         * @return Application|Factory|View
39
         */
40
         */
40
        public function index( Supplier $supplier ): View|Factory|Application
41
        public function index( Supplier $supplier ): View|Factory|Application
41
        {
42
        {
42
            //
43
            //
43
            $vKosten = SupplierShipping::with('shipping_group')->where( "supplier_id", $supplier->id )->orderBy('rank')->get();
44
            $vKosten = SupplierShipping::with( 'shipping_group' )->where( "supplier_id", $supplier->id )->orderBy( 'rank' )->get();
44
            return view( "online_shop.shipping_include", [ "shipping" => $vKosten, "supplier" => $supplier, ] );
45
            return view( "online_shop.shipping_include", [ "shipping" => $vKosten, "supplier" => $supplier, ] );
Zeile 45... Zeile 46...
45
        }
46
        }
46
 
47
 
Zeile 68... Zeile 69...
68
            //
69
            //
69
            $data = $request->validated();
70
            $data = $request->validated();
70
            SupplierShipping::create( $data );
71
            SupplierShipping::create( $data );
71
        }
72
        }
Zeile -... Zeile 73...
-
 
73
 
-
 
74
        public function show( Supplier $supplier, SupplierShipping $supplierShipping ): void
-
 
75
        {
-
 
76
            echo $supplierShipping->name . "für Lieferanten " . $supplier->name;
-
 
77
        }
72
 
78
 
73
        /**
79
        /**
74
         * Show the form for editing the specified resource.
80
         * Show the form for editing the specified resource.
75
         *
81
         *
76
         * @param Supplier $supplier
82
         * @param Supplier $supplier
77
         * @param SupplierShipping $shipping
83
         * @param SupplierShipping $shipping
78
         * @return Application|Factory|View
84
         * @return Application|Factory|View
79
         */
85
         */
80
        public function edit( Supplier $supplier, SupplierShipping $shipping ): View|Factory|Application
86
        public function edit( Supplier $supplier, SupplierShipping $shipping ): View|Factory|Application
81
        {
87
        {
82
		//
88
            //
83
            $shipping->load('shipping_group');
89
            $shipping->load( 'shipping_group' );
84
            return view( "online_shop.shipping", [ "supplier" => $supplier, "vk" => $shipping, ] );
90
            return view( "online_shop.shipping", [ "supplier" => $supplier, "vk" => $shipping, ] );
Zeile 85... Zeile 91...
85
        }
91
        }
86
 
92