Merge branch 'master' into sql-review-700
Conflicts: html/install.php
|
|
@ -673,7 +673,6 @@ EXCLUDE_SYMLINKS = NO
|
|||
EXCLUDE_PATTERNS = a?.php \
|
||||
b?.php \
|
||||
?.php \
|
||||
test*.php \
|
||||
calendar-*.js \
|
||||
richtext.js \
|
||||
builder.js \
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ require_once NOALYSS_INCLUDE.'/lib/ac_common.php';
|
|||
require_once NOALYSS_INCLUDE.'/class/user.class.php';
|
||||
require_once NOALYSS_INCLUDE.'/lib/http_input.class.php';
|
||||
require_once NOALYSS_INCLUDE.'/lib/icon_action.class.php';
|
||||
require_once NOALYSS_INCLUDE.'/lib/progress_bar.class.php';
|
||||
$http=new HttpInput();
|
||||
|
||||
mb_internal_encoding("UTF-8");
|
||||
|
|
@ -86,6 +87,16 @@ else
|
|||
$g_user = new User($cn);
|
||||
$g_user->check(true);
|
||||
}
|
||||
|
||||
// For progress bar, for saving time , we check and answer directly
|
||||
if ($op == "progressBar") {
|
||||
$task_id=$http->request("task_id");
|
||||
$task=new Progress_Bar($task_id);
|
||||
$task->answer();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
$html = var_export($_REQUEST, true);
|
||||
set_language();
|
||||
if ( LOGINPUT)
|
||||
|
|
@ -208,6 +219,8 @@ $path = array(
|
|||
"accounting"=>"ajax_accounting",
|
||||
// Show detail of an ANC operation
|
||||
"anc_detail_op"=>"ajax_anc_detail_operation",
|
||||
// show history of an analytic account
|
||||
"history_anc_account"=>"ajax_history_anc_account",
|
||||
// Display the list of filter saved
|
||||
"display_search_filter"=>"ajax_search_filter",
|
||||
// Save search filter
|
||||
|
|
@ -223,7 +236,9 @@ $path = array(
|
|||
// Attribute for category of card
|
||||
'template_cat_category'=>'ajax_template_cat_category',
|
||||
// From FollowUp , update a comment on a file
|
||||
'update_comment_followUp'=>'ajax_follow_up'
|
||||
'update_comment_followUp'=>'ajax_follow_up',
|
||||
// TVA param
|
||||
"tva_parameter"=>"ajax_tva_parameter"
|
||||
) ;
|
||||
|
||||
if (array_key_exists($op, $path)) {
|
||||
|
|
@ -232,6 +247,60 @@ if (array_key_exists($op, $path)) {
|
|||
}
|
||||
switch ($op)
|
||||
{
|
||||
case "periode_change":
|
||||
$field=$http->get("field");
|
||||
$type=$http->get("type");
|
||||
$exercice=$http->get("exercice","number");
|
||||
$last=$http->get("last","number");
|
||||
|
||||
// if last == 1 then show first and last periode of the
|
||||
// exercice
|
||||
$periode_start=0;
|
||||
$periode_end=0;
|
||||
if ( $last==1) {
|
||||
$t_periode=new Periode($cn);
|
||||
list($per_max,$per_min)=$t_periode->get_limit($exercice);
|
||||
$periode_start=$per_max->p_id;
|
||||
$periode_end=$per_min->p_id;
|
||||
}
|
||||
|
||||
$iperiod = new IPeriod($field);
|
||||
$iperiod->id=$field;
|
||||
$iperiod->user = $g_user;
|
||||
$iperiod->cn = $cn;
|
||||
$iperiod->filter_year = true;
|
||||
$iperiod->exercice=$exercice;
|
||||
if ( $type=="from")
|
||||
{
|
||||
$iperiod->show_end_date=FALSE;
|
||||
$iperiod->value=$periode_start;
|
||||
} elseif ($type=="to"){
|
||||
$iperiod->show_start_date=FALSE;
|
||||
$iperiod->value=$periode_end;
|
||||
|
||||
} else {
|
||||
throw new Exception(_("Invalide type"));
|
||||
}
|
||||
|
||||
$iperiod->type = ALL;
|
||||
echo $iperiod->input();
|
||||
|
||||
return;
|
||||
|
||||
break;
|
||||
case "pref_exercice":
|
||||
$iperiod = new IPeriod("period");
|
||||
$iperiod->id="setting_period";
|
||||
$iperiod->user = $g_user;
|
||||
$iperiod->cn = $cn;
|
||||
$iperiod->filter_year = true;
|
||||
$iperiod->exercice=$http->get("exercice");
|
||||
|
||||
$iperiod->type = ALL;
|
||||
echo $iperiod->input();
|
||||
|
||||
return;
|
||||
break;
|
||||
case "remove_anc":
|
||||
if ($g_user->check_module('ANCODS') == 0)
|
||||
exit();
|
||||
|
|
@ -350,7 +419,29 @@ EOF;
|
|||
break;
|
||||
case 'dsp_tva':
|
||||
$cn = Dossier::connect();
|
||||
$Res = $cn->exec_sql("select * from tva_rate order by tva_rate desc");
|
||||
// Filter the VAT
|
||||
$filter=$http->get("filter","string","none");
|
||||
if ( $filter == 'sale') {
|
||||
$Res = $cn->exec_sql("select *
|
||||
from v_tva_rate
|
||||
where
|
||||
tva_sale <> '#'
|
||||
order by tva_rate desc");
|
||||
|
||||
} elseif ($filter == "purchase") {
|
||||
|
||||
$Res = $cn->exec_sql("select *
|
||||
from
|
||||
v_tva_rate
|
||||
where
|
||||
tva_purchase <> '#'
|
||||
order by tva_rate desc");
|
||||
}else {
|
||||
|
||||
$Res = $cn->exec_sql("select * from v_tva_rate
|
||||
where
|
||||
order by tva_rate desc");
|
||||
}
|
||||
$Max = Database::num_row($Res);
|
||||
$r = "";
|
||||
$r.=HtmlInput::title_box(_('Choisissez la TVA'),'tva_select',"close","","y");
|
||||
|
|
|
|||
|
|
@ -196,7 +196,7 @@ if (DBVERSION > dossier::get_version($cn))
|
|||
{
|
||||
echo '<h2 class="error" style="font-size:12px">' . _("Votre base de données n'est pas à jour") . ' ';
|
||||
$a = _("cliquez ici pour appliquer le patch");
|
||||
$base = dirname($_SERVER['SCRIPT_NAME']);
|
||||
$base = dirname($_SERVER['REQUEST_URI']);
|
||||
if ($base == '/') { $base = ''; }
|
||||
$base .= '/admin-noalyss.php';
|
||||
echo '<a hreF="' . $base . '">' . $a . '</a></h2>';
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 217 B |
|
Before Width: | Height: | Size: 877 B |
|
Before Width: | Height: | Size: 148 B |
|
Before Width: | Height: | Size: 807 B |
|
Before Width: | Height: | Size: 81 B |
|
Before Width: | Height: | Size: 299 B |
|
Before Width: | Height: | Size: 76 B |
|
Before Width: | Height: | Size: 689 B |
|
Before Width: | Height: | Size: 118 B |
|
Before Width: | Height: | Size: 100 B |
|
Before Width: | Height: | Size: 167 B |
|
Before Width: | Height: | Size: 607 B |
|
Before Width: | Height: | Size: 374 B |
|
Before Width: | Height: | Size: 58 B |
|
Before Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 77 B |
|
Before Width: | Height: | Size: 196 B |
|
Before Width: | Height: | Size: 299 B |
|
Before Width: | Height: | Size: 301 B |
|
Before Width: | Height: | Size: 96 B |
|
Before Width: | Height: | Size: 84 B |
|
Before Width: | Height: | Size: 76 B |
|
Before Width: | Height: | Size: 76 B |
|
Before Width: | Height: | Size: 88 B |
|
Before Width: | Height: | Size: 563 B |
|
|
@ -1,305 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="412"
|
||||
height="82"
|
||||
id="svg3836"
|
||||
version="1.1"
|
||||
inkscape:version="0.48.4 r9939"
|
||||
sodipodi:docname="logo-noalyss-7000-2.svg">
|
||||
<defs
|
||||
id="defs3838">
|
||||
<inkscape:path-effect
|
||||
effect="spiro"
|
||||
id="path-effect3997"
|
||||
is_visible="true" />
|
||||
<inkscape:path-effect
|
||||
effect="spiro"
|
||||
id="path-effect3855"
|
||||
is_visible="true" />
|
||||
<inkscape:path-effect
|
||||
effect="spiro"
|
||||
id="path-effect3861"
|
||||
is_visible="true" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="3.959798"
|
||||
inkscape:cx="192.67146"
|
||||
inkscape:cy="58.488379"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1020"
|
||||
inkscape:window-x="-2"
|
||||
inkscape:window-y="35"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata3841">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Calque 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-970.36218)">
|
||||
<g
|
||||
id="g3935"
|
||||
transform="matrix(0.57896041,0,0,0.56949598,-44.979175,377.29868)"
|
||||
style="stroke:#003380">
|
||||
<path
|
||||
inkscape:export-ydpi="599"
|
||||
inkscape:export-xdpi="599"
|
||||
inkscape:export-filename="/home/dany/developpement/phpcompta/noalyss/html/image/logo6820.png"
|
||||
style="fill:#ffffff;fill-opacity:1;stroke:#003380;stroke-width:0.82599997999999997;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
|
||||
d="m 118.40641,1050.88 37.90114,0 c 6.22618,0 11.2386,5.0124 11.2386,11.2386 l 0,77.0119 c 0,6.2262 -5.01242,11.2386 -11.2386,11.2386 l -37.90114,0 c -6.22618,0 -11.2386,-5.0124 -11.2386,-11.2386 l 0,-77.0119 c 0,-6.2262 5.01242,-11.2386 11.2386,-11.2386 z"
|
||||
id="rect2987"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="sssssssss" />
|
||||
<path
|
||||
inkscape:export-ydpi="599"
|
||||
inkscape:export-xdpi="599"
|
||||
inkscape:export-filename="/home/dany/developpement/phpcompta/noalyss/html/image/logo6820.png"
|
||||
sodipodi:nodetypes="sssssssss"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path2990"
|
||||
d="m 124.51622,1060.7879 25.68152,0 c 4.21882,0 7.61519,3.3963 7.61519,7.6151 l 0,18.4669 c 0,4.2188 -3.39637,7.6152 -7.61519,7.6152 l -25.68152,0 c -4.21881,0 -7.61519,-3.3964 -7.61519,-7.6152 l 0,-18.4669 c 0,-4.2188 3.39638,-7.6151 7.61519,-7.6151 z"
|
||||
style="fill:none;stroke:#003380;stroke-width:0.72600001000000003;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
|
||||
<path
|
||||
inkscape:export-ydpi="599"
|
||||
inkscape:export-xdpi="599"
|
||||
inkscape:export-filename="/home/dany/developpement/phpcompta/noalyss/html/image/logo6820.png"
|
||||
sodipodi:type="arc"
|
||||
style="fill:none;stroke:#003380;stroke-width:1.42117310000000008;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
|
||||
id="path3770"
|
||||
sodipodi:cx="211.12189"
|
||||
sodipodi:cy="519.00165"
|
||||
sodipodi:rx="10.101525"
|
||||
sodipodi:ry="10.101525"
|
||||
d="m 221.22341,519.00165 c 0,5.57892 -4.5226,10.10152 -10.10152,10.10152 -5.57892,0 -10.10153,-4.5226 -10.10153,-10.10152 0,-5.57892 4.52261,-10.10153 10.10153,-10.10153 5.57892,0 10.10152,4.52261 10.10152,10.10153 z"
|
||||
transform="matrix(0.51084558,0,0,0.51084558,13.518379,843.80386)" />
|
||||
<path
|
||||
inkscape:export-ydpi="599"
|
||||
inkscape:export-xdpi="599"
|
||||
inkscape:export-filename="/home/dany/developpement/phpcompta/noalyss/html/image/logo6820.png"
|
||||
transform="matrix(0.51084558,0,0,0.51084558,29.506299,843.80386)"
|
||||
d="m 221.22341,519.00165 c 0,5.57892 -4.5226,10.10152 -10.10152,10.10152 -5.57892,0 -10.10153,-4.5226 -10.10153,-10.10152 0,-5.57892 4.52261,-10.10153 10.10153,-10.10153 5.57892,0 10.10152,4.52261 10.10152,10.10153 z"
|
||||
sodipodi:ry="10.101525"
|
||||
sodipodi:rx="10.101525"
|
||||
sodipodi:cy="519.00165"
|
||||
sodipodi:cx="211.12189"
|
||||
id="path3772"
|
||||
style="fill:none;stroke:#003380;stroke-width:1.42117310000000008;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
|
||||
sodipodi:type="arc" />
|
||||
<path
|
||||
inkscape:export-ydpi="599"
|
||||
inkscape:export-xdpi="599"
|
||||
inkscape:export-filename="/home/dany/developpement/phpcompta/noalyss/html/image/logo6820.png"
|
||||
sodipodi:type="arc"
|
||||
style="fill:none;stroke:#003380;stroke-width:1.42117310000000008;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
|
||||
id="path3774"
|
||||
sodipodi:cx="211.12189"
|
||||
sodipodi:cy="519.00165"
|
||||
sodipodi:rx="10.101525"
|
||||
sodipodi:ry="10.101525"
|
||||
d="m 221.22341,519.00165 c 0,5.57892 -4.5226,10.10152 -10.10152,10.10152 -5.57892,0 -10.10153,-4.5226 -10.10153,-10.10152 0,-5.57892 4.52261,-10.10153 10.10153,-10.10153 5.57892,0 10.10152,4.52261 10.10152,10.10153 z"
|
||||
transform="matrix(0.51084558,0,0,0.51084558,45.494218,843.80386)" />
|
||||
<path
|
||||
inkscape:export-ydpi="599"
|
||||
inkscape:export-xdpi="599"
|
||||
inkscape:export-filename="/home/dany/developpement/phpcompta/noalyss/html/image/logo6820.png"
|
||||
transform="matrix(0.51084558,0,0,0.51084558,13.518379,864.23769)"
|
||||
d="m 221.22341,519.00165 c 0,5.57892 -4.5226,10.10152 -10.10152,10.10152 -5.57892,0 -10.10153,-4.5226 -10.10153,-10.10152 0,-5.57892 4.52261,-10.10153 10.10153,-10.10153 5.57892,0 10.10152,4.52261 10.10152,10.10153 z"
|
||||
sodipodi:ry="10.101525"
|
||||
sodipodi:rx="10.101525"
|
||||
sodipodi:cy="519.00165"
|
||||
sodipodi:cx="211.12189"
|
||||
id="path3776"
|
||||
style="fill:none;stroke:#003380;stroke-width:1.42117310000000008;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
|
||||
sodipodi:type="arc" />
|
||||
<path
|
||||
inkscape:export-ydpi="599"
|
||||
inkscape:export-xdpi="599"
|
||||
inkscape:export-filename="/home/dany/developpement/phpcompta/noalyss/html/image/logo6820.png"
|
||||
sodipodi:type="arc"
|
||||
style="fill:none;stroke:#003380;stroke-width:1.42117310000000008;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
|
||||
id="path3778"
|
||||
sodipodi:cx="211.12189"
|
||||
sodipodi:cy="519.00165"
|
||||
sodipodi:rx="10.101525"
|
||||
sodipodi:ry="10.101525"
|
||||
d="m 221.22341,519.00165 c 0,5.57892 -4.5226,10.10152 -10.10152,10.10152 -5.57892,0 -10.10153,-4.5226 -10.10153,-10.10152 0,-5.57892 4.52261,-10.10153 10.10153,-10.10153 5.57892,0 10.10152,4.52261 10.10152,10.10153 z"
|
||||
transform="matrix(0.51084558,0,0,0.51084558,29.506299,864.23769)" />
|
||||
<path
|
||||
inkscape:export-ydpi="599"
|
||||
inkscape:export-xdpi="599"
|
||||
inkscape:export-filename="/home/dany/developpement/phpcompta/noalyss/html/image/logo6820.png"
|
||||
transform="matrix(0.51084558,0,0,0.51084558,45.494218,864.23769)"
|
||||
d="m 221.22341,519.00165 c 0,5.57892 -4.5226,10.10152 -10.10152,10.10152 -5.57892,0 -10.10153,-4.5226 -10.10153,-10.10152 0,-5.57892 4.52261,-10.10153 10.10153,-10.10153 5.57892,0 10.10152,4.52261 10.10152,10.10153 z"
|
||||
sodipodi:ry="10.101525"
|
||||
sodipodi:rx="10.101525"
|
||||
sodipodi:cy="519.00165"
|
||||
sodipodi:cx="211.12189"
|
||||
id="path3780"
|
||||
style="fill:none;stroke:#003380;stroke-width:1.42117310000000008;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
|
||||
sodipodi:type="arc" />
|
||||
<path
|
||||
inkscape:export-ydpi="599"
|
||||
inkscape:export-xdpi="599"
|
||||
inkscape:export-filename="/home/dany/developpement/phpcompta/noalyss/html/image/logo6820.png"
|
||||
inkscape:connector-curvature="0"
|
||||
inkscape:original-d="m 174.36084,1138.0706 c -0.53621,0.134 -1.07241,0.2681 0,0 z"
|
||||
inkscape:path-effect="#path-effect3861"
|
||||
id="path3859"
|
||||
d="m 174.36084,1138.0706 0,0"
|
||||
style="fill:#f8f9f9;fill-opacity:1;fill-rule:evenodd;stroke:#003380;stroke-width:0.72600001000000003;stroke-miterlimit:4;stroke-opacity:0.67058823999999995;stroke-dasharray:none;display:inline" />
|
||||
<g
|
||||
inkscape:export-ydpi="599"
|
||||
inkscape:export-xdpi="599"
|
||||
inkscape:export-filename="/home/dany/developpement/phpcompta/noalyss/html/image/logo6820.png"
|
||||
transform="matrix(0.36816536,0,0,0.42620989,-270.59974,810.60605)"
|
||||
id="g3834"
|
||||
style="display:inline;stroke:#003380">
|
||||
<g
|
||||
id="g5287"
|
||||
transform="translate(771.12741,-362.11738)"
|
||||
style="stroke:#003380;stroke-opacity:1">
|
||||
<g
|
||||
id="g6916"
|
||||
transform="translate(15.732949,1.4983761)"
|
||||
inkscape:export-filename="/home/dany/data/professional/phpcompta-noalyss/doc-image-logo/new-logo/noalyss-web5.png"
|
||||
inkscape:export-xdpi="599"
|
||||
inkscape:export-ydpi="599"
|
||||
style="stroke:#003380;stroke-opacity:1">
|
||||
<g
|
||||
transform="translate(-1.8995956,20.879914)"
|
||||
style="fill:#000000;fill-opacity:0;stroke:#003380;stroke-opacity:1"
|
||||
id="g5284">
|
||||
<path
|
||||
inkscape:export-filename="/home/dany/data/professional/phpcompta-noalyss/doc-image-logo/new-logo/noalyss-web5.png"
|
||||
inkscape:export-ydpi="599"
|
||||
inkscape:export-xdpi="599"
|
||||
sodipodi:nodetypes="cccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
inkscape:original-d="m 191.70307,1059.4468 c 13.46772,-108.56263 45.84195,-117.49764 45.84195,-117.49764 609.16816,-63.20383 133.74621,171.62914 83.7126,190.70824 l 1.1011,-21.5026 20.28968,-175.46943 c 121.325,-87.26119 61.07045,67.95553 134.35537,0.46177"
|
||||
inkscape:path-effect="#path-effect3997"
|
||||
id="path3995"
|
||||
d="m 191.70307,1059.4468 45.84195,-117.49764 83.7126,190.70824 1.1011,-21.5026 20.28968,-175.46943 134.35537,0.46177"
|
||||
style="fill:#000000;fill-opacity:0;stroke:#003380;stroke-width:22.74668884000000091;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
style="stroke:#003380;stroke-width:18.83109664999999922;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
transform="translate(771.12741,-362.11738)"
|
||||
id="g3826">
|
||||
<g
|
||||
style="stroke:#003380;stroke-width:18.83109664999999922;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
inkscape:export-ydpi="599"
|
||||
inkscape:export-xdpi="599"
|
||||
inkscape:export-filename="/home/dany/data/professional/phpcompta-noalyss/doc-image-logo/new-logo/noalyss-web5.png"
|
||||
transform="translate(15.732949,1.4983761)"
|
||||
id="g3828">
|
||||
<g
|
||||
id="g3830"
|
||||
style="fill:#000000;fill-opacity:0;stroke:#003380;stroke-width:18.83109664999999922;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
transform="translate(-1.8995956,20.879914)">
|
||||
<path
|
||||
style="fill:#000000;fill-opacity:0;stroke:#003380;stroke-width:18.83109664999999922;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="m 191.13372,1058.9549 46.4113,-116.02212 83.7126,189.72462 1.1011,-21.5026 20.28968,-175.46943 133.78602,-0.03"
|
||||
id="path3832"
|
||||
inkscape:path-effect="#path-effect3997"
|
||||
inkscape:original-d="m 191.13372,1058.9549 46.4113,-116.02212 c 0,0 133.74621,170.64552 83.7126,189.72462 l 1.1011,-21.5026 20.28968,-175.46943 c 121.325,-87.26119 60.5011,67.46373 133.78602,-0.03"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cccccc"
|
||||
inkscape:export-xdpi="599"
|
||||
inkscape:export-ydpi="599"
|
||||
inkscape:export-filename="/home/dany/data/professional/phpcompta-noalyss/doc-image-logo/new-logo/noalyss-web5.png" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<path
|
||||
inkscape:export-ydpi="599"
|
||||
inkscape:export-xdpi="599"
|
||||
inkscape:export-filename="/home/dany/developpement/phpcompta/noalyss/html/image/logo6820.png"
|
||||
inkscape:transform-center-y="-25.014409"
|
||||
inkscape:transform-center-x="4.3352937"
|
||||
transform="matrix(-0.02694076,1.4783429,-1.3802706,-0.02831418,492.38794,966.38714)"
|
||||
d="m 72.240372,254.81686 5.028394,8.09605 -6.427252,-7.04076 -2.232412,9.29489 0.446711,-9.54087 -8.090641,5.01167 7.002779,-6.44997 -9.282834,-2.18751 9.559795,0.43983 -5.017192,-8.10909 6.444162,7.05015 2.156969,-9.26763 -0.396869,9.49219 8.07837,-4.97306 -7.037073,6.41136 9.308436,2.20893 z"
|
||||
inkscape:randomized="0.002"
|
||||
inkscape:rounded="-3.1571967e-16"
|
||||
inkscape:flatsided="false"
|
||||
sodipodi:arg2="0.92442315"
|
||||
sodipodi:arg1="0.53172407"
|
||||
sodipodi:r2="11.640957"
|
||||
sodipodi:r1="2.3281915"
|
||||
sodipodi:cy="253.6217"
|
||||
sodipodi:cx="70.236176"
|
||||
sodipodi:sides="8"
|
||||
id="path8179"
|
||||
style="fill:#ffffff;fill-opacity:1;stroke:#003380;stroke-width:0.50814276999999997;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
|
||||
sodipodi:type="star" />
|
||||
<path
|
||||
transform="matrix(1.7188823,0,0,1.3279735,49.555559,1024.4529)"
|
||||
d="m 44.85756,107.43829 c 0,5.67259 -5.818559,10.27113 -12.996116,10.27113 -7.177556,0 -12.996115,-4.59854 -12.996115,-10.27113 0,-5.67258 5.818559,-10.27112 12.996115,-10.27112 7.177557,0 12.996116,4.59854 12.996116,10.27112 z"
|
||||
sodipodi:ry="10.271124"
|
||||
sodipodi:rx="12.996116"
|
||||
sodipodi:cy="107.43829"
|
||||
sodipodi:cx="31.861444"
|
||||
id="path3269-3"
|
||||
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#003380;stroke-width:0.66188455000000002;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline"
|
||||
sodipodi:type="arc" />
|
||||
<path
|
||||
id="path3269-6"
|
||||
d="m 124.02946,1138.6144 c -12.33737,0 -22.34375,6.092 -22.34375,13.625 0,5.9836 6.31493,11.0681 15.09375,12.9063 -0.66505,1.2922 -1.0625,2.6674 -1.0625,4.0937 0,7.5331 10.00638,13.625 22.34375,13.625 12.33738,0 22.34375,-6.0919 22.34375,-13.625 0,-1.5076 -0.41648,-2.9566 -1.15625,-4.3125 8.28206,-1.9956 14.15625,-6.9213 14.15625,-12.6875 0,-7.533 -10.00638,-13.625 -22.34375,-13.625 -5.08916,0 -9.77507,1.0316 -13.53125,2.7813 -3.75186,-1.7425 -8.42245,-2.7813 -13.5,-2.7813 z"
|
||||
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#003380;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
transform="matrix(1.7188823,0,0,1.3279735,114.32652,1021.9376)"
|
||||
d="m 44.85756,107.43829 c 0,5.67259 -5.818559,10.27113 -12.996116,10.27113 -7.177556,0 -12.996115,-4.59854 -12.996115,-10.27113 0,-5.67258 5.818559,-10.27112 12.996115,-10.27112 7.177557,0 12.996116,4.59854 12.996116,10.27112 z"
|
||||
sodipodi:ry="10.271124"
|
||||
sodipodi:rx="12.996116"
|
||||
sodipodi:cy="107.43829"
|
||||
sodipodi:cx="31.861444"
|
||||
id="path3269-7"
|
||||
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#003380;stroke-width:0.66188455000000002;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline"
|
||||
sodipodi:type="arc" />
|
||||
</g>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:27.68781281000000050px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:#003380;stroke-width:0.79344051999999998;stroke-opacity:1;font-family:Danube;-inkscape-font-specification:Danube"
|
||||
x="82.762955"
|
||||
y="830.32202"
|
||||
id="text3959"
|
||||
sodipodi:linespacing="125%"
|
||||
transform="scale(0.809529,1.2352862)"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan3961"
|
||||
x="82.762955"
|
||||
y="830.32202"
|
||||
style="stroke-width:0.79344051999999998;stroke:#003380">Noalyss comptabilite</tspan></text>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 17 KiB |
BIN
html/image/logo7000.png
Normal file
|
After Width: | Height: | Size: 58 KiB |
|
Before Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 469 B |
|
Before Width: | Height: | Size: 90 B |
|
Before Width: | Height: | Size: 312 KiB |
|
Before Width: | Height: | Size: 96 B |
|
Before Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 152 B |
|
Before Width: | Height: | Size: 675 B |
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 7.9 KiB |
|
Before Width: | Height: | Size: 88 B |
|
Before Width: | Height: | Size: 76 B |
|
Before Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 310 B |
|
Before Width: | Height: | Size: 107 B |
|
Before Width: | Height: | Size: 159 KiB |
|
Before Width: | Height: | Size: 109 B |
BIN
html/image/trash-24.gif
Normal file
|
After Width: | Height: | Size: 412 B |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 93 B |
|
Before Width: | Height: | Size: 89 B |
|
Before Width: | Height: | Size: 904 B |
|
|
@ -59,32 +59,39 @@ border-width: 0px;
|
|||
background-image: url("image/bg-submit3.gif");
|
||||
background-repeat: repeat-x repeat-y;
|
||||
}
|
||||
#logo_id {
|
||||
width:19%;
|
||||
}
|
||||
@media only screen and (max-width : 900px) {
|
||||
#alternate_browser {
|
||||
display : none;
|
||||
}
|
||||
#logo_id {
|
||||
height:160px;
|
||||
position:absolute;
|
||||
z-index:-1;
|
||||
height:60%;
|
||||
width:auto;
|
||||
left:0px;
|
||||
|
||||
}
|
||||
.input_text {
|
||||
width:8em;
|
||||
}
|
||||
|
||||
}
|
||||
@media only screen and (min-width : 1201px) {
|
||||
@media only screen and (min-width : 901px) {
|
||||
#alternate_browser {
|
||||
position:absolute;
|
||||
bottom: 0px;
|
||||
left:0px;
|
||||
z-index: -1
|
||||
z-index: -1;
|
||||
}
|
||||
#logo_id {
|
||||
width:608px;
|
||||
z-index:-1;
|
||||
position:absolute;
|
||||
top:230px;
|
||||
left:688px;
|
||||
height: 125px;
|
||||
width:19%;
|
||||
left:27%;
|
||||
top:24.5%;
|
||||
}
|
||||
#login_frm {
|
||||
position:absolute;
|
||||
|
|
@ -99,5 +106,6 @@ background-repeat: repeat-x repeat-y;
|
|||
position:absolute;
|
||||
margin-top:397px;
|
||||
left:539px;
|
||||
background-color: white;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ version NOALYSS_VERSION - '.$my_domain.'
|
|||
|
||||
<BR>
|
||||
<center>
|
||||
<IMG SRC="image/logo-noalyss-7000-6.svg" id="logo_id" alt="NOALYSS">
|
||||
<IMG SRC="image/logo7000.png" style="opacity:0.4" id="logo_id" alt="NOALYSS">
|
||||
<BR>
|
||||
<BR>
|
||||
<BR>
|
||||
|
|
|
|||
|
|
@ -67,12 +67,18 @@ session_start();
|
|||
.warning,.error {
|
||||
color:red;
|
||||
}
|
||||
img:hover {
|
||||
cursor: inherit;
|
||||
background-color: inherit;
|
||||
color: inherit;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p align="center">
|
||||
<IMG SRC="image/logo6820.png" style="width: 365px;height: 150px" alt="NOALYSS">
|
||||
<IMG SRC="image/logo7000.png" style="width: 400px;z-index:-1;position:fixed;top:30px;rigth:50px;opacity: 0.2" alt="NOALYSS">
|
||||
</p>
|
||||
<h1>NOALYSS : comptabilité - accountancy </h1>
|
||||
|
||||
<?php
|
||||
/*
|
||||
|
|
@ -100,6 +106,7 @@ session_start();
|
|||
* This file is included in each release for a new upgrade
|
||||
*
|
||||
*/
|
||||
|
||||
if ( ! isset($_GET['lang'])){
|
||||
?>
|
||||
<p>
|
||||
|
|
@ -277,7 +284,7 @@ require_once NOALYSS_INCLUDE.'/lib/database.class.php';
|
|||
// we shouldn't use it
|
||||
// if ( defined ("MULTI") && MULTI==1) { create_htaccess();}
|
||||
|
||||
echo '<h1 class="title">'._('Configuration').'</h1>';
|
||||
echo '<h1>'._('Configuration').'</h1>';
|
||||
?>
|
||||
<h2>Info</h2>
|
||||
<?php echo _('Vous utilisez le domaine'),domaine; ?>
|
||||
|
|
@ -422,11 +429,11 @@ $sql="select setting from pg_settings where name='server_version'";
|
|||
$version=$cn->get_value($sql);
|
||||
|
||||
echo _("Version base de données :"),$version;
|
||||
|
||||
if ( $version[0] < 9 )
|
||||
$majeur=explode(".",$version);
|
||||
if ( $majeur[0] < 9 )
|
||||
{
|
||||
?>
|
||||
<p><?php echo $failed . _(" Vous devez absolument utiliser au minimum une version 9 de PostGresql, si votre distribution n'en
|
||||
<p><?php echo $failed . _(" Vous devez absolument utiliser au minimum une version 9.0 de PostGresql, si votre distribution n'en
|
||||
offre pas, installez-en une en la compilant. Lisez attentivement la notice sur postgresql.org pour migrer
|
||||
vos bases de données")?>
|
||||
</p>
|
||||
|
|
|
|||
|
|
@ -681,6 +681,38 @@ function view_history_account(p_value, dossier,p_exercice)
|
|||
}
|
||||
);
|
||||
|
||||
}
|
||||
/**
|
||||
* @brief View the history of an account
|
||||
* @param {type} p_value
|
||||
* @param {type} dossier
|
||||
* @returns {undefined}
|
||||
*/
|
||||
function view_history_anc_account(p_value, dossier,p_exercice)
|
||||
{
|
||||
layer++;
|
||||
var idbox = 'det' + layer;
|
||||
var popup = {'id': idbox, 'cssclass': 'inner_box', 'html': loading(), 'drag': false};
|
||||
|
||||
var querystring={'gDossier':dossier,'op':'history_anc_account','po_id':p_value,'div':idbox,'l':layer,'act':'history','exercice':p_exercice};
|
||||
waiting_box();
|
||||
|
||||
var action = new Ajax.Request(
|
||||
"ajax_misc.php",
|
||||
{
|
||||
method: 'get',
|
||||
parameters: querystring,
|
||||
onFailure: error_box,
|
||||
onSuccess: function (req, xml)
|
||||
{
|
||||
remove_waiting_box();
|
||||
add_div(popup);
|
||||
$(idbox).innerHTML=req.responseText;
|
||||
$(idbox).style.top = calcy(140 + (layer * 3)) + "px";
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
/**
|
||||
* @brief Change the view of account history
|
||||
|
|
|
|||
|
|
@ -303,7 +303,7 @@ var ManageTable = function (p_table_name)
|
|||
var obj = {id: control, "cssclass": "inner_box", "html": loading()};
|
||||
add_div(obj);
|
||||
var pos = calcy(250);
|
||||
$(obj.id).setStyle({position: "absolute", top: '15%', width: "auto", "margin-left": "20%"});
|
||||
$(obj.id).setStyle({position: "fixed", top: '15%', width: "auto", "margin-left": "20%"});
|
||||
$(obj.id).update(x['html']);
|
||||
} catch (e) {
|
||||
smoke.alert("ERREUR " + e.message);
|
||||
|
|
|
|||
|
|
@ -496,6 +496,8 @@ function popup_select_tva(obj)
|
|||
queryString += '&code=' + obj.jcode;
|
||||
if (obj.compute)
|
||||
queryString += '&compute=' + obj.compute;
|
||||
if (obj.filter)
|
||||
queryString += '&filter=' + obj.filter;
|
||||
|
||||
var action = new Ajax.Request(
|
||||
"ajax_misc.php",
|
||||
|
|
@ -2896,7 +2898,7 @@ function create_anchor_up()
|
|||
function init_scroll()
|
||||
{
|
||||
var up=new Element('div',{"class":"inner_box",
|
||||
"style":"padding:5px;left:auto;width:auto;height: auto;display:none;position:fixed;bottom:25px;right:50px;text-align:center",
|
||||
"style":"padding:5px;left:auto;width:auto;height: auto;display:none;position:fixed;bottom:95px;right:50px;text-align:center;font-size:20px",
|
||||
id:"go_up"
|
||||
});
|
||||
up.innerHTML=' <a class="icon" href="#up_top" ></a><a href="javascript:show_calc()" class="icon"></a>';
|
||||
|
|
@ -2904,7 +2906,7 @@ function init_scroll()
|
|||
window.onscroll=function () {
|
||||
if ( document.viewport.getScrollOffsets().top> 0) {
|
||||
if ($('go_up').visible() == false) {
|
||||
$('go_up').setOpacity(0.80);
|
||||
$('go_up').setOpacity(0.45);
|
||||
$('go_up').show();
|
||||
$('go_up').style.zIndex=99;
|
||||
}
|
||||
|
|
@ -3009,14 +3011,14 @@ function pin (object_id) {
|
|||
if ( aDraggableElement[object_id]) {
|
||||
aDraggableElement[object_id].destroy();
|
||||
aDraggableElement[object_id]=undefined;
|
||||
$('pin_'+object_id).innerHTML="";
|
||||
$('pin_'+object_id).innerHTML="";
|
||||
} else {
|
||||
aDraggableElement[object_id]=new Draggable(object_id, {starteffect: function ()
|
||||
{
|
||||
new Effect.Highlight(object_id, {scroll: window, queue: 'end'});
|
||||
}}
|
||||
);
|
||||
$('pin_'+object_id).innerHTML="";
|
||||
$('pin_'+object_id).innerHTML="";
|
||||
}
|
||||
}
|
||||
/**
|
||||
|
|
@ -3394,3 +3396,115 @@ Periode.filter_exercice=function (p_table_id) {
|
|||
|
||||
}
|
||||
};
|
||||
|
||||
// keep track of progress bar
|
||||
var progressBar = [];
|
||||
// idx of progress bar
|
||||
var progressIdx = 0;
|
||||
|
||||
/**
|
||||
* Start the progress bar
|
||||
* @param {string} p_taskid id to monitor
|
||||
* @param {int} p_dossier
|
||||
*/
|
||||
function progress_bar_start(p_taskid,p_message)
|
||||
{
|
||||
try {
|
||||
progressIdx++;
|
||||
// block the window
|
||||
var message="Un instant svp";
|
||||
if ( p_message) {
|
||||
message=p_message;
|
||||
}
|
||||
add_div({id:"blocking"+progressIdx,cssclass:"smoke-base smoke-visible "});
|
||||
|
||||
add_div({id:"message"+progressIdx,cssclass:"inner_box",style:"z-index:1000;position:fixed;top:30%;width:40%;left:30%"});
|
||||
$("message"+progressIdx).update(message);
|
||||
// Create a div
|
||||
add_div({id: "progressDiv" + progressIdx, cssclass: "progressbar", html: '<span id="progressValue">0</span>'});
|
||||
// Check status every sec.
|
||||
progressBar[progressIdx] = setInterval(progress_bar_check.bind(null, progressIdx, p_taskid), 1000);
|
||||
} catch (e) {
|
||||
console.error(e.message);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check every second the status
|
||||
* @param {integer} p_idx idx of progressbar
|
||||
* @param {string} p_taskid id to monitor
|
||||
*/
|
||||
function progress_bar_check(p_idx, p_taskid)
|
||||
{
|
||||
try {
|
||||
|
||||
new Ajax.Request("ajax_misc.php", {
|
||||
parameters: {gDossier: 0, task_id: p_taskid,op:"progressBar"},
|
||||
method:"get",
|
||||
onSuccess: function (req) {
|
||||
try
|
||||
{
|
||||
var answer=req.responseText.evalJSON();
|
||||
var progress_div=$("progressDiv"+progressIdx);
|
||||
var a_child=progress_div.childNodes;
|
||||
var i=0;
|
||||
for ( i=0;i< a_child.length;i++) {
|
||||
if ( a_child[i].id="progressValue") {
|
||||
var progressValue = a_child[i];
|
||||
}
|
||||
}
|
||||
var progress = parseFloat(progressValue.innerHTML);
|
||||
if ( answer.value <= progress ) {
|
||||
return;
|
||||
}
|
||||
|
||||
progressValue.innerHTML = answer.value;
|
||||
progressValue.setStyle("width:" + answer.value + "%");
|
||||
if (answer.value== 100) {
|
||||
clearInterval(progressBar[p_idx]);
|
||||
progressValue.innerHTML="Success";
|
||||
Effect.BlindUp("progressDiv"+p_idx,{duration:1.0,scaleContent:false})
|
||||
$("message"+p_idx).remove();
|
||||
$("blocking"+p_idx).remove();
|
||||
setTimeout(function() { $("progressDiv"+progressIdx).remove } , 1100);
|
||||
}
|
||||
} catch (e) {
|
||||
clearInterval(progressBar[p_idx]);
|
||||
document.getElementById("progressValue").innerHTML=req.responseText;
|
||||
console.error(e.message);
|
||||
}
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
clearInterval(progressBar[p_idx]);
|
||||
console.error(e.message);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* In the user's setting box, update the period list with the choosen exercice
|
||||
* @param {int} p_dossier
|
||||
*/
|
||||
function updatePeriodePreference(p_dossier)
|
||||
{
|
||||
waiting_box();
|
||||
var exercice=$('exercice_setting').value;
|
||||
new Ajax.Updater('setting_period',"ajax_misc.php",{method:"get",parameters:{ "op":"pref_exercice","gDossier":p_dossier,"exercice":exercice}});
|
||||
remove_waiting_box();
|
||||
}
|
||||
/**
|
||||
* Update the from and to periode list when changing the exercice
|
||||
* @param {int} p_dossier
|
||||
* @param {string} p_exercice id of the exercice
|
||||
* @param {type} p_periode_from id of the starting periode
|
||||
* @param {type} p_periode_to id of the ending periode
|
||||
* @param {type} p_last possible value = 1 to show last periode or 0 the first
|
||||
*/
|
||||
function updatePeriode(p_dossier,p_exercice,p_periode_from,p_periode_to,p_last)
|
||||
{
|
||||
waiting_box();
|
||||
var exercice=$(p_exercice).value;
|
||||
new Ajax.Updater(p_periode_from,"ajax_misc.php",{method:"get",parameters:{op:"periode_change","gDossier":p_dossier,"exercice":exercice,field:p_periode_from,"type":"from","last":p_last}});
|
||||
new Ajax.Updater(p_periode_to,"ajax_misc.php",{method:"get",parameters:{op:"periode_change","gDossier":p_dossier,"exercice":exercice,field:p_periode_to,"type":"to","last":p_last}});
|
||||
remove_waiting_box();
|
||||
}
|
||||
|
|
|
|||
1019
html/js/smoke.js
|
|
@ -24,10 +24,11 @@ require_once NOALYSS_INCLUDE.'/lib/html_input.class.php';
|
|||
require_once NOALYSS_INCLUDE.'/lib/icon_action.class.php';
|
||||
require_once NOALYSS_INCLUDE.'/class/dossier.class.php';
|
||||
require_once NOALYSS_INCLUDE.'/lib/database.class.php';
|
||||
require_once NOALYSS_INCLUDE.'/lib/http_input.class.php';
|
||||
require_once NOALYSS_INCLUDE.'/class/user.class.php';
|
||||
require_once NOALYSS_INCLUDE.'/class/periode.class.php';
|
||||
|
||||
|
||||
$http=new HttpInput();
|
||||
/*
|
||||
* Check if the user is still connected
|
||||
*/
|
||||
|
|
@ -66,8 +67,13 @@ $g_user->check_dossier(Dossier::id());
|
|||
if ( basename($_GET['op']) == 'history' )
|
||||
{
|
||||
$href=dossier::get();
|
||||
|
||||
$exercice=$http->get("exercice","number",0);
|
||||
|
||||
/* current year */
|
||||
$exercice=$g_user->get_exercice();
|
||||
if ($exercice == 0 ) {
|
||||
$exercice=$g_user->get_exercice();
|
||||
}
|
||||
|
||||
/* get date limit */
|
||||
$periode=new Periode($cn);
|
||||
|
|
|
|||
|
|
@ -235,18 +235,13 @@ td.mtitle {
|
|||
padding: 0px;
|
||||
text-align:center;
|
||||
width:250px;
|
||||
/*! height :30px; */
|
||||
border-radius:5px;
|
||||
-moz-border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
height:42px;
|
||||
|
||||
background-color: #5681B7;
|
||||
/*! border-style: solid; */
|
||||
/*! border-width: 1px; */
|
||||
border-color: darkblue;
|
||||
border-top-right-radius: 0px;
|
||||
border-bottom-left-radius: 0px;
|
||||
/*! padding-top: 5px; */
|
||||
/*! padding-bottom: 5px; */
|
||||
|
||||
}
|
||||
@media only screen and (max-width:955px) {
|
||||
td.mtitle {
|
||||
|
|
@ -258,11 +253,14 @@ td.mtitle {
|
|||
td.mtitle a.mtitle {
|
||||
color : white;
|
||||
display:block;
|
||||
/*! width:100%; */
|
||||
/*! height: 100%; */
|
||||
font-size:1rem;
|
||||
padding-top: 8px;
|
||||
padding-bottom: 8px;
|
||||
font-family:SansationLight;
|
||||
width:100%;
|
||||
padding:0px;
|
||||
margin:0px;
|
||||
height:100%;
|
||||
padding:4px 0px 0px 0px;
|
||||
|
||||
}
|
||||
|
||||
span.mtitle {
|
||||
|
|
@ -307,21 +305,16 @@ td.cell{
|
|||
}
|
||||
td.selectedcell{
|
||||
|
||||
/* border-color:#0000FF;*/
|
||||
border-radius:5px;
|
||||
-moz-border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
border-radius:15px;
|
||||
-moz-border-radius: 15px;
|
||||
-webkit-border-radius: 15px;
|
||||
font-weight: bold;
|
||||
/* background:#5D90CD ;*/
|
||||
color:#FFFFFF;
|
||||
width:250px;
|
||||
text-align:center;
|
||||
/*! height:30px; */
|
||||
|
||||
background: #b8c6df; /* Old browsers */
|
||||
|
||||
border-top-right-radius: 0px;
|
||||
border-bottom-left-radius: 0px;
|
||||
border-top-right-radius: 0px;
|
||||
border-bottom-left-radius: 0px;
|
||||
}
|
||||
.menu2 td.mtitle ,.menu2 td.selectedcell{
|
||||
border-radius: 0px;
|
||||
|
|
@ -349,6 +342,7 @@ a.mtitle:hover {
|
|||
background-color:#EFEBEB;
|
||||
|
||||
color: blue;
|
||||
/*! padding: 100px; */
|
||||
}
|
||||
td.selectedcell a.mtitle,div.content td.selectedcell a.mtitle {
|
||||
text-decoration:none;
|
||||
|
|
@ -1248,17 +1242,20 @@ div.menu2 a.mtitle{
|
|||
font-size:1rem;
|
||||
font-weight: normal;
|
||||
color: darkblue;
|
||||
padding-top: 4px;
|
||||
padding-bottom: 4px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
padding:5px;
|
||||
margin:0px;
|
||||
color: whitesmoke;
|
||||
border-radius: 5px;
|
||||
}
|
||||
div.menu2 a.mtitle:hover,div.menu a.mtitle:hover,td.mtitle a.mtitle:hover {
|
||||
color:#5681B7;
|
||||
background-color: #EFEBEB;
|
||||
/* padding:18px 0px 18px 0px; */
|
||||
|
||||
}
|
||||
div.menu2 a.mtitle:hover {
|
||||
border-radius: 0px 0px;
|
||||
}
|
||||
div.menu3 {
|
||||
font-size:13.6px;
|
||||
font-size:0.80rem;
|
||||
|
|
@ -2184,14 +2181,16 @@ div.select_box a:hover,div.select_box ul li:hover {
|
|||
* Menu second level
|
||||
*/
|
||||
div.menu2 td.mtitle, div.menu2 td.mtitle a{
|
||||
background-color: white;
|
||||
color:darkblue;
|
||||
|
||||
border-style: solid;
|
||||
border-width: 0.1px;
|
||||
border-color:lightgrey;
|
||||
border-color:white;
|
||||
height:25px;
|
||||
border-radius: 0px 0px 0px 10px;
|
||||
}
|
||||
div.menu2 td.mtitle a{
|
||||
border-width:0px;
|
||||
padding:5px;
|
||||
}
|
||||
/**
|
||||
* For the icon (font-famillo fontello)
|
||||
|
|
@ -2227,4 +2226,30 @@ div.bxbutton .icon:hover
|
|||
{
|
||||
background-color: white;
|
||||
color: blue;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* progressBar
|
||||
*/
|
||||
div.progressbar {
|
||||
width:300px;
|
||||
height:30px;
|
||||
position:fixed;
|
||||
top:5px;
|
||||
left:40%;
|
||||
background-color: white;
|
||||
color:blue;
|
||||
z-index:800;
|
||||
border-color: #596a72;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
}
|
||||
#progressValue {
|
||||
display:block;
|
||||
width: 0px;
|
||||
height: 100%;
|
||||
margin:0px;
|
||||
padding: 0px;
|
||||
background-color:darkblue;
|
||||
color:antiquewhite;
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
|
@ -2200,4 +2200,30 @@ div.bxbutton .icon:hover
|
|||
{
|
||||
background-color: white;
|
||||
color: blue;
|
||||
}
|
||||
/**
|
||||
* progressBar
|
||||
*/
|
||||
div.progressbar {
|
||||
width:300px;
|
||||
height:30px;
|
||||
position:fixed;
|
||||
top:5px;
|
||||
left:40%;
|
||||
background-color: white;
|
||||
color:blue;
|
||||
z-index:800;
|
||||
border-color: #596a72;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
}
|
||||
#progressValue {
|
||||
display:block;
|
||||
width: 0px;
|
||||
height: 100%;
|
||||
margin:0px;
|
||||
padding: 0px;
|
||||
background-color:darkblue;
|
||||
color:antiquewhite;
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
* It is only a quick and dirty testing. You should use a tool as PHPUNIT for the unit testing
|
||||
*
|
||||
* - first do not forget to create the authorized_debug file in the html folder
|
||||
* - secund the test must adapted to this page : if you do a post (or get) from a test, you won't get any result
|
||||
* - secund the test must be adapted to this page : if you do a post (or get) from a test, you won't get any result
|
||||
* if the $_REQUEST[test_select] is not set, so set it .
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -53,8 +53,10 @@ if ( isset($_GET['f_id']))
|
|||
$f_id=$http->get('f_id',"number");
|
||||
$fiche=new Fiche($cn,$f_id);
|
||||
|
||||
$year=$http->get("exercice","string",$g_user->get_exercice());
|
||||
if ( $year == 0 )
|
||||
$year=$http->get("exercice","string","");
|
||||
if ( $year == "") $year=$g_user->get_exercice();
|
||||
|
||||
if ( $year == "" )
|
||||
{
|
||||
$html=_("erreur aucune période par défaut, allez dans préférence pour en choisir une");
|
||||
}
|
||||
|
|
@ -137,7 +139,8 @@ if ( isset($_REQUEST['pcm_val']))
|
|||
{
|
||||
$poste=new Acc_Account_Ledger($cn,$_REQUEST['pcm_val']);
|
||||
$poste->load();
|
||||
$year=$http->get("exercice","string",$g_user->get_exercice());
|
||||
$year=$http->get("exercice","string","");
|
||||
if ( $year == "") $year=$g_user->get_exercice();
|
||||
if ( $year == 0 )
|
||||
{
|
||||
$html=_("erreur aucune période par défaut, allez dans préférence pour en choisir une");
|
||||
|
|
|
|||
69
include/ajax/ajax_history_anc_account.php
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of NOALYSS.
|
||||
*
|
||||
* PhpCompta is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* PhpCompta is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with PhpCompta; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
// Copyright (2018) Author Dany De Bontridder <dany@alchimerys.be>
|
||||
|
||||
if (!defined('ALLOWED')) die('Appel direct ne sont pas permis');
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @brief Display the history of an analytic account.
|
||||
* Receives the parameters GET:
|
||||
- gDossier integer
|
||||
- act history_anc_account
|
||||
- po_id integer poste_analytic.po_id
|
||||
- div DOM ID of the box
|
||||
- op history
|
||||
- exercice integer
|
||||
*/
|
||||
require_once NOALYSS_INCLUDE."/class/anc_grandlivre.class.php";
|
||||
|
||||
try {
|
||||
$po_id=$http->get("po_id","number");
|
||||
$exercice=$http->get("exercice","number");
|
||||
$div=$http->get("div");
|
||||
} catch (Exception $ex) {
|
||||
echo $ex->getTraceAsString();
|
||||
throw $ex;
|
||||
}
|
||||
$poste_analytic=new Poste_analytique_SQL($cn, $po_id);
|
||||
|
||||
$anc_grandlivre=new Anc_GrandLivre($cn);
|
||||
|
||||
$anc_grandlivre->from_poste=$poste_analytic->po_name;
|
||||
$anc_grandlivre->to_poste=$poste_analytic->po_name;
|
||||
|
||||
// Find the first and last periode
|
||||
$periode=new Periode($cn);
|
||||
$a_periode_limit=$periode->limit_year($exercice);
|
||||
|
||||
// Find the first day
|
||||
$first_day=$periode->first_day($a_periode_limit['start']);
|
||||
|
||||
// find the last day
|
||||
$last_day=$periode->last_day($a_periode_limit['end']);
|
||||
|
||||
$anc_grandlivre->from=$first_day;
|
||||
$anc_grandlivre->to=$last_day;
|
||||
|
||||
echo HtmlInput::title_box($poste_analytic->getp("po_name"), $div, "close", "", "n");
|
||||
|
||||
echo $anc_grandlivre->display_html(0);
|
||||
$anc_grandlivre->pa_id=$poste_analytic->pa_id;
|
||||
echo $anc_grandlivre->show_button();
|
||||
|
|
@ -27,6 +27,7 @@ require_once NOALYSS_INCLUDE.'/lib/iselect.class.php';
|
|||
require_once NOALYSS_INCLUDE.'/lib/iperiod.class.php';
|
||||
require_once NOALYSS_INCLUDE.'/class/acc_report.class.php';
|
||||
require_once NOALYSS_INCLUDE.'/class/periode.class.php';
|
||||
require_once NOALYSS_INCLUDE.'/class/exercice.class.php';
|
||||
echo HtmlInput::title_box(_('Préférence'), 'preference_div');
|
||||
echo '<DIV class="content">';
|
||||
echo '<p class="notice">';
|
||||
|
|
@ -105,21 +106,37 @@ if (isset($_REQUEST['gDossier']) && $_REQUEST['gDossier']<>0)
|
|||
|
||||
$period->p_id = $l_user_per;
|
||||
$period->jrn_def_id = 0;
|
||||
$selected_exercice=$period->get_exercice();
|
||||
$js=sprintf('onchange="updatePeriodePreference(%d);"',Dossier::id());
|
||||
$exercice=new Exercice($cn);
|
||||
|
||||
if ($period->is_closed($l_user_per) == 1)
|
||||
{
|
||||
$msg = _('Attention cette période est fermée, vous ne pourrez rien modifier dans le module comptable');
|
||||
$msg = '<h2 class="notice">' . $msg . '</h2>';
|
||||
}
|
||||
|
||||
$period = new IPeriod("period");
|
||||
$period->user = $g_user;
|
||||
$period->cn = $cn;
|
||||
$period->filter_year = false;
|
||||
$period->value = $l_user_per;
|
||||
$period->type = ALL;
|
||||
$l_form_per = $period->input();
|
||||
|
||||
$iperiod = new IPeriod("period");
|
||||
$iperiod->id="setting_period";
|
||||
$iperiod->user = $g_user;
|
||||
$iperiod->cn = $cn;
|
||||
$iperiod->filter_year = true;
|
||||
$iperiod->exercice=$selected_exercice;
|
||||
$iperiod->value = $l_user_per;
|
||||
$iperiod->type = ALL;
|
||||
$l_form_per = $iperiod->input();
|
||||
?>
|
||||
<tr><td><?php echo _('Période');?></td>
|
||||
<tr>
|
||||
<td>
|
||||
<?=_("Exercice")?>
|
||||
</td>
|
||||
<td>
|
||||
<?=$exercice->select("exercice_setting",$selected_exercice,$js)->input();?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td><?php echo _('Période');?></td>
|
||||
<td>
|
||||
<?php printf(' %s ', $l_form_per);?>
|
||||
</td>
|
||||
|
|
|
|||
78
include/ajax/ajax_tva_parameter.php
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of NOALYSS.
|
||||
*
|
||||
* PhpCompta is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* PhpCompta is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with PhpCompta; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
// Copyright (2018) Author Dany De Bontridder <dany@alchimerys.be>
|
||||
|
||||
if (!defined('ALLOWED'))
|
||||
die('Appel direct ne sont pas permis');
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @brief
|
||||
* @param type $name Descriptionara
|
||||
*/
|
||||
require_once NOALYSS_INCLUDE."/class/tva_rate_mtable.class.php";
|
||||
|
||||
if ( $g_user->check_module('CFGTVA') ==0 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
try
|
||||
{
|
||||
$table=$http->request('table');
|
||||
$action=$http->request('action');
|
||||
$p_id=$http->request('p_id', "number");
|
||||
$ctl_id=$http->request('ctl');
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
record_log($e->getTraceAsString());
|
||||
return;
|
||||
}
|
||||
|
||||
$tva_rate=new V_Tva_Rate_SQL($cn);
|
||||
$p_id=$http->request('p_id', "number");
|
||||
$tva_rate->set_pk_value($p_id);
|
||||
$tva_rate->load();
|
||||
$manage_table=new Tva_Rate_MTable($tva_rate);
|
||||
$manage_table->set_callback("ajax_misc.php");
|
||||
$manage_table->add_json_param("op", "tva_parameter");
|
||||
|
||||
if ($action=="input")
|
||||
{
|
||||
|
||||
$manage_table->set_object_name($ctl_id);
|
||||
header('Content-type: text/xml; charset=UTF-8');
|
||||
echo $manage_table->ajax_input()->saveXML();
|
||||
return;
|
||||
}
|
||||
elseif ($action=="save")
|
||||
{
|
||||
$manage_table->set_object_name($ctl_id);
|
||||
header('Content-type: text/xml; charset=UTF-8');
|
||||
echo $manage_table->ajax_save()->saveXML();
|
||||
return;
|
||||
}
|
||||
elseif ($action=="delete")
|
||||
{
|
||||
$manage_table->set_object_name($ctl_id);
|
||||
header('Content-type: text/xml; charset=UTF-8');
|
||||
echo $manage_table->ajax_delete()->saveXML();
|
||||
}
|
||||
return;
|
||||
|
|
@ -34,10 +34,13 @@ if ($result != null)
|
|||
echo '<span style="display:block">';
|
||||
echo _('Tout sélectionner')." ".ICheckBox::toggle_checkbox('export_pdf_bt1','export_anc_receipt_pdf');
|
||||
echo '</span>';
|
||||
$task_id=uniqid();
|
||||
echo $grandLivre->show_button();
|
||||
printf ('<form method="GET" id="export_anc_receipt_pdf" action="export.php" style="display:inline" onsubmit="smoke.signal(\'%s\', function(e){}, {duration: 3000,classname: \'custom-class\'});return true;">',
|
||||
_("Le traitement est en cours , merci de patienter sans recharger la page"));
|
||||
|
||||
printf ('<form method="GET" id="export_anc_receipt_pdf" action="export.php" style="display:inline" onsubmit="progress_bar_start(\'%s\',\'%s\');return true;">',
|
||||
$task_id,
|
||||
_("Le traitement est en cours , merci de patienter sans recharger la page")
|
||||
);
|
||||
echo HtmlInput::hidden("task_id",$task_id);
|
||||
echo $grandLivre->button_export_pdf();
|
||||
echo $grandLivre->display_html();
|
||||
echo $grandLivre->button_export_pdf();
|
||||
|
|
|
|||
|
|
@ -51,9 +51,8 @@ if ( ! $m )
|
|||
// show the left menu
|
||||
//----------------------------------------------------------------------
|
||||
echo '
|
||||
<div class="content" >
|
||||
<div class="menu2">
|
||||
<table>
|
||||
<table clsas="mtitle">
|
||||
<tr>
|
||||
<td class="mtitle" >
|
||||
<A class="mtitle" HREF="?ac='.$_REQUEST['ac'].'&new&'.$str_dossier.'"> '._('Nouveau').' </A>
|
||||
|
|
@ -64,7 +63,6 @@ echo '
|
|||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -35,30 +35,31 @@ require_once NOALYSS_INCLUDE.'/class/periode.class.php';
|
|||
require_once NOALYSS_INCLUDE.'/class/exercice.class.php';
|
||||
global $g_user, $http;
|
||||
$gDossier=dossier::id();
|
||||
$exercice=(isset($_GET['exercice']))?$_GET['exercice']:$g_user->get_exercice();
|
||||
// Get the exercice
|
||||
$exercice=$http->request("exercice","number",0);
|
||||
if ($exercice == 0 ){
|
||||
$exercice=$g_user->get_exercice();
|
||||
}
|
||||
|
||||
bcscale(2);
|
||||
|
||||
echo '<div class="content">';
|
||||
/*
|
||||
* Let you change the exercice
|
||||
*/
|
||||
echo '<fieldset class="noprint"><legend>'._('Exercice').'</legend>';;
|
||||
echo '<form method="GET">';
|
||||
echo _('Choisissez un autre exercice')." : ";
|
||||
$ex=new Exercice($cn);
|
||||
$wex=$ex->select('exercice',$exercice,' onchange="submit(this)"');
|
||||
$js=sprintf("updatePeriode(%d,'%s','%s','%s',1)",Dossier::id(),'exercice','from_periode','to_periode');
|
||||
$wex=$ex->select('exercice',$exercice,' onchange="'.$js.'"');
|
||||
echo $wex->input();
|
||||
echo dossier::hidden();
|
||||
echo HtmlInput::get_to_hidden(array('ac','type'));
|
||||
echo '</form>';
|
||||
echo '</fieldset>';
|
||||
|
||||
|
||||
// Show the form for period
|
||||
echo '<FORM method="get">';
|
||||
echo HtmlInput::get_to_hidden(array('ac'));
|
||||
echo HtmlInput::hidden('type','bal');
|
||||
echo HtmlInput::get_to_hidden(array('exercice'));
|
||||
echo dossier::hidden();
|
||||
|
||||
|
||||
|
|
@ -66,6 +67,7 @@ echo dossier::hidden();
|
|||
// filter on the current year
|
||||
$from=$http->get("from_periode", "number",0);
|
||||
$input_from=new IPeriod("from_periode",$from,$exercice);
|
||||
$input_from->id="from_periode";
|
||||
$input_from->show_end_date=false;
|
||||
$input_from->type=ALL;
|
||||
$input_from->cn=$cn;
|
||||
|
|
@ -83,6 +85,7 @@ if( $to == 0) {
|
|||
$to=$per_min->p_id;
|
||||
}
|
||||
$input_to=new IPeriod("to_periode",$to,$exercice);
|
||||
$input_to->id="to_periode";
|
||||
$input_to->show_start_date=false;
|
||||
$input_to->filter_year=true;
|
||||
$input_to->type=ALL;
|
||||
|
|
@ -288,7 +291,7 @@ if ( isset($_GET['view'] ) )
|
|||
$previous=(isset($_GET['previous_exc']))?1:0;
|
||||
$from_periode=$http->get("from_periode","number");
|
||||
$to_periode=$http->get("to_periode","number");
|
||||
$row=$bal->get_row($from_periode,$to_periode);
|
||||
$row=$bal->get_row($from_periode,$to_periode,$previous);
|
||||
$previous= (isset ($row[0]['sum_cred_previous']))?1:0;
|
||||
|
||||
$periode=new Periode($cn);
|
||||
|
|
@ -300,26 +303,22 @@ if ( isset($_GET['view'] ) )
|
|||
echo HtmlInput::filter_table("t_balance", "0,1","1");
|
||||
echo '</span>';
|
||||
echo '<table id="t_balance" width="100%">';
|
||||
echo '<th>Poste Comptable</th>';
|
||||
echo '<th>Libellé</th>';
|
||||
echo '<th>'._("Poste Comptable").'</th>';
|
||||
echo '<th>'._("Libellé").'</th>';
|
||||
if ( $previous == 1 ){
|
||||
echo '<th>Débit N-1</th>';
|
||||
echo '<th>Crédit N-1</th>';
|
||||
echo '<th>Solde Débiteur N-1</th>';
|
||||
echo '<th>Solde Créditeur N-1</th>';
|
||||
if ( isset($_GET['lvl1']) || isset($_GET['lvl2']) || isset($_GET['lvl3']))
|
||||
echo '<th>Solde N-1</th>';
|
||||
echo '<th>'._("Débit N-1").'</th>';
|
||||
echo '<th>'._('Crédit N-1').'</th>';
|
||||
echo '<th>'._('Solde N-1').'</th>';
|
||||
|
||||
}
|
||||
echo '<th>'._('Ouverture').'</th>';
|
||||
echo '<th>Débit</th>';
|
||||
echo '<th>Crédit</th>';
|
||||
echo '<th>Solde</th>';
|
||||
// if ( isset($_GET['lvl1']) || isset($_GET['lvl2']) || isset($_GET['lvl3']))
|
||||
// echo '<th>Solde</th>';
|
||||
echo '<th>'._('Débit').'</th>';
|
||||
echo '<th>'._('Crédit').'</th>';
|
||||
echo '<th>'._('Solde').'</th>';
|
||||
|
||||
$i=0;
|
||||
if ( $previous == 1) {
|
||||
$a_sum=array('sum_cred','sum_deb','solde_deb','solde_cred','sum_cred_previous','sum_deb_previous','solde_deb_previous','solde_cred_previous');
|
||||
$a_sum=array('sum_cred','sum_deb','solde_deb','solde_cred','sum_deb_ope','sum_cred_ope','sum_cred_previous','sum_deb_previous','solde_previous');
|
||||
}
|
||||
else {
|
||||
$a_sum=array('sum_cred','sum_deb','solde_deb','solde_cred','sum_deb_ope','sum_cred_ope') ;
|
||||
|
|
@ -348,7 +347,9 @@ if ( isset($_GET['view'] ) )
|
|||
else
|
||||
$tr="odd";
|
||||
$view_history=HtmlInput::history_account($r['poste'], $r['poste'], "",$exercice);
|
||||
|
||||
if ($previous == 1 ) {
|
||||
$r['solde_previous']=bcsub($r['solde_deb_previous'],$r['solde_cred_previous']);
|
||||
}
|
||||
/*
|
||||
* level x
|
||||
*/
|
||||
|
|
@ -362,23 +363,22 @@ if ( isset($_GET['view'] ) )
|
|||
echo '<tr class="highlight">';
|
||||
echo td(${'lvl'.$ind.'_old'},'style="font-weight:bold;"');
|
||||
echo td(${'lvl'.$ind.'_old'}." "._("Total niveau")." ".$ind,'style="font-weight:bold;"');
|
||||
|
||||
// compare with previous exercice
|
||||
if ($previous==1) {
|
||||
echo td(nbm(${'lvl'.$ind}['sum_deb_previous']),'class="previous_year" style="font-weight:bold;"');
|
||||
echo td(nbm(${'lvl'.$ind}['sum_cred_previous']),' class="previous_year" style="font-weight:bold;" ');
|
||||
echo td(nbm(${'lvl'.$ind}['solde_deb_previous']),'class="previous_year" style="font-weight:bold;"');
|
||||
echo td(nbm(${'lvl'.$ind}['solde_cred_previous']),'class="previous_year" style="font-weight:bold;"');
|
||||
$delta_previous=bcsub(${'lvl'.$ind}['solde_cred_previous'],${'lvl'.$ind}['solde_deb_previous']);
|
||||
$side_previous=($delta_previous > 0 ) ? "C":"D";
|
||||
$delta_previous=${'lvl'.$ind}['solde_previous'];
|
||||
$side_previous=($delta_previous > 0 ) ? "D":"C";
|
||||
echo td(nbm(abs($delta_previous))." $side_previous",'class="previous_year" style="text-align:right;font-weight:bold;" ');
|
||||
|
||||
}
|
||||
/*echo td(nbm(${'lvl'.$ind}['sum_deb']),'style="text-align:right;font-weight:bold;" ');
|
||||
echo td(nbm(${'lvl'.$ind}['sum_cred']),'style="text-align:right;font-weight:bold;"');*/
|
||||
|
||||
// Ouverture
|
||||
$solde3=bcsub(${'lvl'.$ind}['sum_deb_ope'],${'lvl'.$ind}['sum_cred_ope']);
|
||||
$side3=($solde3<0)?" C":" D";
|
||||
$side3=($solde3==0)?" ":$side3;
|
||||
echo td(nbm(abs($solde3)).$side3);
|
||||
echo td(nbm(abs($solde3)).$side3,'style="text-align:right;font-weight:bold;"');
|
||||
|
||||
// Saldo debit
|
||||
$solde_deb=bcsub(${'lvl'.$ind}['sum_deb'],${'lvl'.$ind}['sum_deb_ope']);
|
||||
|
|
@ -400,12 +400,12 @@ if ( isset($_GET['view'] ) )
|
|||
}
|
||||
}
|
||||
|
||||
foreach($a_sum as $a)
|
||||
{
|
||||
$lvl1[$a]=bcadd($lvl1[$a],$r[$a]);
|
||||
$lvl2[$a]=bcadd($lvl2[$a],$r[$a]);
|
||||
$lvl3[$a]=bcadd($lvl3[$a],$r[$a]);
|
||||
}
|
||||
foreach($a_sum as $a)
|
||||
{
|
||||
$lvl1[$a]=bcadd($lvl1[$a],$r[$a]);
|
||||
$lvl2[$a]=bcadd($lvl2[$a],$r[$a]);
|
||||
$lvl3[$a]=bcadd($lvl3[$a],$r[$a]);
|
||||
}
|
||||
// For the Total row , there is no accounting
|
||||
if ( $r['poste'] == "") {
|
||||
$tr="highlight";
|
||||
|
|
@ -420,12 +420,11 @@ if ( isset($_GET['view'] ) )
|
|||
if ($previous == 1 ) {
|
||||
echo td(nbm($r['sum_deb_previous']),' class="previous_year"');
|
||||
echo td(nbm($r['sum_cred_previous']),' class="previous_year" ');
|
||||
echo td(nbm($r['solde_deb_previous']),' class="previous_year"');
|
||||
echo td(nbm($r['solde_cred_previous']),'class="previous_year" ');
|
||||
if ( isset($_GET['lvl1']) ||
|
||||
isset($_GET['lvl2']) ||
|
||||
isset($_GET['lvl3']))
|
||||
echo '<td></td>';
|
||||
$solde_previous=bcsub($r['solde_deb_previous'],$r['solde_cred_previous']);
|
||||
$side=($solde_previous<0)?"D":"C";
|
||||
$side=($solde_previous==0)?"":$side;
|
||||
$r['solde_previous']=$solde_previous;
|
||||
echo td(nbm(abs($solde_previous))." ".$side,' class="previous_year"');
|
||||
|
||||
$summary_prev_tab=$bal->summary_add($summary_prev_tab,
|
||||
$r['poste'],
|
||||
|
|
|
|||
|
|
@ -138,12 +138,17 @@ class Acc_Balance
|
|||
$per_sql_previous=sql_filter_per($this->db,$previous_start->p_id,$previous_end->p_id,'p_id','j_tech_per');
|
||||
$sql="
|
||||
with m as
|
||||
( select j_poste,sum(deb) as sdeb,sum(cred) as scred
|
||||
( select j_poste,sum(deb) as sdeb,sum(cred) as scred,
|
||||
sum(deb_op) as sum_deb_ope ,
|
||||
sum(cred_op) as sum_cred_ope
|
||||
from
|
||||
(select j_poste,
|
||||
case when j_debit='t' then j_montant else 0 end as deb,
|
||||
case when j_debit='f' then j_montant else 0 end as cred
|
||||
case when j_debit='f' then j_montant else 0 end as cred ,
|
||||
case when j_debit='t' and jr_optype='OPE' then j_montant else 0 end as deb_op,
|
||||
case when j_debit='f' and jr_optype='OPE' then j_montant else 0 end as cred_op
|
||||
from jrnx
|
||||
join jrn on (j_grpt=jr_grpt_id)
|
||||
join tmp_pcmn on (j_poste=pcm_val)
|
||||
left join parm_periode on (j_tech_per = p_id)
|
||||
join jrn_def on (j_jrn_def=jrn_def_id)
|
||||
|
|
@ -152,15 +157,11 @@ class Acc_Balance
|
|||
$and $filter_sql and $per_sql
|
||||
) as sub_m group by j_poste order by j_poste ) ,
|
||||
p as ( select j_poste,sum(deb) as sdeb,
|
||||
sum(cred) as scred ,
|
||||
sum(deb_op) as sum_deb_ope ,
|
||||
sum(cred_op) as sum_cred_ope
|
||||
sum(cred) as scred
|
||||
from
|
||||
(select j_poste,
|
||||
case when j_debit='t' then j_montant else 0 end as deb,
|
||||
case when j_debit='f' then j_montant else 0 end as cred ,
|
||||
case when j_debit='t' and jr_optype='OPE' then j_montant else 0 end as deb_op,
|
||||
case when j_debit='f' and jr_optype='OPE' then j_montant else 0 end as cred_op
|
||||
case when j_debit='f' then j_montant else 0 end as cred
|
||||
from jrnx join tmp_pcmn on (j_poste=pcm_val)
|
||||
left join parm_periode on (j_tech_per = p_id)
|
||||
join jrn_def on (j_jrn_def=jrn_def_id)
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ require_once NOALYSS_INCLUDE.'/lib/sort_table.class.php';
|
|||
require_once NOALYSS_INCLUDE.'/database/jrn_def_sql.class.php';
|
||||
require_once NOALYSS_INCLUDE.'/class/acc_payment.class.php';
|
||||
require_once NOALYSS_INCLUDE.'/class/acc_ledger_history.class.php';
|
||||
//require_once NOALYSS_INCLUDE.'/class/print_ledger.class.php';
|
||||
require_once NOALYSS_INCLUDE.'/lib/http_input.class.php';
|
||||
|
||||
/** \file
|
||||
|
|
@ -2634,6 +2635,11 @@ class Acc_Ledger extends jrn_def_sql
|
|||
if ( empty($pa_ledger) ) {
|
||||
$pa_ledger=[$this->id];
|
||||
}
|
||||
// if $pa_ledger == 0, it means we need to show all ledgers
|
||||
if ( $pa_ledger == [0] ) {
|
||||
$pa_ledger=Print_Ledger::available_ledger($p_from);
|
||||
}
|
||||
|
||||
$alh_generic=new Acc_Ledger_History_Generic($this->db, $pa_ledger, $p_from, $p_to, "A");
|
||||
$alh_generic->get_rowSimple($trunc,$p_limit,$p_offset);
|
||||
$data=$alh_generic->get_data();
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
* \brief the class Acc_Ledger_Fin inherits from Acc_Ledger, this
|
||||
* object permit to manage the financial ledger
|
||||
*/
|
||||
require_once NOALYSS_INCLUDE.'/class/acc_ledger.class.php';
|
||||
require_once NOALYSS_INCLUDE.'/lib/idate.class.php';
|
||||
require_once NOALYSS_INCLUDE.'/lib/icard.class.php';
|
||||
require_once NOALYSS_INCLUDE.'/lib/ispan.class.php';
|
||||
|
|
@ -32,7 +33,6 @@ require_once NOALYSS_INCLUDE.'/lib/iconcerned.class.php';
|
|||
require_once NOALYSS_INCLUDE.'/lib/ifile.class.php';
|
||||
require_once NOALYSS_INCLUDE.'/lib/ihidden.class.php';
|
||||
require_once NOALYSS_INCLUDE.'/lib/iselect.class.php';
|
||||
require_once NOALYSS_INCLUDE.'/class/acc_ledger.class.php';
|
||||
require_once NOALYSS_INCLUDE.'/lib/ac_common.php';
|
||||
require_once NOALYSS_INCLUDE.'/class/acc_reconciliation.class.php';
|
||||
|
||||
|
|
|
|||
|
|
@ -1262,6 +1262,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger
|
|||
$Tva->js="onblur=\"format_number(this);onChange=clean_tva($i);compute_ledger($i)\"";
|
||||
$Tva->in_table=true;
|
||||
$Tva->set_attribute('compute',$i);
|
||||
$Tva->set_filter("purchase");
|
||||
$Tva->value=$march_tva_id;
|
||||
$array[$i]['tva']=$Tva->input("e_march$i"."_tva_id");
|
||||
|
||||
|
|
|
|||
|
|
@ -1291,6 +1291,7 @@ EOF;
|
|||
$Tva = new ITva_Popup($this->db);
|
||||
$Tva->in_table = true;
|
||||
$Tva->set_attribute('compute', $i);
|
||||
$Tva->set_filter("sale");
|
||||
|
||||
$Tva->js = 'onblur="format_number(this);clean_tva(' . $i . ');compute_ledger(' . $i . ')"';
|
||||
$Tva->value = $march_tva_id;
|
||||
|
|
|
|||
|
|
@ -352,12 +352,13 @@ class Anc_Balance_Double extends Anc_Print
|
|||
$r.=_('Entre le poste ');
|
||||
$r.=$poste->input("from_poste2",$this->from_poste2);
|
||||
$javascript="search_ca(".dossier::id().",'from_poste2','pa_id2')";
|
||||
$r.=HtmlInput::button_image($javascript, uniqid(), 'alt="'._('Recherche').'" title="'._('Recherche').'" class="image_search"',"image/magnifier13.png");
|
||||
|
||||
$r.=Icon_Action::icon_magnifier(uniqid(), $javascript);
|
||||
|
||||
$r.=_(" et le poste ");
|
||||
$poste->id="to_poste2";
|
||||
$r.=$poste->input("to_poste2",$this->to_poste2);
|
||||
$r.=HtmlInput::button_image($javascript, uniqid(), 'alt="'._('Recherche').'" title="'._('Recherche').'" class="image_search"',"image/magnifier13.png");
|
||||
$javascript="search_ca(".dossier::id().",'to_poste2','pa_id2')";
|
||||
$r.=Icon_Action::icon_magnifier(uniqid(), $javascript);
|
||||
|
||||
$r.='<span class="notice" style="display:block">'.
|
||||
_('Selectionnez le plan qui vous intéresse avant de cliquer sur Recherche').
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ class Anc_GrandLivre extends Anc_Print
|
|||
* \return string
|
||||
*/
|
||||
|
||||
function display_html()
|
||||
function display_html($p_with_ck=1)
|
||||
{
|
||||
$r = "";
|
||||
//---Html
|
||||
|
|
@ -250,7 +250,7 @@ class Anc_GrandLivre extends Anc_Print
|
|||
*/
|
||||
$str_ck = "";
|
||||
$str_document = "";
|
||||
if ($row['jr_id'] != null)
|
||||
if ($row['jr_id'] != null && $p_with_ck==1)
|
||||
{
|
||||
/*
|
||||
* Get receipt info
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ class Anc_Listing extends Anc_Print
|
|||
'<td>'.$row['oa_date'].'</td>'.
|
||||
td($post_detail).
|
||||
td($card_detail).
|
||||
'<td>'.h($row['po_name']).'</td>'.
|
||||
'<td>'.HtmlInput::history_anc_account($row['po_id'],h($row['po_name'])).'</td>'.
|
||||
'<td>'.h($row['oa_description']).'</td>'.
|
||||
td($row['jr_comment']).
|
||||
'<td>'.$detail.'</td>'.
|
||||
|
|
|
|||
|
|
@ -213,32 +213,33 @@ class Anc_Operation
|
|||
$pa_id_cond= "pa_id=".$this->pa_id." and";
|
||||
$sql="
|
||||
|
||||
select oa_id,
|
||||
po_name,
|
||||
oa_description,
|
||||
po_description,
|
||||
oa_debit,
|
||||
(case when jr_date is not null then to_char(jr_date,'DD.MM.YYYY') else to_char(oa_date,'DD.MM.YYYY') end ) as oa_date,
|
||||
oa_amount,
|
||||
oa_group,
|
||||
j_id ,
|
||||
jr_internal,
|
||||
jr_id,
|
||||
coalesce(jr_comment,b.oa_description) as jr_comment,
|
||||
case when j_poste is null and b.f_id is not null then
|
||||
(select ad_value from fiche_detail where fiche_detail.f_id=b.f_id and ad_id=".ATTR_DEF_ACCOUNT.")
|
||||
when j_poste is not null then
|
||||
j_poste
|
||||
end as j_poste
|
||||
,
|
||||
coalesce(jrnx.f_id,b.f_id) as f_id,
|
||||
case when jrnx.f_id is not null then
|
||||
(select ad_value from fiche_Detail where f_id=jrnx.f_id and ad_id=23)
|
||||
when b.f_id is not null then
|
||||
(select ad_value from fiche_Detail where f_id=b.f_id and ad_id=23)
|
||||
end
|
||||
as qcode,
|
||||
jr_pj_number
|
||||
select B.po_id as po_id,
|
||||
oa_id,
|
||||
po_name,
|
||||
oa_description,
|
||||
po_description,
|
||||
oa_debit,
|
||||
(case when jr_date is not null then to_char(jr_date,'DD.MM.YYYY') else to_char(oa_date,'DD.MM.YYYY') end ) as oa_date,
|
||||
oa_amount,
|
||||
oa_group,
|
||||
j_id ,
|
||||
jr_internal,
|
||||
jr_id,
|
||||
coalesce(jr_comment,b.oa_description) as jr_comment,
|
||||
case when j_poste is null and b.f_id is not null then
|
||||
(select ad_value from fiche_detail where fiche_detail.f_id=b.f_id and ad_id=".ATTR_DEF_ACCOUNT.")
|
||||
when j_poste is not null then
|
||||
j_poste
|
||||
end as j_poste
|
||||
,
|
||||
coalesce(jrnx.f_id,b.f_id) as f_id,
|
||||
case when jrnx.f_id is not null then
|
||||
(select ad_value from fiche_Detail where f_id=jrnx.f_id and ad_id=23)
|
||||
when b.f_id is not null then
|
||||
(select ad_value from fiche_Detail where f_id=b.f_id and ad_id=23)
|
||||
end
|
||||
as qcode,
|
||||
jr_pj_number
|
||||
from operation_analytique as B join poste_analytique using(po_id)
|
||||
left join jrnx using (j_id)
|
||||
left join jrn on (j_grpt=jr_grpt_id)
|
||||
|
|
@ -711,11 +712,12 @@ class Anc_Operation
|
|||
{
|
||||
$tot=bcadd($tot,$a_Anc_Operation[$i]->oa_amount);
|
||||
}
|
||||
if ( $tot != $p_nd && count($a_Anc_Operation) > 0 )
|
||||
{
|
||||
$diff= bcsub($tot, $p_nd);
|
||||
$a_Anc_Operation[0]->oa_amount=bcsub($a_Anc_Operation[0]->oa_amount,$diff);
|
||||
}
|
||||
// utilité ???
|
||||
// if ( $tot != $p_nd && count($a_Anc_Operation) > 0 )
|
||||
// {
|
||||
// $diff= bcsub($tot, $p_nd);
|
||||
// $a_Anc_Operation[0]->oa_amount=bcsub($a_Anc_Operation[0]->oa_amount,$diff);
|
||||
// }
|
||||
for ($i=0;$i<$nb_op;$i++)
|
||||
{
|
||||
$a_Anc_Operation[$i]->add();
|
||||
|
|
|
|||
|
|
@ -127,11 +127,11 @@ class Anc_Print
|
|||
$plan_id->selected=$this->pa_id;
|
||||
|
||||
$javascript="search_ca(".dossier::id().",'from_poste','pa_id')";
|
||||
$choose_from=HtmlInput::button_image($javascript, uniqid(), 'alt="'._('Recherche').'" title="'._('Recherche').'" class="image_search"',"image/magnifier13.png");
|
||||
|
||||
$choose_from=Icon_Action::icon_magnifier(uniqid(), $javascript);
|
||||
$javascript="search_ca(".dossier::id().",'to_poste','pa_id')";
|
||||
$choose_to=HtmlInput::button_image($javascript, uniqid(), 'alt="'._('Recherche').'" title="'._('Recherche').'" class="image_search"',"image/magnifier13.png");
|
||||
|
||||
$choose_to=Icon_Action::icon_magnifier(uniqid(), $javascript);
|
||||
|
||||
|
||||
$r.=HtmlInput::request_to_hidden(array('ac'));
|
||||
ob_start();
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
// Copyright Author Dany De Bontridder danydb@aevalys.eu
|
||||
require_once NOALYSS_INCLUDE.'/class/pdf_operation.class.php';
|
||||
require_once NOALYSS_INCLUDE.'/lib/progress_bar.class.php';
|
||||
/**
|
||||
* @brief Export DOCUMENT from Analytic accountancy, can transform into PDF
|
||||
* and add a stamp on each pages
|
||||
|
|
@ -118,16 +119,20 @@ class Document_Export
|
|||
* a stamp. If an error occurs then $this->feedback won't be empty
|
||||
* @param $p_array contents all the jr_id
|
||||
*/
|
||||
function export_all($p_array)
|
||||
function export_all($p_array, Progress_Bar $progress)
|
||||
{
|
||||
$this->check_file();
|
||||
if ( count($p_array)==0) return;
|
||||
ob_start();
|
||||
$cnt_feedback=0;
|
||||
global $cn;
|
||||
|
||||
// follow progress
|
||||
$step=round(16/count($p_array),2);
|
||||
|
||||
$cn->start();
|
||||
foreach ($p_array as $value)
|
||||
{
|
||||
$progress->increment($step);
|
||||
// For each file save it into the temp folder,
|
||||
$file = $cn->get_array('select jr_pj,jr_pj_name,jr_pj_number,jr_pj_type from jrn '
|
||||
. ' where jr_id=$1', array($value));
|
||||
|
|
@ -173,7 +178,7 @@ class Document_Export
|
|||
continue;
|
||||
}
|
||||
|
||||
|
||||
$progress->increment($step);
|
||||
//
|
||||
// remove extension
|
||||
$ext = strrpos($filename, ".");
|
||||
|
|
@ -210,6 +215,7 @@ class Document_Export
|
|||
}
|
||||
rename ($this->store_convert . '/' . $file_pdf.'.2',$this->store_convert . '/' . $file_pdf);
|
||||
}
|
||||
$progress->increment($step);
|
||||
// output
|
||||
$output = $this->store_convert . '/stamp_' . $file_pdf;
|
||||
|
||||
|
|
@ -238,7 +244,8 @@ class Document_Export
|
|||
// concatenate detail operation with the output
|
||||
$stmt = PDFTK . " " . $detail_operation->get_pdf_filename()." ".$output.
|
||||
' output ' . $output2;
|
||||
|
||||
|
||||
$progress->increment($step);
|
||||
passthru($stmt, $status);
|
||||
if ($status <> 0)
|
||||
{
|
||||
|
|
@ -259,12 +266,15 @@ class Document_Export
|
|||
$this->move_file($output, 'stamp_' . $file_pdf);
|
||||
}
|
||||
|
||||
$progress->set_value(93);
|
||||
// concatenate all pdf into one
|
||||
$this->concatenate_pdf();
|
||||
|
||||
|
||||
ob_clean();
|
||||
$this->send_pdf();
|
||||
|
||||
$progress->set_value(100);
|
||||
// remove files from "conversion folder"
|
||||
$this->clean_folder();
|
||||
|
||||
|
|
|
|||
|
|
@ -281,7 +281,7 @@ class Dossier
|
|||
|
||||
static function get_version($p_cn)
|
||||
{
|
||||
return $p_cn->get_value('select val from version');
|
||||
return $p_cn->get_value('select max(val) from version');
|
||||
}
|
||||
|
||||
static function connect()
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ require_once NOALYSS_INCLUDE.'/lib/database.class.php';
|
|||
require_once NOALYSS_INCLUDE.'/lib/iselect.class.php';
|
||||
class Exercice
|
||||
{
|
||||
function __construct(&$cn)
|
||||
function __construct($cn)
|
||||
{
|
||||
$this->cn=$cn;
|
||||
}
|
||||
|
|
@ -50,7 +50,7 @@ class Exercice
|
|||
function select($name,$selected='',$js='')
|
||||
{
|
||||
$iselect=new ISelect($name);
|
||||
$iselect->value=$this->cn->make_array('select distinct p_exercice,p_exercice from parm_periode order by 1');
|
||||
$iselect->value=$this->cn->make_array('select distinct p_exercice,p_exercice from parm_periode order by 1 desc');
|
||||
$iselect->selected=$selected;
|
||||
$iselect->javascript=$js;
|
||||
return $iselect;
|
||||
|
|
|
|||
|
|
@ -52,29 +52,38 @@ class Print_Ledger {
|
|||
if ($p_format_output == 'PDF') {
|
||||
switch ($p_type_export) {
|
||||
case 'D':
|
||||
$own = new Noalyss_Parameter_Folder($cn);
|
||||
$jrn_type = $p_ledger->get_type();
|
||||
$own=new Noalyss_Parameter_Folder($cn);
|
||||
$jrn_type=$p_ledger->get_type();
|
||||
//---------------------------------------------
|
||||
// Detailled Printing (accounting )
|
||||
//---------------------------------------------
|
||||
if ($jrn_type == 'ACH' || $jrn_type == 'VEN') {
|
||||
if ($jrn_type=='ACH'||$jrn_type=='VEN')
|
||||
{
|
||||
if (
|
||||
($jrn_type == 'ACH' && $cn->get_value('select count(qp_id) from quant_purchase') == 0) ||
|
||||
($jrn_type == 'VEN' && $cn->get_value('select count(qs_id) from quant_sold') == 0)
|
||||
) {
|
||||
$pdf = new Print_Ledger_Simple_without_vat($cn, $p_ledger);
|
||||
($jrn_type=='ACH'&&$cn->get_value('select count(qp_id) from quant_purchase')
|
||||
==0)||
|
||||
($jrn_type=='VEN'&&$cn->get_value('select count(qs_id) from quant_sold')
|
||||
==0)
|
||||
)
|
||||
{
|
||||
$pdf=new Print_Ledger_Simple_without_vat($cn,
|
||||
$p_ledger);
|
||||
$pdf->set_error(_('Ce journal ne peut être imprimé en mode simple'));
|
||||
return $pdf;
|
||||
}
|
||||
if ($own->MY_TVA_USE == 'Y') {
|
||||
$pdf = new Print_Ledger_Simple($cn, $p_ledger);
|
||||
if ($own->MY_TVA_USE=='Y')
|
||||
{
|
||||
$pdf=new Print_Ledger_Simple($cn, $p_ledger);
|
||||
return $pdf;
|
||||
}
|
||||
if ($own->MY_TVA_USE == 'N') {
|
||||
$pdf = new Print_Ledger_Simple_without_vat($cn, $p_ledger);
|
||||
if ($own->MY_TVA_USE=='N')
|
||||
{
|
||||
$pdf=new Print_Ledger_Simple_without_vat($cn,
|
||||
$p_ledger);
|
||||
return $pdf;
|
||||
}
|
||||
}else
|
||||
}
|
||||
else
|
||||
return new Print_Ledger_Detail($cn, $p_ledger);
|
||||
break;
|
||||
|
||||
|
|
@ -82,76 +91,139 @@ class Print_Ledger {
|
|||
//----------------------------------------------------------------------
|
||||
// Simple Printing Purchase Ledger
|
||||
//---------------------------------------------------------------------
|
||||
$own = new Noalyss_Parameter_Folder($cn);
|
||||
$jrn_type = $p_ledger->get_type();
|
||||
$own=new Noalyss_Parameter_Folder($cn);
|
||||
$jrn_type=$p_ledger->get_type();
|
||||
|
||||
|
||||
if ($jrn_type == 'ACH' || $jrn_type == 'VEN') {
|
||||
if ($jrn_type=='ACH'||$jrn_type=='VEN')
|
||||
{
|
||||
if (
|
||||
($jrn_type == 'ACH' && $cn->get_value('select count(qp_id) from quant_purchase') == 0) ||
|
||||
($jrn_type == 'VEN' && $cn->get_value('select count(qs_id) from quant_sold') == 0)
|
||||
) {
|
||||
$pdf = new Print_Ledger_Simple_without_vat($cn, $p_ledger);
|
||||
($jrn_type=='ACH'&&$cn->get_value('select count(qp_id) from quant_purchase')
|
||||
==0)||
|
||||
($jrn_type=='VEN'&&$cn->get_value('select count(qs_id) from quant_sold')
|
||||
==0)
|
||||
)
|
||||
{
|
||||
$pdf=new Print_Ledger_Simple_without_vat($cn,
|
||||
$p_ledger);
|
||||
$pdf->set_error(_('Ce journal ne peut être imprimé en mode simple'));
|
||||
return $pdf;
|
||||
}
|
||||
if ($own->MY_TVA_USE == 'Y') {
|
||||
$pdf = new Print_Ledger_Simple($cn, $p_ledger);
|
||||
if ($own->MY_TVA_USE=='Y')
|
||||
{
|
||||
$pdf=new Print_Ledger_Simple($cn, $p_ledger);
|
||||
return $pdf;
|
||||
}
|
||||
if ($own->MY_TVA_USE == 'N') {
|
||||
$pdf = new Print_Ledger_Simple_without_vat($cn, $p_ledger);
|
||||
if ($own->MY_TVA_USE=='N')
|
||||
{
|
||||
$pdf=new Print_Ledger_Simple_without_vat($cn,
|
||||
$p_ledger);
|
||||
return $pdf;
|
||||
}
|
||||
}
|
||||
|
||||
if ($jrn_type == 'FIN') {
|
||||
$pdf = new Print_Ledger_Financial($cn, $p_ledger);
|
||||
if ($jrn_type=='FIN')
|
||||
{
|
||||
$pdf=new Print_Ledger_Financial($cn, $p_ledger);
|
||||
return $pdf;
|
||||
}
|
||||
if ($jrn_type == 'ODS' || $p_ledger->id == 0) {
|
||||
$pdf = new Print_Ledger_Misc($cn, $p_ledger);
|
||||
if ($jrn_type=='ODS'||$p_ledger->id==0)
|
||||
{
|
||||
$pdf=new Print_Ledger_Misc($cn, $p_ledger);
|
||||
return $pdf;
|
||||
}
|
||||
break;
|
||||
case 'E':
|
||||
/**********************************************************
|
||||
* Print Detail Operation + Item
|
||||
********************************************************** */
|
||||
$own = new Noalyss_Parameter_Folder($cn);
|
||||
$jrn_type = $p_ledger->get_type();
|
||||
if ($jrn_type == 'FIN') {
|
||||
$pdf = new Print_Ledger_Financial($cn, $p_ledger);
|
||||
* ********************************************************* */
|
||||
$own=new Noalyss_Parameter_Folder($cn);
|
||||
$jrn_type=$p_ledger->get_type();
|
||||
if ($jrn_type=='FIN')
|
||||
{
|
||||
$pdf=new Print_Ledger_Financial($cn, $p_ledger);
|
||||
return $pdf;
|
||||
;
|
||||
}
|
||||
if ($jrn_type == 'ODS' || $p_ledger->id == 0) {
|
||||
$pdf = new Print_Ledger_Detail($cn, $p_ledger);
|
||||
if ($jrn_type=='ODS'||$p_ledger->id==0)
|
||||
{
|
||||
$pdf=new Print_Ledger_Detail($cn, $p_ledger);
|
||||
return $pdf;
|
||||
}
|
||||
if (
|
||||
($jrn_type == 'ACH' && $cn->get_value('select count(qp_id) from quant_purchase') == 0) ||
|
||||
($jrn_type == 'VEN' && $cn->get_value('select count(qs_id) from quant_sold') == 0)
|
||||
) {
|
||||
$pdf = new Print_Ledger_Simple_without_vat($cn, $p_ledger);
|
||||
($jrn_type=='ACH'&&$cn->get_value('select count(qp_id) from quant_purchase')
|
||||
==0)||
|
||||
($jrn_type=='VEN'&&$cn->get_value('select count(qs_id) from quant_sold')
|
||||
==0)
|
||||
)
|
||||
{
|
||||
$pdf=new Print_Ledger_Simple_without_vat($cn, $p_ledger);
|
||||
$pdf->set_error('Ce journal ne peut être imprimé en mode simple');
|
||||
return $pdf;
|
||||
}
|
||||
$pdf = new Print_Ledger_Detail_Item($cn,$p_ledger);
|
||||
$pdf=new Print_Ledger_Detail_Item($cn, $p_ledger);
|
||||
return $pdf;
|
||||
case 'A':
|
||||
/***********************************************************
|
||||
* Accounting
|
||||
*/
|
||||
$pdf = new Print_Ledger_Detail($cn, $p_ledger);
|
||||
$pdf=new Print_Ledger_Detail($cn, $p_ledger);
|
||||
return $pdf;
|
||||
break;
|
||||
|
||||
} // end switch
|
||||
} // end $p_format == PDF
|
||||
}
|
||||
|
||||
// end function
|
||||
/**
|
||||
* @brief find all the active ledger for the exerice of the periode
|
||||
* and readable by the current user
|
||||
* @global type $g_user
|
||||
* @param int $get_from_periode
|
||||
* @return array of ledger id
|
||||
*/
|
||||
static function available_ledger($get_from_periode)
|
||||
{
|
||||
global $g_user;
|
||||
$cn=Dossier::connect();
|
||||
// Find periode
|
||||
$periode=new Periode($cn, $get_from_periode);
|
||||
$exercice=$periode->get_exercice($get_from_periode);
|
||||
|
||||
if ($g_user->Admin()==0&&$g_user->is_local_admin()==0&&$g_user->get_status_security_ledger()
|
||||
==1)
|
||||
{
|
||||
$sql="select jrn_def_id
|
||||
from jrn_def join jrn_type on jrn_def_type=jrn_type_id
|
||||
join user_sec_jrn on uj_jrn_id=jrn_def_id
|
||||
where
|
||||
uj_login=$1
|
||||
and uj_priv in ('R','W')
|
||||
order by jrn_def_name
|
||||
and ( jrn_enable=1
|
||||
or
|
||||
exists (select 1 from jrn where jr_tech_per in (select p_id from parm_periode where p_exercice=$2))
|
||||
";
|
||||
$a_jrn=$cn->get_array($sql, array($g_user->login, $exercice));
|
||||
}
|
||||
else
|
||||
{
|
||||
$a_jrn=$cn->get_array("select jrn_def_id
|
||||
from jrn_def join jrn_type on jrn_def_type=jrn_type_id
|
||||
where
|
||||
jrn_enable=1 or exists(select 1 from jrn where jr_tech_per in (select p_id from parm_periode where p_exercice=$1))
|
||||
order by jrn_def_name
|
||||
", [$exercice]);
|
||||
}
|
||||
$a=[];
|
||||
$nb_jrn=count($a_jrn);
|
||||
for ($i=0; $i<$nb_jrn; $i++)
|
||||
{
|
||||
$a[]=$a_jrn[$i]['jrn_def_id'];
|
||||
}
|
||||
return $a;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
|||
278
include/class/tva_rate_mtable.class.php
Normal file
|
|
@ -0,0 +1,278 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of NOALYSS.
|
||||
*
|
||||
* PhpCompta is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* PhpCompta is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with PhpCompta; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
// Copyright (2018) Author Dany De Bontridder <dany@alchimerys.be>
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @brief Configure the tva : code , rate, label ...
|
||||
*/
|
||||
require_once NOALYSS_INCLUDE."/lib/manage_table_sql.class.php";
|
||||
require_once NOALYSS_INCLUDE."/lib/icon_action.class.php";
|
||||
require_once NOALYSS_INCLUDE."/database/v_tva_rate_sql.class.php";
|
||||
require_once NOALYSS_INCLUDE."/database/tva_rate_sql.class.php";
|
||||
|
||||
/**
|
||||
* @class
|
||||
* @brief Configure the tva : code , rate, label ...
|
||||
* When using Manage_Table_SQL
|
||||
*/
|
||||
class Tva_Rate_MTable extends Manage_Table_SQL
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
* @param V_Tva_rate_SQL $p_table
|
||||
* @example tva_parameter.php
|
||||
*/
|
||||
function __construct(V_Tva_rate_SQL $p_table)
|
||||
{
|
||||
parent::__construct($p_table);
|
||||
$this->set_col_label("tva_id", _("id"));
|
||||
$this->set_col_label("tva_label", _("label"));
|
||||
$this->set_col_label("tva_rate", _("taux"));
|
||||
$this->set_col_label("tva_comment", _("Description"));
|
||||
$this->set_col_label("tva_both_side", _("Autoliquidation"));
|
||||
$this->set_col_label("tva_sale", _("TVA Vente (C)"));
|
||||
$this->set_col_label("tva_purchase", _("TVA Achat (D)"));
|
||||
$this->set_col_type("tva_both_side", "select",
|
||||
array(
|
||||
["value"=>0, "label"=>_("Normal")],
|
||||
["value"=>1, "label"=>_("Autoliquidation")]
|
||||
));
|
||||
$this->set_property_updatable("tva_id", FALSE);
|
||||
$this->a_info=["tva_purchase"=>44,"tva_both_side"=>43,"tva_sale"=>45];
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief display into a dialog box the datarow in order
|
||||
* to be appended or modified. Can be override if you need
|
||||
* a more complex form
|
||||
*/
|
||||
function input()
|
||||
{
|
||||
$nb_order=count($this->a_order);
|
||||
echo "<table>";
|
||||
for ($i=0; $i<$nb_order; $i++)
|
||||
{
|
||||
echo "<tr>";
|
||||
$key=$this->a_order[$i];
|
||||
$label=$this->a_label_displaid[$key];
|
||||
$value=$this->table->get($key);
|
||||
$error=$this->get_error($key);
|
||||
$error=($error=="")?"":HtmlInput::errorbulle($error);
|
||||
if ($this->get_property_visible($key)===TRUE)
|
||||
{
|
||||
$info="";
|
||||
if ( isset($this->a_info[$key])) {
|
||||
$info=Icon_Action::infobulle($this->a_info[$key]);
|
||||
}
|
||||
// Label
|
||||
echo "<td> {$label} {$info} {$error}</td>";
|
||||
|
||||
if ($this->get_property_updatable($key)==TRUE)
|
||||
{
|
||||
echo "<td>";
|
||||
if ($this->a_type[$key]=="select")
|
||||
{
|
||||
$select=new ISelect($key);
|
||||
$select->value=$this->a_select[$key];
|
||||
$select->selected=$value;
|
||||
echo $select->input();
|
||||
}
|
||||
elseif ($key=="tva_rate")
|
||||
{
|
||||
$text=new INum($key);
|
||||
$text->value=$value;
|
||||
$text->prec=4;
|
||||
$min_size=(strlen($value)<10)?10:strlen($value)+1;
|
||||
$text->size=$min_size;
|
||||
echo $text->input();
|
||||
}
|
||||
elseif ($key=='tva_purchase')
|
||||
{
|
||||
$text=new IPoste("tva_purchase");
|
||||
$text->value=$value;
|
||||
$min_size=10;
|
||||
$text->size=$min_size;
|
||||
$text->set_attribute('gDossier', Dossier::id());
|
||||
$text->set_attribute('jrn', 0);
|
||||
$text->set_attribute('account', 'tva_purchase');
|
||||
echo $text->input();
|
||||
//@todo ajout infobulle pour prévenir que compte doit exister
|
||||
}
|
||||
elseif ($key=='tva_sale')
|
||||
{
|
||||
$text=new IPoste("tva_sale");
|
||||
$text->value=$value;
|
||||
$min_size=10;
|
||||
$text->set_attribute('gDossier', Dossier::id());
|
||||
$text->set_attribute('jrn', 0);
|
||||
$text->set_attribute('account', 'tva_sale');
|
||||
$text->size=$min_size;
|
||||
echo $text->input();
|
||||
}
|
||||
elseif ($this->a_type[$key]=="text")
|
||||
{
|
||||
$text=new IText($key);
|
||||
$text->value=$value;
|
||||
$min_size=(strlen($value)<30)?30:strlen($value)+5;
|
||||
$text->size=$min_size;
|
||||
echo $text->input();
|
||||
}
|
||||
echo "</td>";
|
||||
}
|
||||
else
|
||||
{
|
||||
printf('<td>%s %s</td>', h($value),
|
||||
HtmlInput::hidden($key, $value)
|
||||
);
|
||||
}
|
||||
}
|
||||
echo "</tr>";
|
||||
}
|
||||
echo "</table>";
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief save the data in TVA_RATE
|
||||
* if tva_both_side is 1 and tva_purchase or tva_sale is empty then
|
||||
it is equal to the other value
|
||||
*
|
||||
*/
|
||||
function save()
|
||||
{
|
||||
$cn=Dossier::connect();
|
||||
// if tva_both_side is 1 and tva_purchase or tva_sale is empty then
|
||||
// it is equal to the other value
|
||||
if ($this->table->tva_both_side==1)
|
||||
{
|
||||
if ($this->table->tva_purchase=="#"||trim($this->table->tva_purchase)
|
||||
=="#")
|
||||
{
|
||||
$this->table->tva_purchase=$this->table->tva_sale;
|
||||
}
|
||||
if ($this->table->tva_sale=="#"||trim($this->table->tva_sale)=="#")
|
||||
{
|
||||
$this->table->tva_sale=$this->table->tva_purchase;
|
||||
}
|
||||
}
|
||||
$tva_rate=new Tva_rate_SQL($cn, $this->table->tva_id);
|
||||
$tva_rate->setp("tva_rate", $this->table->tva_rate);
|
||||
$tva_rate->setp("tva_label", $this->table->tva_label);
|
||||
$tva_rate->setp("tva_comment", $this->table->tva_comment);
|
||||
$tva_rate->setp("tva_both_side", $this->table->tva_both_side);
|
||||
|
||||
// TVA accounting must be joined and separated with a comma
|
||||
$tva_purchase=(trim($this->table->tva_purchase)=="")?"#":$this->table->tva_purchase;
|
||||
$tva_sale=(trim($this->table->tva_sale)=="")?"#":$this->table->tva_sale;
|
||||
$tva_rate->setp("tva_poste", $tva_purchase.",".$tva_sale);
|
||||
$tva_rate->save();
|
||||
|
||||
// reload the row
|
||||
$this->table->set_pk_value($tva_rate->tva_id);
|
||||
$this->table->load();
|
||||
}
|
||||
/**
|
||||
* Check data are valid
|
||||
* 1. tva_rate between 0 & 1
|
||||
* 2. label is uniq
|
||||
* 3. accounting must exist
|
||||
* @return boolean
|
||||
*/
|
||||
function check()
|
||||
{
|
||||
$cn=Dossier::connect();
|
||||
|
||||
// both accounting can not be empty
|
||||
if (trim($this->table->tva_purchase)==""&&trim($this->table->tva_sale)=="")
|
||||
{
|
||||
$this->set_error("tva_purchase",
|
||||
_("Les 2 postes comptables ne peuvent être nuls"));
|
||||
$this->set_error("tva_sale",
|
||||
_("Les 2 postes comptables ne peuvent être nuls"));
|
||||
}
|
||||
|
||||
// Check the tva rate
|
||||
if (trim($this->table->tva_rate)==""||isNumber($this->table->tva_rate)==0||$this->table->tva_rate>1)
|
||||
{
|
||||
$this->set_error("tva_rate", _("Taux de TVA invalide"));
|
||||
}
|
||||
|
||||
//Check the label must be unique
|
||||
$count=$cn->get_value("select count(*) from tva_rate where tva_id<>$1 and lower(tva_label)=lower($2)",
|
||||
[$this->table->tva_id, $this->table->tva_label]);
|
||||
if ($count>0)
|
||||
{
|
||||
$this->set_error("tva_label", _("Ce nom est déjà utilisé"));
|
||||
}
|
||||
|
||||
// Check accounting exists for purchase
|
||||
if (trim($this->table->tva_purchase)!=""&&$this->table->tva_purchase!="#")
|
||||
{
|
||||
$count=$cn->get_value("select count(*) from tmp_pcmn where pcm_val = $1",
|
||||
[$this->table->tva_purchase]);
|
||||
if ($count==0)
|
||||
{
|
||||
$this->set_error("tva_purchase", _("Poste comptable inexistant"));
|
||||
}
|
||||
}
|
||||
// Check accounting exists for sale
|
||||
if (trim($this->table->tva_sale)!=""&&$this->table->tva_sale!="#")
|
||||
{
|
||||
$count=$cn->get_value("select count(*) from tmp_pcmn where pcm_val = $1",
|
||||
[$this->table->tva_sale]);
|
||||
if ($count==0)
|
||||
{
|
||||
$this->set_error("tva_sale", _("Poste comptable inexistant"));
|
||||
}
|
||||
}
|
||||
|
||||
// check if tva_both_side is valid
|
||||
if ($this->table->tva_both_side!=0&&$this->table->tva_both_side!=1)
|
||||
{
|
||||
$this->set_error("tva_both_side", _("Choix incorrect"));
|
||||
}
|
||||
|
||||
|
||||
if ($this->count_error()!=0)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
/**
|
||||
* delete if not used anywhere
|
||||
*/
|
||||
function delete()
|
||||
{
|
||||
$cn=Dossier::connect();
|
||||
$count_purchase=$cn->get_value("select count(*) from quant_purchase where qp_vat_code = $1",[$this->table->tva_id]);
|
||||
$count_sale=$cn->get_value("select count(*) from quant_sold where qs_vat_code = $1",[$this->table->tva_id]);
|
||||
if ( $count_purchase > 0 || $count_sale > 0) {
|
||||
throw new Exception(_("Effacement interdit : TVA utilisée"));
|
||||
}
|
||||
|
||||
// Forbid to remove all tva
|
||||
$count=$cn->get_value("select count(*) from tva_rate");
|
||||
if ( $count < 2) {
|
||||
throw new Exception(_("Vous ne pouvez pas effacer tous les taux. Si votre société n'utilise pas la TVA, changer dans le menu société"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -554,6 +554,7 @@ class User
|
|||
* record in audit log
|
||||
* This function works only if user is connected to a Folder
|
||||
* @param string $p_module menu_ref.me_code
|
||||
* @returns 0 for FORBIDDEN, 1 for GRANTED
|
||||
*/
|
||||
function check_module($p_module)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ define ('SMALLX','ⵝ');
|
|||
define ('BUTTONADD',"✚");
|
||||
|
||||
|
||||
define ('SVNINFO',6919+8);
|
||||
define ('SVNINFO',7000);
|
||||
if ( ! defined ('DEBUG')) {
|
||||
define ("DEBUG",false);
|
||||
}
|
||||
|
|
@ -108,9 +108,9 @@ if ( !defined("SITE_UPDATE_PLUGIN"))
|
|||
if ( ! defined ("SYSINFO_DISPLAY")) {
|
||||
define ("SYSINFO_DISPLAY",TRUE);
|
||||
}
|
||||
define ("DBVERSION",125);
|
||||
define ("DBVERSION",128);
|
||||
define ("MONO_DATABASE",25);
|
||||
define ("DBVERSIONREPO",17);
|
||||
define ("DBVERSIONREPO",18);
|
||||
define ('NOTFOUND','--not found--');
|
||||
define ("MAX_COMPTE",4);
|
||||
define ('MAX_ARTICLE',5);
|
||||
|
|
@ -309,5 +309,5 @@ define ('EMAIL_LIMIT',1002);
|
|||
define ('EXC_PARAM_VALUE',1005);
|
||||
define ('EXC_PARAM_TYPE',1006);
|
||||
define ('EXC_DUPLICATE',1200);
|
||||
define ("PINDG","");
|
||||
define ("UNPINDG","");
|
||||
define ("UNPINDG","");
|
||||
define ("PINDG","");
|
||||
|
|
|
|||
70
include/database/tva_rate_sql.class.php
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Autogenerated file
|
||||
* This file is part of NOALYSS.
|
||||
*
|
||||
* NOALYSS is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* NOALYSS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with NOALYSS; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
require_once NOALYSS_INCLUDE.'/lib/noalyss_sql.class.php';
|
||||
require_once NOALYSS_INCLUDE.'/lib/database.class.php';
|
||||
|
||||
/**
|
||||
* class_tva_rate_sql.php
|
||||
*
|
||||
* @file
|
||||
* @brief abstract of the table public.tva_rate
|
||||
*
|
||||
*/
|
||||
class Tva_rate_SQL extends Noalyss_SQL
|
||||
{
|
||||
|
||||
function __construct(Database $p_cn, $p_id=-1)
|
||||
{
|
||||
$this->table="public.tva_rate";
|
||||
$this->primary_key="tva_id";
|
||||
/*
|
||||
* List of columns
|
||||
*/
|
||||
$this->name=array(
|
||||
"tva_id"=>"tva_id"
|
||||
, "tva_label"=>"tva_label"
|
||||
, "tva_rate"=>"tva_rate"
|
||||
, "tva_comment"=>"tva_comment"
|
||||
, "tva_poste"=>"tva_poste"
|
||||
, "tva_both_side"=>"tva_both_side"
|
||||
);
|
||||
/*
|
||||
* Type of columns
|
||||
*/
|
||||
$this->type=array(
|
||||
"tva_id"=>"numeric"
|
||||
, "tva_label"=>"text"
|
||||
, "tva_rate"=>"numeric"
|
||||
, "tva_comment"=>"text"
|
||||
, "tva_poste"=>"text"
|
||||
, "tva_both_side"=>"numeric"
|
||||
);
|
||||
|
||||
|
||||
$this->default=array(
|
||||
"tva_id"=>"auto"
|
||||
);
|
||||
|
||||
$this->date_format="DD.MM.YYYY";
|
||||
parent::__construct($p_cn, $p_id);
|
||||
}
|
||||
|
||||
}
|
||||
72
include/database/v_tva_rate_sql.class.php
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Autogenerated file
|
||||
* This file is part of NOALYSS.
|
||||
*
|
||||
* NOALYSS is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* NOALYSS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with NOALYSS; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
require_once NOALYSS_INCLUDE.'/lib/noalyss_sql.class.php';
|
||||
require_once NOALYSS_INCLUDE.'/lib/database.class.php';
|
||||
|
||||
/**
|
||||
* class_tva_rate_sql.php
|
||||
*
|
||||
* @file
|
||||
* @brief abstract of the view public.v_tva_rate
|
||||
*
|
||||
*/
|
||||
class V_Tva_Rate_SQL extends Noalyss_SQL
|
||||
{
|
||||
|
||||
function __construct(Database $p_cn, $p_id=-1)
|
||||
{
|
||||
$this->table="public.v_tva_rate";
|
||||
$this->primary_key="tva_id";
|
||||
/*
|
||||
* List of columns
|
||||
*/
|
||||
$this->name=array(
|
||||
"tva_id"=>"tva_id"
|
||||
, "tva_label"=>"tva_label"
|
||||
, "tva_rate"=>"tva_rate"
|
||||
, "tva_comment"=>"tva_comment"
|
||||
, "tva_purchase"=>"tva_purchase"
|
||||
, "tva_sale"=>"tva_sale"
|
||||
, "tva_both_side"=>"tva_both_side"
|
||||
);
|
||||
/*
|
||||
* Type of columns
|
||||
*/
|
||||
$this->type=array(
|
||||
"tva_id"=>"numeric"
|
||||
, "tva_label"=>"text"
|
||||
, "tva_rate"=>"numeric"
|
||||
, "tva_comment"=>"text"
|
||||
, "tva_purchase"=>"text"
|
||||
, "tva_sale"=>"text"
|
||||
, "tva_both_side"=>"numeric"
|
||||
);
|
||||
|
||||
|
||||
$this->default=array(
|
||||
"tva_id"=>"auto"
|
||||
);
|
||||
|
||||
$this->date_format="DD.MM.YYYY";
|
||||
parent::__construct($p_cn, $p_id);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -54,7 +54,7 @@ if ( isset ($_POST["DATABASE"]) )
|
|||
$repo=new Database();
|
||||
try {
|
||||
$dos=$http->post('DATABASE');
|
||||
$template=$http->post("FMOD_ID","numnber");
|
||||
$template=$http->post("FMOD_ID","number");
|
||||
} catch (Exception $ex) {
|
||||
echo $ex->getMessage();
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -23,19 +23,22 @@
|
|||
if (!defined('ALLOWED'))
|
||||
die('Appel direct ne sont pas permis');
|
||||
|
||||
|
||||
// unlock session
|
||||
session_write_close();
|
||||
/**
|
||||
* export all the selected documents for Ana Accountancy in PDF
|
||||
*/
|
||||
require_once NOALYSS_INCLUDE.'/class/document_export.class.php';
|
||||
require_once NOALYSS_INCLUDE.'/lib/http_input.class.php';
|
||||
require_once NOALYSS_INCLUDE.'/lib/progress_bar.class.php';
|
||||
$http=new HttpInput();
|
||||
$ck = $http->get('ck',"string", 0);
|
||||
if ($ck == 0)
|
||||
{
|
||||
echo "Aucune sélection";
|
||||
echo _("Aucune sélection");
|
||||
exit();
|
||||
}
|
||||
$anc=new Document_Export();
|
||||
|
||||
$anc->export_all($ck);
|
||||
$task_id=$http->request("task_id");
|
||||
$progress=new Progress_Bar($task_id);
|
||||
$anc->export_all($ck,$progress);
|
||||
|
|
|
|||
|
|
@ -110,11 +110,15 @@ $pPeriode=new Periode($cn);
|
|||
$a=$pPeriode->get_date_limit($from_periode);
|
||||
$b=$pPeriode->get_date_limit($to_periode);
|
||||
$per_text=" du ".$a['p_start']." au ".$b['p_end'];
|
||||
|
||||
// If compare with previous exercice ,
|
||||
// we use the landscape mode
|
||||
if ($previous == 1 ) {
|
||||
$pdf=new PDFLand($cn);
|
||||
} else {
|
||||
$pdf= new PDF($cn);
|
||||
}
|
||||
|
||||
$pdf->setDossierInfo(" Balance ".$per_text);
|
||||
$pdf->AliasNbPages();
|
||||
$pdf->AddPage();
|
||||
|
|
@ -129,9 +133,9 @@ if ($previous == 1 ){
|
|||
$pdf->write_cell(20,6,'Solde N-1',0,0,'R');
|
||||
}
|
||||
$pdf->write_cell(25,6,_('Ouverture'),0,0,'R');
|
||||
$pdf->write_cell(25,6,'Total Débit',0,0,'R');
|
||||
$pdf->write_cell(25,6,'Total Crédit',0,0,'R');
|
||||
$pdf->write_cell(25,6,'Solde Débiteur',0,0,'R');
|
||||
$pdf->write_cell(25,6,_('Total Débit'),0,0,'R');
|
||||
$pdf->write_cell(25,6,_('Total Crédit'),0,0,'R');
|
||||
$pdf->write_cell(25,6,_('Solde Débiteur'),0,0,'R');
|
||||
$pdf->line_new();
|
||||
|
||||
$pdf->SetFont('DejaVuCond','',8);
|
||||
|
|
@ -185,20 +189,19 @@ if (! empty($array))
|
|||
if ($previous == 1 ) {
|
||||
$delta_previous=bcsub(${'nlvl'.$ind}['solde_cred_previous'],${'nlvl'.$ind}['solde_deb_previous']);
|
||||
$side_previous=($delta_previous < 0) ? "D":"C";
|
||||
$pdf->write_cell(30,6,"n-1 : " .nbm($delta_previous)." $side_previous",0,0,'R');
|
||||
$pdf->write_cell(30,6," n : ".nbm($delta)." $side",0,0,'R');
|
||||
$pdf->write_cell(60,6," ",0,0,'R');
|
||||
$pdf->write_cell(22,6,nbm(${'nlvl'.$ind}['sum_deb_previous']),0,0,'R');
|
||||
$pdf->write_cell(22,6,nbm(${'nlvl'.$ind}['sum_cred_previous']),0,0,'R');
|
||||
$pdf->write_cell(22,6,nbm(${'nlvl'.$ind}['solde_deb_previous']),0,0,'R');
|
||||
$pdf->write_cell(22,6,nbm(${'nlvl'.$ind}['solde_cred_previous']),0,0,'R');
|
||||
$pdf->write_cell(22,6,nbm(abs($delta_previous))." $side_previous",0,0,'R');
|
||||
|
||||
} else {
|
||||
$pdf->write_cell(60,6," ",0,0,'R');
|
||||
$solde_lv=bcsub(${'nlvl'.$ind}['sum_deb_ope'],${'nlvl'.$ind}['sum_cred_ope']);
|
||||
$side_lv=($solde_lv<0)?" D":" C";
|
||||
$side_lv=($solde_lv==0)?" ":$side_lv;
|
||||
$pdf->write_cell(25,6,nbm(abs($solde_lv)).$side_lv,0,0,'R');
|
||||
|
||||
}
|
||||
$solde_lv=bcsub(${'nlvl'.$ind}['sum_deb_ope'],${'nlvl'.$ind}['sum_cred_ope']);
|
||||
$side_lv=($solde_lv<0)?" C":" D";
|
||||
$side_lv=($solde_lv==0)?" ":$side_lv;
|
||||
$pdf->write_cell(25,6,nbm(abs($solde_lv)).$side_lv,0,0,'R');
|
||||
$pdf->write_cell(25,6,nbm(bcsub(${'nlvl'.$ind}['sum_deb'],${'nlvl'.$ind}['sum_deb_ope'])),0,0,'R');
|
||||
$pdf->write_cell(25,6,nbm(bcsub(${'nlvl'.$ind}['sum_cred'],${'nlvl'.$ind}['sum_cred_ope'])),0,0,'R');
|
||||
$solde_lv=bcsub(${'nlvl'.$ind}['solde_deb'],${'nlvl'.$ind}['solde_cred']);
|
||||
|
|
@ -240,8 +243,15 @@ if (! empty($array))
|
|||
if ($previous == 1 ) {
|
||||
$pdf->write_cell(22,6,nbm($value['sum_deb_previous']),0,0,'R',$fill);
|
||||
$pdf->write_cell(22,6,nbm($value['sum_cred_previous']),0,0,'R',$fill);
|
||||
$pdf->write_cell(22,6,nbm($value['solde_deb_previous']),0,0,'R',$fill);
|
||||
$pdf->write_cell(22,6,nbm($value['solde_cred_previous']),0,0,'R',$fill);
|
||||
|
||||
// $pdf->write_cell(22,6,nbm($value['solde_deb_previous']),0,0,'R',$fill);
|
||||
// $pdf->write_cell(22,6,nbm($value['solde_cred_previous']),0,0,'R',$fill);
|
||||
$solde_previous=bcsub($value['solde_cred_previous'],$value['solde_deb_previous']);
|
||||
$side_previous=($solde_previous<0)?" D":" C";
|
||||
$side_previous=($solde_previous==0)?"":$side_previous;
|
||||
|
||||
$pdf->write_cell(22,6,nbm(abs($solde_previous)).$side_previous,0,0,'R',$fill);
|
||||
|
||||
$tp_deb_previous=bcadd($tp_deb_previous,$value['sum_deb_previous']);
|
||||
$tp_cred_previous=bcadd($tp_cred_previous,$value['sum_cred_previous']);
|
||||
$tp_sold_previous=bcadd($tp_sold_previous,$value['solde_deb_previous']);
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ include_once NOALYSS_INCLUDE."/lib/ac_common.php";
|
|||
require_once NOALYSS_INCLUDE.'/class/noalyss_parameter_folder.class.php';
|
||||
require_once NOALYSS_INCLUDE.'/class/acc_ledger_sold.class.php';
|
||||
require_once NOALYSS_INCLUDE.'/class/acc_ledger_purchase.class.php';
|
||||
require_once NOALYSS_INCLUDE.'/class/print_ledger.class.php';
|
||||
require_once NOALYSS_INCLUDE.'/class/dossier.class.php';
|
||||
$gDossier=dossier::id();
|
||||
|
||||
|
|
@ -83,45 +84,12 @@ global $g_user;
|
|||
*/
|
||||
if ($get_jrn==0)
|
||||
{
|
||||
// Find periode
|
||||
$periode=new Periode($cn, $get_from_periode);
|
||||
$exercice=$periode->get_exercice($get_from_periode);
|
||||
|
||||
if ($g_user->Admin()==0&&$g_user->is_local_admin()==0&&$g_user->get_status_security_ledger()
|
||||
==1)
|
||||
{
|
||||
$sql="select jrn_def_id
|
||||
from jrn_def join jrn_type on jrn_def_type=jrn_type_id
|
||||
join user_sec_jrn on uj_jrn_id=jrn_def_id
|
||||
where
|
||||
uj_login=$1
|
||||
and uj_priv in ('R','W')
|
||||
order by jrn_def_name
|
||||
and ( jrn_enable=1
|
||||
or
|
||||
exists (select 1 from jrn where jr_tech_per in (select p_id from parm_periode where p_exercice=$2))
|
||||
";
|
||||
$a_jrn=$cn->get_array($sql, array($g_user->login, $exercice));
|
||||
}
|
||||
else
|
||||
{
|
||||
$a_jrn=$cn->get_array("select jrn_def_id
|
||||
from jrn_def join jrn_type on jrn_def_type=jrn_type_id
|
||||
where
|
||||
jrn_enable=1 or exists(select 1 from jrn where jr_tech_per in (select p_id from parm_periode where p_exercice=$1))
|
||||
order by jrn_def_name
|
||||
", [$exercice]);
|
||||
}
|
||||
$a=[];
|
||||
$nb_jrn=count($a_jrn);
|
||||
for ($i=0;$i< $nb_jrn;$i++){
|
||||
$a[]=$a_jrn[$i]['jrn_def_id'];
|
||||
}
|
||||
$a_jrn=$a;
|
||||
// find out all the available ledgers for the current user
|
||||
$a_jrn=Print_Ledger::available_ledger($get_from_periode);
|
||||
}
|
||||
else
|
||||
{
|
||||
$a_jrn=$Jrn->id;
|
||||
$a_jrn=$get_jrn;
|
||||
}
|
||||
$Jrn=new Acc_Ledger($cn, $get_jrn);
|
||||
|
||||
|
|
@ -134,7 +102,7 @@ $jrn_type=$Jrn->get_type();
|
|||
// ODS or all ledgers becomes A
|
||||
// Extended but no FIN becomes L
|
||||
//
|
||||
if ($get_option=='D'||($jrn_type=='ODS'||$Jrn->id==0)&&$get_option=="E")
|
||||
if ( $get_option=="E")
|
||||
{
|
||||
if ($jrn_type=='FIN')
|
||||
{
|
||||
|
|
@ -198,9 +166,15 @@ if ($get_option=='D'||($jrn_type=='ODS'||$Jrn->id==0)&&$get_option=="E")
|
|||
//-----------------------------------------------------------------------------
|
||||
if ($get_option=='A')
|
||||
{
|
||||
|
||||
$acc_ledger_history=new Acc_Ledger_History_Generic($cn, $a_jrn,
|
||||
if ($get_jrn == 0 )
|
||||
{
|
||||
$acc_ledger_history=new Acc_Ledger_History_Generic($cn, $a_jrn,
|
||||
$get_from_periode, $get_to_periode, 'A');
|
||||
} else {
|
||||
$acc_ledger_history=new Acc_Ledger_History_Generic($cn, array($a_jrn),
|
||||
$get_from_periode, $get_to_periode, 'A');
|
||||
|
||||
}
|
||||
$acc_ledger_history->export_csv();
|
||||
exit;
|
||||
}
|
||||
|
|
@ -209,7 +183,7 @@ if ($get_option=='A')
|
|||
// for Misc the amount
|
||||
// For Financial only the tiers and the sign of the amount
|
||||
//-----------------------------------------------------------------------------
|
||||
if ($get_option=="L")
|
||||
if ($get_option=="L" || $get_option == 'D')
|
||||
{
|
||||
|
||||
//-----------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ if ( ! isset ($_REQUEST['oper_detail']))
|
|||
continue;
|
||||
$title=array();
|
||||
|
||||
$title[]=_("Date");
|
||||
$title[]=_("Poste");
|
||||
$title[]=_("n° pièce");
|
||||
$title[]=_("Code journal");
|
||||
|
|
@ -82,7 +83,6 @@ if ( ! isset ($_REQUEST['oper_detail']))
|
|||
$title[]=_("QuickCode");
|
||||
$title[]=_("Lib.");
|
||||
$title[]=_("Interne");
|
||||
$title[]=_("Date");
|
||||
$title[]=_("Tiers");
|
||||
$title[]=_("Description");
|
||||
$title[]=_("Débit");
|
||||
|
|
@ -134,6 +134,7 @@ if ( ! isset ($_REQUEST['oper_detail']))
|
|||
$tot_cred=bcadd($tot_cred,$op['cred_montant']);
|
||||
$diff=bcsub($op['deb_montant'],$op['cred_montant']);
|
||||
$prog=bcadd($prog,$diff);
|
||||
$export->add($op['j_date_fmt']);
|
||||
$export->add($pos['pcm_val']);
|
||||
$export->add($op['jr_pj_number']);
|
||||
$export->add($op['jrn_def_code']);
|
||||
|
|
@ -141,7 +142,6 @@ if ( ! isset ($_REQUEST['oper_detail']))
|
|||
$export->add($op['j_qcode']);
|
||||
$export->add($name);
|
||||
$export->add($op['jr_internal']);
|
||||
$export->add($op['j_date_fmt']);
|
||||
$export->add($tiers);
|
||||
$export->add($op['description']);
|
||||
$export->add($op['deb_montant'],"number");
|
||||
|
|
|
|||
|
|
@ -77,7 +77,8 @@ $Ledger->id = $p_jrn;
|
|||
//------------------------------
|
||||
if (isset($_GET ['paid']))
|
||||
{
|
||||
$Ledger->update_paid($_GET);
|
||||
$ledger_paid=new Acc_Ledger($cn,$p_jrn);
|
||||
$ledger_paid->update_paid($_GET);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -385,7 +385,7 @@ class Database
|
|||
|
||||
function get_version()
|
||||
{
|
||||
$Res=$this->get_value("select val from version");
|
||||
$Res=$this->get_value("select max(val) from version");
|
||||
return $Res;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
require_once NOALYSS_INCLUDE.'/lib/http_input.class.php';
|
||||
require_once NOALYSS_INCLUDE.'/lib/icon_action.class.php';
|
||||
|
||||
// Copyright Author Dany De Bontridder danydb@aevalys.eu
|
||||
|
||||
|
|
@ -321,6 +322,9 @@ class HtmlInput
|
|||
|
||||
/**
|
||||
* display a div with the history of the card
|
||||
* @param int $f_id fiche.f_id
|
||||
* @param string $p_mesg string to display
|
||||
* @param int $p_exercice exercice of the history
|
||||
*/
|
||||
static function history_card_button($f_id, $p_mesg,$p_exercice="")
|
||||
{
|
||||
|
|
@ -338,6 +342,10 @@ class HtmlInput
|
|||
|
||||
/**
|
||||
* display a div with the history of the account
|
||||
* @param string $p_account accounting
|
||||
* @param string $p_mesg string to display
|
||||
* @param string $p_style extra code for HTML
|
||||
* @param int $p_exercice exercice of the history
|
||||
*/
|
||||
static function history_account($p_account, $p_mesg, $p_style="",$p_exercice="")
|
||||
{
|
||||
|
|
@ -349,6 +357,23 @@ class HtmlInput
|
|||
$p_style, $p_account, dossier::id(),$p_exercice, $p_mesg);
|
||||
return $view_history;
|
||||
}
|
||||
/**
|
||||
* display a div with the history of the analytic account
|
||||
* @param int $p_account po_id
|
||||
* @param string $p_mesg string to display
|
||||
* @param string $p_style extra code for HTML
|
||||
* @param int $p_exercice exercice of the history
|
||||
*/
|
||||
static function history_anc_account($p_account, $p_mesg, $p_style="",$p_exercice="")
|
||||
{
|
||||
global $g_user;
|
||||
if ( $p_exercice=="") {
|
||||
$p_exercice=$g_user->get_exercice();
|
||||
}
|
||||
$view_history=sprintf('<A class="detail" style="text-decoration:underline;%s" HREF="javascript:view_history_anc_account(\'%s\',\'%s\',\'%s\')" >%s</A>',
|
||||
$p_style, $p_account, dossier::id(),$p_exercice, $p_mesg);
|
||||
return $view_history;
|
||||
}
|
||||
|
||||
/**
|
||||
* create a hidden plus button to select the cat of ledger
|
||||
|
|
|
|||