diff --git a/classes/controller/admin/accounting.php b/classes/controller/admin/accounting.php index bf55d5b..c57b918 100644 --- a/classes/controller/admin/accounting.php +++ b/classes/controller/admin/accounting.php @@ -1,10 +1,10 @@ xslt_stylesheet = 'admin/accounting'; xml::to_XML(array('admin_page' => 'Accounting'), $this->xml_meta); xml::to_XML(array('current_date' => date('Y-m-d', time())), $this->xml_meta); } @@ -13,7 +13,7 @@ public function action_index() { $accounting_node = $this->xml_content->appendChild($this->dom->createElement('accounting')); - xml::to_XML(Transactions::get(NULL, 'IF(transfer_date = 0,1,0),transfer_date;'), $accounting_node, 'entry', 'id'); + xml::to_XML(Transactions::get(NULL, 'IF(transfer_date = 0,1,0),transfer_date;', NULL, TRUE), $accounting_node, 'entry', 'id'); } public function action_entry() @@ -54,10 +54,19 @@ public function action_entry() 'employee_id' => $post->get('employee_id'), ); + if (isset($_POST['rm_voucher'])) + { + $new_transaction_data['rm_vouchers'] = array(); + foreach (array_keys($_POST['rm_voucher']) as $nr) + $new_transaction_data['rm_vouchers'][] = $_POST['rm_voucher_names'][$nr]; + } + if ( ! isset($_GET['id'])) { $transaction = new Transaction(NULL, $new_transaction_data); $this->add_message('Transaction '.$transaction->get_id().' added'); + if (isset($_FILES['voucher'])) $transaction->add_voucher($_FILES['voucher']); + $this->set_formdata(array('accounting_date' => date('Y-m-d', time()), 'transfer_date' => date('Y-m-d', time()))); } else { @@ -65,6 +74,8 @@ public function action_entry() $transaction->set($new_transaction_data); $this->add_message('Transaction '.$transaction->get_id().' updated'); $this->set_formdata($transaction->get()); + if (isset($_FILES['voucher'])) $transaction->add_voucher($_FILES['voucher']); + xml::to_XML($transaction->get('vouchers'), array('vouchers' => $this->xml_content), 'voucher'); } } else @@ -77,6 +88,7 @@ public function action_entry() { $transaction = new Transaction($_GET['id']); $this->set_formdata($transaction->get()); + xml::to_XML($transaction->get('vouchers'), array('vouchers' => $this->xml_content), 'voucher'); } else { diff --git a/classes/model/transaction.php b/classes/model/transaction.php index eb0b73e..49686f1 100644 --- a/classes/model/transaction.php +++ b/classes/model/transaction.php @@ -7,24 +7,19 @@ class Model_Transaction extends Model private $id; private static $prepared_insert; // PDO prepared insert object - public function __construct($id = NULL, $data = NULL) + public function __construct($id = NULL, $data = NULL, $voucher = FALSE) { parent::__construct(); if ($id === NULL && is_array($data)) { - if ($this->id = $this->add($data)) - { - $this->data = $data; - } + if ($this->id = $this->add($data, $voucher)) + $this->load_entry_data($this->id); } elseif ($id > 0) { $id = (int) preg_replace("/[^0-9]+/", '', $id); - if ($this->load_entry_data($id)) - { - $this->id = $id; - } + if ($this->load_entry_data($id)) $this->id = $id; } } @@ -40,6 +35,7 @@ public function __construct($id = NULL, $data = NULL) * 'sum' => amount of money, above 0 * 'employee_id' => int or NULL OPTIONAL * ) + * @param arr $voucher - from a file form field * @return int **/ private function add($data) @@ -51,9 +47,7 @@ private function add($data) if ( ! isset($data['employee_id'])) $data['employee_id'] = NULL; if (self::$prepared_insert == NULL) - { self::$prepared_insert = $this->pdo->prepare('INSERT INTO transactions (accounting_date, transfer_date, description, journal_id, vat, sum, employee_id) VALUES(?,?,?,?,?,?,?)'); - } self::$prepared_insert->execute(array( $data['accounting_date'], @@ -68,6 +62,27 @@ private function add($data) return $this->pdo->lastInsertId(); } + /** + * Add voucher to this transaction + * + * @param arr $voucher - from a file form field + * @return boolean + **/ + public function add_voucher($voucher) + { + if ( ! ($this->id > 0)) throw new Kohana_Exception('No transaction ID set'); + + $folder = APPPATH.'user_content/vouchers/'.$this->get_id(); + exec('mkdir -p '.$folder); + + if (isset($voucher['error']) && $voucher['error'] == 0) + { + move_uploaded_file($voucher['tmp_name'], $folder.'/'.$voucher['name']); + $this->load_entry_data($this->get_id()); // Load the new data to the local data cache + return TRUE; + } + } + /** * Set data in current transaction * @@ -87,17 +102,20 @@ public function set($data) { if ( ! ($this->id > 0)) throw new Kohana_Exception('No transaction ID set'); - $sql = 'UPDATE transactions SET'; + $sql = 'UPDATE transactions SET'; + $columns = array_keys($this->pdo->query('SELECT * FROM transactions LIMIT 1;')->fetch(PDO::FETCH_ASSOC)); + if (isset($columns[array_search('id', $columns)])) + unset($columns[array_search('id', $columns)]); // Unset ID, we should never try to update that foreach ($data as $field => $value) { - $columns = array_keys($this->pdo->query('SELECT * FROM transactions LIMIT 1;')->fetch(PDO::FETCH_ASSOC)); - - if (isset($columns[array_search('id', $columns)])) - unset($columns[array_search('id', $columns)]); // Unset ID, we should never try to update that - if (in_array($field, $columns)) $sql .= '`'.$field.'` = '.$this->pdo->quote($value).','; + elseif ($field == 'rm_vouchers') + { + foreach ($value as $filename) + unlink(APPPATH.'user_content/vouchers/'.$this->id.'/'.$filename); + } } $sql = substr($sql, 0, strlen($sql) - 1) . ' WHERE id = '.$this->pdo->quote($this->get_id()).' LIMIT 1'; @@ -121,9 +139,18 @@ public function get_id() return $this->id; } - private function load_entry_data($id) + protected function load_entry_data($id) { - return ($this->data = $this->pdo->query('SELECT * FROM transactions WHERE id = '.$id)->fetch(PDO::FETCH_ASSOC)); + if ($this->data = $this->pdo->query('SELECT * FROM transactions WHERE id = '.$id)->fetch(PDO::FETCH_ASSOC)) + { + $this->data['vouchers'] = array(); + foreach (glob(APPPATH.'user_content/vouchers/'.$id.'/*') as $voucher) + $this->data['vouchers'][] = pathinfo($voucher, PATHINFO_BASENAME); + + return TRUE; + } + + return FALSE; } } diff --git a/classes/model/transactions.php b/classes/model/transactions.php index 2c37665..d485296 100644 --- a/classes/model/transactions.php +++ b/classes/model/transactions.php @@ -8,7 +8,7 @@ public function __construct() parent::__construct(); } - public static function get($search = NULL, $order_by = 'accounting_date', $where = NULL) + public static function get($search = NULL, $order_by = 'accounting_date', $where = NULL, $format_for_XML = FALSE) { $pdo = Kohana_pdo::instance(); @@ -48,7 +48,21 @@ public static function get($search = NULL, $order_by = 'accounting_date', $where ORDER BY '.$order_by; // ORDER BY NEEDS TO BE SECURED!!!!!0101=!11111ett - return $pdo->query($sql)->fetchAll(PDO::FETCH_ASSOC); + $transactions = array(); + foreach ($pdo->query($sql)->fetchAll(PDO::FETCH_ASSOC) as $transaction) + { + foreach (glob(APPPATH.'user_content/vouchers/'.$transaction['id'].'/*') as $nr => $voucher) + { + if ($format_for_XML) + $transaction['vouchers'][$nr.'voucher'] = pathinfo($voucher, PATHINFO_BASENAME); + else + $transaction['vouchers'][] = pathinfo($voucher, PATHINFO_BASENAME); + } + + $transactions[] = $transaction; + } + + return $transactions; } } diff --git a/css/admin/style.css b/css/admin/style.css index 50bddfb..4c7928f 100644 --- a/css/admin/style.css +++ b/css/admin/style.css @@ -1,475 +1,456 @@ -* -{ - font-family: "Verdana"; - font-size: 12px; - color: #4c4b4b; -} - -body -{ - margin: 0; - padding: 0; - border: 0; /* This removes the border around the viewport in old versions of IE */ - width: 100%; - background-color: #d9dee5; - min-width: 600px; /* Minimum width of layout - remove line if not required */ - /* The min-width property does not work in old versions of Internet Explorer */ -} - -h1 /* More styles for h1 can be found in the menu-section */ -{ - font-weight: normal; -} - -h2 -{ - padding-top: 25px; - clear: both; -} - -input, textarea -{ - margin: 0 0 2px 0; - border: 1px solid #d4d4d4; - color: #4c4b4b; -} - -input -{ - height: 20px; -} - - input.button +/* ### GENERAL ################################# */ + * { - padding: 2px 15px 2px 15px; - height: 23px; - line-height: 18px; - font-weight: bold; - color: #4c4b4b; - border: 1px solid #d4d4d4; - background-color: #ddd; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fafafa', endColorstr='#dddddd'); - background: -moz-linear-gradient(top, #fafafa, #dddddd); - background: -webkit-gradient(linear, left top, left bottom, from(#fafafa), to(#dddddd)); + font-family: "Verdana"; + font-size: 12px; + color: #4c4b4b; } - input.error, textarea.error + body { - background-color: #ffe9e9; + margin: 0; + padding: 0; + border: 0; /* This removes the border around the viewport in old versions of IE */ + width: 100%; + background-color: #d9dee5; + min-width: 600px; /* Minimum width of layout - remove line if not required */ + /* The min-width property does not work in old versions of Internet Explorer */ } -#logo -{ - position: absolute; - margin: 20px 0 0 40px; - font-size: 50px; - font-family: 'Cuprum', arial, serif; - color: #fff; -} - -.error -{ - font-weight: bold; - color: #f00; -} - - - -/* ######### loginbox - START ######### */ - -div#loginboxcontainer -{ - clear: both; - border: 1px solid #d9dee5; /* No fucking idea why we need this */ -} - -div#loginbox -{ - width: 280px; - margin-left: auto; - margin-right: auto; - background-color: #fff; - display: block; - margin-top: 20px; - border: 1px solid #d4d4d4; -} - - div#loginbox h1 + h1 /* More styles for h1 can be found in the menu-section */ { - margin: 0; - padding: 0px 10px 0px 10px; - font-size: 18px; - line-height: 22px; - background-color: #ddd; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fafafa', endColorstr='#dddddd'); - background: -moz-linear-gradient(top, #fafafa, #dddddd); - background: -webkit-gradient(linear, left top, left bottom, from(#fafafa), to(#dddddd)); - height: 22px; - border-bottom: 1px solid #d4d4d4; + font-weight: normal; } - div#loginbox table + h2 { - margin: 10px 10px 10px auto; + padding-top: 25px; + clear: both; } - div#loginbox table td - { - text-align: right; - } + input, textarea + { + margin: 0 0 2px 0; + border: 1px solid #d4d4d4; + color: #4c4b4b; + } + input + { + height: 20px; + } + input.button + { + padding: 2px 15px 2px 15px; + height: 23px; + line-height: 18px; + font-weight: bold; + color: #4c4b4b; + border: 1px solid #d4d4d4; + background-color: #ddd; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fafafa', endColorstr='#dddddd'); + background: -moz-linear-gradient(top, #fafafa, #dddddd); + background: -webkit-gradient(linear, left top, left bottom, from(#fafafa), to(#dddddd)); + } -/* ######### loginbox - END ######### */ + input.error, textarea.error + { + background-color: #ffe9e9; + } + #logo + { + position: absolute; + margin: 20px 0 0 40px; + font-size: 50px; + font-family: 'Cuprum', arial, serif; + color: #fff; + } -/* ######### header - START ######### */ + .error + { + font-weight: bold; + color: #f00; + } -#header -{ - clear: both; - float: left; - width: 100%; - height: 103px; - background-color: #3b94b9; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#3b94b9', endColorstr='#155a76'); - background: -moz-linear-gradient(top, #3b94b9, #155a76); - background: -webkit-gradient(linear, left top, left bottom, from(#3b94b9), to(#155a76)); - border-bottom: 1px solid #0d3a4c; -} +/* ### LOGINBOX ################################ */ + div#loginboxcontainer + { + clear: both; + border: 1px solid #d9dee5; /* No fucking idea why we need this */ + } - #header p.info + div#loginbox { - float: right; - padding: 75px 15px 0 0; - color: #3b94b9; - white-space: nowrap; + width: 280px; + margin-left: auto; + margin-right: auto; + background-color: #fff; + display: block; + margin-top: 20px; + border: 1px solid #d4d4d4; } - #header p.info span + div#loginbox h1 { - font-weight: bold; - color: #3b94b9; + margin: 0; + padding: 0px 10px 0px 10px; + font-size: 18px; + line-height: 22px; + background-color: #ddd; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fafafa', endColorstr='#dddddd'); + background: -moz-linear-gradient(top, #fafafa, #dddddd); + background: -webkit-gradient(linear, left top, left bottom, from(#fafafa), to(#dddddd)); + height: 22px; + border-bottom: 1px solid #d4d4d4; } - #header p.info a + div#loginbox table { - color: #4bbceb; + margin: 10px 10px 10px auto; } - #header p.info a:hover - { - color: #fff; - } + div#loginbox table td + { + text-align: right; + } -/* ######### header - END ######### */ - -/* ######### columns - START ######### */ - -.colsoutercontainer -{ - border-top: 1px solid #fafafa; - position: relative; /* This fixes the IE7 overflow hidden bug and stops the layout jumping out of place */ - clear: both; - float: left; - width: 100%; /* width of whole page */ - overflow: hidden; /* This chops off any overhanging divs */ -} - -.colscontainer -{ - float: left; - width: 200%; - position: relative; - left: 200px; -} - -.contentwrap -{ - float: right; - width: 50%; - position: relative; - right: 200px; - padding-bottom: 1em; -} - -/* ######### columns - END ######### */ - - -/* ######### content - START ######### */ - -.contentwrap2 -{ - margin: 10px 15px 0 220px; - position: relative; - right: 100%; - overflow: hidden; - background-color: #fff; - border: 1px solid #d4d4d4; -} - - .contentwrap2 ul.tabs +/* ### HEADER ################################## */ + #header { - margin: 0; - padding: 0; - display: block; - height: 22px; - border-top: 1px solid #d4d4d4; + clear: both; + float: left; + width: 100%; + height: 103px; + background-color: #3b94b9; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#3b94b9', endColorstr='#155a76'); + background: -moz-linear-gradient(top, #3b94b9, #155a76); + background: -webkit-gradient(linear, left top, left bottom, from(#3b94b9), to(#155a76)); + border-bottom: 1px solid #0d3a4c; } - .contentwrap2 ul.tabs li + #header p.info { - min-width: 60px; - padding: 0; - list-style-type: none; - line-height: 20px; - height: 20px; - border-bottom: 1px solid #d4d4d4; - border-right: 1px solid #d4d4d4; - float: left; - text-align: center; + float: right; + padding: 75px 15px 0 0; + color: #3b94b9; + white-space: nowrap; } - .contentwrap2 ul.tabs li a + #header p.info span { - padding: 0 5px 0 5px; - text-decoration: none; - display: block; + font-weight: bold; + color: #3b94b9; } - .contentwrap2 ul.tabs li a:hover, .contentwrap2 ul.tabs li a.selected + #header p.info a { - background-color: #d7e8ef; + color: #4bbceb; } - .contentwrap2 .content - { - clear: both; - margin: 15px; - line-height: 20px; - overflow: auto; - } - - .contentwrap2 .content form textarea - { - clear: both; - float: left; - width: 350px; - margin-bottom: 1em; - } + #header p.info a:hover + { + color: #fff; + } - .contentwrap2 a:hover +/* ### COLUMNS ################################# */ + .colsoutercontainer { - background-color: #d7e8ef; + border-top: 1px solid #fafafa; + position: relative; /* This fixes the IE7 overflow hidden bug and stops the layout jumping out of place */ + clear: both; + float: left; + width: 100%; /* width of whole page */ + overflow: hidden; /* This chops off any overhanging divs */ } - .contentwrap2 table + .colscontainer { - width: 100%; - border-collapse: collapse; + float: left; + width: 200%; + position: relative; + left: 200px; } - .contentwrap2 table tr.odd th, .contentwrap2 table tr.odd td - { - background-color: #d7e8ef; - } - - .contentwrap2 table th - { - font-weight: bold; - text-align: left; - border-bottom: 1px solid #d4d4d4; - } - - .contentwrap2 table tfoot th - { - border-top: 1px solid #d4d4d4; - border-bottom: none; - } - - .contentwrap2 table .small_row - { - width: 60px; - } - - .contentwrap2 table .medium_row - { - width: 100px; - } - - .contentwrap2 table th.right, .contentwrap2 table td.right - { - text-align: right; - padding-right: 20px; - } + .contentwrap + { + float: right; + width: 50%; + position: relative; + right: 200px; + padding-bottom: 1em; + } - .contentwrap2 label +/* ### MENU #################################### */ + .menu { - width: 350px; - float: left; - clear: left; - margin-right: 5px; + float: left; + width: 200px; + position: relative; + right: 190px; } - .contentwrap2 label.content_types {} + .menu div + { + width: 198px; + background-color: #fafafa; + border: 1px solid #d4d4d4; + margin-top: 10px; + /* + border-radius: 8px; + -moz-border-radius: 8px; + */ + } - .contentwrap2 label.content_types input + .menu div p, div.contentwrap2 h1 { - width: auto; - margin-right: 5px; + margin: 0; + padding: 0px 10px 0px 10px; + height: 22px; + font-size: 18px; + line-height: 22px; + background-color: #ddd; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fafafa', endColorstr='#dddddd'); + background: -moz-linear-gradient(top, #fafafa, #dddddd); + background: -webkit-gradient(linear, left top, left bottom, from(#fafafa), to(#dddddd)); } - .contentwrap2 label.content_types select + .menu div ul { - width: auto; + margin: 0; + padding: 0; } - .contentwrap2 span.instead_of_input + .menu div ul li + { + list-style-type: none; + line-height: 20px; + height: 20px; + border-top: 1px solid #d4d4d4; + } + + .menu div ul li a + { + display: block; + width: auto; + padding: 0px 10px 0px 10px; + text-decoration: none; + } + + .menu div ul li a:hover, .menu div ul li a.selected + { + background-color: #d7e8ef; + } + +/* ### FOOTER ################################## */ + #footer { - font-weight: bold; + clear: both; + float: left; + width: 100%; + text-align: center; } - .contentwrap2 input, .contentwrap2 select, .contentwrap2 span.instead_of_input +/* ### CONTENT ################################# */ + .contentwrap2 { - float: right; - width: 150px; + margin: 10px 15px 0 220px; + position: relative; + right: 100%; + overflow: hidden; + background-color: #fff; + border: 1px solid #d4d4d4; } - .contentwrap2 input.button + .contentwrap2 ul.tabs { - width: auto; - margin-top: 20px; + margin: 0; + padding: 0; + display: block; + height: 22px; + border-top: 1px solid #d4d4d4; } - .contentwrap2 input.add_field + .contentwrap2 ul.tabs li { - float: left; - margin-bottom: 20px; + min-width: 60px; + padding: 0; + list-style-type: none; + line-height: 20px; + height: 20px; + border-bottom: 1px solid #d4d4d4; + border-right: 1px solid #d4d4d4; + float: left; + text-align: center; } - .contentwrap2 form p - { - clear: both; - } + .contentwrap2 ul.tabs li a + { + padding: 0 5px 0 5px; + text-decoration: none; + display: block; + } - .contentwrap2 form p.error - { - clear: right; - } + .contentwrap2 ul.tabs li a:hover, .contentwrap2 ul.tabs li a.selected + { + background-color: #d7e8ef; + } - .contentwrap2 div.message - { - background-color: #e9ffe9; - border: solid 1px #0f0; - font-weight: bold; - margin-bottom: 10px; - padding: 5px; - } + .contentwrap2 .content + { + clear: both; + margin: 15px; + line-height: 20px; + overflow: auto; + } - .contentwrap2 div.error - { - background-color: #ffe9e9; - border: solid 1px #f00; - font-weight: bold; - margin-bottom: 10px; - padding: 5px; - } + .contentwrap2 .content form textarea + { + clear: both; + float: left; + width: 350px; + margin-bottom: 1em; + } + .contentwrap2 a:hover + { + background-color: #d7e8ef; + } -/* Site specific - wages */ -form div.form_line -{ - width: 350px; - float: left; - clear: left; - margin-right: 5px; -} + .contentwrap2 table + { + width: 100%; + border-collapse: collapse; + } - form div.form_line span - { - float: right; - width: 150px; - text-align: right; - font-weight: bold; - } -/* End of Site specific - wages */ + .contentwrap2 table tr.odd th, .contentwrap2 table tr.odd td + { + background-color: #d7e8ef; + } -/* ######### content - END ######### */ + .contentwrap2 table th + { + font-weight: bold; + text-align: left; + border-bottom: 1px solid #d4d4d4; + } + .contentwrap2 table tfoot th + { + border-top: 1px solid #d4d4d4; + border-bottom: none; + } -/* ######### menu - START ######### */ + .contentwrap2 table .small_row + { + width: 60px; + } -.menu -{ - float: left; - width: 200px; - position: relative; - right: 190px; -} + .contentwrap2 table .medium_row + { + width: 100px; + } - .menu div - { - width: 198px; - background-color: #fafafa; - border: 1px solid #d4d4d4; - margin-top: 10px; - /* - border-radius: 8px; - -moz-border-radius: 8px; - */ - } + .contentwrap2 table th.right, .contentwrap2 table td.right + { + text-align: right; + padding-right: 20px; + } - .menu div p, div.contentwrap2 h1 + .contentwrap2 label { - margin: 0; - padding: 0px 10px 0px 10px; - height: 22px; - font-size: 18px; - line-height: 22px; - background-color: #ddd; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fafafa', endColorstr='#dddddd'); - background: -moz-linear-gradient(top, #fafafa, #dddddd); - background: -webkit-gradient(linear, left top, left bottom, from(#fafafa), to(#dddddd)); + width: 350px; + float: left; + clear: left; + margin-right: 5px; } - .menu div ul + .contentwrap2 label.content_types {} + + .contentwrap2 label.content_types input + { + width: auto; + margin-right: 5px; + } + + .contentwrap2 label.content_types select + { + width: auto; + } + + .contentwrap2 span.instead_of_input { - margin: 0; - padding: 0; + font-weight: bold; } - .menu div ul li - { - list-style-type: none; - line-height: 20px; - height: 20px; - border-top: 1px solid #d4d4d4; - } + .contentwrap2 input, .contentwrap2 select, .contentwrap2 span.instead_of_input + { + float: right; + width: 150px; + } - .menu div ul li a + .contentwrap2 input.button { - display: block; - width: auto; - padding: 0px 10px 0px 10px; - text-decoration: none; + width: auto; + margin-top: 20px; } - .menu div ul li a:hover, .menu div ul li a.selected + .contentwrap2 input.add_field { - background-color: #d7e8ef; + float: left; + margin-bottom: 20px; } -/* ######### menu - END ######### */ + .contentwrap2 form p + { + clear: both; + } + + .contentwrap2 form p.error + { + clear: right; + } + + .contentwrap2 div.message + { + background-color: #e9ffe9; + border: solid 1px #0f0; + font-weight: bold; + margin-bottom: 10px; + padding: 5px; + } + .contentwrap2 div.error + { + background-color: #ffe9e9; + border: solid 1px #f00; + font-weight: bold; + margin-bottom: 10px; + padding: 5px; + } -/* ######### footer - START ######### */ + /* ### WAGES ################################### */ + form div.form_line + { + width: 350px; + float: left; + clear: left; + margin-right: 5px; + } -#footer -{ - clear: both; - float: left; - width: 100%; - text-align: center; -} + form div.form_line span + { + float: right; + width: 150px; + text-align: right; + font-weight: bold; + } -/* ######### footer - END ######### */ + /* ### ACCOUNTING ############################## */ + .voucher + { + float: left; + clear: left; + padding-top: 10px; + } \ No newline at end of file diff --git a/css/pdfs.css b/css/pdfs.css index b029e0a..2cbc626 100644 --- a/css/pdfs.css +++ b/css/pdfs.css @@ -45,7 +45,7 @@ table.box_table tr.column_decider td {height: 1px;} table.box_table td { - border: 1px solid #f2a201; + border: 1px solid #a2a2a2; border-top: none; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; @@ -73,9 +73,9 @@ table.box_table td.vclearer table.box_table th { - border: 1px solid #f2a201; + border: 1px solid #a2a2a2; border-bottom: none; - background-color: #fcc200; + background-color: #c2c2c2; font-weight: normal; padding: 2px; border-top-left-radius: 5px; @@ -109,9 +109,9 @@ table.salary table.salary th { - border: 1px solid #F2A201; + border: 1px solid #a2a2a2; border-bottom: none; - background-color: #fcc200; + background-color: #c2c2c2; font-weight: normal; padding: 5px; width: 200px; @@ -140,22 +140,22 @@ table.salary table.salary td.thingie { - border-left: 1px solid #F2A201; + border-left: 1px solid #a2a2a2; padding-left: 20px; text-align: left; } table.salary td.numbers { - border-right: 1px solid #F2A201; + border-right: 1px solid #a2a2a2; padding-right: 20px; text-align: right; } table.salary tr.last td { - border-bottom: 1px solid #F2A201; - border-top: 1px solid #F2A201; + border-bottom: 1px solid #a2a2a2; + border-top: 1px solid #a2a2a2; } table.salary tr.last td strong @@ -189,26 +189,26 @@ table.items table.items tr.bottom td.tot_value { font-weight: normal; - border-right: 1px solid #f2a201; + border-right: 1px solid #a2a2a2; } table.items tr.bottom td.tot_ex_vat, table.items tr.bottom td.vat, table.items tr.bottom td.tot { - border-left: 1px solid #f2a201; + border-left: 1px solid #a2a2a2; } table.items tr.bottom td.tot { - border-bottom: 1px solid #f2a201; + border-bottom: 1px solid #a2a2a2; border-bottom-left-radius: 5px; font-weight: bold; } table.items tr.bottom td.tot_value { - border-bottom: 1px solid #f2a201; + border-bottom: 1px solid #a2a2a2; border-bottom-right-radius: 5px; font-weight: bold; } @@ -229,21 +229,21 @@ table.items table.items tr.odd td { - background-color: #fef3cc; + background-color: #eee; } table.items th { - background-color: #fcc200; + background-color: #c2c2c2; font-weight: normal; padding: 2px; - border-top: 1px solid #f2a201; - border-bottom: 1px solid #f2a201; + border-top: 1px solid #a2a2a2; + border-bottom: 1px solid #a2a2a2; } table.items th.artnr { - border-left: 1px solid #f2a201; + border-left: 1px solid #a2a2a2; border-top-left-radius: 5px; width: 98px; } @@ -265,27 +265,27 @@ table.items table.items th.price { - border-right: 1px solid #f2a201; + border-right: 1px solid #a2a2a2; border-top-right-radius: 5px; width: 83px; } table.items td { - background-color: #fceccc; + background-color: #dbdbdb; font-weight: normal; padding: 2px 12px 2px 12px; } table.items td.last { - border-bottom: 1px solid #f2a201; + border-bottom: 1px solid #a2a2a2; } table.items td.artnr { - border-left: 1px solid #f2a201; - border-right: 1px solid #f2a201; + border-left: 1px solid #a2a2a2; + border-right: 1px solid #a2a2a2; } table.items td.artnr.last @@ -295,20 +295,20 @@ table.items table.items td.qty { - border-right: 1px solid #f2a201; - border-left: 1px solid #f2a201; + border-right: 1px solid #a2a2a2; + border-left: 1px solid #a2a2a2; text-align: right; } table.items td.single_price { - border-right: 1px solid #f2a201; + border-right: 1px solid #a2a2a2; text-align: right; } table.items td.price { - border-right: 1px solid #f2a201; + border-right: 1px solid #a2a2a2; text-align: right; } /** End of Items table **/ diff --git a/xsl/admin/accounting.xsl b/xsl/admin/accounting.xsl index 2846127..c74a612 100644 --- a/xsl/admin/accounting.xsl +++ b/xsl/admin/accounting.xsl @@ -60,6 +60,7 @@