Skip to content

Commit

Permalink
Fixed accounting date for wages
Browse files Browse the repository at this point in the history
  • Loading branch information
lillem4n committed Jul 15, 2014
1 parent 570de36 commit eb0dede
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
12 changes: 3 additions & 9 deletions classes/controller/admin/wages.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -223,4 +217,4 @@ public function action_payout()
}
}

}
}
5 changes: 1 addition & 4 deletions xsl/admin/wages.xsl
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:decimal-format
decimal-separator='.'
grouping-separator=','
/>
<xsl:decimal-format decimal-separator='.' grouping-separator=',' />

<xsl:include href="tpl.default.xsl" />

Expand Down

0 comments on commit eb0dede

Please sign in to comment.