created money expense

This commit is contained in:
Ricsi
2017-02-11 22:42:44 +01:00
parent 73db6b620a
commit 08ed5a85d4
20 changed files with 814 additions and 4 deletions

View File

@@ -0,0 +1,90 @@
<div class="buttons">
<a href="/admin/create/money_expense" class="addbutton add-big">Új kiadás</a>
<a href="/admin/money_expense_category" class="addbutton add-big">Kiadás kategóriák kezelése</a>
</div>
<div class="list full_width">
{foreach $mox_array as $mox}
{if !$mox@first && $mox_array[$mox@index]->get_mox_date()|substr:5:2 != $mox_array[$mox@index-1]->get_mox_date()|substr:5:2}
</div>
{/if}
{if $mox@first || $mox_array[$mox@index]->get_mox_date()|substr:5:2 != $mox_array[$mox@index-1]->get_mox_date()|substr:5:2}
<span class="date_separator">{$mox_array[$mox@index]->get_mox_date()|substr:0:4}.
{$months[$mox_array[$mox@index]->get_mox_date()|substr:5:2]}
<img src="/_image/open_folder.png" onclick="block_action('block_{$mox->get_mox_date()|substr:0:4}{$mox->get_mox_date()|substr:5:2}');">
</span>
<div id="block_{$mox->get_mox_date()|substr:0:4}{$mox->get_mox_date()|substr:5:2}" class="month_block">
{/if}
<a href="/admin/money_expense/{$mox->get_mox_id()}">
<div class="list_item">
<table class="money">
<tr>
<td class="icon">
<img src="/_image/expense.png">
</td>
<td class="quarter_width">
{$mox->get_mox_date()}
</td>
<td class="no_mobile_show quarter_width">
{if $mox->get_mox_money_expense_category_moxc_id()}{$mox->get_mox_moxc()->get_moxc_name()}{else}<span class="italic">nincs megadva</span>{/if}
</td>
<td class="no_mobile_show quarter_width">
{$mox->get_mox_name()}
</td>
<td class="quarter_width">
{$mox->get_mox_item()}
</td>
<td class="sum">
{$mox->get_mox_sum()|number_format:0:'':' '} Ft
</td>
</tr>
</table>
</div>
</a>
{if $mox@last}
</div>
{/if}
{/foreach}
</div>
<script>
function open_block(block_id) {
$("#"+block_id).slideDown("slow");
}
function close_block(block_id) {
$("#"+block_id).slideUp("slow");
}
function block_action(block_id) {
if ($("#"+block_id).is(':hidden')) {
open_block(block_id);
}
else {
close_block(block_id);
}
}
$( document ).ready(function() {
var divs = $( "div[class=month_block]" );
$( ".list" ).find( divs ).hide();
var div_list = $( ".list" ).find( divs );
open_block(div_list[0].id);
});
</script>

View File

@@ -0,0 +1,18 @@
<div class="buttons">
<a href="/admin/create/money_expense_category" class="addbutton add-big">Új kiadás kategória</a>
</div>
<div class="list">
{foreach $moxc_assoc_array as $moxc}
<a href="/admin/money_expense_category/{$moxc->get_moxc_id()}">
<div class="list_item">
<img src="/_image/expense.png">
{$moxc->get_moxc_name()}
</div>
</a>
{/foreach}
</div>

View File

@@ -0,0 +1,17 @@
<div class="form_wrapper">
<form method="post">
<input type="hidden" name="action" value="moxc_create">
<div>
<label class="desc" id="title1" for="moxc_name">Kiadás kategória neve:</label>
<div><input type="text" name="moxc_name" id="moxc_name" required></div>
</div>
<div>
<div>
<input class="button black" type="submit" value="Létrehozás">
</div>
</div>
</form>
</div>

View File

@@ -0,0 +1,21 @@
<div class="form_wrapper">
<form method="post">
<div class="buttons">
<a href="/admin/delete_money_expense_category/{$moxc->get_moxc_id()}" class="addbutton delete-big">Kategória törlése</a>
</div>
<input type="hidden" name="action" value="moxc_update">
<input type="hidden" name="moxc_id" value="{$moxc->get_moxc_id()}">
<div>
<label class="desc" id="title1" for="moxc_name">Kiadás kategória neve:</label>
<div><input type="text" name="moxc_name" id="moxc_name" value="{$moxc->get_moxc_name()}" required></div>
</div>
<div>
<div>
<input class="button black" type="submit" value="Mentés">
</div>
</div>
</form>
</div>

View File

@@ -0,0 +1,44 @@
<div class="form_wrapper">
<form method="post">
<input type="hidden" name="action" value="mox_create">
<div>
<label for="mox_name">Név:</label>
<div><input type="text" name="mox_name" id="mox_name"></div>
</div>
<div>
<label for="mox_date">Dátum:</label>
<div><input type="text" name="mox_date" id="mox_date" placeholder="ÉÉÉÉ-HH-NN" required></div>
</div>
<div>
<label for="mox_item">Tétel:</label>
<div><input type="text" name="mox_item" id="mox_item" required></div>
</div>
<div>
<label for="mox_összeg">Összeg:</label>
<div><input type="text" name="mox_sum" id="mox_sum" required></div>
</div>
<div>
<label for="mox_item">Kategória:</label>
<div>
<select name="mox_moxc_id">
<option value='null'>- nincs beállítva -</option>
{foreach $moxc_array as $moxc}
<option value='{$moxc->get_moxc_id()}'>{$moxc->get_moxc_name()}</select>
{/foreach}
</select>
</div>
</div>
<div>
<div>
<input class="button black" type="submit" value="Létrehozás">
</div>
</div>
</form>
</div>

View File

@@ -0,0 +1,48 @@
<div class="form_wrapper">
<form method="post">
<div class="buttons">
<a href="/admin/delete_money_expense/{$mox->get_mox_id()}" class="addbutton delete-big">Kiadás törlése</a>
</div>
<input type="hidden" name="action" value="mox_create">
<input type="hidden" name="moxc_id" value="{$mox->get_mox_id()}">
<div>
<label for="mox_name">Név:</label>
<div><input type="text" name="mox_name" id="mox_name" value="{$mox->get_mox_name()}"></div>
</div>
<div>
<label for="mox_date">Dátum:</label>
<div><input type="text" name="mox_date" id="mox_date" placeholder="ÉÉÉÉ-HH-NN" value="{$mox->get_mox_date()}" required></div>
</div>
<div>
<label for="mox_item">Tétel:</label>
<div><input type="text" name="mox_item" id="mox_item" value="{$mox->get_mox_item()}" required></div>
</div>
<div>
<label for="mox_összeg">Összeg:</label>
<div><input type="text" name="mox_sum" id="mox_sum" value="{$mox->get_mox_sum()}" required></div>
</div>
<div>
<label for="mox_item">Kategória:</label>
<div>
<select name="mox_moxc_id">
<option value='null'>- nincs beállítva -</option>
{foreach $moxc_array as $moxc}
<option value='{$moxc->get_moxc_id()}'{if $moxc->get_moxc_id() == $mox->get_mox_money_expense_category_moxc_id()} selected{/if}>{$moxc->get_moxc_name()}</select>
{/foreach}
</select>
</div>
</div>
<div>
<div>
<input class="button black" type="submit" value="Mentés">
</div>
</div>
</form>
</div>

View File

@@ -0,0 +1,44 @@
<div class="form_wrapper">
<form method="post">
<input type="hidden" name="action" value="mox_create">
<div>
<label for="mox_name">Név:</label>
<div><input type="text" name="mox_name" id="mox_name" value="{$mox->get_mox_name()}"></div>
</div>
<div>
<label for="mox_date">Dátum:</label>
<div><input type="text" name="mox_date" id="mox_date" placeholder="ÉÉÉÉ-HH-NN" value="{$mox->get_mox_date()}" required></div>
</div>
<div>
<label for="mox_item">Tétel:</label>
<div><input type="text" name="mox_item" id="mox_item" value="{$mox->get_mox_item()}" required></div>
</div>
<div>
<label for="mox_összeg">Összeg:</label>
<div><input type="text" name="mox_sum" id="mox_sum" value="{$mox->get_mox_sum()}" required></div>
</div>
<div>
<label for="mox_item">Kategória:</label>
<div>
<select name="mox_moxc_id">
<option value='null'>- nincs beállítva -</option>
{foreach $moxc_array as $moxc}
<option value='{$moxc->get_moxc_id()}'>{$moxc->get_moxc_name()}{if $moxc->get_moxc_id() == $mox->get_mox_moxc_id()} selected{/if}</select>
{/foreach}
</select>
</div>
</div>
<div>
<div>
<input class="button black" type="submit" value="Mentés">
</div>
</div>
</form>
</div>