This commit is contained in:
Laurent Destailleur 2012-03-17 00:47:01 +01:00
parent a458ea3582
commit 02cdd86066
9 changed files with 86 additions and 35 deletions

View File

@ -93,9 +93,9 @@ class mod_expedition_ribera extends ModelNumRefExpedition
/** /**
* Return next value * Return next value
* *
* @param objsoc third party object * @param Societe $objsoc Third party object
* @param shipment shipment object * @param Object $shipment Shipment object
* @return string Value if OK, 0 if KO * @return string Value if OK, 0 if KO
*/ */
function getNextValue($objsoc,$shipment) function getNextValue($objsoc,$shipment)
{ {
@ -119,9 +119,9 @@ class mod_expedition_ribera extends ModelNumRefExpedition
/** /**
* Return next free value * Return next free value
* *
* @param objsoc Object third party * @param Societe $objsoc Third party object
* @param objforref Object for number to search * @param Object $shipment Shipment object
* @return string Next free value * @return string Next free value
*/ */
function expedition_get_num($objsoc,$objforref) function expedition_get_num($objsoc,$objforref)
{ {

View File

@ -93,9 +93,9 @@ class mod_expedition_safor extends ModelNumRefExpedition
/** /**
* Return next value * Return next value
* *
* @param objsoc third party object * @param Societe $objsoc Third party object
* @param shipment shipment object * @param Object $shipment Shipment object
* @return string Value if OK, 0 if KO * @return string Value if OK, 0 if KO
*/ */
function getNextValue($objsoc,$shipment) function getNextValue($objsoc,$shipment)
{ {
@ -131,9 +131,9 @@ class mod_expedition_safor extends ModelNumRefExpedition
/** /**
* Return next free value * Return next free value
* *
* @param objsoc Object third party * @param Societe $objsoc Third party object
* @param objforref Object for number to search * @param Object $shipment Shipment object
* @return string Next free value * @return string Next free value
*/ */
function expedition_get_num($objsoc,$objforref) function expedition_get_num($objsoc,$objforref)
{ {

View File

@ -468,13 +468,13 @@ class pdf_crabe extends ModelePDFFactures
$pdf->line($tab3_posx, $tab3_top-1+$tab3_height, $tab3_posx+$tab3_width, $tab3_top-1+$tab3_height); $pdf->line($tab3_posx, $tab3_top-1+$tab3_height, $tab3_posx+$tab3_width, $tab3_top-1+$tab3_height);
$pdf->SetFont('','', $default_font_size - 4); $pdf->SetFont('','', $default_font_size - 4);
$pdf->SetXY($tab3_posx, $tab3_top ); $pdf->SetXY($tab3_posx, $tab3_top);
$pdf->MultiCell(20, 3, $outputlangs->transnoentities("Payment"), 0, 'L', 0); $pdf->MultiCell(20, 3, $outputlangs->transnoentities("Payment"), 0, 'L', 0);
$pdf->SetXY($tab3_posx+21, $tab3_top ); $pdf->SetXY($tab3_posx+21, $tab3_top);
$pdf->MultiCell(20, 3, $outputlangs->transnoentities("Amount"), 0, 'L', 0); $pdf->MultiCell(20, 3, $outputlangs->transnoentities("Amount"), 0, 'L', 0);
$pdf->SetXY($tab3_posx+40, $tab3_top ); $pdf->SetXY($tab3_posx+40, $tab3_top);
$pdf->MultiCell(20, 3, $outputlangs->transnoentities("Type"), 0, 'L', 0); $pdf->MultiCell(20, 3, $outputlangs->transnoentities("Type"), 0, 'L', 0);
$pdf->SetXY($tab3_posx+58, $tab3_top ); $pdf->SetXY($tab3_posx+58, $tab3_top);
$pdf->MultiCell(20, 3, $outputlangs->transnoentities("Num"), 0, 'L', 0); $pdf->MultiCell(20, 3, $outputlangs->transnoentities("Num"), 0, 'L', 0);
$y=0; $y=0;
@ -504,7 +504,7 @@ class pdf_crabe extends ModelePDFFactures
$invoice->fetch($obj->fk_facture_source); $invoice->fetch($obj->fk_facture_source);
$pdf->SetXY($tab3_posx, $tab3_top+$y ); $pdf->SetXY($tab3_posx, $tab3_top+$y);
$pdf->MultiCell(20, 3, dol_print_date($obj->datef,'day',false,$outputlangs,true), 0, 'L', 0); $pdf->MultiCell(20, 3, dol_print_date($obj->datef,'day',false,$outputlangs,true), 0, 'L', 0);
$pdf->SetXY($tab3_posx+21, $tab3_top+$y); $pdf->SetXY($tab3_posx+21, $tab3_top+$y);
$pdf->MultiCell(20, 3, price($obj->amount_ttc), 0, 'L', 0); $pdf->MultiCell(20, 3, price($obj->amount_ttc), 0, 'L', 0);
@ -541,7 +541,7 @@ class pdf_crabe extends ModelePDFFactures
$y+=3; $y+=3;
$row = $this->db->fetch_object($resql); $row = $this->db->fetch_object($resql);
$pdf->SetXY($tab3_posx, $tab3_top+$y ); $pdf->SetXY($tab3_posx, $tab3_top+$y);
$pdf->MultiCell(20, 3, dol_print_date($this->db->jdate($row->date),'day',false,$outputlangs,true), 0, 'L', 0); $pdf->MultiCell(20, 3, dol_print_date($this->db->jdate($row->date),'day',false,$outputlangs,true), 0, 'L', 0);
$pdf->SetXY($tab3_posx+21, $tab3_top+$y); $pdf->SetXY($tab3_posx+21, $tab3_top+$y);
$pdf->MultiCell(20, 3, price($row->amount), 0, 'L', 0); $pdf->MultiCell(20, 3, price($row->amount), 0, 'L', 0);

View File

@ -208,7 +208,7 @@ class pdf_soleil extends ModelePDFFicheinter
$pdf->SetXY($this->marge_gauche, $tab_top); $pdf->SetXY($this->marge_gauche, $tab_top);
$pdf->MultiCell(190,8,$outputlangs->transnoentities("Description"),0,'L',0); $pdf->MultiCell(190,8,$outputlangs->transnoentities("Description"),0,'L',0);
$pdf->line($this->marge_gauche, $tab_top + 8, $this->page_largeur-$this->marge_droite, $tab_top + 8 ); $pdf->line($this->marge_gauche, $tab_top + 8, $this->page_largeur-$this->marge_droite, $tab_top + 8);
$pdf->SetFont('', '', $default_font_size - 1); $pdf->SetFont('', '', $default_font_size - 1);

View File

@ -69,6 +69,7 @@ abstract class ModeleNumRefFicheinter
/** /**
* Return if a module can be used or not * Return if a module can be used or not
*
* @return boolean true if module can be used * @return boolean true if module can be used
*/ */
function isEnabled() function isEnabled()
@ -78,6 +79,7 @@ abstract class ModeleNumRefFicheinter
/** /**
* Renvoi la description par defaut du modele de numerotation * Renvoi la description par defaut du modele de numerotation
*
* @return string Texte descripif * @return string Texte descripif
*/ */
function info() function info()
@ -89,6 +91,7 @@ abstract class ModeleNumRefFicheinter
/** /**
* Renvoi un exemple de numerotation * Renvoi un exemple de numerotation
*
* @return string Example * @return string Example
*/ */
function getExample() function getExample()
@ -101,6 +104,7 @@ abstract class ModeleNumRefFicheinter
/** /**
* Test si les numeros deja en vigueur dans la base ne provoquent pas de * Test si les numeros deja en vigueur dans la base ne provoquent pas de
* de conflits qui empechera cette numerotation de fonctionner. * de conflits qui empechera cette numerotation de fonctionner.
*
* @return boolean false si conflit, true si ok * @return boolean false si conflit, true si ok
*/ */
function canBeActivated() function canBeActivated()
@ -110,6 +114,7 @@ abstract class ModeleNumRefFicheinter
/** /**
* Renvoi prochaine valeur attribuee * Renvoi prochaine valeur attribuee
*
* @return string Valeur * @return string Valeur
*/ */
function getNextValue() function getNextValue()
@ -120,6 +125,7 @@ abstract class ModeleNumRefFicheinter
/** /**
* Renvoi version du module numerotation * Renvoi version du module numerotation
*
* @return string Valeur * @return string Valeur
*/ */
function getVersion() function getVersion()
@ -137,11 +143,12 @@ abstract class ModeleNumRefFicheinter
/** /**
* Create an intervention document on disk using template defined into FICHEINTER_ADDON_PDF * Create an intervention document on disk using template defined into FICHEINTER_ADDON_PDF
* @param db objet base de donnee *
* @param object Object fichinter * @param DoliDB $db objet base de donnee
* @param modele force le modele a utiliser ('' par defaut) * @param Object $object Object fichinter
* @param outputlangs objet lang a utiliser pour traduction * @param string $modele force le modele a utiliser ('' par defaut)
* @return int 0 si KO, 1 si OK * @param Translate $outputlangs objet lang a utiliser pour traduction
* @return int 0 if KO, 1 if OK
*/ */
function fichinter_create($db, $object, $modele='', $outputlangs='') function fichinter_create($db, $object, $modele='', $outputlangs='')
{ {

View File

@ -84,36 +84,71 @@ class ImportCsv extends ModeleImports
if (preg_match('/^societe_/',$datatoimport)) $this->thirpartyobject=new Societe($this->db); if (preg_match('/^societe_/',$datatoimport)) $this->thirpartyobject=new Societe($this->db);
} }
/**
* getDriverId
*
* @return int Id
*/
function getDriverId() function getDriverId()
{ {
return $this->id; return $this->id;
} }
/**
* getDriverLabel
*
* @return string Label
*/
function getDriverLabel() function getDriverLabel()
{ {
return $this->label; return $this->label;
} }
/**
* getDriverDesc
*
* @return string Description
*/
function getDriverDesc() function getDriverDesc()
{ {
return $this->desc; return $this->desc;
} }
/**
* getDriverExtension
*
* @return string Driver suffix
*/
function getDriverExtension() function getDriverExtension()
{ {
return $this->extension; return $this->extension;
} }
/**
* getDriverVersion
*
* @return string Driver version
*/
function getDriverVersion() function getDriverVersion()
{ {
return $this->version; return $this->version;
} }
/**
* getDriverLabel
*
* @return string Label of external lib
*/
function getLibLabel() function getLibLabel()
{ {
return $this->label_lib; return $this->label_lib;
} }
/**
* getLibVersion
*
* @return string Version of external lib
*/
function getLibVersion() function getLibVersion()
{ {
return $this->version_lib; return $this->version_lib;
@ -135,6 +170,7 @@ class ImportCsv extends ModeleImports
* Output title line of an example file for this format * Output title line of an example file for this format
* *
* @param Translate $outputlangs Output language * @param Translate $outputlangs Output language
* @param array $headerlinefields Array of fields name
* @return string * @return string
*/ */
function write_title_example($outputlangs,$headerlinefields) function write_title_example($outputlangs,$headerlinefields)
@ -289,6 +325,7 @@ class ImportCsv extends ModeleImports
* @param array $array_match_file_to_database Array of target fields where to insert data: [fieldpos] => 's.fieldname', [fieldpos+1]... * @param array $array_match_file_to_database Array of target fields where to insert data: [fieldpos] => 's.fieldname', [fieldpos+1]...
* @param Object $objimport Object import (contains objimport->import_tables_array, objimport->import_fields_array, objimport->import_convertvalue_array, ...) * @param Object $objimport Object import (contains objimport->import_tables_array, objimport->import_fields_array, objimport->import_convertvalue_array, ...)
* @param int $maxfields Max number of fields to use * @param int $maxfields Max number of fields to use
* @param string $importid Import key
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function import_insert($arrayrecord,$array_match_file_to_database,$objimport,$maxfields,$importid) function import_insert($arrayrecord,$array_match_file_to_database,$objimport,$maxfields,$importid)

View File

@ -113,6 +113,7 @@ class ModeleImports
/** /**
* Return picto of import driver * Return picto of import driver
* *
* @param string $key Key
* @return string * @return string
*/ */
function getPicto($key) function getPicto($key)
@ -123,6 +124,7 @@ class ModeleImports
/** /**
* Renvoi libelle d'un driver import * Renvoi libelle d'un driver import
* *
* @param string $key Key
* @return string * @return string
*/ */
function getDriverLabel($key) function getDriverLabel($key)
@ -133,6 +135,7 @@ class ModeleImports
/** /**
* Renvoi la description d'un driver import * Renvoi la description d'un driver import
* *
* @param string $key Key
* @return string * @return string
*/ */
function getDriverDesc($key) function getDriverDesc($key)
@ -143,6 +146,7 @@ class ModeleImports
/** /**
* Renvoi version d'un driver import * Renvoi version d'un driver import
* *
* @param string $key Key
* @return string * @return string
*/ */
function getDriverVersion($key) function getDriverVersion($key)
@ -153,6 +157,7 @@ class ModeleImports
/** /**
* Renvoi libelle de librairie externe du driver * Renvoi libelle de librairie externe du driver
* *
* @param string $key Key
* @return string * @return string
*/ */
function getLibLabel($key) function getLibLabel($key)
@ -163,6 +168,7 @@ class ModeleImports
/** /**
* Renvoi version de librairie externe du driver * Renvoi version de librairie externe du driver
* *
* @param string $key Key
* @return string * @return string
*/ */
function getLibVersion($key) function getLibVersion($key)
@ -172,5 +178,4 @@ class ModeleImports
} }
?> ?>

View File

@ -76,9 +76,10 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
/** /**
* Fonction generant le bon de livraison sur le disque * Fonction generant le bon de livraison sur le disque
* @param object Object livraison a generer *
* @param outputlangs Lang output object * @param Object $object Object livraison a generer
* @return int 1 if OK, <=0 if KO * @param Translate $outputlangs Lang output object
* @return int 1 if OK, <=0 if KO
*/ */
function write_file($object,$outputlangs) function write_file($object,$outputlangs)
{ {
@ -191,7 +192,7 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
$pdf->SetFont('','', $default_font_size - 1); // Dans boucle pour gerer multi-page $pdf->SetFont('','', $default_font_size - 1); // Dans boucle pour gerer multi-page
$nexY = $pdf->GetY(); $nexY = $pdf->GetY();
$pdf->SetXY(10, $curY ); $pdf->SetXY(10, $curY);
$pdf->MultiCell(20, 3, $outputlangs->convToOutputCharset($object->lines[$i]->ref), 0, 'C'); $pdf->MultiCell(20, 3, $outputlangs->convToOutputCharset($object->lines[$i]->ref), 0, 'C');
@ -199,7 +200,7 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
//$pdf->SetXY(133, $curY ); //$pdf->SetXY(133, $curY );
//$pdf->MultiCell(10, 5, $object->lines[$i]->tva_tx, 0, 'C'); //$pdf->MultiCell(10, 5, $object->lines[$i]->tva_tx, 0, 'C');
$pdf->SetXY(145, $curY ); $pdf->SetXY(145, $curY);
$pdf->MultiCell(10, 3, $object->lines[$i]->qty_shipped, 0, 'C'); $pdf->MultiCell(10, 3, $object->lines[$i]->qty_shipped, 0, 'C');
// TODO Field not yet saved in database // TODO Field not yet saved in database

View File

@ -97,9 +97,10 @@ class pdf_typhon extends ModelePDFDeliveryOrder
/** /**
* Fonction generant le bon de livraison sur le disque * Fonction generant le bon de livraison sur le disque
* @param object Object livraison a generer *
* @param outputlangs Lang output object * @param Object $object Object livraison a generer
* @return int 1 if OK, <=0 if KO * @param Translate $outputlangs Lang output object
* @return int 1 if OK, <=0 if KO
*/ */
function write_file($object,$outputlangs) function write_file($object,$outputlangs)
{ {
@ -470,11 +471,11 @@ class pdf_typhon extends ModelePDFDeliveryOrder
// Modif Seb cadres signatures // Modif Seb cadres signatures
$pdf->SetFont('','', $default_font_size); $pdf->SetFont('','', $default_font_size);
$larg_sign = ($this->page_largeur-$this->marge_gauche-$this->marge_droite)/3; $larg_sign = ($this->page_largeur-$this->marge_gauche-$this->marge_droite)/3;
$pdf->Rect($this->marge_gauche, ($tab_top + $tab_height + 3), $larg_sign, 25 ); $pdf->Rect($this->marge_gauche, ($tab_top + $tab_height + 3), $larg_sign, 25);
$pdf->SetXY($this->marge_gauche + 2, $tab_top + $tab_height + 5); $pdf->SetXY($this->marge_gauche + 2, $tab_top + $tab_height + 5);
$pdf->MultiCell($larg_sign,2, $outputlangs->trans("For").' '.$outputlangs->convToOutputCharset($mysoc->name).":",'','L'); $pdf->MultiCell($larg_sign,2, $outputlangs->trans("For").' '.$outputlangs->convToOutputCharset($mysoc->name).":",'','L');
$pdf->Rect(2*$larg_sign+$this->marge_gauche, ($tab_top + $tab_height + 3), $larg_sign, 25 ); $pdf->Rect(2*$larg_sign+$this->marge_gauche, ($tab_top + $tab_height + 3), $larg_sign, 25);
$pdf->SetXY(2*$larg_sign+$this->marge_gauche + 2, $tab_top + $tab_height + 5); $pdf->SetXY(2*$larg_sign+$this->marge_gauche + 2, $tab_top + $tab_height + 5);
$pdf->MultiCell($larg_sign,2, $outputlangs->trans("ForCustomer").':','','L'); $pdf->MultiCell($larg_sign,2, $outputlangs->trans("ForCustomer").':','','L');