fix cosmetic bug :

This commit is contained in:
Dany De Bontridder 2011-12-21 21:30:09 +00:00
parent fd482cf60d
commit e470d13858
10 changed files with 31 additions and 29 deletions

View file

@ -234,7 +234,7 @@ case 'st':
/* we filter thanks a given model of card */
if ( isset($cat))
{
$sql=$sql.sprintf(' where frd_id = '.sql_string ($cat));
$sql=$sql.sprintf(' where frd_id in ('.sql_string ($cat).')');
}
else
/* we filter thanks a given list of category of card

View file

@ -135,7 +135,7 @@ if ( isset($_SESSION['isValid']) && $_SESSION['isValid'] == 1)
/* store the answer in an array and transform it later into a JSON object */
$tmp=array();
$tmp[]=array('flabel',$fLabel);
$tmp[]=array('name',h($name));
$tmp[]=array('name',$name);
$tmp[]=array('ftva_id',$fTva_id);
$tmp[]=array('tva_id',$tva_id);
$tmp[]=array('fPrice_sale',$fPrice_sale);

View file

@ -409,7 +409,7 @@ function select_card_type(obj)
sx=document.body.scrollTop+60;
}
var str_style="top:"+sx+";left:25%;width:50%;height:auto";
var str_style="top:"+sx+";left:25%;width:50%;height:30%";
var popup={'id': content,'cssclass':'inner_box','style':str_style,'html':loading(),'drag':true};

View file

@ -1089,7 +1089,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger
$march_label=(isset(${"e_march".$i."_label"}))?${"e_march".$i."_label"}:"";
// retrieve the tva label and name
//--
if ( strlen(trim($march))!=0 )
if ( strlen(trim($march))!=0 && strlen(trim($march_label))==0 )
{
$fMarch=new Fiche($this->db);
$fMarch->get_by_qcode($march);

View file

@ -1198,7 +1198,7 @@ class Acc_Ledger_Sold extends Acc_Ledger
// retrieve the tva label and name
//--
if ( strlen(trim($march))!=0 )
if ( strlen(trim($march))!=0 && strlen(trim($march_label))==0)
{
$fMarch=new Fiche($this->db);
$fMarch->get_by_qcode($march);

View file

@ -66,7 +66,7 @@ class Document
/*!
* \brief Generate the document, Call $this-\>Replace to replace
* tag by value
*
*
*
* \return an array : the url where the generated doc can be found, the name
* of the file and his mimetype
@ -108,7 +108,7 @@ class Document
$zip->extractTo($dirname.DIRECTORY_SEPARATOR);
$zip->close();
} else {
echo __FILE__.":".__LINE__."cannot unzip model ".$filename;
echo __FILE__.":".__LINE__."cannot unzip model ".$filename;
}
// Remove the file we do not need anymore
@ -154,7 +154,7 @@ class Document
/*! ParseDocument
* \brief This function parse a document and replace all
* the predefined tags by a value. This functions
* the predefined tags by a value. This functions
* generate diffent documents (invoice, order, letter)
* with the info from the database
*
@ -169,7 +169,7 @@ class Document
* - MY_* table parameter
* - ART_VEN* table quant_sold for invoice
* - CUST_* table quant_sold and fiche for invoice
* - e_* for the invoice in the $_POST
* - e_* for the invoice in the $_POST
*/
// open the document
$infile_name=$p_dir.DIRECTORY_SEPARATOR.$p_file;
@ -223,7 +223,7 @@ class Document
while ( preg_match_all ($regex,$buffer,$f) >0 )
{
foreach ( $f as $apattern )
{
@ -276,7 +276,7 @@ class Document
/*! SaveGenerated
* \brief Save the generated Document
* \param $p_file is the generated file
*
*
*
* \return 0 if no error otherwise 1
*/
@ -307,7 +307,7 @@ class Document
return 0;
}
/*! Upload
* \brief Upload a file into document
* \brief Upload a file into document
* all the needed data are in $_FILES we don't increment the seq
* \param $p_file : array containing by default $_FILES
*
@ -447,7 +447,7 @@ class Document
}
/*!
* \brief replace the TAG by the real value, this value can be into
* the database or in $_POST
* the database or in $_POST
* The possible tags are
* - [CUST_NAME] customer's name
* - [CUST_ADDR_1] customer's address line 1
@ -456,7 +456,7 @@ class Document
* - [CUST_CITY] customer's city
* - [CUST_VAT] customer's VAT
* - [MARCH_NEXT] end this item and increment the counter $i
* - [DATE_LIMIT]
* - [DATE_LIMIT]
* - [VEN_ART_NAME]
* - [VEN_ART_PRICE]
* - [VEN_ART_QUANT]
@ -804,13 +804,13 @@ class Document
extract ($_POST);
$id='e_march'.$counter."_label";
// check if the march exists
if (! isset (${$id}) || (isset (${$id}) && strlen(trim(${$id})) == 0))
{
$id = 'e_march' . $counter;
// check if the march exists
if (!isset(${$id}))
return "";
$r= "";
// check that something is sold
if (${'e_march' . $counter . '_price'} != 0 && ${'e_quant' . $counter} != 0)
{
@ -818,10 +818,11 @@ class Document
$f->get_by_qcode(${$id}, false);
$r = $f->strAttribut(ATTR_DEF_NAME);
}
else
$r="";
}
else
$r=${'e_march'.$counter.'_label'};
return $r;
break;
case 'VEN_ART_PRICE':

View file

@ -758,7 +758,7 @@ class Fiche
try
{
if (isNumber($v) == 1 || strpos($v,',') != 0)
if ( strlen(trim($v)) != 0)
{
$parameter=array($this->id,$v);
}

View file

@ -81,10 +81,10 @@ class Print_Ledger_Detail extends PDF
$this->SetFont('DejaVu','BI',7);
$this->Cell(215,7,'report Débit',0,0,'R');
$this->Cell(30,7,sprintf('%10.2f',$rap_deb),0,0,'R');
$this->Cell(30,7,nbm($rap_deb),0,0,'R');
$this->Ln(4);
$this->Cell(215,7,'report Crédit',0,0,'R');
$this->Cell(30,7,sprintf('%10.2f',$rap_cred),0,0,'R');
$this->Cell(30,7,nbm($rap_cred),0,0,'R');
$this->Ln(4);
// print all operation
@ -101,7 +101,8 @@ class Print_Ledger_Detail extends PDF
$this->Ln(4);
// get the entries
$aEntry=$this->cn->get_array("select j_id,j_poste,j_qcode,j_montant,j_debit, ".
$aEntry=$this->cn->get_array("select j_id,j_poste,j_qcode,j_montant,j_debit, j_text,".
" case when j_text='' or j_text is null then pcm_lib else j_text end as desc,".
" pcm_lib ".
" from jrnx join tmp_pcmn on (j_poste=pcm_val) where j_grpt = $1".
" order by j_debit desc,j_id",
@ -115,7 +116,7 @@ class Print_Ledger_Detail extends PDF
$this->Cell(23,6,$entry['j_poste'],0,0,'R');
// if j_qcode is not empty retrieve name
if ( $entry['j_qcode'] != '')
if ( $entry['j_text'] =='' && $entry['j_qcode'] != '')
{
$f_id=$this->cn->get_value('select f_id from vw_poste_qcode where j_qcode=$1',array($entry['j_qcode']));
if ($f_id != '')
@ -125,7 +126,7 @@ class Print_Ledger_Detail extends PDF
$name=$entry['pcm_lib'];
}
else
$name=$entry['pcm_lib'];
$name=$entry['desc'];
$this->Cell(150,6,$name,0,0,'L');
// print amount

View file

@ -210,7 +210,7 @@ function toggleShowDetail() {
</script>
<div style="float: left; text-align: right; padding-right: 5px; font-size: 1.2em; font-weight: bold; color: blue;">
<input name="act" id="act" class="button" value="<?=_('Actualiser')?>" onclick="compute_all_purchase();" type="button">
<input name="act" id="act" class="button" value="<?=_('Actualiser')?>" onclick="compute_all_ledger();" type="button">
<div style="float: right; text-align: left; font-size: 1.2em; font-weight: bold; color: blue;" id="sum">
<br><span id="htva">0.0</span>

View file

@ -27,9 +27,9 @@ $date->value=format_date($obj->det->jr_date);
<tr>
<?
$bk=new Fiche($cn,$obj->det->array[0]['qf_bank']);
$view_history= sprintf('<A class="detail" HREF="javascript:view_history_card(\'%s\',\'%s\')" >%s</A>',
$view_history= sprintf('<A class="line" HREF="javascript:view_history_card(\'%s\',\'%s\')" >%s</A>',
$bk->id, $gDossier, $bk->get_quick_code());
echo td(h($bk->getName())).td($view_history);;
echo td('Compte en banque').td(h($bk->getName())).td($view_history);;
?>
</tr>
@ -37,9 +37,9 @@ echo td(h($bk->getName())).td($view_history);;
<?
$bk=new Fiche($cn,$obj->det->array[0]['qf_other']);
$view_history= sprintf('<A class="detail" HREF="javascript:view_history_card(\'%s\',\'%s\')" >%s</A>',
$view_history= sprintf('<A class="line" HREF="javascript:view_history_card(\'%s\',\'%s\')" >%s</A>',
$bk->id, $gDossier, $bk->get_quick_code());
echo td(h($bk->getName()));
echo td('Tiers').td(h($bk->getName()));
echo td($view_history);
?>
</tr>
@ -49,7 +49,7 @@ echo td($view_history);
$itext=new IText('lib');
$itext->value=strip_tags($obj->det->jr_comment);
$itext->size=40;
echo td(_('Libellé')).td($itext->input());
echo td(_('Libellé')).td($itext->input(),' colspan="2" style="width:auto"');
?>