Nachdem diese Frage immer wieder kommt, hier mal eine Anpassung
Für das Dokument Angebot
Öffne in einem Texteditor – z.B. Notepad++ die Datei - in deinem Dolibarr Ortner
..\htdocs\core\modules\propale\doc\pdf_cyan.modules.php
und speichere sie direkt unter - dein Dolibarr Ortner
..\htdocs\core\modules\propale\doc\pdf_cyan_pos.modules.php
Falls du schon Änderungen vorgenommen hast und das Dokument einen anderen Namen hat - nimm das
nun suche und ersetze
class pdf_cyan extends ModelePDFPropales --> class pdf_cyan_Pos extends ModelePDFPropales
$this->name = "cyan"; --> $this->name = "cyan pos";
suche nach → // Unit price before discount
und füge nach der geschlossenen " } " das ein
// Pos
$pdf->SetXY ($this->posxpos + 25, $curY +1);
$pdf->MultiCell($this->posxdesc-$this->posxpos - 0.8, 3, $i+1, 0, 'L', 0);
suche nach → // line takes a position y in 2nd parameter and 4th parameter
und füge nach der geschlossenen " } " das ein
// Pos Line
$pdf->line($this->posxdesc + 8, $tab_top, $this->posxdesc + 8, $tab_top + $tab_height);
suche nach → $rank = 0; // do not use negative rank
und ersetze das
$rank = 0; // do not use negative rank
$this->cols['desc'] = array(
'rank' => $rank,
'width' => false, // only for desc
'status' => true,
'title' => array(
'textkey' => 'Designation', // use lang key is usefull in somme case with module
'align' => 'L',
// 'textkey' => 'yourLangKey', // if there is no label, yourLangKey will be translated to replace label
// 'label' => ' ', // the final label
'padding' => array(0.5, 0.5, 0.5, 0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left
),
'content' => array(
'align' => 'L',
'padding' => array(1, 0.5, 1, 1.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left
),
);
gegen das
$rank = $rank + 0;
$this->cols['pos'] = array(
'rank' => $rank,
'status' => true,
'width' => 8, // in mm
'title' => array(
'textkey' => 'POS'
),
'border-left' => false, // add left line separator
);
$rank = + 10; // do not use negative rank
$this->cols['desc'] = array(
'rank' => $rank,
'width' => false, // only for desc
'status' => true,
'title' => array(
'textkey' => 'Designation', // use lang key is usefull in somme case with module
'align' => 'L',
// 'textkey' => 'yourLangKey', // if there is no label, yourLangKey will be translated to replace label
// 'label' => ' ', // the final label
'padding' => array(0.5, 0.5, 0.5, 2.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left
),
'content' => array(
'align' => 'L',
'padding' => array(1, 0.5, 1, 2), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left
),
);
speichere die Änderungen und gehe zu Dolibarr
Um die Spaltenbezeichnung zu bekommen gehe bei Dolibarr zu
-
Einstellungen → Übersetzungen → Überschreiben der Übersetzungen +
-
wähle die Sprache aus - trage als Key " POS " ein - und bei Meine Übersetzung den Namen der Positionsspalte z.B. " Pos. "
-
öffne → Einstellungen → Module → Angebote
da sollte jetzt eine neue Dokumentenvorlage mit dem Namen - cyan pos - sein.
Wenn alles geklappt hat wird ab jetzt bei Angeboten, wenn sie mit dem neuen Dokument erstellt wird, eine Spalte mit der Position Nummer angezeigt.
Viel Spaß Scalar