Subversion-Projekte lars-tiefland.ci

Revision

Revision 1293 | Revision 1323 | Zur aktuellen Revision | Details | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1131 lars 1
<?php
2
 
3
/**
4
 * User
5
 *
6
 * @package
7
 * @author WebanOS CI
8
 * @copyright Lars Tiefland
9
 * @version 2016
10
 * @access public
11
 */
12
class Order extends CI_Controller
13
{
14
 
15
	public function __construct()
16
	{
17
		parent::__construct();
18
		$this->load->model('order_model', 'order');
19
	}
20
	/**
21
	 * User::index()
22
	 *
23
	 * @return
24
	 */
25
	public function index()
26
	{
1133 lars 27
		$orders = $this->order->get_list();
1131 lars 28
		$this->smarty->assign('orders', $orders);
29
		$this->smarty->view('orders.tpl');
30
	}
31
 
32
	/**
33
	 * User::edit()
34
	 *
35
	 * @param mixed $id
36
	 * @return void
37
	 */
38
	public function edit($id = null)
39
	{
1271 lars 40
		$daten["artikel_stati"] = array(
41
			array(
42
				"name" => "offen",
43
				"short" => "O",
44
				"class" => "status_red"),
45
			array(
46
				"name" => "in Bearbeitung",
47
				"short" => "B",
48
				"class" => "status_yellow",
49
				),
50
			array(
51
				"name" => "reserviert",
52
				"short" => "R",
53
				"class" => "status_blue",
54
				),
55
			array(
56
				"name" => "erledigt",
57
				"short" => "E",
58
				"class" => "status_green",
59
				),
60
			array(
61
				"name" => "abgeschlossen",
62
				"short" => "A",
63
				"class" => "status_white",
64
				),
65
			);
66
		$daten["rechnung_stati"] = array(
67
			array(
68
				"name" => "schreiben",
69
				"short" => "S",
70
				"class" => "status_red"),
71
			array(
72
				"name" => "geschrieben",
73
				"short" => "G",
74
				"class" => "status_yellow",
75
				),
76
			array(
77
				"name" => "bezahlt",
78
				"short" => "B",
79
				"class" => "status_green",
80
				),
81
			);
82
		$daten["lieferschein_stati"] = array(
83
			array(
84
				"name" => "schreiben",
85
				"short" => "S",
86
				"class" => "status_yellow"),
87
			array(
88
				"name" => "geschrieben",
89
				"short" => "G",
90
				"class" => "status_green",
91
				),
92
			array(
93
				"name" => "offen",
94
				"short" => "O",
95
				"class" => "status_red",
96
				),
97
			);
98
		$daten["mahnung_stati"] = array(
99
			array(
100
				"name" => "mahnung1",
101
				"short" => "1",
102
				"class" => "status_green"),
103
			array(
104
				"name" => "mahnung2",
105
				"short" => "2",
106
				"class" => "status_yellow",
107
				),
108
			array(
109
				"name" => "mahnung3",
110
				"short" => "3",
111
				"class" => "status_red",
112
				),
113
			);
114
		$daten["garantie_stati"] = array(
115
			array(
116
				"name" => "eingereicht",
117
				"short" => "E",
118
				"class" => "status_red"),
119
			array(
120
				"name" => "abgeschlossen",
121
				"short" => "A",
122
				"class" => "status_green",
123
				),
124
			);
125
		// Modul dokumente
1288 lars 126
		$preise_anzeigen = 1;
127
		if (isset($GLOBALS["user_rechte"]["Warenwirtschaft"]["bestellung"]["preise_anzeigen"]))
128
		{
129
			if (!isset($GLOBALS["user_rechte"]["Warenwirtschaft"]["bestellung"]["preise_anzeigen"]))
130
			{
131
				// "<br>für bestimmte user preis verbergen";
132
				$preise_anzeigen = 0;
133
			}
134
		}
1172 lars 135
		$order = $this->order->get($id);
1293 lars 136
		$this->smarty->assign('title', 'Bestellung bearbeiten');
1289 lars 137
		$this->smarty->assign('preise_anzeigen', $preise_anzeigen);
1172 lars 138
		$this->smarty->assign('order', $order);
1271 lars 139
		$this->smarty->assign('daten', $daten);
1172 lars 140
		$this->smarty->view('single_order.tpl');
1131 lars 141
	}
142
 
143
	public function save()
144
	{
145
	}
1172 lars 146
 
1131 lars 147
	public function del($id = null)
148
	{
149
	}
150
 
151
}