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

@@ -32,6 +32,7 @@ Fix: Signature was not added for email sent from thirdparty page.
Fix: Action event SHIPPING_VALIDATE is not implemented Fix: Action event SHIPPING_VALIDATE is not implemented
Fix: The customer code was set to uppercase when using numbering module leopard. We Fix: The customer code was set to uppercase when using numbering module leopard. We
must keep data safe of any change. must keep data safe of any change.
Fix: Loading actions extrafields fails.
***** ChangeLog for 3.5 compared to 3.4.* ***** ***** ChangeLog for 3.5 compared to 3.4.* *****
For users: For users:

View File

@@ -3,7 +3,7 @@
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com> * Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@@ -863,7 +863,7 @@ if ($id > 0)
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$act,$action); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$act,$action); // Note that $action and $object may have been modified by hook
if (empty($reshook) && ! empty($extrafields->attribute_label)) if (empty($reshook) && ! empty($extrafields->attribute_label))
{ {
print $actioncomm->showOptionals($extrafields,'edit'); print $act->showOptionals($extrafields,'edit');
} }

View File

@@ -2364,7 +2364,7 @@ class Form
* *
* @param string $selected Id account pre-selected * @param string $selected Id account pre-selected
* @param string $htmlname Name of select zone * @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 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 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 * @param string $moreattrib To add more attribute on select
@@ -2376,10 +2376,10 @@ class Form
$langs->load("admin"); $langs->load("admin");
$sql = "SELECT rowid, label, bank"; $sql = "SELECT rowid, label, bank, clos as status";
$sql.= " FROM ".MAIN_DB_PREFIX."bank_account"; $sql.= " FROM ".MAIN_DB_PREFIX."bank_account";
$sql.= " WHERE clos = '".$statut."'"; $sql.= " WHERE entity IN (".getEntity('bank_account', 1).")";
$sql.= " AND entity IN (".getEntity('bank_account', 1).")"; if ($statut != 2) $sql.= " AND clos = '".$statut."'";
if ($filtre) $sql.=" AND ".$filtre; if ($filtre) $sql.=" AND ".$filtre;
$sql.= " ORDER BY label"; $sql.= " ORDER BY label";
@@ -2409,6 +2409,7 @@ class Form
print '<option value="'.$obj->rowid.'">'; print '<option value="'.$obj->rowid.'">';
} }
print $obj->label; print $obj->label;
if ($statut == 2 && $obj->status == 1) print ' ('.$langs->trans("Closed").')';
print '</option>'; print '</option>';
$i++; $i++;
} }

View File

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

View File

@@ -609,6 +609,37 @@ class pdf_einstein extends ModelePDFCommandes
$posy=$pdf->GetY()+1; $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 // Show payment mode
if ($object->mode_reglement_code if ($object->mode_reglement_code
&& $object->mode_reglement_code != 'CHQ' && $object->mode_reglement_code != 'CHQ'

View File

@@ -1084,7 +1084,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/tablednd/jquery.tablednd.0.6.min.js'.($ext?'?'.$ext:'').'"></script>'."\n"; print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/tablednd/jquery.tablednd.0.6.min.js'.($ext?'?'.$ext:'').'"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/tiptip/jquery.tipTip.min.js'.($ext?'?'.$ext:'').'"></script>'."\n"; print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/tiptip/jquery.tipTip.min.js'.($ext?'?'.$ext:'').'"></script>'."\n";
// jQuery Layout // jQuery Layout
if (! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT) || defined('REQUIRE_JQUERY_LAYOUT')) if (empty($conf->dol_use_jmobile) && ! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT) || defined('REQUIRE_JQUERY_LAYOUT'))
{ {
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/layout/jquery.layout-latest.js'.($ext?'?'.$ext:'').'"></script>'."\n"; print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/layout/jquery.layout-latest.js'.($ext?'?'.$ext:'').'"></script>'."\n";
} }
@@ -1293,7 +1293,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
if ($conf->use_javascript_ajax) if ($conf->use_javascript_ajax)
{ {
if (! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) if (empty($conf->dol_use_jmobile) && ! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT))
{ {
print '<script type="text/javascript"> print '<script type="text/javascript">
jQuery(document).ready(function () { jQuery(document).ready(function () {
@@ -1347,7 +1347,8 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
</script>'; </script>';
} }
if (! empty($conf->global->MAIN_MENU_USE_JQUERY_ACCORDION)) /* This make menu bugged
if ($conf->use_javascript_ajax && ! empty($conf->global->MAIN_MENU_USE_JQUERY_ACCORDION) && empty($conf->dol_use_jmobile))
{ {
print "\n".'<script type="text/javascript"> print "\n".'<script type="text/javascript">
jQuery(document).ready(function () { jQuery(document).ready(function () {
@@ -1360,7 +1361,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
}); });
}); });
</script>'; </script>';
} } */
// Wrapper to show tooltips // Wrapper to show tooltips
print "\n".'<script type="text/javascript"> print "\n".'<script type="text/javascript">
@@ -1377,7 +1378,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
*/ */
print "\n".'<!-- Start top horizontal -->'."\n"; print "\n".'<!-- Start top horizontal -->'."\n";
if (! empty($conf->use_javascript_ajax) && ! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) print '<div class="ui-layout-north"> <!-- Begin top layout -->'."\n"; if (empty($conf->dol_use_jmobile) && ! empty($conf->use_javascript_ajax) && ! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) print '<div class="ui-layout-north"> <!-- Begin top layout -->'."\n";
if (empty($conf->dol_hide_topmenu)) if (empty($conf->dol_hide_topmenu))
{ {
@@ -1496,11 +1497,11 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
unset($form); unset($form);
} }
if (! empty($conf->use_javascript_ajax) && ! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) print "</div><!-- End top layout -->\n"; if (empty($conf->dol_use_jmobile) && ! empty($conf->use_javascript_ajax) && ! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) print "</div><!-- End top layout -->\n";
print '<div style="clear: both;"></div>'; print '<div style="clear: both;"></div>';
print "<!-- End top horizontal menu -->\n\n"; print "<!-- End top horizontal menu -->\n\n";
if (empty($conf->dol_hide_leftmenu) && (empty($conf->use_javascript_ajax) || empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT))) print '<div id="id-container">'; if (empty($conf->dol_hide_leftmenu) && (empty($conf->use_javascript_ajax) || ! empty($conf->dol_use_jmobile) || empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT))) print '<div id="id-container">';
} }
@@ -1530,7 +1531,7 @@ function left_menu($menu_array_before, $helppagename='', $moresearchform='', $me
// Instantiate hooks of thirdparty module // Instantiate hooks of thirdparty module
$hookmanager->initHooks(array('searchform','leftblock')); $hookmanager->initHooks(array('searchform','leftblock'));
if (! empty($conf->use_javascript_ajax) && ! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) print "\n".'<div class="ui-layout-west"> <!-- Begin left layout -->'."\n"; if (empty($conf->dol_use_jmobile) && ! empty($conf->use_javascript_ajax) && ! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) print "\n".'<div class="ui-layout-west"> <!-- Begin left layout -->'."\n";
else print '<div id="id-left">'; else print '<div id="id-left">';
print "\n"; print "\n";
@@ -1708,8 +1709,7 @@ function left_menu($menu_array_before, $helppagename='', $moresearchform='', $me
$leftblock=$hookmanager->executeHooks('printLeftBlock',$parameters); // Note that $action and $object may have been modified by some hooks $leftblock=$hookmanager->executeHooks('printLeftBlock',$parameters); // Note that $action and $object may have been modified by some hooks
print $leftblock; print $leftblock;
if (! empty($conf->use_javascript_ajax) && ! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) print '</div> <!-- End left layout -->'."\n"; if (empty($conf->dol_use_jmobile) && ! empty($conf->use_javascript_ajax) && ! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) print '</div> <!-- End left layout -->'."\n";
//XXX else print '</td>';
else print '</div>'; // End div id="id-left" else print '</div>'; // End div id="id-left"
} }
@@ -1731,12 +1731,10 @@ function main_area($title='')
{ {
global $conf, $langs; global $conf, $langs;
if (! empty($conf->use_javascript_ajax) && ! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) if (empty($conf->dol_use_jmobile) && ! empty($conf->use_javascript_ajax) && ! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT))
{ {
print '<div id="mainContent"><div class="ui-layout-center"> <!-- begin main layout -->'."\n"; print '<div id="mainContent"><div class="ui-layout-center"> <!-- begin main layout -->'."\n";
//print '<table width="100%" class="notopnoleftnoright" summary="centermenutable" id="undertopmenu"><tr>';
} }
//XXX print '<td valign="top">'."\n";
if (empty($conf->dol_hide_leftmenu)) print '<div id="id-right">'; if (empty($conf->dol_hide_leftmenu)) print '<div id="id-right">';
print "\n"; print "\n";
@@ -1864,8 +1862,7 @@ if (! function_exists("llxFooter"))
print '</div> <!-- end div class="fiche" -->'."\n"; print '</div> <!-- end div class="fiche" -->'."\n";
if (! empty($conf->dol_use_jmobile)) print '</div>'; // end data-role="page" if (! empty($conf->dol_use_jmobile)) print '</div>'; // end data-role="page"
//XXX print "\n".'</td></tr></table> <!-- end right area -->'."\n"; if (empty($conf->dol_use_jmobile) && ! empty($conf->use_javascript_ajax) && ! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) print '</div></div> <!-- end main layout -->'."\n";
if (! empty($conf->use_javascript_ajax) && ! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) print '</div></div> <!-- end main layout -->'."\n";
if (empty($conf->dol_hide_leftmenu)) print '</div>'; // End div id-right if (empty($conf->dol_hide_leftmenu)) print '</div>'; // End div id-right
print "\n"; print "\n";

View File

@@ -1345,7 +1345,7 @@ div.divButAction { margin-bottom: 1.4em; }
.butActionRefused { .butActionRefused {
background: #FFe7ec; background: #FFe7ec;
color: #666; color: #aaa !important;
} }
<?php if (! empty($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED)) { ?> <?php if (! empty($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED)) { ?>
@@ -1602,6 +1602,7 @@ tr.pair td.nohover {
-webkit-box-shadow: 4px 4px 4px #DDD; -webkit-box-shadow: 4px 4px 4px #DDD;
box-shadow: 4px 4px 4px #DDD; box-shadow: 4px 4px 4px #DDD;
margin-bottom: 8px !important;*/ margin-bottom: 8px !important;*/
background: #FFFFFF;
border: 1px solid #AAA; border: 1px solid #AAA;
text-align: center; text-align: center;
border-radius: 5px; border-radius: 5px;