Recover the defaulter bans;

main
Bruno Carrión 1 year ago
parent 25fa319f3b
commit b620bc9d9b
  1. 1
      .#activate_all_roles.php
  2. 1
      .gitignore
  3. 26
      css/aixada_main.css
  4. 1085
      index.php
  5. 14
      php/ctrl/Account.php
  6. 53
      php/lib/account_operations.php
  7. 23
      report_stats.php
  8. 1475
      shop_and_order.php

@ -1 +0,0 @@
orzo@orzopad.110128:1625718632

1
.gitignore vendored

@ -2,3 +2,4 @@ aixada.host.key
local_config/config.php
local_config/timeline.svg
*~
historic

@ -396,9 +396,23 @@ input {height:1.6em;}
.tblOverviewOrders td {padding-right:4px; padding-left:4px;}
/** Warngin Styles **/
#warningBanner {
background-color: #ff7a75;
color: white;
border-radius: 7px;
box-shadow: 3px 3px 7px #0004;
margin: 1rem 0;
padding: .5rem 1.5rem;
text-align: center;
}
#noMoney {
display: block;
text-align: center;
padding: 4rem 3.5rem;
}
#noMoney h1 {
color: #ff7a75
}

File diff suppressed because it is too large Load Diff

@ -43,7 +43,7 @@ try{
get_param_array_int('account_types',array(1000))
));
exit;
case 'getBalances':
printXML(
$ao->get_balances_XML(get_param_array_int('account_types'))
@ -52,18 +52,24 @@ try{
case 'getUfBalances':
printXML($ao->get_uf_balances_XML(
get_param_int('all', 0),
get_param_int('all', 0),
get_param_int('negative', 0)
));
exit;
case 'getUfBalance':
printXML($ao->get_uf_balance_XML(
get_param_int('uf', 0)
));
exit;
case 'getNegativeAccounts':
printXML($ao->get_uf_balances_XML(0, 1));
exit;
case 'getProviderBalances':
printXML($ao->get_provider_balances_XML(
get_param_int('all', 0),
get_param_int('all', 0),
get_param_int('negative', 0)
));
exit;

@ -117,13 +117,13 @@ class account_operations {
$sqlStr .= $all ? "" :" and active=1";
$sqlStr .= " order by ad.id";
$strXML .= query_to_XML($sqlStr);
}
}
// UF accounts
if ($filter['show_uf_generic']) {
$strXML .= array_to_XML(array(
'id' => 1000,
'name' => i18n('mon_all_active_uf')
));
));
}
if ($filter['show_uf']) {
$sqlStr = "SELECT id+1000 id, concat(id,' ',name) name FROM aixada_uf";
@ -140,7 +140,7 @@ class account_operations {
}
return '<accounts>'.$strXML.'</accounts>';
}
/**
*
*/
@ -154,16 +154,16 @@ class account_operations {
);
}
protected function get_uf_balances_rs($all, $negative) {
$sql =
$sql =
"select
a.account_id,
uf.id as uf, uf.name,
a.balance, a.ts as last_update
from (select
account_id, max(id) as MaxId
from aixada_account group by account_id) r
uf.id as uf, uf.name,
a.balance, a.ts as last_update
from (select
account_id, max(id) as MaxId
from aixada_account group by account_id) r
join (aixada_account a, aixada_uf uf)
on a.account_id = r.account_id
on a.account_id = r.account_id
and a.id = r.MaxId
and uf.id = a.account_id -1000";
$sql_where = "";
@ -180,7 +180,38 @@ class account_operations {
}
return DBWrap::get_instance()->Execute($sql);
}
/**
*
*/
public function get_uf_balance_XML($uf) {
return rs_XML_fields(
$this->get_uf_balance_rs($uf),
cnv_config_formats(array(
'last_update' => 'datetime',
'balance' => 'amount'
))
);
}
protected function get_uf_balance_rs($uf) {
$sql = "SELECT
a.account_id,
uf.id as uf,
uf.name,
a.balance,
a.ts as last_update
FROM (SELECT
account_id, max(id) as MaxId
FROM aixada_account GROUP BY account_id) r
JOIN (aixada_account a, aixada_uf uf)
ON a.account_id = r.account_id
AND a.id = r.MaxId
AND uf.id = a.account_id -1000
WHERE
uf.id = {$uf}";
return DBWrap::get_instance()->Execute($sql);
}
/**
*
*/

@ -1,4 +1,4 @@
<?php
<?php
include "php/inc/header.inc.php";
require_once(__ROOT__.'php/lib/account_writers.php');
?>
@ -13,11 +13,11 @@
<link rel="stylesheet" type="text/css" media="print" href="css/print.css" />
<link rel="stylesheet" type="text/css" media="screen" href="js/fgmenu/fg.menu.css" />
<link rel="stylesheet" type="text/css" media="screen" href="css/ui-themes/<?=$default_theme;?>/jqueryui.css"/>
<script type="text/javascript" src="js/jquery/jquery.js"></script>
<script type="text/javascript" src="js/jqueryui/jqueryui.js"></script>
<?php echo aixada_js_src(); ?>
<script type="text/javascript">
$(function(){
$.ajaxSetup({ cache: false });
@ -45,6 +45,8 @@
.bind("click", function(){
$(this).parent().next().toggle();
});
}); //close document ready
</script>
@ -56,17 +58,26 @@
<?php include "php/inc/menu.inc.php" ?>
</div>
<!-- end of headwrap -->
<div id="stagewrap">
<div id="titlewrap" class="ui-widget">
<div id="titleLeftCol">
<h1><?php echo $Text['ti_stats']; ?> </h1>
</div>
</div>
<?php write_dailyStats("oneThirdCol"); ?>
<?php write_negative_ufs("oneThirdCol"); ?>
<div id="monitorStock" class="ui-widget oneThirdCol">
<div class="ui-widget-content ui-corner-all">
<h3 class="ui-widget-header ui-corner-all"><?php echo $Text['negativeStock'];?></h3>
<table id="min_stock" class="printStats table_listing">
<thead>
<tr>
@ -85,12 +96,16 @@
</tr>
</tbody>
</table>
</div>
</div>
</div>
<!-- end of stage wrap -->
</div>
<!-- end of wrap -->
<!-- / END -->
</body>
</html>
</html>

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save