Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into dev_consomption_thirdparty_withmorefigures

This commit is contained in:
florian HENRY 2016-10-25 09:44:03 +02:00
commit 237d04e3c0
56 changed files with 752 additions and 690 deletions

View File

@ -104,7 +104,7 @@ if ($action == 'update')
else dolibarr_set_const($db, 'THEME_ELDY_TEXTLINK', implode(',',colorStringToArray(GETPOST('THEME_ELDY_TEXTLINK'),array())),'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_SIZE_LISTE_LIMIT", $_POST["main_size_liste_limit"],'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_SIZE_SHORTLISTE_LIMIT", $_POST["main_size_shortliste_limit"],'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_SIZE_SHORTLIST_LIMIT", $_POST["main_size_shortliste_limit"],'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_DISABLE_JAVASCRIPT", $_POST["main_disable_javascript"],'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_BUTTON_HIDE_UNAUTHORIZED", $_POST["MAIN_BUTTON_HIDE_UNAUTHORIZED"],'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_START_WEEK", $_POST["MAIN_START_WEEK"],'chaine',0,'',$conf->entity);
@ -225,7 +225,7 @@ if ($action == 'edit') // Edit
// Max size of short lists on customer card
$var=!$var;
print '<tr '.$bc[$var].'><td>'.$langs->trans("DefaultMaxSizeShortList").'</td><td><input class="flat" name="main_size_shortliste_limit" size="4" value="' . $conf->global->MAIN_SIZE_SHORTLISTE_LIMIT . '"></td>';
print '<tr '.$bc[$var].'><td>'.$langs->trans("DefaultMaxSizeShortList").'</td><td><input class="flat" name="main_size_shortliste_limit" size="4" value="' . $conf->global->MAIN_SIZE_SHORTLIST_LIMIT . '"></td>';
print '<td width="20">&nbsp;</td>';
print '</tr>';
@ -408,7 +408,7 @@ else // Show
print "</tr>";
$var=!$var;
print '<tr '.$bc[$var].'><td>'.$langs->trans("DefaultMaxSizeShortList").'</td><td>' . $conf->global->MAIN_SIZE_SHORTLISTE_LIMIT . '</td>';
print '<tr '.$bc[$var].'><td>'.$langs->trans("DefaultMaxSizeShortList").'</td><td>' . $conf->global->MAIN_SIZE_SHORTLIST_LIMIT . '</td>';
print '<td width="20">&nbsp;</td>';
print "</tr>";

View File

@ -1472,7 +1472,7 @@ if ($id > 0)
$var=true;
$somethingshown=$formfile->show_documents('agenda',$object->id,$filedir,$urlsource,$genallowed,$delallowed,'',0,0,0,0,0,'','','',$object->default_lang);
print $formfile->showdocuments('agenda',$object->id,$filedir,$urlsource,$genallowed,$delallowed,'',0,0,0,0,0,'','','',$object->default_lang);
print '</div><div class="fichehalfright"><div class="ficheaddleft">';

View File

@ -217,14 +217,14 @@ if ($id > 0)
print '<table class="border" width="100%">';
// Prospect/Customer
print '<tr><td width="30%">'.$langs->trans('ProspectCustomer').'</td><td width="70%" colspan="3">';
print '<tr><td class="titlefield">'.$langs->trans('ProspectCustomer').'</td><td>';
print $object->getLibCustProspStatut();
print '</td></tr>';
// Prefix
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
{
print '<tr><td>'.$langs->trans("Prefix").'</td><td colspan="3">';
print '<tr><td>'.$langs->trans("Prefix").'</td><td>';
print ($object->prefix_comm?$object->prefix_comm:'&nbsp;');
print '</td></tr>';
}
@ -234,7 +234,7 @@ if ($id > 0)
$langs->load("compta");
print '<tr><td>';
print $langs->trans('CustomerCode').'</td><td colspan="3">';
print $langs->trans('CustomerCode').'</td><td>';
print $object->code_client;
if ($object->check_codeclient() <> 0) print ' <font class="error">('.$langs->trans("WrongCustomerCode").')</font>';
print '</td></tr>';
@ -242,7 +242,7 @@ if ($id > 0)
print '<tr>';
print '<td>';
print $form->editfieldkey("CustomerAccountancyCode",'customeraccountancycode',$object->code_compta,$object,$user->rights->societe->creer);
print '</td><td colspan="3">';
print '</td><td>';
print $form->editfieldval("CustomerAccountancyCode",'customeraccountancycode',$object->code_compta,$object,$user->rights->societe->creer);
print '</td>';
print '</tr>';
@ -251,12 +251,12 @@ if ($id > 0)
// Skype
if (! empty($conf->skype->enabled))
{
print '<td>'.$langs->trans('Skype').'</td><td colspan="3">'.dol_print_skype($object->skype,0,$object->id,'AC_SKYPE').'</td></tr>';
print '<td>'.$langs->trans('Skype').'</td><td>'.dol_print_skype($object->skype,0,$object->id,'AC_SKYPE').'</td></tr>';
}
// Assujeti a TVA ou pas
print '<tr>';
print '<td class="nowrap">'.$langs->trans('VATIsUsed').'</td><td colspan="3">';
print '<td class="nowrap">'.$langs->trans('VATIsUsed').'</td><td>';
print yn($object->tva_assuj);
print '</td>';
print '</tr>';
@ -264,20 +264,20 @@ if ($id > 0)
// Local Taxes
if ($mysoc->useLocalTax(1))
{
print '<tr><td class="nowrap">'.$langs->trans("LocalTax1IsUsedES").'</td><td colspan="3">';
print '<tr><td class="nowrap">'.$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code).'</td><td>';
print yn($object->localtax1_assuj);
print '</td></tr>';
}
if ($mysoc->useLocalTax(2))
{
print '<tr><td class="nowrap">'.$langs->trans("LocalTax2IsUsedES").'</td><td colspan="3">';
print '<tr><td class="nowrap">'.$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code).'</td><td>';
print yn($object->localtax2_assuj);
print '</td></tr>';
}
// TVA Intra
print '<tr><td class="nowrap">'.$langs->trans('VATIntra').'</td><td colspan="3">';
print '<tr><td class="nowrap">'.$langs->trans('VATIntra').'</td><td>';
print $object->tva_intra;
print '</td></tr>';
@ -289,7 +289,7 @@ if ($id > 0)
print '<td>';
if (($action != 'editconditions') && $user->rights->societe->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editconditions&amp;socid='.$object->id.'">'.img_edit($langs->trans('SetConditions'),1).'</a></td>';
print '</tr></table>';
print '</td><td colspan="3">';
print '</td><td>';
if ($action == 'editconditions')
{
$form->form_conditions_reglement($_SERVER['PHP_SELF'].'?socid='.$object->id, $object->cond_reglement_id, 'cond_reglement_id',1);
@ -308,7 +308,7 @@ if ($id > 0)
print '<td>';
if (($action != 'editmode') && $user->rights->societe->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editmode&amp;socid='.$object->id.'">'.img_edit($langs->trans('SetMode'),1).'</a></td>';
print '</tr></table>';
print '</td><td colspan="3">';
print '</td><td>';
if ($action == 'editmode')
{
$form->form_modes_reglement($_SERVER['PHP_SELF'].'?socid='.$object->id,$object->mode_reglement_id,'mode_reglement_id');
@ -323,11 +323,11 @@ if ($id > 0)
// Compte bancaire par défaut
print '<tr><td class="nowrap">';
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
print $langs->trans('BankAccount');
print $langs->trans('PaymentBankAccount');
print '<td>';
if (($action != 'editbankaccount') && $user->rights->societe->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editbankaccount&amp;socid='.$object->id.'">'.img_edit($langs->trans('SetBankAccount'),1).'</a></td>';
print '</tr></table>';
print '</td><td colspan="3">';
print '</td><td>';
if ($action == 'editbankaccount')
{
$form->formSelectAccount($_SERVER['PHP_SELF'].'?socid='.$object->id,$object->fk_account,'fk_account',1);
@ -350,7 +350,7 @@ if ($id > 0)
print '<a href="'.DOL_URL_ROOT.'/comm/remise.php?id='.$object->id.'">'.img_edit($langs->trans("Modify")).'</a>';
}
print '</td></tr></table>';
print '</td><td colspan="3">'.($object->remise_percent?'<a href="'.DOL_URL_ROOT.'/comm/remise.php?id='.$object->id.'">'.$object->remise_percent.'%</a>':'').'</td>';
print '</td><td>'.($object->remise_percent?'<a href="'.DOL_URL_ROOT.'/comm/remise.php?id='.$object->id.'">'.$object->remise_percent.'%</a>':'').'</td>';
print '</tr>';
// Absolute discounts (Discounts-Drawbacks-Rebates)
@ -365,7 +365,7 @@ if ($id > 0)
}
print '</td></tr></table>';
print '</td>';
print '<td colspan="3">';
print '<td>';
$amount_discount=$object->getAvailableDiscounts();
if ($amount_discount < 0) dol_print_error($db,$object->error);
if ($amount_discount > 0) print '<a href="'.DOL_URL_ROOT.'/comm/remx.php?id='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?socid='.$object->id).'">'.price($amount_discount,1,$langs,1,-1,-1,$conf->currency).'</a>';
@ -373,20 +373,6 @@ if ($id > 0)
print '</td>';
print '</tr>';
if ($object->client)
{
print '<tr>';
print '<td>';
print $form->editfieldkey("OutstandingBill",'outstanding_limit',$object->outstanding_limit,$object,$user->rights->societe->creer);
print '</td><td colspan="3">';
$limit_field_type = (! empty($conf->global->MAIN_USE_JQUERY_JEDITABLE)) ? 'numeric' : 'amount';
print $form->editfieldval("OutstandingBill",'outstanding_limit',$object->outstanding_limit,$object,$user->rights->societe->creer,$limit_field_type,($object->outstanding_limit != '' ? price($object->outstanding_limit) : ''));
//if (empty($object->outstanding_limit)) print $langs->trans("NoLimit");
print '</td>';
print '</tr>';
}
// Multiprice level
if (! empty($conf->global->PRODUIT_MULTIPRICES))
{
@ -399,7 +385,7 @@ if ($id > 0)
print '<a href="'.DOL_URL_ROOT.'/comm/multiprix.php?id='.$object->id.'">'.img_edit($langs->trans("Modify")).'</a>';
}
print '</td></tr></table>';
print '</td><td colspan="3">';
print '</td><td>';
print $object->price_level;
$keyforlabel='PRODUIT_MULTIPRICES_LABEL'.$object->price_level;
if (! empty($conf->global->$keyforlabel)) print ' - '.$langs->trans($conf->global->$keyforlabel);
@ -407,36 +393,6 @@ if ($id > 0)
print '</tr>';
}
if ($object->client == 2 || $object->client == 3)
{
// Level of prospect
print '<tr><td class="nowrap">';
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
print $langs->trans('ProspectLevel');
print '<td>';
if ($action != 'editlevel' && $user->rights->societe->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editlevel&amp;socid='.$object->id.'">'.img_edit($langs->trans('Modify'),1).'</a></td>';
print '</tr></table>';
print '</td><td colspan="3">';
if ($action == 'editlevel')
$formcompany->form_prospect_level($_SERVER['PHP_SELF'].'?socid='.$object->id,$object->fk_prospectlevel,'prospect_level_id',1);
else
print $object->getLibProspLevel();
print "</td>";
print '</tr>';
// Status
$object->loadCacheOfProspStatus();
print '<tr><td>'.$langs->trans("StatusProsp").'</td><td colspan="3">'.$object->getLibProspCommStatut(4, $object->cacheprospectstatus[$object->stcomm_id]['label']);
print ' &nbsp; &nbsp; <div class="floatright">';
foreach($object->cacheprospectstatus as $key => $val)
{
$titlealt='default';
if (! empty($val['code']) && ! in_array($val['code'], array('ST_NO', 'ST_NEVER', 'ST_TODO', 'ST_PEND', 'ST_DONE'))) $titlealt=$val['label'];
if ($object->stcomm_id != $val['id']) print '<a class="pictosubstatus" href="'.$_SERVER["PHP_SELF"].'?socid='.$object->id.'&stcomm='.$val['code'].'&action=setstcomm">'.img_action($titlealt,$val['code']).'</a>';
}
print '</div></td></tr>';
}
// Preferred shipping Method
if (! empty($conf->global->SOCIETE_ASK_FOR_SHIPPING_METHOD)) {
print '<tr><td class="nowrap">';
@ -445,7 +401,7 @@ if ($id > 0)
print '<td>';
if (($action != 'editshipping') && $user->rights->societe->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editshipping&amp;socid='.$object->id.'">'.img_edit($langs->trans('SetMode'),1).'</a></td>';
print '</tr></table>';
print '</td><td colspan="3">';
print '</td><td>';
if ($action == 'editshipping')
{
$form->formSelectShippingMethod($_SERVER['PHP_SELF'].'?socid='.$object->id,$object->shipping_method_id,'shipping_method_id');
@ -462,7 +418,7 @@ if ($id > 0)
if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) {
$langs->load("categories");
print '<tr><td>' . $langs->trans("CustomersCategoriesShort") . '</td>';
print '<td colspan="3">';
print '<td>';
print $form->showCategories( $object->id, 'customer', 1 );
print "</td></tr>";
}
@ -484,8 +440,8 @@ if ($id > 0)
{
$langs->load("members");
$langs->load("users");
print '<tr><td width="25%">'.$langs->trans("LinkedToDolibarrMember").'</td>';
print '<td colspan="3">';
print '<tr><td>'.$langs->trans("LinkedToDolibarrMember").'</td>';
print '<td>';
$adh=new Adherent($db);
$result=$adh->fetch('','',$object->id);
if ($result > 0)
@ -503,12 +459,47 @@ if ($id > 0)
print "</table>";
print '<br>';
print '<div class="underbanner clearboth"></div>';
print '<table class="border" width="100%">';
if ($object->client == 2 || $object->client == 3)
{
// Level of prospect
print '<tr><td class="titlefield nowrap">';
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
print $langs->trans('ProspectLevel');
print '<td>';
if ($action != 'editlevel' && $user->rights->societe->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editlevel&amp;socid='.$object->id.'">'.img_edit($langs->trans('Modify'),1).'</a></td>';
print '</tr></table>';
print '</td><td>';
if ($action == 'editlevel')
$formcompany->form_prospect_level($_SERVER['PHP_SELF'].'?socid='.$object->id,$object->fk_prospectlevel,'prospect_level_id',1);
else
print $object->getLibProspLevel();
print "</td>";
print '</tr>';
// Status
$object->loadCacheOfProspStatus();
print '<tr><td>'.$langs->trans("StatusProsp").'</td><td colspan="3">'.$object->getLibProspCommStatut(4, $object->cacheprospectstatus[$object->stcomm_id]['label']);
print ' &nbsp; &nbsp; <div class="floatright">';
foreach($object->cacheprospectstatus as $key => $val)
{
$titlealt='default';
if (! empty($val['code']) && ! in_array($val['code'], array('ST_NO', 'ST_NEVER', 'ST_TODO', 'ST_PEND', 'ST_DONE'))) $titlealt=$val['label'];
if ($object->stcomm_id != $val['id']) print '<a class="pictosubstatus" href="'.$_SERVER["PHP_SELF"].'?socid='.$object->id.'&stcomm='.$val['code'].'&action=setstcomm">'.img_action($titlealt,$val['code']).'</a>';
}
print '</div></td></tr>';
}
print "</table>";
print '</div><div class="fichehalfright"><div class="ficheaddleft">';
// Nbre max d'elements des petites listes
$MAXLIST=$conf->global->MAIN_SIZE_SHORTLISTE_LIMIT;
$MAXLIST=$conf->global->MAIN_SIZE_SHORTLIST_LIMIT;
// Lien recap
$outstandingBills = $object->get_OutstandingBill();
@ -519,14 +510,33 @@ if ($id > 0)
}
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Summary").'</td>';
print '<td align="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/compta/recap-compta.php?socid='.$object->id.'">'.$langs->trans("ShowCustomerPreview").'</a></td>';
print '</tr>';
print '<tr class="impair">';
// Max outstanding bill
if ($object->client)
{
print '<tr class="impair">';
print '<td>';
print $form->editfieldkey("OutstandingBill",'outstanding_limit',$object->outstanding_limit,$object,$user->rights->societe->creer);
print '</td><td>';
$limit_field_type = (! empty($conf->global->MAIN_USE_JQUERY_JEDITABLE)) ? 'numeric' : 'amount';
print $form->editfieldval("OutstandingBill",'outstanding_limit',$object->outstanding_limit,$object,$user->rights->societe->creer,$limit_field_type,($object->outstanding_limit != '' ? price($object->outstanding_limit) : ''));
//if (empty($object->outstanding_limit)) print $langs->trans("NoLimit");
print '</td>';
print '</tr>';
}
// Outstanding bill
print '<tr class="pair">';
print '<td>'.$langs->trans("CurrentOutstandingBill").'</td>';
print '<td align="right">'.price($outstandingBills).$warn.'</td>';
print '<td>'.price($outstandingBills).$warn.'</td>';
print '</tr>';
print '</table>';
print '<br>';

View File

@ -2340,8 +2340,6 @@ if ($action == 'create')
if ($action != 'presend')
{
print '<div class="fichecenter"><div class="fichehalfleft">';
// print '<table width="100%"><tr><td width="50%" valign="top">';
// print '<a name="builddoc"></a>'; // ancre
/*
* Documents generes
@ -2354,7 +2352,7 @@ if ($action == 'create')
$var = true;
$somethingshown = $formfile->show_documents('propal', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang);
print $formfile->showdocuments('propal', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang);
// Show links to link elements
$linktoelem = $form->showLinkToObjectBlock($object, null, array('propal'));
@ -2362,14 +2360,12 @@ if ($action == 'create')
print '</div><div class="fichehalfright"><div class="ficheaddleft">';
// print '</td><td valign="top" width="50%">';
// List of actions on element
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
$formactions = new FormActions($db);
$somethingshown = $formactions->showactions($object, 'propal', $socid);
// print '</td></tr></table>';
print '</div></div></div>';
}

View File

@ -2563,7 +2563,7 @@ if ($action == 'create' && $user->rights->commande->creer)
$urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id;
$genallowed = $user->rights->commande->creer;
$delallowed = $user->rights->commande->supprimer;
$somethingshown = $formfile->show_documents('commande', $comref, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang);
print $formfile->showdocuments('commande', $comref, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang);
// Show links to link elements

View File

@ -801,7 +801,7 @@ if ($action != 'new')
$filedir=$dir.get_exdir($object->ref,0,1,0,$object,'cheque') . dol_sanitizeFileName($object->ref);
$urlsource=$_SERVER["PHP_SELF"]."?id=".$object->id;
$formfile->show_documents('remisecheque', $filename, $filedir, $urlsource, 1, 1);
print $formfile->showdocuments('remisecheque', $filename, $filedir, $urlsource, 1, 1);
print '<br>';
}

View File

@ -54,7 +54,6 @@ $confirm = GETPOST('confirm','alpha');
$backtopage = GETPOST('backtopage','alpha');
$id = GETPOST('id','int');
$socid = GETPOST('socid','int');
if ($user->societe_id) $socid=$user->societe_id;
$object = new Contact($db);
$extrafields = new ExtraFields($db);
@ -74,6 +73,7 @@ if (! empty($canvas))
}
// Security check
if ($user->societe_id) $socid=$user->societe_id;
$result = restrictedArea($user, 'contact', $id, 'socpeople&societe', '', '', 'rowid', $objcanvas); // If we create a contact with no company (shared contacts), no check on write permission
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array

View File

@ -37,9 +37,22 @@ $id = GETPOST('id','int');
$action = GETPOST("action");
$confirm = GETPOST('confirm', 'alpha');
$object = new Contact($db);
// Get object canvas (By default, this is not defined, so standard usage of dolibarr)
$object->getCanvas($id);
$objcanvas=null;
$canvas = (! empty($object->canvas)?$object->canvas:GETPOST("canvas"));
if (! empty($canvas))
{
require_once DOL_DOCUMENT_ROOT.'/core/class/canvas.class.php';
$objcanvas = new Canvas($db, $action);
$objcanvas->getCanvas('contact', 'contactcard', $canvas);
}
// Security check
if ($user->societe_id) $socid=$user->societe_id;
$result = restrictedArea($user, 'contact', $id, '','');
$result = restrictedArea($user, 'contact', $id, 'socpeople&societe', '', '', 'rowid', $objcanvas); // If we create a contact with no company (shared contacts), no check on write permission
// Get parameters
$sortfield = GETPOST("sortfield",'alpha');
@ -54,7 +67,6 @@ $pagenext = $page + 1;
if (! $sortorder) $sortorder="ASC";
if (! $sortfield) $sortfield="name";
$object = new Contact($db);
if ($id > 0) $object->fetch($id);
$upload_dir = $conf->societe->dir_output.'/contact/'.dol_sanitizeFileName($object->ref);

View File

@ -2038,7 +2038,7 @@ else
$var = true;
$somethingshown = $formfile->show_documents('contract', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang);
print $formfile->showdocuments('contract', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang);
// Show links to link elements

View File

@ -1615,9 +1615,11 @@ class Form
* @param int $hidelabel Hide label (0=no, 1=yes, 2=show search icon (before) and placeholder, 3 search icon after)
* @param array $ajaxoptions Options for ajax_autocompleter
* @param int $socid Thirdparty Id (to get also price dedicated to this customer)
* @param string $showempty '' to not show empty line. Translation key to show an empty line. '1' show empty line with no text.
* @param int $forcecombo Force to use combo box
* @return void
*/
function select_produits($selected='', $htmlname='productid', $filtertype='', $limit=20, $price_level=0, $status=1, $finished=2, $selected_input_value='', $hidelabel=0, $ajaxoptions=array(), $socid=0)
function select_produits($selected='', $htmlname='productid', $filtertype='', $limit=20, $price_level=0, $status=1, $finished=2, $selected_input_value='', $hidelabel=0, $ajaxoptions=array(), $socid=0, $showempty='1', $forcecombo=0)
{
global $langs,$conf;
@ -1650,14 +1652,14 @@ class Form
print img_picto($langs->trans("Search"), 'search');
}
}
print '<input type="text" size="20" name="search_'.$htmlname.'" id="search_'.$htmlname.'" value="'.$selected_input_value.'"'.$placeholder.' '.(!empty($conf->global->PRODUCT_SEARCH_AUTOFOCUS) ? 'autofocus' : '').' />';
print '<input type="text" class="minwidth100" name="search_'.$htmlname.'" id="search_'.$htmlname.'" value="'.$selected_input_value.'"'.$placeholder.' '.(!empty($conf->global->PRODUCT_SEARCH_AUTOFOCUS) ? 'autofocus' : '').' />';
if ($hidelabel == 3) {
print img_picto($langs->trans("Search"), 'search');
}
}
else
{
print $this->select_produits_list($selected,$htmlname,$filtertype,$limit,$price_level,'',$status,$finished,0,$socid);
print $this->select_produits_list($selected,$htmlname,$filtertype,$limit,$price_level,'',$status,$finished,0,$socid,$showempty,$forcecombo);
}
}
@ -1674,9 +1676,11 @@ class Form
* @param int $finished Filter on finished field: 2=No filter
* @param int $outputmode 0=HTML select string, 1=Array
* @param int $socid Thirdparty Id (to get also price dedicated to this customer)
* @param string $showempty '' to not show empty line. Translation key to show an empty line. '1' show empty line with no text.
* @param int $forcecombo Force to use combo box
* @return array Array of keys for json
*/
function select_produits_list($selected='',$htmlname='productid',$filtertype='',$limit=20,$price_level=0,$filterkey='',$status=1,$finished=2,$outputmode=0,$socid=0)
function select_produits_list($selected='',$htmlname='productid',$filtertype='',$limit=20,$price_level=0,$filterkey='',$status=1,$finished=2,$outputmode=0,$socid=0,$showempty='1',$forcecombo=0)
{
global $langs,$conf,$user,$db;
@ -1767,8 +1771,27 @@ class Form
require_once DOL_DOCUMENT_ROOT.'/product/dynamic_price/class/price_parser.class.php';
$num = $this->db->num_rows($result);
$out.='<select class="flat" name="'.$htmlname.'" id="'.$htmlname.'">';
$out.='<option value="0" selected>&nbsp;</option>';
$events=null;
if ($conf->use_javascript_ajax && ! $forcecombo)
{
include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
$comboenhancement =ajax_combobox($htmlname, $events, $conf->global->PRODUIT_USE_SEARCH_TO_SELECT);
$out.= $comboenhancement;
$nodatarole=($comboenhancement?' data-role="none"':'');
}
$out.='<select class="flat" name="'.$htmlname.'" id="'.$htmlname.'"'.$nodatarole.'>';
$textifempty='';
// Do not use textifempty = ' ' or '&nbsp;' here, or search on key will search on ' key'.
//if (! empty($conf->use_javascript_ajax) || $forcecombo) $textifempty='';
if (! empty($conf->global->PRODUIT_USE_SEARCH_TO_SELECT))
{
if ($showempty && ! is_numeric($showempty)) $textifempty=$langs->trans($showempty);
else $textifempty.=$langs->trans("All");
}
if ($showempty) $out.='<option value="0" selected>'.$textifempty.'</option>';
$i = 0;
while ($num && $i < $num)
@ -3274,7 +3297,7 @@ class Form
* @param string $selectedchoice "" or "no" or "yes"
* @param int $useajax 0=No, 1=Yes, 2=Yes but submit page with &confirm=no if choice is No, 'xxx'=Yes and preoutput confirm box with div id=dialog-confirm-xxx
* @param int $height Force height of box
* @param int $width Force width of bow
* @param int $width Force width of box ('999' or '90%'). Ignored and forced to 90% on smartphones.
* @return string HTML ajax code if a confirm ajax popup is required, Pure HTML code if it's an html form
*/
function formconfirm($page, $title, $question, $action, $formquestion='', $selectedchoice="", $useajax=0, $height=200, $width=500)
@ -3289,7 +3312,8 @@ class Form
// Clean parameters
$newselectedchoice=empty($selectedchoice)?"no":$selectedchoice;
if ($conf->browser->layout == 'phone') $width='95%';
if (is_array($formquestion) && ! empty($formquestion))
{
// First add hidden fields and value
@ -4517,7 +4541,7 @@ class Form
}
}
if ($d && $h) $retstring.='&nbsp;';
if ($d && $h) $retstring.=($h==2?'<br>':' ');
if ($h)
{
@ -4684,7 +4708,7 @@ class Form
}
elseif ($typehour=='text')
{
$retstring.='<input type="text" size="2" name="'.$prefix.'hour"'.($disabled?' disabled':'').' class="flat" value="'.($hourSelected?((int) $hourSelected):'').'">';
$retstring.='<input type="text" size="1" name="'.$prefix.'hour"'.($disabled?' disabled':'').' class="flat" value="'.($hourSelected?((int) $hourSelected):'').'">';
}
else return 'BadValueForParameterTypeHour';
@ -4707,7 +4731,7 @@ class Form
}
elseif ($typehour=='text')
{
$retstring.='<input type="text" size="2" name="'.$prefix.'min"'.($disabled?' disabled':'').' class="flat" value="'.($minSelected?((int) $minSelected):'').'">';
$retstring.='<input type="text" size="1" name="'.$prefix.'min"'.($disabled?' disabled':'').' class="flat" value="'.($minSelected?((int) $minSelected):'').'">';
}
$retstring.=' '.$langs->trans('MinuteShort');
$retstring.="&nbsp;";
@ -5523,7 +5547,11 @@ class Form
//print "xx".$previous_ref."x".$next_ref;
$ret.='<div style="vertical-align: middle">';
if ($morehtmlleft) $ret.='<div class="inline-block floatleft">'.$morehtmlleft.'</div>';
if ($morehtmlleft)
{
if ($conf->browser->layout == 'phone') $ret.='<div class="center">'.$morehtmlleft.'</div>';
else $ret.='<div class="inline-block floatleft">'.$morehtmlleft.'</div>';
}
$ret.='<div class="inline-block floatleft valignmiddle refid'.(($shownav && ($previous_ref || $next_ref))?' refidpadding':'').'">';
@ -5727,7 +5755,10 @@ class Form
}
else
{
$ret.='<img class="photo'.$modulepart.($cssclass?' '.$cssclass:'').'" alt="No photo" border="0"'.($width?' width="'.$width.'"':'').($height?' height="'.$height.'"':'').' src="'.DOL_URL_ROOT.$nophoto.'">';
if ($conf->browser->layout != 'phone')
{
$ret.='<img class="photo'.$modulepart.($cssclass?' '.$cssclass:'').'" alt="No photo" border="0"'.($width?' width="'.$width.'"':'').($height?' height="'.$height.'"':'').' src="'.DOL_URL_ROOT.$nophoto.'">';
}
}
}

View File

@ -1454,13 +1454,16 @@ class FormFile
global $langs, $conf;
$out='';
$urladvancedpreview=getAdvancedPreviewUrl($modulepart, $relativepath);
if ($urladvancedpreview)
if ($conf->browser->layout != 'phone')
{
$out.= '<a data-ajax="false" class="pictopreview" href="'.$urladvancedpreview.'">';
if (empty($ruleforpicto)) $out.= img_picto($langs->trans('Preview').' '.$file['name'], 'detail');
else $out.= img_mime($relativepath, $langs->trans('Preview').' '.$file['name']);
$out.= '</a>';
$urladvancedpreview=getAdvancedPreviewUrl($modulepart, $relativepath); // Return if a file is qualified for preview
if ($urladvancedpreview)
{
$out.= '<a data-ajax="false" class="pictopreview" href="'.$urladvancedpreview.'">';
if (empty($ruleforpicto)) $out.= img_picto($langs->trans('Preview').' '.$file['name'], 'detail');
else $out.= img_mime($relativepath, $langs->trans('Preview').' '.$file['name']);
$out.= '</a>';
}
}
return $out;
}

View File

@ -944,7 +944,6 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
if ($object->element == 'user') $modulepart='userphoto';
if ($object->element == 'product') $modulepart='product';
print '<div class="'.($onlybanner?'':'arearef ').'heightref valignmiddle" width="100%">';
if ($object->element == 'product')
{
$width=80; $cssclass='photoref';
@ -958,7 +957,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
$nophoto='';
$morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref"></div>';
}
else {
elseif ($conf->browser->layout != 'phone') { // Show no photo link
$nophoto='/public/theme/common/nophoto.png';
$morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref"><img class="photo'.$modulepart.($cssclass?' '.$cssclass:'').'" alt="No photo" border="0"'.($width?' width="'.$width.'"':'').($height?' height="'.$height.'"':'').' src="'.DOL_URL_ROOT.$nophoto.'"></div>';
}
@ -969,21 +968,33 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
{
if ($showimage)
{
$morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">';
if ($modulepart != 'unknown') $morehtmlleft.=$form->showphoto($modulepart,$object,0,0,0,'photoref','small',1,0,$maxvisiblephotos);
else if ($object->element == 'action')
if ($modulepart != 'unknown')
{
$cssclass='photorefcenter';
$nophoto=img_picto('', 'title_agenda', '', false, 1);
$morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref"><div class="photoref"><img class="photo'.$modulepart.($cssclass?' '.$cssclass:'').'" alt="No photo" border="0"'.($width?' width="'.$width.'"':'').($height?' height="'.$height.'"':'').' src="'.$nophoto.'"></div></div>';
$phototoshow = $form->showphoto($modulepart,$object,0,0,0,'photoref','small',1,0,$maxvisiblephotos);
if ($phototoshow)
{
$morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">';
$morehtmlleft.=$phototoshow;
$morehtmlleft.='</div>';
}
}
else
elseif ($conf->browser->layout != 'phone') // Show no photo link
{
$width=14; $cssclass='photorefcenter';
$nophoto=img_picto('', 'object_'.$object->picto, '', false, 1);
$morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref"><div class="photoref"><img class="photo'.$modulepart.($cssclass?' '.$cssclass:'').'" alt="No photo" border="0"'.($width?' width="'.$width.'"':'').($height?' height="'.$height.'"':'').' src="'.$nophoto.'"></div></div>';
$morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">';
if ($object->element == 'action')
{
$cssclass='photorefcenter';
$nophoto=img_picto('', 'title_agenda', '', false, 1);
$morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref"><div class="photoref"><img class="photo'.$modulepart.($cssclass?' '.$cssclass:'').'" alt="No photo" border="0"'.($width?' width="'.$width.'"':'').($height?' height="'.$height.'"':'').' src="'.$nophoto.'"></div></div>';
}
else
{
$width=14; $cssclass='photorefcenter';
$nophoto=img_picto('', 'object_'.$object->picto, '', false, 1);
$morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref"><div class="photoref"><img class="photo'.$modulepart.($cssclass?' '.$cssclass:'').'" alt="No photo" border="0"'.($width?' width="'.$width.'"':'').($height?' height="'.$height.'"':'').' src="'.$nophoto.'"></div></div>';
}
$morehtmlleft.='</div>';
}
$morehtmlleft.='</div>';
}
}
if ($showbarcode) $morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">'.$form->showbarcode($object).'</div>';
@ -1035,6 +1046,8 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
$morehtmlref.=$langs->trans("TechnicalID").': '.$object->id;
$morehtmlref.='</div>';
}
print '<div class="'.($onlybanner?'':'arearef ').'heightref valignmiddle" width="100%">';
print $form->showrefnav($object, $paramid, $morehtml, $shownav, $fieldid, $fieldref, $morehtmlref, $moreparam, $nodbprefix, $morehtmlleft, $morehtmlright);
print '</div>';
print '<div class="underrefbanner clearboth"></div>';

View File

@ -406,14 +406,14 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
// Title of task
print "<td>";
if ($showlineingray) print '<i>';
else print '<a href="'.DOL_URL_ROOT.'/projet/tasks/task.php?id='.$lines[$i]->id.'&withproject=1">';
//else print '<a href="'.DOL_URL_ROOT.'/projet/tasks/task.php?id='.$lines[$i]->id.'&withproject=1">';
for ($k = 0 ; $k < $level ; $k++)
{
print "&nbsp; &nbsp; &nbsp;";
}
print $lines[$i]->label;
if ($showlineingray) print '</i>';
else print '</a>';
//else print '</a>';
print "</td>\n";
// Date start
@ -840,7 +840,7 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$
{
// Thirdparty
print '<td class="nowrap">';
$thirdpartystatic->id=$lines[$i]->socid;
$thirdpartystatic->id=$lines[$i]->thirdparty_id;
$thirdpartystatic->name=$lines[$i]->thirdparty_name;
print $thirdpartystatic->getNomUrl(1, 'project', 10);
print '</td>';

View File

@ -33,7 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php';
*/
function shipping_prepare_head($object)
{
global $langs, $conf, $user;
global $db, $langs, $conf, $user;
$langs->load("sendings");
$langs->load("deliveries");
@ -64,7 +64,13 @@ function shipping_prepare_head($object)
if (empty($conf->global->MAIN_DISABLE_CONTACTS_TAB))
{
$nbContact = count($object->liste_contact(-1,'internal')) + count($object->liste_contact(-1,'external'));
$objectsrc = $object;
if ($object->origin == 'commande' && $object->origin_id > 0)
{
$objectsrc = new Commande($db);
$objectsrc->fetch($object->origin_id);
}
$nbContact = count($objectsrc->liste_contact(-1,'internal')) + count($objectsrc->liste_contact(-1,'external'));
$head[$h][0] = DOL_URL_ROOT."/expedition/contact.php?id=".$object->id;
$head[$h][1] = $langs->trans("ContactsAddresses");
if ($nbContact > 0) $head[$h][1].= ' <span class="badge">'.$nbContact.'</span>';

View File

@ -805,7 +805,7 @@ if (! empty($id) && $action != 'edit')
print "</div>";
print '<table width="100%"><tr><td width="50%" valign="top">';
print '<div class="fichecenter"><div class="fichehalfleft">';
/*
* Documents generes
@ -818,13 +818,11 @@ if (! empty($id) && $action != 'edit')
$var=true;
print '<br>';
$formfile->show_documents('donation',$filename,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf);
print '</td><td>&nbsp;</td>';
print '</tr></table>';
print $formfile->showdocuments('donation',$filename,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf);
print '</div><div class="fichehalfright"><div class="ficheaddleft">';
print '</div></div></div>';
}
llxFooter();

View File

@ -1295,7 +1295,7 @@ else if ($id || $ref)
$totalVolume=$tmparray['volume'];
// Warehouse card
// Shipment card
$linkback = '<a href="'.DOL_URL_ROOT.'/expedition/list.php">'.$langs->trans("BackToList").'</a>';
$morehtmlref='<div class="refidno">';
@ -1348,18 +1348,6 @@ else if ($id || $ref)
print '<table class="border" width="100%">';
// Ref
/*
print '<tr><td width="20%">'.$langs->trans("Ref").'</td>';
print '<td colspan="3">';
print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref');
print '</td></tr>';
// Customer
print '<tr><td width="20%">'.$langs->trans("Customer").'</td>';
print '<td colspan="3">'.$soc->getNomUrl(1).'</td>';
print "</tr>";*/
// Linked documents
if ($typeobject == 'commande' && $object->$typeobject->id && ! empty($conf->commande->enabled))
{
@ -1909,7 +1897,7 @@ else if ($id || $ref)
$genallowed=$user->rights->expedition->lire;
$delallowed=$user->rights->expedition->supprimer;
$somethingshown=$formfile->show_documents('expedition',$objectref,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf,1,0,0,28,0,'','','',$soc->default_lang);
print $formfile->showdocuments('expedition',$objectref,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf,1,0,0,28,0,'','','',$soc->default_lang);
// Show links to link elements

View File

@ -155,83 +155,99 @@ if ($id > 0 || ! empty($ref))
dol_fiche_head($head, 'contact', $langs->trans("Shipment"), 0, 'sending');
/*
* Facture synthese pour rappel
*/
print '<table class="border" width="100%">';
// Shipment card
$linkback = '<a href="'.DOL_URL_ROOT.'/expedition/list.php">'.$langs->trans("BackToList").'</a>';
$morehtmlref='<div class="refidno">';
// Ref customer shipment
$morehtmlref.=$form->editfieldkey("RefCustomer", '', $object->ref_customer, $object, $user->rights->expedition->creer, 'string', '', 0, 1);
$morehtmlref.=$form->editfieldval("RefCustomer", '', $object->ref_customer, $object, $user->rights->expedition->creer, 'string', '', null, null, '', 1);
// Thirdparty
$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1);
// Project
/*
if (! empty($conf->projet->enabled)) {
$langs->load("projects");
$morehtmlref .= '<br>' . $langs->trans('Project') . ' ';
if ($user->rights->supplier_proposal->creer) {
if ($action != 'classify') {
$morehtmlref .= '<a href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
}
if ($action == 'classify') {
// $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
$morehtmlref .= '<form method="post" action="' . $_SERVER['PHP_SELF'] . '?id=' . $object->id . '">';
$morehtmlref .= '<input type="hidden" name="action" value="classin">';
$morehtmlref .= '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
$morehtmlref .= $formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1);
$morehtmlref .= '<input type="submit" class="button" value="' . $langs->trans("Modify") . '">';
$morehtmlref .= '</form>';
} else {
$morehtmlref .= $form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1);
}
} else {
if (! empty($object->fk_project)) {
$proj = new Project($db);
$proj->fetch($object->fk_project);
$morehtmlref .= '<a href="' . DOL_URL_ROOT . '/projet/card.php?id=' . $object->fk_project . '" title="' . $langs->trans('ShowProject') . '">';
$morehtmlref .= $proj->ref;
$morehtmlref .= '</a>';
} else {
$morehtmlref .= '';
}
}
}*/
$morehtmlref.='</div>';
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
print '<div class="fichecenter">';
//print '<div class="fichehalfleft">';
print '<div class="underbanner clearboth"></div>';
// Ref
print '<tr><td width="18%">'.$langs->trans("Ref").'</td><td colspan="3">';
print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref');
print "</td></tr>";
print '<table class="border centpercent">';
// Customer
print '<tr><td width="20%">'.$langs->trans("Customer").'</td>';
print '<td colspan="3">'.$object->thirdparty->getNomUrl(1).'</td>';
print "</tr>";
// Linked documents
// Linked documents
if ($typeobject == 'commande' && $object->$typeobject->id && ! empty($conf->commande->enabled))
{
print '<tr><td>';
$objectsrc=new Commande($db);
$objectsrc->fetch($object->$typeobject->id);
print $langs->trans("RefOrder").'</td>';
print '<td colspan="3">';
print $objectsrc->getNomUrl(1,'commande');
print "</td>\n";
print '</tr>';
print '<tr><td class="titlefield">';
$objectsrc=new Commande($db);
$objectsrc->fetch($object->$typeobject->id);
print $langs->trans("RefOrder").'</td>';
print '<td colspan="3">';
print $objectsrc->getNomUrl(1,'commande');
print "</td>\n";
print '</tr>';
}
if ($typeobject == 'propal' && $object->$typeobject->id && ! empty($conf->propal->enabled))
{
print '<tr><td>';
$objectsrc=new Propal($db);
$objectsrc->fetch($object->$typeobject->id);
print $langs->trans("RefProposal").'</td>';
print '<td colspan="3">';
print $objectsrc->getNomUrl(1,'expedition');
print "</td>\n";
print '</tr>';
print '<tr><td class="titlefield">';
$objectsrc=new Propal($db);
$objectsrc->fetch($object->$typeobject->id);
print $langs->trans("RefProposal").'</td>';
print '<td colspan="3">';
print $objectsrc->getNomUrl(1,'expedition');
print "</td>\n";
print '</tr>';
}
// Ref expedition client
print '<tr><td>';
print '<table class="nobordernopadding" width="100%"><tr><td class="nowrap">';
print $langs->trans('RefCustomer').'</td><td align="left">';
print '</td>';
print '</tr></table>';
print '</td><td colspan="3">';
print $objectsrc->ref_client;
print '</td>';
print '</tr>';
// Delivery address
if (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT))
{
print '<tr><td>';
print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('DeliveryAddress');
print '</td>';
if ($action != 'editdelivery_address' && $object->brouillon) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editdelivery_address&amp;socid='.$object->socid.'&amp;id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetDeliveryAddress'),1).'</a></td>';
print '</tr></table>';
print '</td><td colspan="3">';
if ($action == 'editdelivery_address')
{
$formother->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,$object->socid,'fk_address','shipping',$object->id);
}
else
{
$formother->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,$object->socid,'none','shipping',$object->id);
}
print '</td></tr>';
}
print "</table>";
//print '</div>';
//print '<div class="fichehalfright">';
//print '<div class="ficheaddleft">';
//print '<div class="underbanner clearboth"></div>';
//print '</div>';
//print '</div>';
print '</div>';
print '<div class="clearboth"></div>';
dol_fiche_end();
// Lignes de contacts

View File

@ -20,9 +20,9 @@
/**
* \file htdocs/expedition/note.php
* \ingroup expedition
* \brief Note card expedition
*/
* \ingroup expedition
* \brief Note card expedition
*/
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php';
@ -99,65 +99,57 @@ if ($id > 0 || ! empty($ref))
$head=shipping_prepare_head($object);
dol_fiche_head($head, 'note', $langs->trans("Shipment"), 0, 'sending');
print '<table class="border" width="100%">';
$linkback = '<a href="'.DOL_URL_ROOT.'/expedition/list.php">'.$langs->trans("BackToList").'</a>';
// Ref
print '<tr><td width="20%">'.$langs->trans("Ref").'</td>';
print '<td colspan="3">';
print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref');
print '</td></tr>';
// Customer
print '<tr><td width="20%">'.$langs->trans("Customer").'</td>';
print '<td colspan="3">'.$soc->getNomUrl(1).'</td>';
print "</tr>";
// Linked documents
if ($typeobject == 'commande' && $object->$typeobject->id && ! empty($conf->commande->enabled))
{
print '<tr><td>';
$objectsrc=new Commande($db);
$objectsrc->fetch($object->$typeobject->id);
print $langs->trans("RefOrder").'</td>';
print '<td colspan="3">';
print $objectsrc->getNomUrl(1,'commande');
print "</td>\n";
print '</tr>';
}
if ($typeobject == 'propal' && $object->$typeobject->id && ! empty($conf->propal->enabled))
{
print '<tr><td>';
$objectsrc=new Propal($db);
$objectsrc->fetch($object->$typeobject->id);
print $langs->trans("RefProposal").'</td>';
print '<td colspan="3">';
print $objectsrc->getNomUrl(1,'expedition');
print "</td>\n";
print '</tr>';
}
// Ref customer
print '<tr><td>'.$langs->trans("RefCustomer").'</td>';
print '<td colspan="3">'.$object->ref_customer."</a></td>\n";
print '</tr>';
// Date creation
print '<tr><td>'.$langs->trans("DateCreation").'</td>';
print '<td colspan="3">'.dol_print_date($object->date_creation,"day")."</td>\n";
print '</tr>';
// Delivery date planed
print '<tr><td>'.$langs->trans("DateDeliveryPlanned").'</td>';
print '<td colspan="3">'.dol_print_date($object->date_delivery,"dayhourtext")."</td>\n";
print '</tr>';
print '</table>';
print '<br>';
$colwidth=20;
// Shipment card
$linkback = '<a href="'.DOL_URL_ROOT.'/expedition/list.php">'.$langs->trans("BackToList").'</a>';
$morehtmlref='<div class="refidno">';
// Ref customer shipment
$morehtmlref.=$form->editfieldkey("RefCustomer", '', $object->ref_customer, $object, $user->rights->expedition->creer, 'string', '', 0, 1);
$morehtmlref.=$form->editfieldval("RefCustomer", '', $object->ref_customer, $object, $user->rights->expedition->creer, 'string', '', null, null, '', 1);
// Thirdparty
$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1);
// Project
/*
if (! empty($conf->projet->enabled)) {
$langs->load("projects");
$morehtmlref .= '<br>' . $langs->trans('Project') . ' ';
if ($user->rights->supplier_proposal->creer) {
if ($action != 'classify') {
$morehtmlref .= '<a href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
}
if ($action == 'classify') {
// $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
$morehtmlref .= '<form method="post" action="' . $_SERVER['PHP_SELF'] . '?id=' . $object->id . '">';
$morehtmlref .= '<input type="hidden" name="action" value="classin">';
$morehtmlref .= '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
$morehtmlref .= $formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1);
$morehtmlref .= '<input type="submit" class="button" value="' . $langs->trans("Modify") . '">';
$morehtmlref .= '</form>';
} else {
$morehtmlref .= $form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1);
}
} else {
if (! empty($object->fk_project)) {
$proj = new Project($db);
$proj->fetch($object->fk_project);
$morehtmlref .= '<a href="' . DOL_URL_ROOT . '/projet/card.php?id=' . $object->fk_project . '" title="' . $langs->trans('ShowProject') . '">';
$morehtmlref .= $proj->ref;
$morehtmlref .= '</a>';
} else {
$morehtmlref .= '';
}
}
}*/
$morehtmlref.='</div>';
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
print '<div class="underbanner clearboth"></div>';
$cssclass='titlefield';
include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php';
dol_fiche_end();

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
*
* This program is free software; you can redistribute it and/or modify
@ -234,7 +234,8 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
// Show filter box
print '<form name="stats" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="mode" value="'.$mode.'">';
print '<table class="border" width="100%">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td class="liste_titre" colspan="2">'.$langs->trans("Filter").'</td></tr>';
// Company
print '<tr><td align="left">'.$langs->trans("ThirdParty").'</td><td align="left">';
@ -259,8 +260,8 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
print '<br><br>';
//}
print '<table class="border" width="100%">';
print '<tr height="24">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre" height="24">';
print '<td align="center">'.$langs->trans("Year").'</td>';
print '<td align="center">'.$langs->trans("NbOfSendings").'</td>';
/*print '<td align="center">'.$langs->trans("AmountTotal").'</td>';
@ -268,13 +269,16 @@ print '<td align="center">'.$langs->trans("AmountAverage").'</td>';*/
print '</tr>';
$oldyear=0;
$var=true;
foreach ($data as $val)
{
$year = $val['year'];
while (! empty($year) && $oldyear > $year+1)
{ // If we have empty year
$oldyear--;
print '<tr height="24">';
$var=!$var;
print '<tr '.$bc[$var].' height="24">';
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$oldyear.'&amp;mode='.$mode.'">'.$oldyear.'</a></td>';
print '<td align="right">0</td>';
@ -283,7 +287,8 @@ foreach ($data as $val)
print '</tr>';
}
print '<tr height="24">';
$var=!$var;
print '<tr '.$bc[$var].' height="24">';
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&amp;mode='.$mode.'">'.$year.'</a></td>';
print '<td align="right">'.$val['nb'].'</td>';
/*print '<td align="right">'.price(price2num($val['total'],'MT'),1).'</td>';

View File

@ -1170,6 +1170,7 @@ if ($step == 5 && $datatoexport)
print '</div>';
print '<table width="100%">';
if ($sqlusedforexport && $user->admin)
@ -1180,17 +1181,18 @@ if ($step == 5 && $datatoexport)
}
print '</table>';
print '<table width="100%"><tr><td width="50%">';
print '<div class="fichecenter"><div class="fichehalfleft">';
if (! is_dir($conf->export->dir_temp)) dol_mkdir($conf->export->dir_temp);
// Affiche liste des documents
// NB: La fonction show_documents rescanne les modules qd genallowed=1, sinon prend $liste
$formfile->show_documents('export','',$upload_dir,$_SERVER["PHP_SELF"].'?step=5&datatoexport='.$datatoexport,$liste,1,(! empty($_POST['model'])?$_POST['model']:'csv'),1,1);
print '</td><td width="50%">&nbsp;</td></tr>';
print '</table>';
print $formfile->showdocuments('export','',$upload_dir,$_SERVER["PHP_SELF"].'?step=5&datatoexport='.$datatoexport,$liste,1,(! empty($_POST['model'])?$_POST['model']:'csv'),1,1);
print '</div><div class="fichehalfright"><div class="ficheaddleft">';
print '</div></div></div>';
}
print '<br>';

View File

@ -1773,7 +1773,7 @@ else if ($id > 0 || ! empty($ref))
$var=true;
//print "<br>\n";
$somethingshown=$formfile->show_documents('ficheinter',$filename,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf,1,0,0,28,0,'','','',$soc->default_lang);
print $somethingshown=$formfile->showdocuments('ficheinter',$filename,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf,1,0,0,28,0,'','','',$soc->default_lang);
// Show links to link elements

View File

@ -280,7 +280,7 @@ if ($object->id > 0)
$var=true;
$MAXLIST=5;
$MAXLIST=$conf->global->MAIN_SIZE_SHORTLIST_LIMIT;
// Lien recap
print '<table class="noborder" width="100%">';

View File

@ -2030,24 +2030,6 @@ else
print '<table class="border" width="100%">';
// Ref
/*
print '<tr><td class="titlefield nowrap">'.$langs->trans("Ref").'</td><td colspan="4">';
print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref');
print '</td>';
print "</tr>\n";
// Ref supplier
print '<tr><td>'.$form->editfieldkey("RefSupplier",'ref_supplier',$object->ref_supplier,$object,($object->statut<FactureFournisseur::STATUS_CLOSED && $user->rights->fournisseur->facture->creer)).'</td><td colspan="4">';
print $form->editfieldval("RefSupplier",'ref_supplier',$object->ref_supplier,$object,($object->statut<FactureFournisseur::STATUS_CLOSED && $user->rights->fournisseur->facture->creer));
print '</td></tr>';
// Third party
print '<tr><td>'.$langs->trans('Supplier').'</td><td colspan="4">'.$societe->getNomUrl(1,'supplier');
print ' &nbsp; (<a href="'.DOL_URL_ROOT.'/fourn/facture/list.php?socid='.$object->socid.'">'.$langs->trans('OtherBills').'</a>)</td>';
print '</tr>';
*/
// Type
print '<tr><td class="titlefield">'.$langs->trans('Type').'</td><td>';
print $object->getLibType();

View File

@ -435,7 +435,7 @@ if ($resql)
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<input type="hidden" name="viewstatut" value="'.$viewstatut.'">';
print_barre_liste($langs->trans("BillsSuppliers").($socid?" $soc->name.":""),$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords,'title_accountancy',0,'','',$limit);
print_barre_liste($langs->trans("BillsSuppliers").($socid?" - $soc->name":""),$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords,'title_accountancy',0,'','',$limit);
if ($search_all)
{

View File

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
*
* This program is free software; you can redistribute it and/or modify
@ -37,7 +37,12 @@ $lastftpentry=0;
$action = GETPOST('action','alpha');
$entry = GETPOST('numero_entry','alpha');
// Positionne la variable pour le nombre de rss externes
/*
* Action
*/
// Get value for $lastftpentry
$sql ="select MAX(name) as name from ".MAIN_DB_PREFIX."const";
$sql.=" WHERE name like 'FTP_SERVER_%'";
$result=$db->query($sql);
@ -210,8 +215,6 @@ else
<?php
print '<table class="noborder" width="100%">'."\n";
$sql ="select name, value, note from ".MAIN_DB_PREFIX."const";
$sql.=" WHERE name like 'FTP_SERVER_%'";
$sql.=" ORDER BY name";
@ -235,9 +238,13 @@ else
print "<form name=\"externalrssconfig\" action=\"".$_SERVER["PHP_SELF"]."\" method=\"post\">";
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="numero_entry" value="'.$idrss.'">';
print '<table class="noborder" width="100%">'."\n";
print "<tr class=\"liste_titre\">";
print "<td colspan=\"2\">".$langs->trans("FTP")." ".($idrss)."</td>";
print '<tr class="liste_titre">';
print '<td class="fieldtitle">'.$langs->trans("FTP")." ".($idrss)."</td>";
print '<td></td>';
print "</tr>";
$var=!$var;
@ -281,12 +288,14 @@ else
print "<input type=\"submit\" class=\"button\" name=\"modify\" value=\"".$langs->trans("Modify")."\">";
print " &nbsp; ";
print "<input type=\"submit\" class=\"button\" name=\"delete\" value=\"".$langs->trans("Delete")."\">";
print "<input type=\"hidden\" name=\"numero_entry\" value=\"".$idrss."\">";
print "</td>";
print "</tr>";
print '</table>';
print "</form>";
print '<br>';
$i++;
}
}
@ -294,9 +303,6 @@ else
{
dol_print_error($db);
}
print '</table>';
}
llxFooter();

View File

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2008-2009 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2008-2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2008-2009 Regis Houssin <regis.houssin@capnetworks.com>
*
* This program is free software; you can redistribute it and/or modify
@ -20,7 +20,6 @@
* \file htdocs/ftp/index.php
* \ingroup ftp
* \brief Main page for FTP section area
* \author Laurent Destailleur
*/
require('../main.inc.php');
@ -418,7 +417,6 @@ else
if ($action == 'delete_section')
{
print $form->formconfirm($_SERVER["PHP_SELF"].'?numero_ftp='.$numero_ftp.'&section='.urlencode($_REQUEST["section"]).'&file='.urlencode($_GET["file"]), $langs->trans('DeleteSection'), $langs->trans('ConfirmDeleteSection',$ecmdir->label), 'confirm_deletesection','','',1);
}
print $langs->trans("Server").': <b>'.$ftp_server.'</b><br>';
@ -646,8 +644,21 @@ else
}
else
{
$s_ftp_server='FTP_SERVER_1';
if (empty($s_ftp_server))
$foundsetup=false;
$MAXFTP=20;
$i=1;
while ($i <= $MAXFTP)
{
$paramkey='FTP_NAME_'.$i;
//print $paramkey;
if (! empty($conf->global->$paramkey))
{
$foundsetup=true;
break;
}
$i++;
}
if (! $foundsetup)
{
print $langs->trans("SetupOfFTPClientModuleNotComplete");
}

View File

@ -55,7 +55,7 @@ insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_M
-- IHM
--
insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_SIZE_LISTE_LIMIT','25','chaine','Longueur maximum des listes',0,0);
insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_SIZE_SHORTLISTE_LIMIT','4','chaine','Longueur maximum des listes courtes (fiche client)',0,0);
insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_SIZE_SHORTLIST_LIMIT','3','chaine','Longueur maximum des listes courtes (fiche client)',0,0);
insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_SHOW_WORKBOARD','1','yesno','Affichage tableau de bord de travail Dolibarr',0,0);
insert into llx_const (name, value, type, note, visible) values ('MAIN_MENU_STANDARD','eldy_menu.php','chaine','Menu manager for internal users',0);

View File

@ -61,7 +61,7 @@ update llx_opensurvey_sondage set format = 'D' where format = 'D+';
update llx_opensurvey_sondage set format = 'A' where format = 'A+';
INSERT INTO llx_const (name, value, type, note, visible) values (__ENCRYPT('MAIN_DELAY_EXPENSEREPORTS_TO_PAY')__,__ENCRYPT('31')__,'chaine','Tolérance de retard avant alerte (en jours) sur les notes de frais impayées',0);
INSERT INTO llx_const (name, value, type, note, visible) values ('MAIN_SIZE_SHORTLISTE_LIMIT','4','chaine','Longueur maximum des listes courtes (fiche client)',0);
INSERT INTO llx_const (name, value, type, note, visible) values ('MAIN_SIZE_SHORTLIST_LIMIT','3','chaine','Max length for small lists (tabs)',0);
ALTER TABLE llx_accounting_system MODIFY COLUMN pcg_version varchar(32);
ALTER TABLE llx_accountingaccount MODIFY COLUMN fk_pcg_version varchar(32);

View File

@ -164,3 +164,5 @@ create table llx_resource_extrafields
) ENGINE=innodb;
ALTER TABLE llx_resource_extrafields ADD INDEX idx_resource_extrafields (fk_object);
INSERT INTO llx_const (name, value, type, note, visible) values ('MAIN_SIZE_SHORTLIST_LIMIT','3','chaine','Max length for small lists (tabs)',0);

View File

@ -58,8 +58,8 @@ ErrorCodeCantContainZero=Code can't contain value 0
DisableJavascript=Disable JavaScript and Ajax functions (Recommended for blind person or text browsers)
UseSearchToSelectCompanyTooltip=Also if you have a large number of third parties (> 100 000), you can increase speed by setting constant COMPANY_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string.
UseSearchToSelectContactTooltip=Also if you have a large number of third parties (> 100 000), you can increase speed by setting constant CONTACT_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string.
DelaiedFullListToSelectCompany=Wait you press a key before loading content of thirdparties combo list (This may increase performance if you have a large number of thirdparties)
DelaiedFullListToSelectContact=Wait you press a key before loading content of contact combo list (This may increase performance if you have a large number of contact)
DelaiedFullListToSelectCompany=Wait you press a key before loading content of thirdparties combo list (This may increase performance if you have a large number of thirdparties, but it is less convenient)
DelaiedFullListToSelectContact=Wait you press a key before loading content of contact combo list (This may increase performance if you have a large number of contact, but it is less convenient)
NumberOfKeyToSearch=Nbr of characters to trigger search: %s
NotAvailableWhenAjaxDisabled=Not available when Ajax disabled
AllowToSelectProjectFromOtherCompany=On document of a third party, can choose a project linked to another third party
@ -1320,7 +1320,7 @@ ViewProductDescInFormAbility=Visualization of product descriptions in the forms
MergePropalProductCard=Activate in product/service Attached Files tab an option to merge product PDF document to proposal PDF azur if product/service is in the proposal
ViewProductDescInThirdpartyLanguageAbility=Visualization of products descriptions in the third party language
UseSearchToSelectProductTooltip=Also if you have a large number of product (> 100 000), you can increase speed by setting constant PRODUCT_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string.
UseSearchToSelectProduct=Use a search form to choose a product (rather than a drop-down list).
UseSearchToSelectProduct=Wait you press a key before loading content of product combo list (This may increase performance if you have a large number of products, but it is less convenient)
SetDefaultBarcodeTypeProducts=Default barcode type to use for products
SetDefaultBarcodeTypeThirdParties=Default barcode type to use for third parties
UseUnits=Define a unit of measure for Quantity during order, proposal or invoice lines edition

View File

@ -76,7 +76,8 @@ DefaultLang=Language by default
VATIsUsed=VAT is used
VATIsNotUsed=VAT is not used
CopyAddressFromSoc=Fill address with third party address
ThirdpartyNotCustomerNotSupplierSoNoRef=Thirdparty neither customer nor supplier, no available refering objects
ThirdpartyNotCustomerNotSupplierSoNoRef=Thirdparty neither customer nor supplier, no available refering objects
PaymentBankAccount=Payment bank account
##### Local Taxes #####
LocalTax1IsUsed=Use second tax
LocalTax1IsUsedES= RE is used

View File

@ -50,5 +50,5 @@ ListOfSupplierProposal=List of supplier proposal requests
ListSupplierProposalsAssociatedProject=List of supplier proposals associated with project
SupplierProposalsToClose=Supplier proposals to close
SupplierProposalsToProcess=Supplier proposals to process
LastSupplierProposals=Last price requests
LastSupplierProposals=Latest %s price requests
AllPriceRequests=All requests

View File

@ -23,7 +23,7 @@ WithdrawalsSetup=Direct debit payment setup
WithdrawStatistics=Direct debit payment statistics
WithdrawRejectStatistics=Direct debit payment reject statistics
LastWithdrawalReceipt=Latest %s direct debit receipts
MakeWithdrawRequest=Make a withdraw request
MakeWithdrawRequest=Make a direct debit payment request
ThirdPartyBankCode=Third party bank code
NoInvoiceCouldBeWithdrawed=No invoice withdrawed with success. Check that invoice are on companies with a valid BAN.
ClassCredited=Classify credited

View File

@ -670,7 +670,7 @@ else
$genallowed=$user->rights->expedition->livraison->creer;
$delallowed=$user->rights->expedition->livraison->supprimer;
$somethingshown=$formfile->show_documents('livraison',$objectref,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf,1,0,0,28,0,'','','',$soc->default_lang);
print $formfile->showdocuments('livraison',$objectref,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf,1,0,0,28,0,'','','',$soc->default_lang);
/*
* Linked object block (of linked shipment)

View File

@ -94,7 +94,7 @@ dol_fiche_head($head, 'agentMargins', $titre, 0, $picto);
print '<table class="border" width="100%">';
print '<tr><td class="titlefield">'.$langs->trans('SalesRepresentative').'</td>';
print '<td colspan="4">';
print '<td class="maxwidthonsmartphone" colspan="4">';
print $form->select_dolusers($agentid, 'agentid', 1, '', $user->rights->margins->read->all ? 0 : 1, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
print '</td></tr>';

View File

@ -90,7 +90,7 @@ if ($socid > 0) {
if ($soc->client)
{
print '<tr><td class="titlefield">'.$langs->trans('ThirdPartyName').'</td>';
print '<td colspan="4">';
print '<td class="maxwidthonsmartphone" colspan="4">';
print $form->select_company($socid, 'socid', 'client=1 OR client=3', 1, 0, 0);
//$form->form_thirdparty($_SERVER['PHP_SELF'].'?socid='.$socid,$socid,'socid','client=1 OR client=3',1,0,1);
print '</td></tr>';
@ -102,7 +102,7 @@ if ($socid > 0) {
}
else {
print '<tr><td class="titlefield">'.$langs->trans('ThirdPartyName').'</td>';
print '<td colspan="4">';
print '<td class="maxwidthonsmartphone" colspan="4">';
print $form->select_company(null, 'socid', 'client=1 OR client=3', 1, 0, 0);
//$form->form_thirdparty($_SERVER['PHP_SELF'],null,'socid','client=1 OR client=3',1,0,1);
print '</td></tr>';

View File

@ -105,20 +105,17 @@ print '<table class="border" width="100%">';
if ($id > 0) {
print '<tr><td class="titlefield">'.$langs->trans('ChooseProduct/Service').'</td>';
print '<td colspan="4">';
print $form->select_produits($id,'id','',20,0,1,2,'',1);
print '<td class="maxwidthonsmartpone" colspan="4">';
print $form->select_produits($id,'id','',20,0,1,2,'',1, array(), 0, 'All');
print '</td></tr>';
print '<tr><td>'.$langs->trans('AllProducts').'</td>';
print '<td colspan="4"><input type="checkbox" id="all" /></td></tr>';
if (! $sortorder) $sortorder="DESC";
if (! $sortfield) $sortfield="f.datef";
}
else {
print '<tr><td class="titlefield">'.$langs->trans('ChooseProduct/Service').'</td>';
print '<td colspan="4">';
print $form->select_produits('','id','',20,0,1,2,'',1);
print '<td class="maxwidthonsmartphone" colspan="4">';
print $form->select_produits('','id','',20,0,1,2,'',1, array(), 0, 'All');
print '</td></tr>';
}
@ -339,10 +336,6 @@ print '
<script type="text/javascript">
$(document).ready(function() {
$("#all").change(function() {
$("#id").val(\'\').change();
});
$("#id").change(function() {
$("div.fiche form").submit();
});

View File

@ -105,7 +105,7 @@ class FormProduct
if(!empty($exclude)) $sql.= ' AND e.rowid NOT IN('.implode(',', $exclude).')';
if ($sumStock && empty($fk_product)) $sql.= " GROUP BY e.rowid, e.label, e.description";
if ($sumStock && empty($fk_product)) $sql.= " GROUP BY e.rowid, e.label, e.description, e.fk_parent";
$sql.= " ORDER BY e.label";
dol_syslog(get_class($this).'::loadWarehouses', LOG_DEBUG);

View File

@ -205,14 +205,18 @@ if ($id > 0 || ! empty($ref))
{
$linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php">'.$langs->trans("BackToList").'</a>';
dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref');
dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref', '', '', '', 0, '', '', 1);
print '<table class="noborder tableforfield" width="100%">';
if ($object->type!=Product::TYPE_SERVICE || empty($conf->global->PRODUIT_MULTIPRICES))
{
print '<div class="underbanner clearboth"></div>';
print '<table class="border tableforfield" width="100%">';
}
// Nature
if($object->type!=Product::TYPE_SERVICE)
if ($object->type!=Product::TYPE_SERVICE)
{
print '<tr><td>'.$langs->trans("Nature").'</td><td colspan="2">';
print '<tr><td>'.$langs->trans("Nature").'</td><td>';
print $object->getLibFinished();
print '</td></tr>';
}
@ -244,7 +248,10 @@ if ($id > 0 || ! empty($ref))
print '</td></tr>';
}
print '</table>';
if ($object->type!=Product::TYPE_SERVICE || empty($conf->global->PRODUIT_MULTIPRICES))
{
print '</table>';
}
dol_fiche_end();

View File

@ -124,7 +124,7 @@ if (! empty($id) || ! empty($ref) || GETPOST('id') == 'all')
$linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php">'.$langs->trans("BackToList").'</a>';
dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref');
dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref', '', '', '', 0, '', '', 1);
dol_fiche_end();
}

View File

@ -191,7 +191,7 @@ if ($action == 'create')
print '<table class="border" width="100%">';
// Ref
print '<tr><td class="titlefieldcreate fieldrequired">'.$langs->trans("Ref").'</td><td colspan="3"><input name="libelle" size="20" value=""></td></tr>';
print '<tr><td class="titlefieldcreate fieldrequired">'.$langs->trans("Ref").'</td><td><input name="libelle" size="20" value=""></td></tr>';
print '<tr><td >'.$langs->trans("LocationSummary").'</td><td colspan="3"><input name="lieu" size="40" value="'.(!empty($object->lieu)?$object->lieu:'').'"></td></tr>';
@ -201,31 +201,32 @@ if ($action == 'create')
print '</td></tr>';
// Description
print '<tr><td class="tdtop">'.$langs->trans("Description").'</td><td colspan="3">';
print '<tr><td class="tdtop">'.$langs->trans("Description").'</td><td>';
// Editeur wysiwyg
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor=new DolEditor('desc',(!empty($object->description)?$object->description:''),'',180,'dolibarr_notes','In',false,true,$conf->fckeditor->enabled,5,70);
$doleditor->Create();
print '</td></tr>';
print '<tr><td>'.$langs->trans('Address').'</td><td colspan="3"><textarea name="address" class="quatrevingtpercent" rows="3" wrap="soft">';
print '<tr><td>'.$langs->trans('Address').'</td><td><textarea name="address" class="quatrevingtpercent" rows="3" wrap="soft">';
print (!empty($object->address)?$object->address:'');
print '</textarea></td></tr>';
// Zip / Town
print '<tr><td>'.$langs->trans('Zip').'</td><td>';
print $formcompany->select_ziptown((!empty($object->zip)?$object->zip:''),'zipcode',array('town','selectcountry_id','state_id'),6);
print '</td><td>'.$langs->trans('Town').'</td><td>';
print '</td></tr>';
print '<tr><td>'.$langs->trans('Town').'</td><td>';
print $formcompany->select_ziptown((!empty($object->town)?$object->town:''),'town',array('zipcode','selectcountry_id','state_id'));
print '</td></tr>';
// Country
print '<tr><td>'.$langs->trans('Country').'</td><td colspan="3">';
print '<tr><td>'.$langs->trans('Country').'</td><td>';
print $form->select_country((!empty($object->country_id)?$object->country_id:$mysoc->country_code),'country_id');
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
print '</td></tr>';
// Status
print '<tr><td>'.$langs->trans("Status").'</td><td colspan="3">';
print '<tr><td>'.$langs->trans("Status").'</td><td>';
print '<select name="statut" class="flat">';
foreach ($object->statuts as $key => $value)
{
@ -295,51 +296,12 @@ else
// Warehouse card
$linkback = '<a href="'.DOL_URL_ROOT.'/product/stock/list.php">'.$langs->trans("BackToList").'</a>';
$morehtmlref='<div class="refidno">';
$morehtmlref.=$langs->trans("LocationSummary").' : '.$object->lieu;
/*
// Ref supplier
//$morehtmlref.=$form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->fournisseur->commande->creer, 'string', '', 0, 1);
//$morehtmlref.=$form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->fournisseur->commande->creer, 'string', '', null, null, '', 1);
// Thirdparty
//$morehtmlref.=$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1);
// Project
if (! empty($conf->projet->enabled))
{
$langs->load("projects");
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
if ($user->rights->supplier_proposal->creer)
{
if ($action != 'classify')
$morehtmlref.='<a href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
if ($action == 'classify') {
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
$morehtmlref.='<input type="hidden" name="action" value="classin">';
$morehtmlref.='<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
$morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1);
$morehtmlref.='<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">';
$morehtmlref.='</form>';
} else {
$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1);
}
} else {
if (! empty($object->fk_project)) {
$proj = new Project($db);
$proj->fetch($object->fk_project);
$morehtmlref.='<a href="'.DOL_URL_ROOT.'/projet/card.php?id=' . $object->fk_project . '" title="' . $langs->trans('ShowProject') . '">';
$morehtmlref.=$proj->ref;
$morehtmlref.='</a>';
} else {
$morehtmlref.='';
}
}
}*/
$morehtmlref.='</div>';
dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'libelle', $morehtmlref);
print '<div class="fichecenter">';
print '<div class="fichehalfleft">';
@ -347,15 +309,6 @@ else
print '<table class="border" width="100%">';
// Ref
/*
print '<tr><td width="25%">'.$langs->trans("Ref").'</td><td colspan="3">';
print $form->showrefnav($object, 'id', $linkback, 1, 'rowid', 'libelle');
print '</td>';*/
//print '<tr><td>'.$langs->trans("LocationSummary").'</td><td colspan="3">'.$object->lieu.'</td></tr>';
// Parent entrepot
$e = new Entrepot($db);
if(!empty($object->fk_parent) && $e->fetch($object->fk_parent) > 0) {
@ -367,30 +320,7 @@ else
}
// Description
print '<tr><td class="tdtop">'.$langs->trans("Description").'</td><td>'.nl2br($object->description).'</td></tr>';
// Address
/*
print '<tr><td>'.$langs->trans('Address').'</td><td>';
print $object->address;
print '</td></tr>';
// Town
print '<tr><td>'.$langs->trans('Zip').'</td><td>'.$object->zip.'</td></tr>';
print '<tr><td>'.$langs->trans('Town').'</td><td>'.$object->town.'</td></tr>';
// Country
print '<tr><td>'.$langs->trans('Country').'</td><td>';
if (! empty($object->country_code))
{
$img=picto_from_langcode($object->country_code);
print ($img?$img.' ':'');
}
print $object->country;
print '</td></tr>';*/
// Status
//print '<tr><td>'.$langs->trans("Status").'</td><td colspan="3">'.$object->getLibStatut(4).'</td></tr>';
print '<tr><td class="titlefield tdtop">'.$langs->trans("Description").'</td><td>'.nl2br($object->description).'</td></tr>';
$calcproductsunique=$object->nb_different_products();
$calcproducts=$object->nb_products();
@ -415,7 +345,7 @@ else
print '<table class="border centpercent">';
// Value
print '<tr><td>'.$langs->trans("EstimatedStockValueShort").'</td><td>';
print '<tr><td class="titlefield">'.$langs->trans("EstimatedStockValueShort").'</td><td>';
print price((empty($calcproducts['value'])?'0':price2num($calcproducts['value'],'MT')), 0, $langs, 0, -1, -1, $conf->currency);
print "</td></tr>";

View File

@ -39,18 +39,30 @@ $result=restrictedArea($user,'stock');
$help_url='EN:Module_Stocks_En|FR:Module_Stock|ES:M&oacute;dulo_Stocks';
llxHeader("",$langs->trans("Stocks"),$help_url);
$entrepot = new Entrepot($db);
$entrepot->fetch($_GET["id"]);
$entrepot->info($_GET["id"]);
$object = new Entrepot($db);
$object->fetch($_GET["id"]);
$object->info($_GET["id"]);
$head = stock_prepare_head($entrepot);
$head = stock_prepare_head($object);
dol_fiche_head($head, 'info', $langs->trans("Warehouse"), 0, 'stock');
print '<table width="100%"><tr><td>';
dol_print_object_info($entrepot);
print '</td></tr></table>';
$linkback = '<a href="'.DOL_URL_ROOT.'/product/stock/list.php">'.$langs->trans("BackToList").'</a>';
$morehtmlref='<div class="refidno">';
$morehtmlref.=$langs->trans("LocationSummary").' : '.$object->lieu;
$morehtmlref.='</div>';
dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'libelle', $morehtmlref);
print '<div class="fichecenter">';
print '<div class="underbanner clearboth"></div>';
print '<br>';
dol_print_object_info($object);
print '</div>';

View File

@ -410,8 +410,8 @@ if ($resql)
if ($id > 0)
{
$entrepot = new Entrepot($db);
$result = $entrepot->fetch($id);
$object = new Entrepot($db);
$result = $object->fetch($id);
if ($result < 0)
{
dol_print_error($db);
@ -430,69 +430,60 @@ if ($resql)
*/
if ($id)
{
$head = stock_prepare_head($entrepot);
$head = stock_prepare_head($object);
dol_fiche_head($head, 'movements', $langs->trans("Warehouse"), 0, 'stock');
$linkback = '<a href="'.DOL_URL_ROOT.'/product/stock/list.php">'.$langs->trans("BackToList").'</a>';
$morehtmlref='<div class="refidno">';
$morehtmlref.=$langs->trans("LocationSummary").' : '.$object->lieu;
$morehtmlref.='</div>';
dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'libelle', $morehtmlref);
print '<div class="fichecenter">';
print '<div class="fichehalfleft">';
print '<div class="underbanner clearboth"></div>';
print '<table class="border" width="100%">';
$linkback = '<a href="'.DOL_URL_ROOT.'/product/stock/list.php">'.$langs->trans("BackToList").'</a>';
// Ref
print '<tr><td width="25%">'.$langs->trans("Ref").'</td><td colspan="3">';
print $form->showrefnav($entrepot, 'id', $linkback, 1, 'rowid', 'libelle');
print '</td>';
print '<tr><td>'.$langs->trans("LocationSummary").'</td><td colspan="3">'.$entrepot->lieu.'</td></tr>';
// Description
print '<tr><td valign="top">'.$langs->trans("Description").'</td><td colspan="3">'.dol_htmlentitiesbr($entrepot->description).'</td></tr>';
print '<tr><td class="titlefield tdtop">'.$langs->trans("Description").'</td><td>'.dol_htmlentitiesbr($object->description).'</td></tr>';
// Address
print '<tr><td>'.$langs->trans('Address').'</td><td colspan="3">';
print $entrepot->address;
print '</td></tr>';
// Town
print '<tr><td width="25%">'.$langs->trans('Zip').'</td><td width="25%">'.$entrepot->zip.'</td>';
print '<td width="25%">'.$langs->trans('Town').'</td><td width="25%">'.$entrepot->town.'</td></tr>';
// Country
print '<tr><td>'.$langs->trans('Country').'</td><td colspan="3">';
if (! empty($entrepot->country_code))
{
$img=picto_from_langcode($entrepot->country_code);
print ($img?$img.' ':'');
print $entrepot->country;
}
print '</td></tr>';
// Status
print '<tr><td>'.$langs->trans("Status").'</td><td colspan="3">'.$entrepot->getLibStatut(4).'</td></tr>';
$calcproductsunique=$entrepot->nb_different_products();
$calcproducts=$entrepot->nb_products();
$calcproductsunique=$object->nb_different_products();
$calcproducts=$object->nb_products();
// Total nb of different products
print '<tr><td valign="top">'.$langs->trans("NumberOfDifferentProducts").'</td><td colspan="3">';
print '<tr><td>'.$langs->trans("NumberOfDifferentProducts").'</td><td>';
print empty($calcproductsunique['nb'])?'0':$calcproductsunique['nb'];
print "</td></tr>";
// Nb of products
print '<tr><td valign="top">'.$langs->trans("NumberOfProducts").'</td><td colspan="3">';
print '<tr><td>'.$langs->trans("NumberOfProducts").'</td><td>';
print empty($calcproducts['nb'])?'0':$calcproducts['nb'];
print "</td></tr>";
print '</table>';
print '</div>';
print '<div class="fichehalfright">';
print '<div class="ficheaddleft">';
print '<div class="underbanner clearboth"></div>';
print '<table class="border centpercent">';
// Value
print '<tr><td valign="top">'.$langs->trans("EstimatedStockValueShort").'</td><td colspan="3">';
print '<tr><td class="titlefield">'.$langs->trans("EstimatedStockValueShort").'</td><td>';
print price((empty($calcproducts['value'])?'0':price2num($calcproducts['value'],'MT')), 0, $langs, 0, -1, -1, $conf->currency);
print "</td></tr>";
// Last movement
$sql = "SELECT MAX(m.datem) as datem";
$sql .= " FROM ".MAIN_DB_PREFIX."stock_mouvement as m";
$sql .= " WHERE m.fk_entrepot = '".$entrepot->id."'";
$sql .= " WHERE m.fk_entrepot = '".$object->id."'";
$resqlbis = $db->query($sql);
if ($resqlbis)
{
@ -504,7 +495,7 @@ if ($resql)
dol_print_error($db);
}
print '<tr><td valign="top">'.$langs->trans("LastMovement").'</td><td colspan="3">';
print '<tr><td>'.$langs->trans("LastMovement").'</td><td>';
if ($lastmovementdate)
{
print dol_print_date($lastmovementdate,'dayhour');
@ -517,6 +508,12 @@ if ($resql)
print "</table>";
print '</div>';
print '</div>';
print '</div>';
print '<div class="clearboth"></div>';
dol_fiche_end();
}
@ -526,7 +523,6 @@ if ($resql)
*/
if ($action == "correction")
{
if ($id) $object=$entrepot;
include DOL_DOCUMENT_ROOT.'/product/stock/tpl/stockcorrection.tpl.php';
print '<br>';
}
@ -536,7 +532,6 @@ if ($resql)
*/
if ($action == "transfert")
{
if ($id) $object=$entrepot;
include DOL_DOCUMENT_ROOT.'/product/stock/tpl/stocktransfer.tpl.php';
print '<br>';
}
@ -651,7 +646,7 @@ if ($resql)
// Warehouse
if (! $id > 0)
{
print '<td class="liste_titre" align="left">';
print '<td class="liste_titre maxwidthonsmartphone" align="left">';
//print '<input class="flat" type="text" size="8" name="search_warehouse" value="'.($search_warehouse).'">';
print $formproduct->selectWarehouses($search_warehouse, 'search_warehouse', '', 1);
print '</td>';

View File

@ -438,11 +438,15 @@ print '<input type="hidden" name="sref" value="'.$sref.'">';
print '<input type="hidden" name="snom" value="'.$snom.'">';
print '<input type="hidden" name="salert" value="'.$salert.'">';
print '<input type="hidden" name="mode" value="'.$mode.'">';
print $langs->trans('Warehouse').' : '.$formproduct->selectWarehouses($fk_entrepot, 'fk_entrepot', '', 1);
print '<br />';
print $langs->trans('Supplier').' : '.$form->select_company($fk_supplier, 'fk_supplier', 'fournisseur=1', 1);
print '<br />';
print ' <input class="button" type="submit" name="valid" value="'.$langs->trans('ToFilter').'">';
print '<div class="inline-block valignmiddle" style="padding-right: 20px;">';
print $langs->trans('Warehouse').' '.$formproduct->selectWarehouses($fk_entrepot, 'fk_entrepot', '', 1);
print '</div>';
print '<div class="inline-block valignmiddle" style="padding-right: 20px;">';
print $langs->trans('Supplier').' '.$form->select_company($fk_supplier, 'fk_supplier', 'fournisseur=1', 1);
print '</div>';
print '<div class="inline-block valignmiddle">';
print '<input class="button" type="submit" name="valid" value="'.$langs->trans('ToFilter').'">';
print '</div>';
print '</form>';
if ($sref || $snom || $sall || $salert || GETPOST('search', 'alpha')) {

View File

@ -494,7 +494,7 @@ if ($action == 'create' && $user->rights->projet->creer)
// Thirdparty
if ($conf->societe->enabled)
{
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td>';
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td class="maxwidthonsmartphone">';
$filteronlist='';
if (! empty($conf->global->PROJECT_FILTER_FOR_THIRDPARTY_LIST)) $filteronlist=$conf->global->PROJECT_FILTER_FOR_THIRDPARTY_LIST;
$text=$form->select_thirdparty_list(GETPOST('socid','int'), 'socid', $filteronlist, 'SelectThirdParty', 1, 0, array(), '', 0, 0, 'minwidth300');
@ -517,8 +517,8 @@ if ($action == 'create' && $user->rights->projet->creer)
print '</td></tr>';
}
// Public
print '<tr><td>'.$langs->trans("Visibility").'</td><td>';
// Visibility
print '<tr><td>'.$langs->trans("Visibility").'</td><td class="maxwidthonsmartphone">';
$array=array();
if (empty($conf->global->PROJECT_DISABLE_PRIVATE_PROJECT)) $array[0] = $langs->trans("PrivateProject");
if (empty($conf->global->PROJECT_DISABLE_PUBLIC_PROJECT)) $array[1] = $langs->trans("SharedProject");
@ -539,13 +539,13 @@ if ($action == 'create' && $user->rights->projet->creer)
{
// Opportunity status
print '<tr><td>'.$langs->trans("OpportunityStatus").'</td>';
print '<td>';
print '<td class="maxwidthonsmartphone">';
print $formproject->selectOpportunityStatus('opp_status', GETPOST('opp_status')?GETPOST('opp_status'):$object->opp_status);
print '</tr>';
// Opportunity probability
print '<tr><td>'.$langs->trans("OpportunityProbability").'</td>';
print '<td><input size="5" type="text" id="opp_percent" name="opp_percent" value="'.(GETPOST('opp_percent')!=''?price(GETPOST('opp_percent')):'').'"> %';
print '<td><input size="5" type="text" id="opp_percent" name="opp_percent" value="'.(GETPOST('opp_percent')!=''?price(GETPOST('opp_percent')):'').'"><span class="hideonsmartphone"> %</span>';
print '<input type="hidden" name="opp_percent_not_set" id="opp_percent_not_set" value="'.(GETPOST('opp_percent')!=''?'0':'1').'">';
print '</td>';
print '</tr>';
@ -1132,7 +1132,7 @@ else
$var=true;
$somethingshown=$formfile->show_documents('project',$filename,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf);
print $formfile->showdocuments('project',$filename,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf);
print '</div><div class="fichehalfright"><div class="ficheaddleft">';

View File

@ -575,7 +575,7 @@ class Task extends CommonObject
$sql = "SELECT p.rowid as projectid, p.ref, p.title as plabel, p.public, p.fk_statut as projectstatus,";
$sql.= " t.rowid as taskid, t.ref as taskref, t.label, t.description, t.fk_task_parent, t.duration_effective, t.progress, t.fk_statut as status,";
$sql.= " t.dateo as date_start, t.datee as date_end, t.planned_workload, t.rang,";
$sql.= " s.nom as thirdparty_name";
$sql.= " s.rowid as thirdparty_id, s.nom as thirdparty_name";
$sql.= " FROM ".MAIN_DB_PREFIX."projet as p";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON p.fk_soc = s.rowid";
if ($mode == 0)
@ -692,6 +692,7 @@ class Task extends CommonObject
$tasks[$i]->date_end = $this->db->jdate($obj->date_end);
$tasks[$i]->rang = $obj->rang;
$tasks[$i]->thirdparty_id = $obj->thirdparty_id;
$tasks[$i]->thirdparty_name = $obj->thirdparty_name;
}

View File

@ -137,8 +137,8 @@ if ($object->id > 0)
print '<table class="border" width="100%">';
// Files infos
print '<tr><td>'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>';
print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.$totalsize.' '.$langs->trans("bytes").'</td></tr>';
print '<tr><td class="titlefield">'.$langs->trans("NbOfAttachedFiles").'</td><td>'.count($filearray).'</td></tr>';
print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td>'.$totalsize.' '.$langs->trans("bytes").'</td></tr>';
print "</table>\n";

View File

@ -562,9 +562,9 @@ if ($id > 0 || ! empty($ref))
print '</div>';
}
print '<table width="100%"><tr><td width="50%" valign="top">';
print '<a name="builddoc"></a>'; // ancre
print '<div class="fichecenter"><div class="fichehalfleft">';
print '<a name="builddoc"></a>'; // ancre
/*
* Documents generes
*/
@ -576,9 +576,11 @@ if ($id > 0 || ! empty($ref))
$var=true;
$somethingshown=$formfile->show_documents('project_task',$filename,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf);
print $formfile->showdocuments('project_task',$filename,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf);
print '</td></tr></table>';
print '</div><div class="fichehalfright"><div class="ficheaddleft">';
print '</div></div></div>';
}
}
}

View File

@ -510,7 +510,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
print '<table class="noborder nohover" width="100%">';
print '<tr class="liste_titre">';
print '<td width="100">'.$langs->trans("Date").'</td>';
print '<td>'.$langs->trans("Date").'</td>';
print '<td>'.$langs->trans("By").'</td>';
print '<td>'.$langs->trans("Note").'</td>';
print '<td>'.$langs->trans("ProgressDeclared").'</td>';
@ -520,20 +520,20 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
print '<tr '.$bc[false].'>';
// Date
print '<td class="nowrap">';
print '<td class="maxwidthonsmartphone">';
//$newdate=dol_mktime(12,0,0,$_POST["timemonth"],$_POST["timeday"],$_POST["timeyear"]);
$newdate='';
print $form->select_date($newdate,'time',1,1,2,"timespent_date",1,0,1);
print $form->select_date($newdate, 'time', ($conf->browser->layout == 'phone'?2:1), 1, 2, "timespent_date", 1, 0, 1);
print '</td>';
// Contributor
print '<td class="nowrap">';
print '<td class="maxwidthonsmartphone">';
print img_object('','user','class="hideonsmartphone"');
$contactsoftask=$object->getListContactId('internal');
if (count($contactsoftask)>0)
{
$userid=$contactsoftask[0];
print $form->select_dolusers((GETPOST('userid')?GETPOST('userid'):$userid), 'userid', 0, '', 0, '', $contactsoftask, 0, 0, 0, '', 0, $langs->trans("ResourceNotAssignedToTheTask"));
print $form->select_dolusers((GETPOST('userid')?GETPOST('userid'):$userid), 'userid', 0, '', 0, '', $contactsoftask, 0, 0, 0, '', 0, $langs->trans("ResourceNotAssignedToTheTask"), 'maxwidth200');
}
else
{
@ -542,8 +542,8 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
print '</td>';
// Note
print '<td class="nowrap">';
print '<textarea name="timespent_note" width="95%" rows="'.ROWS_2.'">'.($_POST['timespent_note']?$_POST['timespent_note']:'').'</textarea>';
print '<td>';
print '<textarea name="timespent_note" class="maxwidth100onsmartphone" rows="'.ROWS_2.'">'.($_POST['timespent_note']?$_POST['timespent_note']:'').'</textarea>';
print '</td>';
// Progress declared
@ -582,7 +582,8 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
$arrayfields['t.task_date']=array('label'=>$langs->trans("Date"), 'checked'=>1);
if ((empty($id) && empty($ref)) || ! empty($projectidforalltimes)) // Not a dedicated task
{
$arrayfields['t.task_ref']=array('label'=>$langs->trans("Task"), 'checked'=>1);
$arrayfields['t.task_ref']=array('label'=>$langs->trans("RefTask"), 'checked'=>1);
$arrayfields['t.task_label']=array('label'=>$langs->trans("LabelTask"), 'checked'=>1);
}
$arrayfields['author']=array('label'=>$langs->trans("By"), 'checked'=>1);
$arrayfields['t.note']=array('label'=>$langs->trans("Note"), 'checked'=>1);
@ -710,6 +711,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
if ((empty($id) && empty($ref)) || ! empty($projectidforalltimes)) // Not a dedicated task
{
if (! empty($arrayfields['t.task_ref']['checked'])) print_liste_field_titre($arrayfields['t.task_ref']['label'],$_SERVER['PHP_SELF'],'pt.ref','',$params,'',$sortfield,$sortorder);
if (! empty($arrayfields['t.task_label']['checked'])) print_liste_field_titre($arrayfields['t.task_label']['label'],$_SERVER['PHP_SELF'],'pt.label','',$params,'',$sortfield,$sortorder);
}
if (! empty($arrayfields['author']['checked'])) print_liste_field_titre($arrayfields['author']['label'],$_SERVER['PHP_SELF'],'','',$params,'',$sortfield,$sortorder);
if (! empty($arrayfields['t.note']['checked'])) print_liste_field_titre($arrayfields['t.note']['label'],$_SERVER['PHP_SELF'],'t.note','',$params,'',$sortfield,$sortorder);
@ -742,9 +744,10 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
if ((empty($id) && empty($ref)) || ! empty($projectidforalltimes)) // Not a dedicated task
{
if (! empty($arrayfields['t.task_ref']['checked'])) print '<td class="liste_titre"></td>';
if (! empty($arrayfields['t.task_label']['checked'])) print '<td class="liste_titre"></td>';
}
if (! empty($arrayfields['author']['checked'])) print '<td class="liste_titre"></td>';
if (! empty($arrayfields['t.note']['checked'])) print '<td class="liste_titre"><input type="text" class="flat" name="search_note" value="'.$search_note.'" size="10"></td>';
if (! empty($arrayfields['t.note']['checked'])) print '<td class="liste_titre"><input type="text" class="flat" name="search_note" value="'.$search_note.'"></td>';
if (! empty($arrayfields['t.task_duration']['checked'])) print '<td class="liste_titre right"></td>';
if (! empty($arrayfields['value']['checked'])) print '<td class="liste_titre"></td>';
// Extra fields
@ -812,7 +815,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
if (! $i) $totalarray['nbfield']++;
}
// Task
// Task ref
if (! empty($arrayfields['t.task_ref']['checked']))
{
if ((empty($id) && empty($ref)) || ! empty($projectidforalltimes)) // Not a dedicated task
@ -827,7 +830,19 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
}
}
// User
// Task label
if (! empty($arrayfields['t.task_label']['checked']))
{
if ((empty($id) && empty($ref)) || ! empty($projectidforalltimes)) // Not a dedicated task
{
print '<td class="nowrap">';
print $task_time->label;
print '</td>';
if (! $i) $totalarray['nbfield']++;
}
}
// User
if (! empty($arrayfields['author']['checked']))
{
print '<td>';

View File

@ -260,7 +260,7 @@ $urlsource=$_SERVER["PHP_SELF"]."?socid=".$socid;
$genallowed=$user->rights->societe->creer;
$delallowed=$user->rights->societe->supprimer;
$somethingshown=$formfile->show_documents('company',$socid,$filedir,$urlsource,$genallowed,$delallowed,'',0,0,0,28,0,'',0,'',$objcanvas->control->object->default_lang);
print $formfile->showdocuments('company',$socid,$filedir,$urlsource,$genallowed,$delallowed,'',0,0,0,28,0,'',0,'',$objcanvas->control->object->default_lang);
?>
</td>

View File

@ -204,7 +204,7 @@ $urlsource=$_SERVER["PHP_SELF"]."?socid=".$socid;
$genallowed=$user->rights->societe->creer;
$delallowed=$user->rights->societe->supprimer;
$somethingshown=$formfile->show_documents('company',$socid,$filedir,$urlsource,$genallowed,$delallowed,'',0,0,0,28,0,'',0,'',$objcanvas->control->object->default_lang);
print $formfile->showdocuments('company',$socid,$filedir,$urlsource,$genallowed,$delallowed,'',0,0,0,28,0,'',0,'',$objcanvas->control->object->default_lang);
?>
</td>

View File

@ -1132,7 +1132,7 @@ else
}
if ($j % 2 == 1) print '<td colspan="2"></td></tr>';
// Assujeti TVA
// Vat is used
print '<tr><td>'.fieldLabel('VATIsUsed','assujtva_value').'</td>';
print '<td>';
print $form->selectyesno('assujtva_value',1,1); // Assujeti par defaut en creation
@ -1688,14 +1688,64 @@ else
}
if ($j % 2 == 1) print '<td colspan="2"></td></tr>';
// VAT payers
print '<tr><td>'.fieldLabel('VATIsUsed','assujtva_value').'</td><td>';
// VAT is used
print '<tr><td>'.fieldLabel('VATIsUsed','assujtva_value').'</td><td colspan="3">';
print $form->selectyesno('assujtva_value',$object->tva_assuj,1);
print '</td>';
// Local Taxes
//TODO: Place into a function to control showing by country or study better option
if($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj=="1")
{
print '<tr><td>'.fieldLabel($langs->transcountry("LocalTax1IsUsed",$mysoc->country_code),'localtax1assuj_value').'</td><td colspan="3">';
print $form->selectyesno('localtax1assuj_value',$object->localtax1_assuj,1);
if(! isOnlyOneLocalTax(1))
{
print '<span class="cblt1"> '.$langs->transcountry("Type",$mysoc->country_code).': ';
$formcompany->select_localtax(1,$object->localtax1_value, "lt1");
print '</span>';
}
print '</td><td>'.fieldLabel($langs->transcountry("LocalTax2IsUsed",$mysoc->country_code),'localtax2assuj_value').'</td><td colspan="3">';
print $form->selectyesno('localtax2assuj_value',$object->localtax2_assuj,1);
if (! isOnlyOneLocalTax(2))
{
print '<span class="cblt2"> '.$langs->transcountry("Type",$mysoc->country_code).': ';
$formcompany->select_localtax(2,$object->localtax2_value, "lt2");
print '</span>';
}
print '</td></tr>';
}
elseif($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj!="1")
{
print '<tr><td>'.fieldLabel($langs->transcountry("LocalTax1IsUsed",$mysoc->country_code),'localtax1assuj_value').'</td><td colspan="3">';
print $form->selectyesno('localtax1assuj_value',$object->localtax1_assuj,1);
if(! isOnlyOneLocalTax(1))
{
print '<span class="cblt1"> '.$langs->transcountry("Type",$mysoc->country_code).': ';
$formcompany->select_localtax(1,$object->localtax1_value, "lt1");
print '</span>';
}
print '</td></tr>';
}
elseif($mysoc->localtax2_assuj=="1" && $mysoc->localtax1_assuj!="1")
{
print '<tr><td>'.fieldLabel($langs->transcountry("LocalTax2IsUsed",$mysoc->country_code),'localtax2assuj_value').'</td><td colspan="3">';
print $form->selectyesno('localtax2assuj_value',$object->localtax2_assuj,1);
if(! isOnlyOneLocalTax(2))
{
print '<span class="cblt2"> '.$langs->transcountry("Type",$mysoc->country_code).': ';
$formcompany->select_localtax(2,$object->localtax2_value, "lt2");
print '</span>';
}
print '</td></tr>';
}
// VAT Code
print '<td>'.fieldLabel('VATIntra','intra_vat').'</td>';
print '<td>';
print '<td colspan="3">';
$s ='<input type="text" class="flat maxwidthonsmartphone" name="tva_intra" id="intra_vat" maxlength="20" value="'.$object->tva_intra.'">';
if (empty($conf->global->MAIN_DISABLEVATCHECK))
@ -1723,56 +1773,6 @@ else
print '</td>';
print '</tr>';
// Local Taxes
//TODO: Place into a function to control showing by country or study better option
if($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj=="1")
{
print '<tr><td>'.fieldLabel($langs->transcountry("LocalTax1IsUsed",$mysoc->country_code),'localtax1assuj_value').'</td><td>';
print $form->selectyesno('localtax1assuj_value',$object->localtax1_assuj,1);
if(! isOnlyOneLocalTax(1))
{
print '<span class="cblt1"> '.$langs->transcountry("Type",$mysoc->country_code).': ';
$formcompany->select_localtax(1,$object->localtax1_value, "lt1");
print '</span>';
}
print '</td><td>'.fieldLabel($langs->transcountry("LocalTax2IsUsed",$mysoc->country_code),'localtax2assuj_value').'</td><td>';
print $form->selectyesno('localtax2assuj_value',$object->localtax2_assuj,1);
if (! isOnlyOneLocalTax(2))
{
print '<span class="cblt2"> '.$langs->transcountry("Type",$mysoc->country_code).': ';
$formcompany->select_localtax(2,$object->localtax2_value, "lt2");
print '</span>';
}
print '</td></tr>';
}
elseif($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj!="1")
{
print '<tr><td>'.fieldLabel($langs->transcountry("LocalTax1IsUsed",$mysoc->country_code),'localtax1assuj_value').'</td><td colspan="3">';
print $form->selectyesno('localtax1assuj_value',$object->localtax1_assuj,1);
if(! isOnlyOneLocalTax(1))
{
print '<span class="cblt1"> '.$langs->transcountry("Type",$mysoc->country_code).': ';
$formcompany->select_localtax(1,$object->localtax1_value, "lt1");
print '</span>';
}
print '</td></tr>';
}
elseif($mysoc->localtax2_assuj=="1" && $mysoc->localtax1_assuj!="1")
{
print '<tr><td>'.fieldLabel($langs->transcountry("LocalTax2IsUsed",$mysoc->country_code),'localtax2assuj_value').'</td><td colspan="3">';
print $form->selectyesno('localtax2assuj_value',$object->localtax2_assuj,1);
if(! isOnlyOneLocalTax(2))
{
print '<span class="cblt2"> '.$langs->transcountry("Type",$mysoc->country_code).': ';
$formcompany->select_localtax(2,$object->localtax2_value, "lt2");
print '</span>';
}
print '</td></tr>';
}
// Type - Size
print '<tr><td>'.fieldLabel('ThirdPartyType','typent_id').'</td><td class="maxwidthonsmartphone">';
print $form->selectarray("typent_id",$formcompany->typent_array(0), $object->typent_id, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT)?'ASC':$conf->global->SOCIETE_SORT_ON_TYPEENT));
@ -1931,7 +1931,7 @@ else
)
);
print $form->formconfirm($_SERVER["PHP_SELF"]."?socid=".$object->id, $langs->trans("MergeThirdparties"), $langs->trans("ConfirmMergeThirdparties"), "confirm_merge", $formquestion, 'no', 1, 190);
print $form->formconfirm($_SERVER["PHP_SELF"]."?socid=".$object->id, $langs->trans("MergeThirdparties"), $langs->trans("ConfirmMergeThirdparties"), "confirm_merge", $formquestion, 'no', 1, 200);
}
dol_htmloutput_errors($error,$errors);
@ -2027,7 +2027,7 @@ else
}
//if ($j % 2 == 1) print '<td colspan="2"></td></tr>';
// VAT payers
// VAT is used
print '<tr><td>';
print $langs->trans('VATIsUsed');
print '</td><td>';
@ -2035,6 +2035,104 @@ else
print '</td>';
print '</tr>';
// Local Taxes
//TODO: Place into a function to control showing by country or study better option
if($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj=="1")
{
print '<tr><td>'.$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code).'</td><td>';
print yn($object->localtax1_assuj);
print '</td></tr><tr><td>'.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).'</td><td>';
print yn($object->localtax2_assuj);
print '</td></tr>';
if($object->localtax1_assuj=="1" && (! isOnlyOneLocalTax(1)))
{
print '<form method="post" action="'.$_SERVER['PHP_SELF'].'?socid='.$object->id.'">';
print '<input type="hidden" name="action" value="set_localtax1">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<tr><td>'.$langs->transcountry("TypeLocaltax1", $mysoc->country_code).' <a href="'.$_SERVER["PHP_SELF"].'?action=editRE&amp;socid='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('Edit'),1).'</td>';
if($action == 'editRE')
{
print '<td align="left">';
$formcompany->select_localtax(1,$object->localtax1_value, "lt1");
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
}
else
{
print '<td>'.$object->localtax1_value.'</td>';
}
print '</tr></form>';
}
if($object->localtax2_assuj=="1" && (! isOnlyOneLocalTax(2)))
{
print '<form method="post" action="'.$_SERVER['PHP_SELF'].'?socid='.$object->id.'">';
print '<input type="hidden" name="action" value="set_localtax2">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<tr><td>'.$langs->transcountry("TypeLocaltax2", $mysoc->country_code).'<a href="'.$_SERVER["PHP_SELF"].'?action=editIRPF&amp;socid='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('Edit'),1).'</td>';
if($action == 'editIRPF'){
print '<td align="left">';
$formcompany->select_localtax(2,$object->localtax2_value, "lt2");
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
}else{
print '<td>'.$object->localtax2_value.'</td>';
}
print '</tr></form>';
}
}
elseif($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj!="1")
{
print '<tr><td>'.$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code).'</td><td>';
print yn($object->localtax1_assuj);
print '</td></tr>';
if($object->localtax1_assuj=="1" && (! isOnlyOneLocalTax(1)))
{
print '<form method="post" action="'.$_SERVER['PHP_SELF'].'?socid='.$object->id.'">';
print '<input type="hidden" name="action" value="set_localtax1">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<tr><td> '.$langs->transcountry("TypeLocaltax1", $mysoc->country_code).'<a href="'.$_SERVER["PHP_SELF"].'?action=editRE&amp;socid='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('Edit'),1).'</td>';
if($action == 'editRE'){
print '<td align="left">';
$formcompany->select_localtax(1,$object->localtax1_value, "lt1");
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
}else{
print '<td>'.$object->localtax1_value.'</td>';
}
print '</tr></form>';
}
}
elseif($mysoc->localtax2_assuj=="1" && $mysoc->localtax1_assuj!="1")
{
print '<tr><td>'.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).'</td><td>';
print yn($object->localtax2_assuj);
print '</td></tr>';
if($object->localtax2_assuj=="1" && (! isOnlyOneLocalTax(2)))
{
print '<form method="post" action="'.$_SERVER['PHP_SELF'].'?socid='.$object->id.'">';
print '<input type="hidden" name="action" value="set_localtax2">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<tr><td> '.$langs->transcountry("TypeLocaltax2", $mysoc->country_code).' <a href="'.$_SERVER["PHP_SELF"].'?action=editIRPF&amp;socid='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('Edit'),1).'</td>';
if($action == 'editIRPF'){
print '<td align="left">';
$formcompany->select_localtax(2,$object->localtax2_value, "lt2");
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
}else{
print '<td>'.$object->localtax2_value.'</td>';
}
print '</tr></form>';
}
}
/*
if ($mysoc->country_code=='ES' && $mysoc->localtax2_assuj!="1" && ! empty($conf->fournisseur->enabled) && $object->fournisseur==1)
{
print '<tr><td>'.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).'</td><td colspan="3">';
print yn($object->localtax2_assuj);
print '</td><tr>';
}
*/
// VAT Code
print '<tr>';
print '<td class="nowrap">'.$langs->trans('VATIntra').'</td><td>';
@ -2074,103 +2172,6 @@ else
print '</td>';
print '</tr>';
// Local Taxes
//TODO: Place into a function to control showing by country or study better option
if($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj=="1")
{
print '<tr><td>'.$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code).'</td><td>';
print yn($object->localtax1_assuj);
print '</td></tr><tr><td>'.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).'</td><td>';
print yn($object->localtax2_assuj);
print '</td></tr>';
if($object->localtax1_assuj=="1" && (! isOnlyOneLocalTax(1)))
{
print '<form method="post" action="'.$_SERVER['PHP_SELF'].'?socid='.$object->id.'">';
print '<input type="hidden" name="action" value="set_localtax1">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<tr><td>'.$langs->transcountry("TypeLocaltax1", $mysoc->country_code).' <a href="'.$_SERVER["PHP_SELF"].'?action=editRE&amp;socid='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('Edit'),1).'</td>';
if($action == 'editRE')
{
print '<td align="left">';
$formcompany->select_localtax(1,$object->localtax1_value, "lt1");
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
}
else
{
print '<td>'.$object->localtax1_value.'</td>';
}
print '</tr></form>';
}
if($object->localtax2_assuj=="1" && (! isOnlyOneLocalTax(2)))
{
print '<form method="post" action="'.$_SERVER['PHP_SELF'].'?socid='.$object->id.'">';
print '<input type="hidden" name="action" value="set_localtax2">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<tr><td>'.$langs->transcountry("TypeLocaltax2", $mysoc->country_code).'<a href="'.$_SERVER["PHP_SELF"].'?action=editIRPF&amp;socid='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('Edit'),1).'</td>';
if($action == 'editIRPF'){
print '<td align="left">';
$formcompany->select_localtax(2,$object->localtax2_value, "lt2");
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
}else{
print '<td>'.$object->localtax2_value.'</td>';
}
print '</tr></form>';
}
}
elseif($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj!="1")
{
print '<tr><td>'.$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code).'</td><td>';
print yn($object->localtax1_assuj);
print '</td><tr>';
if($object->localtax1_assuj=="1" && (! isOnlyOneLocalTax(1)))
{
print '<form method="post" action="'.$_SERVER['PHP_SELF'].'?socid='.$object->id.'">';
print '<input type="hidden" name="action" value="set_localtax1">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<tr><td> '.$langs->transcountry("TypeLocaltax1", $mysoc->country_code).'<a href="'.$_SERVER["PHP_SELF"].'?action=editRE&amp;socid='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('Edit'),1).'</td>';
if($action == 'editRE'){
print '<td align="left">';
$formcompany->select_localtax(1,$object->localtax1_value, "lt1");
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
}else{
print '<td>'.$object->localtax1_value.'</td>';
}
print '</tr></form>';
}
}
elseif($mysoc->localtax2_assuj=="1" && $mysoc->localtax1_assuj!="1")
{
print '<tr><td>'.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).'</td><td>';
print yn($object->localtax2_assuj);
print '</td><tr>';
if($object->localtax2_assuj=="1" && (! isOnlyOneLocalTax(2)))
{
print '<form method="post" action="'.$_SERVER['PHP_SELF'].'?socid='.$object->id.'">';
print '<input type="hidden" name="action" value="set_localtax2">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<tr><td> '.$langs->transcountry("TypeLocaltax2", $mysoc->country_code).' <a href="'.$_SERVER["PHP_SELF"].'?action=editIRPF&amp;socid='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('Edit'),1).'</td>';
if($action == 'editIRPF'){
print '<td align="left">';
$formcompany->select_localtax(2,$object->localtax2_value, "lt2");
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
}else{
print '<td>'.$object->localtax2_value.'</td>';
}
print '</tr></form>';
}
}
/*
if ($mysoc->country_code=='ES' && $mysoc->localtax2_assuj!="1" && ! empty($conf->fournisseur->enabled) && $object->fournisseur==1)
{
print '<tr><td>'.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).'</td><td colspan="3">';
print yn($object->localtax2_assuj);
print '</td><tr>';
}
*/
// Type + Staff
$arr = $formcompany->typent_array(1);
$object->typent= $arr[$object->typent_code];
@ -2185,6 +2186,26 @@ else
print '<div class="underbanner clearboth"></div>';
print '<table class="border tableforfield" width="100%">';
// Tags / categories
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire))
{
// Customer
if ($object->prospect || $object->client) {
print '<tr><td>' . $langs->trans("CustomersCategoriesShort") . '</td>';
print '<td>';
print $form->showCategories($object->id, 'customer', 1);
print "</td></tr>";
}
// Supplier
if ($object->fournisseur) {
print '<tr><td>' . $langs->trans("SuppliersCategoriesShort") . '</td>';
print '<td>';
print $form->showCategories($object->id, 'supplier', 1);
print "</td></tr>";
}
}
// Legal
print '<tr><td class="titlefield">'.$langs->trans('JuridicalStatus').'</td><td>'.$object->forme_juridique.'</td></tr>';
@ -2207,26 +2228,6 @@ else
print '</td></tr>';
}
// Tags / categories
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire))
{
// Customer
if ($object->prospect || $object->client) {
print '<tr><td>' . $langs->trans("CustomersCategoriesShort") . '</td>';
print '<td>';
print $form->showCategories($object->id, 'customer', 1);
print "</td></tr>";
}
// Supplier
if ($object->fournisseur) {
print '<tr><td>' . $langs->trans("SuppliersCategoriesShort") . '</td>';
print '<td>';
print $form->showCategories($object->id, 'supplier', 1);
print "</td></tr>";
}
}
// Incoterms
if (!empty($conf->incoterm->enabled))
{

View File

@ -1840,7 +1840,7 @@ if ($action == 'create')
$var = true;
$somethingshown = $formfile->show_documents('supplier_proposal', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang);
print $formfile->showdocuments('supplier_proposal', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang);
// Show links to link elements

View File

@ -4574,9 +4574,6 @@ img.demothumb {
background-size: 20px auto;
margin-top: 2px;
}
select {
width: 100%;
}
}
/* rule to reduce top menu - 3rd reduction */
@media only screen and (max-width: <?php echo round($nbtopmenuentries * $fontsize * 3.4, 0) + 8; ?>px)
@ -4637,6 +4634,19 @@ img.demothumb {
max-width: 100px;
min-width: 0 !important;
}
div.divphotoref {
padding-right: 5px;
}
img.photoref, div.photoref {
border: none;
-moz-box-shadow: none;
-webkit-box-shadow: none;
box-shadow: none;
padding: 4px;
height: 20px;
width: 20px;
object-fit: contain;
}
}

View File

@ -4445,6 +4445,25 @@ img.demothumb {
position: absolute;
width: <?php print dol_size(300,'width'); ?>px;
}
select {
width: 100%;
max-width: 100px;
min-width: 0 !important;
}
div.divphotoref {
padding-right: 5px;
}
img.photoref, div.photoref {
border: none;
-moz-box-shadow: none;
-webkit-box-shadow: none;
box-shadow: none;
padding: 4px;
height: 20px;
width: 20px;
object-fit: contain;
}
}

View File

@ -76,7 +76,6 @@ $object->info($id); // This overwrite ->ref with login instead of id
print '<div class="fichecenter">';
print '<div class="underbanner clearboth"></div>';
print '<br>';