From eb0dede66e40359211ecf2f343f15f7dcf5509ed Mon Sep 17 00:00:00 2001 From: Lillem4n Date: Tue, 15 Jul 2014 14:52:25 +0200 Subject: [PATCH] Fixed accounting date for wages --- classes/controller/admin/wages.php | 12 +++--------- xsl/admin/wages.xsl | 5 +---- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/classes/controller/admin/wages.php b/classes/controller/admin/wages.php index fa66dc5..f907066 100644 --- a/classes/controller/admin/wages.php +++ b/classes/controller/admin/wages.php @@ -50,24 +50,19 @@ public function action_index() $this->set_formdata(array('period'=>$_GET['period'])); // End of period-stuff - if (count($_POST)) { // Data submitted $post = new Validation($_POST); $post->filter('trim'); - $post_array = $post->as_array(); + $post_array = $post->as_array(); foreach (array_keys($post_array) as $key) - { if (substr($key, 0, 13) == 'submit_button') - { $employee_id = (int) substr($key, 14); - } - } $transaction_data = array( - 'accounting_date' => date('Y-m-d', time()), + 'accounting_date' => date('Y-m-25', strtotime($_GET['period'])), 'transfer_date' => date('Y-m-d', time()), 'description' => 'Social fees period '.$_GET['period'], 'journal_id' => NULL, @@ -141,7 +136,6 @@ public function action_payouts() public function action_payout() { - // Set employees node $employees_node = $this->xml_content->appendChild($this->dom->createElement('employees')); $employees = array(); @@ -223,4 +217,4 @@ public function action_payout() } } -} +} \ No newline at end of file diff --git a/xsl/admin/wages.xsl b/xsl/admin/wages.xsl index 32cad67..2b3ccf0 100644 --- a/xsl/admin/wages.xsl +++ b/xsl/admin/wages.xsl @@ -1,10 +1,7 @@ - +