Cosmetic and small bugs

This commit is contained in:
sparkyx 2021-04-11 09:11:03 +02:00
parent c1d7005d69
commit eb9654f40a
9 changed files with 64 additions and 10 deletions

View file

@ -6,7 +6,7 @@
position:absolute;
top : 0px;
left:0px;
width:40px;
width:60px;
height:auto;
margin-left:0px;
}
@ -15,7 +15,7 @@
#logo_id {
top : 10px;
left:10px;
width: 60px;
width: 90px;
margin-left:35px;

View file

@ -2859,3 +2859,14 @@ span.tagcell {
padding: 2px;
margin: 0px 1px 0px 1px;
}
.h3, h3 {
font-size: 1.4rem;
}
.content .h3, .content h3 {
font-size: 1.4rem;
}
#facturation_div_id {
margin-top:2rem;
}

View file

@ -1119,7 +1119,7 @@ function show_calc()
shtml += '<a class="icon" onclick="pin(\'calc1\')" id="pin_calc1">&#xf047;</a> <a onclick="removeDiv(\'calc1\');" href="javascript:void(0)" title="" class="icon">&#10761;</a>';
shtml += "</div>";
shtml += ' <h2 class="title">' + content[66] + '</h2>';
shtml += '<form name="calc_line" method="GET" onSubmit="cal();return false;" >' + content[68] + '<input class="input_text" type="text" size="30" id="inp" name="calculator"> <input type="button" value="Efface" class="button" onClick="Clean();return false;" > <input type="button" value="Efface historique" class="button" onClick="CleanHistory();return false;" > <input type="button" class="button" value="Fermer" onClick="removeDiv(\'calc1\')" >';
shtml += '<form name="calc_line" method="GET" onSubmit="cal();return false;" >' + content[68] + '<input class="input_text" type="text" id="inp" name="calculator"> <input type="button" value="Efface" class="button" onClick="Clean();return false;" > <input type="button" value="Efface historique" class="button" onClick="CleanHistory();return false;" > <input type="button" class="button" value="Fermer" onClick="removeDiv(\'calc1\')" >';
shtml += '</form><span class="highligth" style="display:block" id="sub_total"> ' + content[67] + ' </span><span style="display:block" id="listing"> </span>';
var obj = {id: sid, html: shtml,

View file

@ -59,8 +59,10 @@ switch ($action)
case "save":
header('Content-type: text/xml; charset=UTF-8');
echo $cat->ajax_save()->saveXML();
if ( $p_id == -1 )
if ( $p_id == -1 && $cat->get_table()->getp("frd_id")!=-1)
{
$cat->add_mandatory_attr();
}
return;
break;
case "delete":

View file

@ -1094,13 +1094,13 @@ class Acc_Ledger extends jrn_def_sql
$currency_code=$http->extract($p_array,"p_currency_code","number");
$currency=new Acc_Currency($this->db,$currency_code);
if ( $currency->get_code() == -1 )
if ( $p_currency_code == -1 )
{
throw new Exception(_('Devise inconnue'), 3);
}
/* -- check the accounting for error of exchange -*/
if ( $currency->get_code() == 0 )
if ($p_currency_code > 0 )
{
$poste=new Acc_Account($this->db,$g_parameter->MY_DEFAULT_ROUND_ERROR_DEB);
if ($poste->get_parameter("id") == -1 )

View file

@ -75,7 +75,7 @@ class Forecast_Item_MTable extends Manage_Table_SQL
/**
* @param int $forecast_id
*/
public function set_forecast_id(int $forecast_id): void
public function set_forecast_id(int $forecast_id)
{
$this->forecast_id = $forecast_id;
$this->add_json_param("forecast_id", $forecast_id);

View file

@ -104,8 +104,42 @@ class Template_Card_Category extends Manage_Table_SQL
echo hi(_("par exemple ne pas changer Client par fournisseur"))."<br>";
echo _("sinon le programme fonctionnera mal, ".
"utiliser uniquement des chiffres pour la classe de base ou rien")."</font>";
parent::input();
$error_name=$this->get_error("frd_text");
$error_account=$this->get_error("frd_class_base");
$error_name=($error_name=="")?"":HtmlInput::errorbulle($error_name);
$error_account=($error_account=="")?"":HtmlInput::errorbulle($error_account);
$frd_id=HtmlInput::hidden("frd_id",$this->get_table()->getp("frd_id"));
$name=new IText("frd_text",$this->get_table()->getp("frd_text"));
$account=new IPoste("frd_class_base",$this->get_table()->getp("frd_class_base"));
$account->set_attribute('gDossier',Dossier::id());
$account->set_attribute('jrn',0);
$account->set_attribute('account','frd_class_base');
$name_label=_("Nom");
$account_label=_("Poste comptable de base");
echo <<<EOF
<table>
<tbody>
<tr>
<td> ID </td>
<td>{$frd_id}{$this->get_table()->getp("frd_id")}</td>
</tr>
<tr>
<td> {$name_label} {$error_name}</td>
<td>
{$name->input()}
</td>
</tr>
<tr>
<td> {$account_label} {$error_account}</td>
<td>
{$account->input()}
</td>
</tr>
</tbody>
</table>
EOF;
echo HtmlInput::get_to_hidden(["gDossier","op","p_id"]);
/**
* Add / Remove attribut Minimum
*/
@ -161,6 +195,7 @@ class Template_Card_Category extends Manage_Table_SQL
echo Icon_Action::icon_add(uniqid(), $js_script);
}
}
}
/**
@ -170,7 +205,7 @@ class Template_Card_Category extends Manage_Table_SQL
function add_mandatory_attr()
{
$cn=Dossier::connect();
$frd_id=$this->table->frd_id;
$frd_id=$this->get_table()->getp("frd_id");
$cn->exec_sql("insert into attr_min (frd_id,ad_id) values ($1,$2)",
[$frd_id, ATTR_DEF_NAME]);
$cn->exec_sql("insert into attr_min (frd_id,ad_id) values ($1,$2)",

View file

@ -53,6 +53,8 @@ echo $ledger->confirm($_POST,false);
<li class="tabs" style="float: none"> <a href="javascript:void(0)" title="<?php echo _("Extourne")?>" onclick="unselect_other_tab(this.parentNode.parentNode);this.parentNode.className='tabs_selected';show_tabs(a_tab,'reverse_div_id')"> <?php echo _('Extourne')?> </a></li>
<li class="tabs" style="float: none"> <a href="javascript:void(0)" title="<?php echo _("Type opération")?>" onclick="unselect_other_tab(this.parentNode.parentNode);this.parentNode.className='tabs_selected';show_tabs(a_tab,'operationtype_div_id')"> <?php echo _('Type opération')?> </a></li>
</ul>
</div>
<div id="facturation_div_id">
<div id="modele_div_id">
<?php echo Pre_operation::save_propose(); ?>
</div>
@ -86,6 +88,7 @@ echo $ledger->confirm($_POST,false);
?>
</div>
</div>
<?php
echo HtmlInput::submit("save",_("Confirmer"));
echo HtmlInput::submit("correct",_("Corriger"));

View file

@ -26,6 +26,7 @@
* @see Tax_Summary
*
*/?>
<div class="content">
<h2><?php echo _("Vente")?></h2>
<?php
@ -173,6 +174,7 @@ $array = $this->get_summary_sale();
?>
<hr>
<h2><?php echo _("Achat")?></h2>
<?php
$array=$this->get_row_purchase();
@ -373,3 +375,4 @@ $a_sum=$this->get_summary_purchase();
echo '</tr>';
?>
</table>
</div>