Fix: checkstyle
This commit is contained in:
parent
bbbfc8c018
commit
65090c582d
@ -341,7 +341,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
foreach(array('internal','external') as $source)
|
foreach(array('internal','external') as $source)
|
||||||
{
|
{
|
||||||
$tab = $object->liste_contact(-1,$source);
|
$tab = $object->liste_contact(-1,$source);
|
||||||
$num=sizeof($tab);
|
$num=count($tab);
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
|
|||||||
@ -496,7 +496,7 @@ function projectLinesb(&$inc, $parent, $lines, &$level, &$projectsrole, &$tasksr
|
|||||||
{
|
{
|
||||||
print " ";
|
print " ";
|
||||||
}
|
}
|
||||||
$taskstatic->id=$lines[$i]->id;
|
$taskstatic->id=$lines[$i]->id;
|
||||||
$taskstatic->ref=$lines[$i]->label;
|
$taskstatic->ref=$lines[$i]->label;
|
||||||
print $taskstatic->getNomUrl(0);
|
print $taskstatic->getNomUrl(0);
|
||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
|
|||||||
@ -736,7 +736,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
//$this->atleastoneratenotnull++;
|
//$this->atleastoneratenotnull++;
|
||||||
|
|
||||||
$index++;
|
$index++;
|
||||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||||
|
|
||||||
$tvacompl='';
|
$tvacompl='';
|
||||||
if (preg_match('/\*/',$tvakey))
|
if (preg_match('/\*/',$tvakey))
|
||||||
@ -748,7 +748,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
||||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||||
|
|
||||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -775,7 +775,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
|
|
||||||
|
|
||||||
$index++;
|
$index++;
|
||||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||||
|
|
||||||
$tvacompl='';
|
$tvacompl='';
|
||||||
if (preg_match('/\*/',$tvakey))
|
if (preg_match('/\*/',$tvakey))
|
||||||
@ -787,7 +787,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
||||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||||
|
|
||||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -837,7 +837,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
//$this->atleastoneratenotnull++;
|
//$this->atleastoneratenotnull++;
|
||||||
|
|
||||||
$index++;
|
$index++;
|
||||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||||
|
|
||||||
$tvacompl='';
|
$tvacompl='';
|
||||||
if (preg_match('/\*/',$tvakey))
|
if (preg_match('/\*/',$tvakey))
|
||||||
@ -849,14 +849,14 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
if ($localtax_type == '7') { // amount on order
|
if ($localtax_type == '7') { // amount on order
|
||||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||||
|
|
||||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvakey), 0, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($tvakey), 0, 'R', 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
||||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -881,7 +881,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
//$this->atleastoneratenotnull++;
|
//$this->atleastoneratenotnull++;
|
||||||
|
|
||||||
$index++;
|
$index++;
|
||||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||||
|
|
||||||
$tvacompl='';
|
$tvacompl='';
|
||||||
if (preg_match('/\*/',$tvakey))
|
if (preg_match('/\*/',$tvakey))
|
||||||
@ -893,7 +893,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
|
|
||||||
if ($localtax_type == '7') { // amount on order
|
if ($localtax_type == '7') { // amount on order
|
||||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvakey), 0, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($tvakey), 0, 'R', 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -901,7 +901,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
||||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||||
|
|
||||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -868,7 +868,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
//$this->atleastoneratenotnull++;
|
//$this->atleastoneratenotnull++;
|
||||||
|
|
||||||
$index++;
|
$index++;
|
||||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||||
|
|
||||||
$tvacompl='';
|
$tvacompl='';
|
||||||
if (preg_match('/\*/',$tvakey))
|
if (preg_match('/\*/',$tvakey))
|
||||||
@ -880,7 +880,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
||||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||||
|
|
||||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -907,7 +907,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
|
|
||||||
|
|
||||||
$index++;
|
$index++;
|
||||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||||
|
|
||||||
$tvacompl='';
|
$tvacompl='';
|
||||||
if (preg_match('/\*/',$tvakey))
|
if (preg_match('/\*/',$tvakey))
|
||||||
@ -919,7 +919,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
||||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||||
|
|
||||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -969,7 +969,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
//$this->atleastoneratenotnull++;
|
//$this->atleastoneratenotnull++;
|
||||||
|
|
||||||
$index++;
|
$index++;
|
||||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||||
|
|
||||||
$tvacompl='';
|
$tvacompl='';
|
||||||
if (preg_match('/\*/',$tvakey))
|
if (preg_match('/\*/',$tvakey))
|
||||||
@ -981,14 +981,14 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
if ($localtax_type == '7') { // amount on order
|
if ($localtax_type == '7') { // amount on order
|
||||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||||
|
|
||||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvakey), 0, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($tvakey), 0, 'R', 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
||||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1014,7 +1014,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
//$this->atleastoneratenotnull++;
|
//$this->atleastoneratenotnull++;
|
||||||
|
|
||||||
$index++;
|
$index++;
|
||||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||||
|
|
||||||
$tvacompl='';
|
$tvacompl='';
|
||||||
if (preg_match('/\*/',$tvakey))
|
if (preg_match('/\*/',$tvakey))
|
||||||
@ -1026,7 +1026,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
|
|
||||||
if ($localtax_type == '7') { // amount on order
|
if ($localtax_type == '7') { // amount on order
|
||||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvakey), 0, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($tvakey), 0, 'R', 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1034,7 +1034,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
||||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||||
|
|
||||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -769,7 +769,7 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
//$this->atleastoneratenotnull++;
|
//$this->atleastoneratenotnull++;
|
||||||
|
|
||||||
$index++;
|
$index++;
|
||||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||||
|
|
||||||
$tvacompl='';
|
$tvacompl='';
|
||||||
if (preg_match('/\*/',$tvakey))
|
if (preg_match('/\*/',$tvakey))
|
||||||
@ -781,7 +781,7 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
||||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||||
|
|
||||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -808,7 +808,7 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
|
|
||||||
|
|
||||||
$index++;
|
$index++;
|
||||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||||
|
|
||||||
$tvacompl='';
|
$tvacompl='';
|
||||||
if (preg_match('/\*/',$tvakey))
|
if (preg_match('/\*/',$tvakey))
|
||||||
@ -820,7 +820,7 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
||||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||||
|
|
||||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -870,7 +870,7 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
//$this->atleastoneratenotnull++;
|
//$this->atleastoneratenotnull++;
|
||||||
|
|
||||||
$index++;
|
$index++;
|
||||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||||
|
|
||||||
$tvacompl='';
|
$tvacompl='';
|
||||||
if (preg_match('/\*/',$tvakey))
|
if (preg_match('/\*/',$tvakey))
|
||||||
@ -882,14 +882,14 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
if ($localtax_type == '7') { // amount on order
|
if ($localtax_type == '7') { // amount on order
|
||||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||||
|
|
||||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvakey), 0, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($tvakey), 0, 'R', 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
||||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -914,7 +914,7 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
//$this->atleastoneratenotnull++;
|
//$this->atleastoneratenotnull++;
|
||||||
|
|
||||||
$index++;
|
$index++;
|
||||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||||
|
|
||||||
$tvacompl='';
|
$tvacompl='';
|
||||||
if (preg_match('/\*/',$tvakey))
|
if (preg_match('/\*/',$tvakey))
|
||||||
@ -926,7 +926,7 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
|
|
||||||
if ($localtax_type == '7') { // amount on order
|
if ($localtax_type == '7') { // amount on order
|
||||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvakey), 0, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($tvakey), 0, 'R', 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -934,7 +934,7 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
||||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||||
|
|
||||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1223,7 +1223,7 @@ class Product extends CommonObject
|
|||||||
$sql.= " WHERE fk_product_price = '".$this->prices_by_qty_id[$i]."'";
|
$sql.= " WHERE fk_product_price = '".$this->prices_by_qty_id[$i]."'";
|
||||||
$sql.= " ORDER BY quantity ASC";
|
$sql.= " ORDER BY quantity ASC";
|
||||||
$resultat=array();
|
$resultat=array();
|
||||||
$resql = $this->db->query($sql) ;
|
$resql = $this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$ii=0;
|
$ii=0;
|
||||||
@ -1276,7 +1276,7 @@ class Product extends CommonObject
|
|||||||
$sql.= " WHERE fk_product_price = '".$this->prices_by_qty_id[0]."'";
|
$sql.= " WHERE fk_product_price = '".$this->prices_by_qty_id[0]."'";
|
||||||
$sql.= " ORDER BY quantity ASC";
|
$sql.= " ORDER BY quantity ASC";
|
||||||
$resultat=array();
|
$resultat=array();
|
||||||
$resql = $this->db->query($sql) ;
|
$resql = $this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$ii=0;
|
$ii=0;
|
||||||
|
|||||||
@ -1,82 +1,82 @@
|
|||||||
/*
|
/*
|
||||||
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
|
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
|
||||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
CKEDITOR.editorConfig = function( config )
|
CKEDITOR.editorConfig = function( config )
|
||||||
{
|
{
|
||||||
// Define changes to default configuration here.
|
// Define changes to default configuration here.
|
||||||
// http://docs.cksource.com/CKEditor_3.x/Developers_Guide
|
// http://docs.cksource.com/CKEditor_3.x/Developers_Guide
|
||||||
// http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html
|
// http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html
|
||||||
config.enterMode = CKEDITOR.ENTER_BR;
|
config.enterMode = CKEDITOR.ENTER_BR;
|
||||||
config.resize_enabled = false;
|
config.resize_enabled = false;
|
||||||
//config.resize_maxHeight = 3000;
|
//config.resize_maxHeight = 3000;
|
||||||
//config.resize_maxWidth = 3000;
|
//config.resize_maxWidth = 3000;
|
||||||
//config.height = '300px';
|
//config.height = '300px';
|
||||||
//config.resize_dir = 'vertical'; // horizontal, vertical, both
|
//config.resize_dir = 'vertical'; // horizontal, vertical, both
|
||||||
config.removePlugins = 'elementspath,save'; // config.removePlugins = 'elementspath,save,font';
|
config.removePlugins = 'elementspath,save'; // config.removePlugins = 'elementspath,save,font';
|
||||||
config.removeDialogTabs = 'flash:advanced'; // config.removeDialogTabs = 'flash:advanced;image:Link';
|
config.removeDialogTabs = 'flash:advanced'; // config.removeDialogTabs = 'flash:advanced;image:Link';
|
||||||
config.protectedSource.push( /<\?[\s\S]*?\?>/g ); // Prevent PHP Code to be formatted
|
config.protectedSource.push( /<\?[\s\S]*?\?>/g ); // Prevent PHP Code to be formatted
|
||||||
//config.menu_groups = 'clipboard,table,anchor,link,image'; // for context menu 'clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea'
|
//config.menu_groups = 'clipboard,table,anchor,link,image'; // for context menu 'clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea'
|
||||||
//config.language = 'de';
|
//config.language = 'de';
|
||||||
//config.defaultLanguage = 'en';
|
//config.defaultLanguage = 'en';
|
||||||
//config.contentsLanguage = 'fr';
|
//config.contentsLanguage = 'fr';
|
||||||
config.fullPage = false; // Not a full html page string, just part of it
|
config.fullPage = false; // Not a full html page string, just part of it
|
||||||
config.dialog_backgroundCoverColor = 'rgb(255, 254, 253)';
|
config.dialog_backgroundCoverColor = 'rgb(255, 254, 253)';
|
||||||
//config.contentsCss = '/css/mysitestyles.css';
|
//config.contentsCss = '/css/mysitestyles.css';
|
||||||
config.image_previewText=' ';
|
config.image_previewText=' ';
|
||||||
|
|
||||||
config.toolbar_Full =
|
config.toolbar_Full =
|
||||||
[
|
[
|
||||||
['Source','-','Save','NewPage','Preview','-','Templates'],
|
['Source','-','Save','NewPage','Preview','-','Templates'],
|
||||||
['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print', 'SpellChecker', 'Scayt'],
|
['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print', 'SpellChecker', 'Scayt'],
|
||||||
['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
|
['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
|
||||||
['Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'],
|
['Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'],
|
||||||
'/',
|
'/',
|
||||||
['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],
|
['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],
|
||||||
['NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv'],
|
['NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv'],
|
||||||
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
|
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
|
||||||
['BidiLtr', 'BidiRtl'],
|
['BidiLtr', 'BidiRtl'],
|
||||||
['Link','Unlink','Anchor'],
|
['Link','Unlink','Anchor'],
|
||||||
['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe'],
|
['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe'],
|
||||||
'/',
|
'/',
|
||||||
['Styles','Format','Font','FontSize'],
|
['Styles','Format','Font','FontSize'],
|
||||||
['TextColor','BGColor'],
|
['TextColor','BGColor'],
|
||||||
['Maximize', 'ShowBlocks','-','About']
|
['Maximize', 'ShowBlocks','-','About']
|
||||||
];
|
];
|
||||||
|
|
||||||
config.toolbar_dolibarr_mailings =
|
config.toolbar_dolibarr_mailings =
|
||||||
[
|
[
|
||||||
['Source','Maximize'],
|
['Source','Maximize'],
|
||||||
['Cut','Copy','Paste','-','SpellChecker'],
|
['Cut','Copy','Paste','-','SpellChecker'],
|
||||||
['Undo','Redo','-','Find','Replace'],
|
['Undo','Redo','-','Find','Replace'],
|
||||||
['Font','FontSize'],
|
['Font','FontSize'],
|
||||||
['Bold','Italic','Underline','Strike','Subscript','Superscript','-','TextColor','RemoveFormat'],
|
['Bold','Italic','Underline','Strike','Subscript','Superscript','-','TextColor','RemoveFormat'],
|
||||||
['NumberedList','BulletedList','Outdent','Indent'],
|
['NumberedList','BulletedList','Outdent','Indent'],
|
||||||
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
|
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
|
||||||
['Link','Unlink','Anchor','Image','Table','SpecialChar']
|
['Link','Unlink','Anchor','Image','Table','SpecialChar']
|
||||||
];
|
];
|
||||||
|
|
||||||
config.toolbar_dolibarr_notes =
|
config.toolbar_dolibarr_notes =
|
||||||
[
|
[
|
||||||
['Source'],
|
['Source'],
|
||||||
['Cut','Copy','Paste','-','SpellChecker'],
|
['Cut','Copy','Paste','-','SpellChecker'],
|
||||||
['Undo','Redo','-','Find','Replace'],
|
['Undo','Redo','-','Find','Replace'],
|
||||||
['Font','FontSize'],
|
['Font','FontSize'],
|
||||||
['Bold','Italic','Underline','Strike','Subscript','Superscript','-','TextColor','RemoveFormat'],
|
['Bold','Italic','Underline','Strike','Subscript','Superscript','-','TextColor','RemoveFormat'],
|
||||||
['NumberedList','BulletedList','Outdent','Indent'],
|
['NumberedList','BulletedList','Outdent','Indent'],
|
||||||
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
|
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
|
||||||
['Link','Unlink','Image','Table','SpecialChar']
|
['Link','Unlink','Image','Table','SpecialChar']
|
||||||
];
|
];
|
||||||
|
|
||||||
config.toolbar_dolibarr_details =
|
config.toolbar_dolibarr_details =
|
||||||
[
|
[
|
||||||
['Source','Maximize'],
|
['Source','Maximize'],
|
||||||
['Cut','Copy','Paste','-','SpellChecker'],
|
['Cut','Copy','Paste','-','SpellChecker'],
|
||||||
['Font','FontSize'],
|
['Font','FontSize'],
|
||||||
['Bold','Italic','Underline','Strike','Subscript','Superscript','-','TextColor','RemoveFormat'],
|
['Bold','Italic','Underline','Strike','Subscript','Superscript','-','TextColor','RemoveFormat'],
|
||||||
['NumberedList','BulletedList','Outdent','Indent'],
|
['NumberedList','BulletedList','Outdent','Indent'],
|
||||||
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
|
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
|
||||||
['SpecialChar']
|
['SpecialChar']
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2006-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2006-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2012 JF FERRY <jfefe@aternatik.fr>
|
* Copyright (C) 2012 JF FERRY <jfefe@aternatik.fr>
|
||||||
|
* Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -55,169 +56,181 @@ $server->wsdl->schemaTargetNamespace=$ns;
|
|||||||
|
|
||||||
// Define WSDL content
|
// Define WSDL content
|
||||||
$server->wsdl->addComplexType(
|
$server->wsdl->addComplexType(
|
||||||
'authentication',
|
'authentication',
|
||||||
'complexType',
|
'complexType',
|
||||||
'struct',
|
'struct',
|
||||||
'all',
|
'all',
|
||||||
'',
|
'',
|
||||||
array(
|
array(
|
||||||
'dolibarrkey' => array('name'=>'dolibarrkey','type'=>'xsd:string'),
|
'dolibarrkey' => array('name'=>'dolibarrkey','type'=>'xsd:string'),
|
||||||
'sourceapplication' => array('name'=>'sourceapplication','type'=>'xsd:string'),
|
'sourceapplication' => array('name'=>'sourceapplication','type'=>'xsd:string'),
|
||||||
'login' => array('name'=>'login','type'=>'xsd:string'),
|
'login' => array('name'=>'login','type'=>'xsd:string'),
|
||||||
'password' => array('name'=>'password','type'=>'xsd:string'),
|
'password' => array('name'=>'password','type'=>'xsd:string'),
|
||||||
'entity' => array('name'=>'entity','type'=>'xsd:string'),
|
'entity' => array('name'=>'entity','type'=>'xsd:string')
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
$server->wsdl->addComplexType(
|
$server->wsdl->addComplexType(
|
||||||
'line',
|
'line',
|
||||||
'complexType',
|
'complexType',
|
||||||
'struct',
|
'struct',
|
||||||
'all',
|
'all',
|
||||||
'',
|
'',
|
||||||
array(
|
array(
|
||||||
'id' => array('name'=>'id','type'=>'xsd:string'),
|
'id' => array('name'=>'id','type'=>'xsd:string'),
|
||||||
'fk_commande' => array('name'=>'fk_commande','type'=>'xsd:int'),
|
'fk_commande' => array('name'=>'fk_commande','type'=>'xsd:int'),
|
||||||
'fk_parent_line' => array('name'=>'fk_parent_line','type'=>'xsd:int'),
|
'fk_parent_line' => array('name'=>'fk_parent_line','type'=>'xsd:int'),
|
||||||
'desc' => array('name'=>'desc','type'=>'xsd:string'),
|
'desc' => array('name'=>'desc','type'=>'xsd:string'),
|
||||||
'qty' => array('name'=>'qty','type'=>'xsd:int'),
|
'qty' => array('name'=>'qty','type'=>'xsd:int'),
|
||||||
'price' => array('name'=>'price','type'=>'xsd:double'),
|
'price' => array('name'=>'price','type'=>'xsd:double'),
|
||||||
'subprice' => array('name'=>'subprice','type'=>'xsd:double'),
|
'subprice' => array('name'=>'subprice','type'=>'xsd:double'),
|
||||||
'tva_tx' => array('name'=>'tva_tx','type'=>'xsd:double'),
|
'tva_tx' => array('name'=>'tva_tx','type'=>'xsd:double'),
|
||||||
|
|
||||||
'remise' => array('name'=>'remise','type'=>'xsd:double'),
|
'remise' => array('name'=>'remise','type'=>'xsd:double'),
|
||||||
'remise_percent' => array('name'=>'remise_percent','type'=>'xsd:double'),
|
'remise_percent' => array('name'=>'remise_percent','type'=>'xsd:double'),
|
||||||
|
|
||||||
'fk_product' => array('name'=>'fk_product','type'=>'xsd:int'),
|
'fk_product' => array('name'=>'fk_product','type'=>'xsd:int'),
|
||||||
'product_type' => array('name'=>'product_type','type'=>'xsd:int'),
|
'product_type' => array('name'=>'product_type','type'=>'xsd:int'),
|
||||||
'total_ht' => array('name'=>'total_ht','type'=>'xsd:double'),
|
'total_ht' => array('name'=>'total_ht','type'=>'xsd:double'),
|
||||||
'total_tva' => array('name'=>'totaltva','type'=>'xsd:double'),
|
'total_tva' => array('name'=>'totaltva','type'=>'xsd:double'),
|
||||||
'total_ttc' => array('name'=>'total_ttc','type'=>'xsd:double'),
|
'total_ttc' => array('name'=>'total_ttc','type'=>'xsd:double'),
|
||||||
|
|
||||||
'date_start' => array('name'=>'date_start','type'=>'xsd:string'),
|
'date_start' => array('name'=>'date_start','type'=>'xsd:string'),
|
||||||
'date_end' => array('name'=>'date_end','type'=>'xsd:string'),
|
'date_end' => array('name'=>'date_end','type'=>'xsd:string'),
|
||||||
|
|
||||||
// From product
|
// From product
|
||||||
'product_ref' => array('name'=>'product_ref','type'=>'xsd:string'),
|
'product_ref' => array('name'=>'product_ref','type'=>'xsd:string'),
|
||||||
'product_label' => array('name'=>'product_label','type'=>'xsd:string'),
|
'product_label' => array('name'=>'product_label','type'=>'xsd:string'),
|
||||||
'product_desc' => array('name'=>'product_desc','type'=>'xsd:string')
|
'product_desc' => array('name'=>'product_desc','type'=>'xsd:string')
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
$server->wsdl->addComplexType(
|
$server->wsdl->addComplexType(
|
||||||
'LinesArray',
|
'LinesArray',
|
||||||
'complexType',
|
'complexType',
|
||||||
'array',
|
'array',
|
||||||
'',
|
'',
|
||||||
'SOAP-ENC:Array',
|
'SOAP-ENC:Array',
|
||||||
array(),
|
array(),
|
||||||
array(
|
array(
|
||||||
array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:line[]')
|
array(
|
||||||
),
|
'ref'=>'SOAP-ENC:arrayType',
|
||||||
'tns:line'
|
'wsdl:arrayType'=>'tns:line[]'
|
||||||
);
|
)
|
||||||
$server->wsdl->addComplexType(
|
),
|
||||||
'LinesArray2',
|
'tns:line'
|
||||||
'complexType',
|
|
||||||
'array',
|
|
||||||
'sequence',
|
|
||||||
'',
|
|
||||||
array(
|
|
||||||
'line' => array(
|
|
||||||
'name' => 'line',
|
|
||||||
'type' => 'tns:line',
|
|
||||||
'minOccurs' => '0',
|
|
||||||
'maxOccurs' => 'unbounded'
|
|
||||||
)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
$server->wsdl->addComplexType(
|
|
||||||
'order',
|
|
||||||
'complexType',
|
|
||||||
'struct',
|
|
||||||
'all',
|
|
||||||
'',
|
|
||||||
array(
|
|
||||||
'id' => array('name'=>'id','type'=>'xsd:string'),
|
|
||||||
'ref' => array('name'=>'ref','type'=>'xsd:string'),
|
|
||||||
'ref_client' => array('name'=>'ref_client','type'=>'xsd:string'),
|
|
||||||
'ref_ext' => array('name'=>'ref_ext','type'=>'xsd:string'),
|
|
||||||
'ref_int' => array('name'=>'ref_int','type'=>'xsd:string'),
|
|
||||||
'socid' => array('name'=>'socid','type'=>'xsd:int'),
|
|
||||||
'statut' => array('name'=>'statut','type'=>'xsd:int'),
|
|
||||||
'facturee' => array('name'=>'facturee','type'=>'xsd:string'),
|
|
||||||
'total_ht' => array('name'=>'total_ht','type'=>'xsd:double'),
|
|
||||||
'total_tva' => array('name'=>'total_tva','type'=>'xsd:double'),
|
|
||||||
'total_localtax1' => array('name'=>'total_localtax1','type'=>'xsd:double'),
|
|
||||||
'total_localtax2' => array('name'=>'total_localtax2','type'=>'xsd:double'),
|
|
||||||
'total_ttc' => array('name'=>'total_ttc','type'=>'xsd:double'),
|
|
||||||
'date' => array('name'=>'date','type'=>'xsd:date'),
|
|
||||||
'date_commande' => array('name'=>'date_commande','type'=>'xsd:date'),
|
|
||||||
'remise' => array('name'=>'remise','type'=>'xsd:string'),
|
|
||||||
'remise_percent' => array('name'=>'remise_percent','type'=>'xsd:string'),
|
|
||||||
'remise_absolue' => array('name'=>'remise_absolue','type'=>'xsd:string'),
|
|
||||||
'source' => array('name'=>'source','type'=>'xsd:string'),
|
|
||||||
'note' => array('name'=>'note','type'=>'xsd:string'),
|
|
||||||
'note_public' => array('name'=>'note_public','type'=>'xsd:string'),
|
|
||||||
'fk_project' => array('name'=>'fk_project','type'=>'xsd:string'),
|
|
||||||
|
|
||||||
'mode_reglement_id' => array('name'=>'mode_reglement_id','type'=>'xsd:string'),
|
|
||||||
'mode_reglement_code' => array('name'=>'mode_reglement_code','type'=>'xsd:string'),
|
|
||||||
'mode_reglement' => array('name'=>'mode_reglement','type'=>'xsd:string'),
|
|
||||||
'cond_reglement_id' => array('name'=>'cond_reglement_id','type'=>'xsd:string'),
|
|
||||||
'cond_reglement_code' => array('name'=>'cond_reglement_code','type'=>'xsd:string'),
|
|
||||||
'cond_reglement' => array('name'=>'cond_reglement','type'=>'xsd:string'),
|
|
||||||
'cond_reglement_doc' => array('name'=>'cond_reglement_doc','type'=>'xsd:string'),
|
|
||||||
|
|
||||||
'date_livraison' => array('name'=>'date_livraison','type'=>'xsd:date'),
|
|
||||||
'fk_delivery_address' => array('name'=>'fk_delivery_address','type'=>'xsd:int'),
|
|
||||||
'demand_reason_id' => array('name'=>'demand_reason_id','type'=>'xsd:string'),
|
|
||||||
|
|
||||||
'lines' => array('name'=>'lines','type'=>'tns:LinesArray')
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$server->wsdl->addComplexType(
|
$server->wsdl->addComplexType(
|
||||||
'OrdersArray',
|
'LinesArray2',
|
||||||
'complexType',
|
'complexType',
|
||||||
'array',
|
'array',
|
||||||
'',
|
'sequence',
|
||||||
'SOAP-ENC:Array',
|
'',
|
||||||
array(),
|
array(
|
||||||
array(
|
'line' => array(
|
||||||
array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:order[]')
|
'name' => 'line',
|
||||||
),
|
'type' => 'tns:line',
|
||||||
'tns:order'
|
'minOccurs' => '0',
|
||||||
|
'maxOccurs' => 'unbounded'
|
||||||
|
)
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
$server->wsdl->addComplexType(
|
$server->wsdl->addComplexType(
|
||||||
'OrdersArray2',
|
'order',
|
||||||
'complexType',
|
'complexType',
|
||||||
'array',
|
'struct',
|
||||||
'sequence',
|
'all',
|
||||||
'',
|
'',
|
||||||
array(
|
array(
|
||||||
'order' => array(
|
'id' => array('name'=>'id','type'=>'xsd:string'),
|
||||||
'name' => 'invoice',
|
'ref' => array('name'=>'ref','type'=>'xsd:string'),
|
||||||
'type' => 'tns:invoice',
|
'ref_client' => array('name'=>'ref_client','type'=>'xsd:string'),
|
||||||
'minOccurs' => '0',
|
'ref_ext' => array('name'=>'ref_ext','type'=>'xsd:string'),
|
||||||
'maxOccurs' => 'unbounded'
|
'ref_int' => array('name'=>'ref_int','type'=>'xsd:string'),
|
||||||
)
|
'socid' => array('name'=>'socid','type'=>'xsd:int'),
|
||||||
)
|
'statut' => array('name'=>'statut','type'=>'xsd:int'),
|
||||||
|
'facturee' => array('name'=>'facturee','type'=>'xsd:string'),
|
||||||
|
'total_ht' => array('name'=>'total_ht','type'=>'xsd:double'),
|
||||||
|
'total_tva' => array('name'=>'total_tva','type'=>'xsd:double'),
|
||||||
|
'total_localtax1' => array('name'=>'total_localtax1','type'=>'xsd:double'),
|
||||||
|
'total_localtax2' => array('name'=>'total_localtax2','type'=>'xsd:double'),
|
||||||
|
'total_ttc' => array('name'=>'total_ttc','type'=>'xsd:double'),
|
||||||
|
'date' => array('name'=>'date','type'=>'xsd:date'),
|
||||||
|
'date_commande' => array('name'=>'date_commande','type'=>'xsd:date'),
|
||||||
|
'remise' => array('name'=>'remise','type'=>'xsd:string'),
|
||||||
|
'remise_percent' => array('name'=>'remise_percent','type'=>'xsd:string'),
|
||||||
|
'remise_absolue' => array('name'=>'remise_absolue','type'=>'xsd:string'),
|
||||||
|
'source' => array('name'=>'source','type'=>'xsd:string'),
|
||||||
|
'note' => array('name'=>'note','type'=>'xsd:string'),
|
||||||
|
'note_public' => array('name'=>'note_public','type'=>'xsd:string'),
|
||||||
|
'fk_project' => array('name'=>'fk_project','type'=>'xsd:string'),
|
||||||
|
|
||||||
|
'mode_reglement_id' => array('name'=>'mode_reglement_id','type'=>'xsd:string'),
|
||||||
|
'mode_reglement_code' => array('name'=>'mode_reglement_code','type'=>'xsd:string'),
|
||||||
|
'mode_reglement' => array('name'=>'mode_reglement','type'=>'xsd:string'),
|
||||||
|
'cond_reglement_id' => array('name'=>'cond_reglement_id','type'=>'xsd:string'),
|
||||||
|
'cond_reglement_code' => array('name'=>'cond_reglement_code','type'=>'xsd:string'),
|
||||||
|
'cond_reglement' => array('name'=>'cond_reglement','type'=>'xsd:string'),
|
||||||
|
'cond_reglement_doc' => array('name'=>'cond_reglement_doc','type'=>'xsd:string'),
|
||||||
|
|
||||||
|
'date_livraison' => array('name'=>'date_livraison','type'=>'xsd:date'),
|
||||||
|
'fk_delivery_address' => array('name'=>'fk_delivery_address','type'=>'xsd:int'),
|
||||||
|
'demand_reason_id' => array('name'=>'demand_reason_id','type'=>'xsd:string'),
|
||||||
|
|
||||||
|
'lines' => array('name'=>'lines','type'=>'tns:LinesArray')
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
$server->wsdl->addComplexType(
|
$server->wsdl->addComplexType(
|
||||||
'result',
|
'OrdersArray',
|
||||||
'complexType',
|
'complexType',
|
||||||
'struct',
|
'array',
|
||||||
'all',
|
'',
|
||||||
'',
|
'SOAP-ENC:Array',
|
||||||
array(
|
array(),
|
||||||
'result_code' => array('name'=>'result_code','type'=>'xsd:string'),
|
array(
|
||||||
'result_label' => array('name'=>'result_label','type'=>'xsd:string'),
|
array(
|
||||||
)
|
'ref'=>'SOAP-ENC:arrayType',
|
||||||
|
'wsdl:arrayType'=>'tns:order[]'
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'tns:order'
|
||||||
|
);
|
||||||
|
|
||||||
|
$server->wsdl->addComplexType(
|
||||||
|
'OrdersArray2',
|
||||||
|
'complexType',
|
||||||
|
'array',
|
||||||
|
'sequence',
|
||||||
|
'',
|
||||||
|
array(
|
||||||
|
'order' => array(
|
||||||
|
'name' => 'invoice',
|
||||||
|
'type' => 'tns:invoice',
|
||||||
|
'minOccurs' => '0',
|
||||||
|
'maxOccurs' => 'unbounded'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
$server->wsdl->addComplexType(
|
||||||
|
'result',
|
||||||
|
'complexType',
|
||||||
|
'struct',
|
||||||
|
'all',
|
||||||
|
'',
|
||||||
|
array(
|
||||||
|
'result_code' => array(
|
||||||
|
'name'=>'result_code',
|
||||||
|
'type'=>'xsd:string'
|
||||||
|
),
|
||||||
|
'result_label' => array(
|
||||||
|
'name'=>'result_label',
|
||||||
|
'type'=>'xsd:string'
|
||||||
|
),
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -230,54 +243,50 @@ $styleuse='encoded'; // encoded/literal/literal wrapped
|
|||||||
// Better choice is document/literal wrapped but literal wrapped not supported by nusoap.
|
// Better choice is document/literal wrapped but literal wrapped not supported by nusoap.
|
||||||
|
|
||||||
// Register WSDL
|
// Register WSDL
|
||||||
$server->register('getOrder',
|
$server->register(
|
||||||
// Entry values
|
'getOrder',
|
||||||
array('authentication'=>'tns:authentication','id'=>'xsd:string','ref'=>'xsd:string','ref_ext'=>'xsd:string'),
|
array('authentication'=>'tns:authentication','id'=>'xsd:string','ref'=>'xsd:string','ref_ext'=>'xsd:string'), // Entry values
|
||||||
// Exit values
|
array('result'=>'tns:result','order'=>'tns:order'), // Exit values
|
||||||
array('result'=>'tns:result','order'=>'tns:order'),
|
$ns,
|
||||||
$ns,
|
$ns.'#getOrder',
|
||||||
$ns.'#getOrder',
|
$styledoc,
|
||||||
$styledoc,
|
$styleuse,
|
||||||
$styleuse,
|
'WS to get a particular invoice'
|
||||||
'WS to get a particular invoice'
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$server->register('getOrdersForThirdParty',
|
$server->register(
|
||||||
// Entry values
|
'getOrdersForThirdParty',
|
||||||
array('authentication'=>'tns:authentication','idthirdparty'=>'xsd:string'),
|
array('authentication'=>'tns:authentication','idthirdparty'=>'xsd:string'), // Entry values
|
||||||
// Exit values
|
array('result'=>'tns:result','orders'=>'tns:OrdersArray2'), // Exit values
|
||||||
array('result'=>'tns:result','orders'=>'tns:OrdersArray2'),
|
$ns,
|
||||||
$ns,
|
$ns.'#getOrdersForThirdParty',
|
||||||
$ns.'#getOrdersForThirdParty',
|
$styledoc,
|
||||||
$styledoc,
|
$styleuse,
|
||||||
$styleuse,
|
'WS to get all orders of a third party'
|
||||||
'WS to get all orders of a third party'
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$server->register('createOrder',
|
$server->register(
|
||||||
// Entry values
|
'createOrder',
|
||||||
array('authentication'=>'tns:authentication','order'=>'tns:order'),
|
array('authentication'=>'tns:authentication','order'=>'tns:order'), // Entry values
|
||||||
// Exit values
|
array('result'=>'tns:result','id'=>'xsd:string'), // Exit values
|
||||||
array('result'=>'tns:result','id'=>'xsd:string'),
|
$ns,
|
||||||
$ns,
|
$ns.'#createOrder',
|
||||||
$ns.'#createOrder',
|
$styledoc,
|
||||||
$styledoc,
|
$styleuse,
|
||||||
$styleuse,
|
'WS to create an order'
|
||||||
'WS to create an order'
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Register WSDL
|
// Register WSDL
|
||||||
$server->register('validOrder',
|
$server->register(
|
||||||
// Entry values
|
'validOrder',
|
||||||
array('authentication'=>'tns:authentication','id'=>'xsd:string'),
|
array('authentication'=>'tns:authentication','id'=>'xsd:string'), // Entry values
|
||||||
// Exit values
|
array('result'=>'tns:result'), // Exit values
|
||||||
array('result'=>'tns:result'),
|
$ns,
|
||||||
$ns,
|
$ns.'#validOrder',
|
||||||
$ns.'#validOrder',
|
$styledoc,
|
||||||
$styledoc,
|
$styleuse,
|
||||||
$styleuse,
|
'WS to valid an order'
|
||||||
'WS to valid an order'
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -605,7 +614,7 @@ function createOrder($authentication,$order)
|
|||||||
|
|
||||||
$now=dol_now();
|
$now=dol_now();
|
||||||
|
|
||||||
dol_syslog("Function: createOrder login=".$authentication['login']." socid :".$order['socid'] );
|
dol_syslog("Function: createOrder login=".$authentication['login']." socid :".$order['socid']);
|
||||||
|
|
||||||
// Init and check authentication
|
// Init and check authentication
|
||||||
$objectresp=array();
|
$objectresp=array();
|
||||||
@ -633,17 +642,17 @@ function createOrder($authentication,$order)
|
|||||||
$newobject->cond_reglement_id=$order['cond_reglement_id'];
|
$newobject->cond_reglement_id=$order['cond_reglement_id'];
|
||||||
$newobject->demand_reason_id=$order['demand_reason_id'];
|
$newobject->demand_reason_id=$order['demand_reason_id'];
|
||||||
$newobject->date_commande=$now;
|
$newobject->date_commande=$now;
|
||||||
|
|
||||||
// Trick because nusoap does not store data with same structure if there is one or several lines
|
// Trick because nusoap does not store data with same structure if there is one or several lines
|
||||||
$arrayoflines=array();
|
$arrayoflines=array();
|
||||||
if (isset($order['lines']['line'][0])) $arrayoflines=$order['lines']['line'];
|
if (isset($order['lines']['line'][0])) $arrayoflines=$order['lines']['line'];
|
||||||
else $arrayoflines=$order['lines'];
|
else $arrayoflines=$order['lines'];
|
||||||
|
|
||||||
foreach($arrayoflines as $key => $line)
|
foreach($arrayoflines as $key => $line)
|
||||||
{
|
{
|
||||||
// $key can be 'line' or '0','1',...
|
// $key can be 'line' or '0','1',...
|
||||||
$newline=new OrderLigne($db);
|
$newline=new OrderLigne($db);
|
||||||
|
|
||||||
$newline->type=$line['type'];
|
$newline->type=$line['type'];
|
||||||
$newline->desc=$line['desc'];
|
$newline->desc=$line['desc'];
|
||||||
$newline->fk_product=$line['fk_product'];
|
$newline->fk_product=$line['fk_product'];
|
||||||
@ -656,7 +665,7 @@ function createOrder($authentication,$order)
|
|||||||
$newline->fk_product=$line['fk_product'];
|
$newline->fk_product=$line['fk_product'];
|
||||||
$newobject->lines[]=$newline;
|
$newobject->lines[]=$newline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
@ -762,7 +771,7 @@ function validOrder($authentication,$id='')
|
|||||||
{
|
{
|
||||||
$objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel));
|
$objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
$objectresp= array('result'=>array('result_code'=>'OK', 'result_label'=>''));
|
$objectresp= array('result'=>array('result_code'=>'OK', 'result_label'=>''));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user