Debug v13
This commit is contained in:
parent
1f28590e5e
commit
cfa194436f
@ -960,7 +960,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
||||
if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) {
|
||||
print '<tr><td>'.$form->editfieldkey("Categories", 'memcats', '', $object, 0).'</td><td>';
|
||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_MEMBER, null, 'parent', null, null, 1);
|
||||
print $form->multiselectarray('memcats', $cate_arbo, GETPOST('memcats', 'array'), null, null, null, null, '100%');
|
||||
print img_picto('', 'category').$form->multiselectarray('memcats', $cate_arbo, GETPOST('memcats', 'array'), null, null, 'quatrevingtpercent widthcentpercentminusx', 0, 0);
|
||||
print "</td></tr>";
|
||||
}
|
||||
|
||||
|
||||
@ -540,6 +540,8 @@ if ($object->id > 0)
|
||||
|
||||
if ($user->rights->supplier_proposal->lire)
|
||||
{
|
||||
$langs->loadLangs(array("supplier_proposal"));
|
||||
|
||||
$sql = "SELECT p.rowid, p.ref, p.date_valid as dc, p.fk_statut, p.total_ht, p.tva as total_tva, p.total as total_ttc";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."supplier_proposal as p ";
|
||||
$sql .= " WHERE p.fk_soc =".$object->id;
|
||||
|
||||
@ -73,3 +73,4 @@ JobClosedTextCandidateFound=The job position is closed. The position has been fi
|
||||
JobClosedTextCanceled=The job position is closed.
|
||||
ExtrafieldsJobPosition=Complementary attributes (job positions)
|
||||
ExtrafieldsCandidatures=Complementary attributes (job applications)
|
||||
MakeOffer=Make an offer
|
||||
|
||||
@ -587,7 +587,7 @@ if ($action == 'create' && $user->rights->projet->creer)
|
||||
print '</td><td class="maxwidthonsmartphone">';
|
||||
$filteronlist = '';
|
||||
if (!empty($conf->global->PROJECT_FILTER_FOR_THIRDPARTY_LIST)) $filteronlist = $conf->global->PROJECT_FILTER_FOR_THIRDPARTY_LIST;
|
||||
$text = img_picto('', 'company').$form->select_company(GETPOST('socid', 'int'), 'socid', $filteronlist, 'SelectThirdParty', 1, 0, array(), 0, 'minwidth300 widthcentpercentminusx');
|
||||
$text = img_picto('', 'company').$form->select_company(GETPOST('socid', 'int'), 'socid', $filteronlist, 'SelectThirdParty', 1, 0, array(), 0, 'minwidth300 widthcentpercentminusxx');
|
||||
if (empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS) && empty($conf->dol_use_jmobile))
|
||||
{
|
||||
$texthelp = $langs->trans("IfNeedToUseOtherObjectKeepEmpty");
|
||||
|
||||
@ -1252,7 +1252,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
|
||||
print '<td>'.$form->editfieldkey('Vendor', 'fournisseur', '', $object, 0, 'string', '', 1).'</td><td>';
|
||||
$default = -1;
|
||||
if (!empty($conf->global->THIRDPARTY_SUPPLIER_BY_DEFAULT)) $default = 1;
|
||||
print $form->selectyesno("fournisseur", (GETPOST('fournisseur', 'int') != '' ? GETPOST('fournisseur', 'int') : (GETPOST("type", 'alpha') == '' ? $default : $object->fournisseur)), 1, 0, (GETPOST("type", 'alpha') == '' ? 1 : 0));
|
||||
print $form->selectyesno("fournisseur", (GETPOST('fournisseur', 'int') != '' ? GETPOST('fournisseur', 'int') : (GETPOST("type", 'alpha') == '' ? $default : $object->fournisseur)), 1, 0, (GETPOST("type", 'alpha') == '' ? 1 : 0), 1);
|
||||
print '</td>';
|
||||
|
||||
|
||||
@ -1280,7 +1280,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
|
||||
|
||||
// Status
|
||||
print '<tr><td>'.$form->editfieldkey('Status', 'status', '', $object, 0).'</td><td colspan="3">';
|
||||
print $form->selectarray('status', array('0'=>$langs->trans('ActivityCeased'), '1'=>$langs->trans('InActivity')), 1);
|
||||
print $form->selectarray('status', array('0'=>$langs->trans('ActivityCeased'), '1'=>$langs->trans('InActivity')), 1, 0, 0, 0, '', 0, 0, 0, '', 'minwidth100', 1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Barcode
|
||||
@ -1364,11 +1364,9 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
|
||||
|
||||
// Prof ids
|
||||
$i = 1; $j = 0; $NBCOLS = ($conf->browser->layout == 'phone' ? 1 : 2);
|
||||
while ($i <= 6)
|
||||
{
|
||||
while ($i <= 6) {
|
||||
$idprof = $langs->transcountry('ProfId'.$i, $object->country_code);
|
||||
if ($idprof != '-')
|
||||
{
|
||||
if ($idprof != '-') {
|
||||
$key = 'idprof'.$i;
|
||||
|
||||
if (($j % $NBCOLS) == 0) print '<tr>';
|
||||
@ -1395,12 +1393,10 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
|
||||
print '<td class="nowrap">';
|
||||
$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) && isInEEC($object))
|
||||
{
|
||||
if (empty($conf->global->MAIN_DISABLEVATCHECK) && isInEEC($object)) {
|
||||
$s .= ' ';
|
||||
|
||||
if (!empty($conf->use_javascript_ajax))
|
||||
{
|
||||
if (!empty($conf->use_javascript_ajax)) {
|
||||
$widthpopup = 600;
|
||||
if (!empty($conf->dol_use_jmobile)) $widthpopup = 350;
|
||||
$heightpopup = 400;
|
||||
@ -1447,12 +1443,12 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
|
||||
// Type - Workforce/Staff
|
||||
print '<tr><td>'.$form->editfieldkey('ThirdPartyType', 'typent_id', '', $object, 0).'</td><td class="maxwidthonsmartphone"'.($conf->browser->layout == 'phone' ? ' colspan="3"' : '').'>'."\n";
|
||||
$sortparam = (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT); // NONE means we keep sort of original array, so we sort on position. ASC, means next function will sort on label.
|
||||
print $form->selectarray("typent_id", $formcompany->typent_array(0), $object->typent_id, 0, 0, 0, '', 0, 0, 0, $sortparam);
|
||||
print $form->selectarray("typent_id", $formcompany->typent_array(0), $object->typent_id, 0, 0, 0, '', 0, 0, 0, $sortparam, '', 1);
|
||||
if ($user->admin) print ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
||||
print '</td>';
|
||||
if ($conf->browser->layout == 'phone') print '</tr><tr>';
|
||||
print '<td>'.$form->editfieldkey('Workforce', 'effectif_id', '', $object, 0).'</td><td class="maxwidthonsmartphone"'.($conf->browser->layout == 'phone' ? ' colspan="3"' : '').'>';
|
||||
print $form->selectarray("effectif_id", $formcompany->effectif_array(0), $object->effectif_id);
|
||||
print $form->selectarray("effectif_id", $formcompany->effectif_array(0), $object->effectif_id, 0, 0, 0, '', 0, 0, 0, '', '', 1);
|
||||
if ($user->admin) print ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
||||
print '</td></tr>';
|
||||
|
||||
@ -1499,7 +1495,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
|
||||
//if ($object->prospect || $object->client || (! $object->fournisseur && ! empty($conf->global->THIRDPARTY_CAN_HAVE_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT_SUPPLIER))) {
|
||||
print '<tr class="visibleifcustomer"><td class="toptd">'.$form->editfieldkey('CustomersProspectsCategoriesShort', 'custcats', '', $object, 0).'</td><td colspan="3">';
|
||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_CUSTOMER, null, 'parent', null, null, 1);
|
||||
print $form->multiselectarray('custcats', $cate_arbo, GETPOST('custcats', 'array'), null, null, null, null, "90%");
|
||||
print img_picto('', 'category').$form->multiselectarray('custcats', $cate_arbo, GETPOST('custcats', 'array'), null, null, 'quatrevingtpercent widthcentpercentminusx', 0, 0);
|
||||
print "</td></tr>";
|
||||
//}
|
||||
|
||||
@ -1507,7 +1503,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
|
||||
//if ($object->fournisseur) {
|
||||
print '<tr class="visibleifsupplier"><td class="toptd">'.$form->editfieldkey('SuppliersCategoriesShort', 'suppcats', '', $object, 0).'</td><td colspan="3">';
|
||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_SUPPLIER, null, 'parent', null, null, 1);
|
||||
print $form->multiselectarray('suppcats', $cate_arbo, GETPOST('suppcats', 'array'), null, null, null, null, "90%");
|
||||
print img_picto('', 'category').$form->multiselectarray('suppcats', $cate_arbo, GETPOST('suppcats', 'array'), null, null, 'quatrevingtpercent widthcentpercentminusx', 0, 0);
|
||||
print "</td></tr>";
|
||||
//}
|
||||
}
|
||||
@ -1533,7 +1529,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
|
||||
$userlist = $form->select_dolusers('', '', 0, null, 0, '', '', 0, 0, 0, 'AND u.statut = 1', 0, '', '', 0, 1);
|
||||
// Note: If user has no right to "see all thirdparties", we force selection of sale representative to him, so after creation he can see the record.
|
||||
$selected = (count(GETPOST('commercial', 'array')) > 0 ? GETPOST('commercial', 'array') : (GETPOST('commercial', 'int') > 0 ? array(GETPOST('commercial', 'int')) : (empty($user->rights->societe->client->voir) ? array($user->id) : array())));
|
||||
print $form->multiselectarray('commercial', $userlist, $selected, null, null, null, null, "90%");
|
||||
print img_picto('', 'user').$form->multiselectarray('commercial', $userlist, $selected, null, null, 'quatrevingtpercent widthcentpercentminusx', 0, 0);
|
||||
print '</td></tr>';
|
||||
|
||||
// Ajout du logo
|
||||
@ -1561,8 +1557,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
|
||||
print '</div>'."\n";
|
||||
|
||||
print '</form>'."\n";
|
||||
} elseif ($action == 'edit')
|
||||
{
|
||||
} elseif ($action == 'edit') {
|
||||
//print load_fiche_titre($langs->trans("EditCompany"));
|
||||
|
||||
if ($socid)
|
||||
@ -1851,7 +1846,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
|
||||
print '<tr>';
|
||||
print '<td>'.$form->editfieldkey('Supplier', 'fournisseur', '', $object, 0, 'string', '', 1).'</td>';
|
||||
print '<td class="maxwidthonsmartphone">';
|
||||
print $form->selectyesno("fournisseur", $object->fournisseur, 1);
|
||||
print $form->selectyesno("fournisseur", $object->fournisseur, 1, false, 0, 1);
|
||||
print '</td>';
|
||||
if ($conf->browser->layout == 'phone') print '</tr><tr>';
|
||||
print '<td>';
|
||||
@ -1892,7 +1887,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
|
||||
|
||||
// Status
|
||||
print '<tr><td>'.$form->editfieldkey('Status', 'status', '', $object, 0).'</td><td colspan="3">';
|
||||
print $form->selectarray('status', array('0'=>$langs->trans('ActivityCeased'), '1'=>$langs->trans('InActivity')), $object->status);
|
||||
print $form->selectarray('status', array('0'=>$langs->trans('ActivityCeased'), '1'=>$langs->trans('InActivity')), $object->status, 0, 0, 0, '', 0, 0, 0, '', 'minwidth100', 1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Address
|
||||
@ -2069,12 +2064,12 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
|
||||
|
||||
// Type - Workforce/Staff
|
||||
print '<tr><td>'.$form->editfieldkey('ThirdPartyType', 'typent_id', '', $object, 0).'</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));
|
||||
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), '', 1);
|
||||
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
||||
print '</td>';
|
||||
if ($conf->browser->layout == 'phone') print '</tr><tr>';
|
||||
print '<td>'.$form->editfieldkey('Workforce', 'effectif_id', '', $object, 0).'</td><td class="maxwidthonsmartphone">';
|
||||
print $form->selectarray("effectif_id", $formcompany->effectif_array(0), $object->effectif_id);
|
||||
print $form->selectarray("effectif_id", $formcompany->effectif_array(0), $object->effectif_id, 0, 0, 0, '', 0, 0, 0, '', '', 1);
|
||||
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
||||
print '</td></tr>';
|
||||
|
||||
@ -2121,7 +2116,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
|
||||
foreach ($cats as $cat) {
|
||||
$arrayselected[] = $cat->id;
|
||||
}
|
||||
print $form->multiselectarray('custcats', $cate_arbo, $arrayselected, '', 0, '', 0, '90%');
|
||||
print img_picto('', 'category').$form->multiselectarray('custcats', $cate_arbo, $arrayselected, 0, 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0);
|
||||
print "</td></tr>";
|
||||
|
||||
// Supplier
|
||||
@ -2134,7 +2129,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
|
||||
foreach ($cats as $cat) {
|
||||
$arrayselected[] = $cat->id;
|
||||
}
|
||||
print $form->multiselectarray('suppcats', $cate_arbo, $arrayselected, '', 0, '', 0, '90%');
|
||||
print img_picto('', 'category').$form->multiselectarray('suppcats', $cate_arbo, $arrayselected, 0, 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0);
|
||||
print "</td></tr>";
|
||||
}
|
||||
|
||||
@ -2185,7 +2180,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
|
||||
$userlist = $form->select_dolusers('', '', 0, null, 0, '', '', 0, 0, 0, 'AND u.statut = 1', 0, '', '', 0, 1);
|
||||
$arrayselected = GETPOST('commercial', 'array');
|
||||
if (empty($arrayselected)) $arrayselected = $object->getSalesRepresentatives($user, 1);
|
||||
print $form->multiselectarray('commercial', $userlist, $arrayselected, null, null, null, null, "90%");
|
||||
print img_picto('', 'user').$form->multiselectarray('commercial', $userlist, $arrayselected, 0, 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0, '', '', '', 1);
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user