Conflicts:
	htdocs/core/modules/commande/doc/pdf_einstein.modules.php
This commit is contained in:
Laurent Destailleur
2014-02-27 10:47:15 +01:00
7 changed files with 55 additions and 27 deletions

View File

@@ -2364,7 +2364,7 @@ class Form
*
* @param string $selected Id account pre-selected
* @param string $htmlname Name of select zone
* @param int $statut Status of searched accounts (0=open, 1=closed)
* @param int $statut Status of searched accounts (0=open, 1=closed, 2=both)
* @param string $filtre To filter list
* @param int $useempty 1=Add an empty value in list, 2=Add an empty value in list only if there is more than 2 entries.
* @param string $moreattrib To add more attribute on select
@@ -2376,10 +2376,10 @@ class Form
$langs->load("admin");
$sql = "SELECT rowid, label, bank";
$sql = "SELECT rowid, label, bank, clos as status";
$sql.= " FROM ".MAIN_DB_PREFIX."bank_account";
$sql.= " WHERE clos = '".$statut."'";
$sql.= " AND entity IN (".getEntity('bank_account', 1).")";
$sql.= " WHERE entity IN (".getEntity('bank_account', 1).")";
if ($statut != 2) $sql.= " AND clos = '".$statut."'";
if ($filtre) $sql.=" AND ".$filtre;
$sql.= " ORDER BY label";
@@ -2409,6 +2409,7 @@ class Form
print '<option value="'.$obj->rowid.'">';
}
print $obj->label;
if ($statut == 2 && $obj->status == 1) print ' ('.$langs->trans("Closed").')';
print '</option>';
$i++;
}

View File

@@ -547,15 +547,12 @@ class Menubase
$tmpcond=$menu['enabled'];
if ($leftmenu == 'all') $tmpcond=preg_replace('/\$leftmenu\s*==\s*["\'a-zA-Z_]+/','1==1',$tmpcond); // Force part of condition to true
$enabled = verifCond($tmpcond);
if ($conf->use_javascript_ajax && ! empty($conf->global->MAIN_MENU_USE_JQUERY_ACCORDION) && preg_match('/^\$leftmenu/',$menu['enabled'])) $enabled=1;
//print "verifCond rowid=".$menu['rowid']." ".$tmpcond.":".$enabled."<br>\n";
//if ($conf->use_javascript_ajax && ! empty($conf->global->MAIN_MENU_USE_JQUERY_ACCORDION) && empty($conf->dol_use_jmobile) && preg_match('/^\$leftmenu/',$menu['enabled'])) $enabled=1;
}
// Define $title
if ($enabled)
{
//$tmp3=dol_microtime_float();
//print '>>> 2 '.($tmp3 - $tmp1).'<br>';
$title = $langs->trans($menu['titre']);
if ($title == $menu['titre']) // Translation not found
{

View File

@@ -609,6 +609,37 @@ class pdf_einstein extends ModelePDFCommandes
$posy=$pdf->GetY()+1;
}*/
// Show shipping date
if ($object->date_livraison)
{
$outputlangs->load("sendings");
$pdf->SetFont('','B', $default_font_size - 2);
$pdf->SetXY($this->marge_gauche, $posy);
$titre = $outputlangs->transnoentities("DateDeliveryPlanned").':';
$pdf->MultiCell(80, 4, $titre, 0, 'L');
$pdf->SetFont('','', $default_font_size - 2);
$pdf->SetXY($posxval, $posy);
$dlp=dol_print_date($object->date_livraison,"daytext",false,$outputlangs,true);
$pdf->MultiCell(80, 4, $dlp, 0, 'L');
$posy=$pdf->GetY()+1;
}
elseif ($object->availability_code || $object->availability) // Show availability conditions
{
$pdf->SetFont('','B', $default_font_size - 2);
$pdf->SetXY($this->marge_gauche, $posy);
$titre = $outputlangs->transnoentities("AvailabilityPeriod").':';
$pdf->MultiCell(80, 4, $titre, 0, 'L');
$pdf->SetTextColor(0,0,0);
$pdf->SetFont('','', $default_font_size - 2);
$pdf->SetXY($posxval, $posy);
$lib_availability=$outputlangs->transnoentities("AvailabilityType".$object->availability_code)!=('AvailabilityType'.$object->availability_code)?$outputlangs->transnoentities("AvailabilityType".$object->availability_code):$outputlangs->convToOutputCharset($object->availability);
$lib_availability=str_replace('\n',"\n",$lib_availability);
$pdf->MultiCell(80, 4, $lib_availability, 0, 'L');
$posy=$pdf->GetY()+1;
}
// Show payment mode
if ($object->mode_reglement_code
&& $object->mode_reglement_code != 'CHQ'