Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
392d75b89e
@ -5100,7 +5100,68 @@ class Form
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
if (((! is_array($restrictlinksto)) || in_array('supplier_order',$restrictlinksto))
|
||||
if ((in_array('fichinter',$restrictlinksto)) && ! empty($conf->ficheinter->enabled))
|
||||
{
|
||||
$linktoelem.=($linktoelem?' ':'').'<a href="#" id="linktoorder">' . $langs->trans('LinkedFichinter') . '</a>';
|
||||
|
||||
print '
|
||||
<script type="text/javascript" language="javascript">
|
||||
jQuery(document).ready(function() {
|
||||
jQuery("#linktoorder").click(function() {
|
||||
jQuery("#orderlist").toggle();
|
||||
jQuery("#linktoorder").toggle();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
';
|
||||
|
||||
print '<div id="orderlist"'.(empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)?' style="display:none"':'').'>';
|
||||
|
||||
$sql = "SELECT s.rowid as socid, s.nom as name, s.client, f.rowid, f.ref";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "societe as s";
|
||||
$sql .= ", " . MAIN_DB_PREFIX . "fichinter as f";
|
||||
$sql .= ' WHERE f.fk_soc = s.rowid';
|
||||
|
||||
$resqlorderlist = $this->db->query($sql);
|
||||
if ($resqlorderlist)
|
||||
{
|
||||
$num = $this->db->num_rows($resqlorderlist);
|
||||
$i = 0;
|
||||
|
||||
print '<br><form action="" method="POST" name="LinkedFichinter">';
|
||||
print '<table class="noborder">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="nowrap"></td>';
|
||||
print '<td align="center">' . $langs->trans("Ref") . '</td>';
|
||||
print '<td align="left">' . $langs->trans("Company") . '</td>';
|
||||
print '</tr>';
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $this->db->fetch_object($resqlorderlist);
|
||||
|
||||
$var = ! $var;
|
||||
print '<tr ' . $bc [$var] . '>';
|
||||
print '<td aling="left">';
|
||||
print '<input type="radio" name="LinkedFichinter" value=' . $objp->rowid . '>';
|
||||
print '<td align="center">' . $objp->ref . '</td>';
|
||||
print '<td>' . $objp->name . '</td>';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
$i ++;
|
||||
}
|
||||
print '</table>';
|
||||
print '<div class="center"><input type="submit" class="button" value="' . $langs->trans('ToLink') . '"> <input type="submit" class="button" name="cancel" value="' . $langs->trans('Cancel') . '"></div>';
|
||||
print '</form>';
|
||||
$this->db->free($resqlorderlist);
|
||||
} else {
|
||||
dol_print_error($this->db);
|
||||
}
|
||||
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
if (((! is_array($restrictlinksto)) || in_array('supplier_order',$restrictlinksto))
|
||||
&& ! empty($conf->fournisseur->enabled))
|
||||
{
|
||||
$linktoelem.=($linktoelem?' ':'').'<a href="#linktoorder" id="linktoorder">' . $langs->trans('LinkedOrder') . '</a>';
|
||||
|
||||
@ -210,9 +210,9 @@ class modUser extends DolibarrModules
|
||||
$this->export_code[$r]=$this->rights_class.'_'.$r;
|
||||
$this->export_label[$r]='Liste des utilisateurs Dolibarr et attributs';
|
||||
$this->export_permission[$r]=array(array("user","user","export"));
|
||||
$this->export_fields_array[$r]=array('u.rowid'=>"Id",'u.login'=>"Login",'u.lastname'=>"Lastname",'u.firstname'=>"Firstname",'u.office_phone'=>'Phone','u.office_fax'=>'Fax','u.email'=>'EMail','u.datec'=>"DateCreation",'u.tms'=>"DateLastModification",'u.admin'=>"Administrator",'u.statut'=>'Status','u.note'=>"Note",'u.datelastlogin'=>'LastConnexion','u.datepreviouslogin'=>'PreviousConnexion','u.fk_socpeople'=>"IdContact",'u.fk_soc'=>"IdCompany",'u.fk_member'=>"MemberId");
|
||||
$this->export_TypeFields_array[$r]=array('u.login'=>"Text",'u.lastname'=>"Text",'u.firstname'=>"Text",'u.office_phone'=>'Text','u.office_fax'=>'Text','u.email'=>'Text','u.datec'=>"Date",'u.tms'=>"Date",'u.admin'=>"Boolean",'u.statut'=>'Status','u.note'=>"Text",'u.datelastlogin'=>'Date','u.datepreviouslogin'=>'Date','u.fk_soc'=>"List:societe:nom:rowid",'u.fk_member'=>"List:adherent:firstname");
|
||||
$this->export_entities_array[$r]=array('u.rowid'=>"user",'u.login'=>"user",'u.lastname'=>"user",'u.firstname'=>"user",'u.office_phone'=>'user','u.office_fax'=>'user','u.email'=>'user','u.datec'=>"user",'u.tms'=>"user",'u.admin'=>"user",'u.statut'=>'user','u.note'=>"user",'u.datelastlogin'=>'user','u.datepreviouslogin'=>'user','u.fk_socpeople'=>"contact",'u.fk_soc'=>"company",'u.fk_member'=>"member");
|
||||
$this->export_fields_array[$r]=array('u.rowid'=>"Id",'u.login'=>"Login",'u.lastname'=>"Lastname",'u.firstname'=>"Firstname",'u.accountancy_code'=>"UserAccountancyCode",'u.office_phone'=>'Phone','u.office_fax'=>'Fax','u.email'=>'EMail','u.datec'=>"DateCreation",'u.tms'=>"DateLastModification",'u.admin'=>"Administrator",'u.statut'=>'Status','u.note'=>"Note",'u.datelastlogin'=>'LastConnexion','u.datepreviouslogin'=>'PreviousConnexion','u.fk_socpeople'=>"IdContact",'u.fk_soc'=>"IdCompany",'u.fk_member'=>"MemberId");
|
||||
$this->export_TypeFields_array[$r]=array('u.login'=>"Text",'u.lastname'=>"Text",'u.firstname'=>"Text",'u.accountancy_code'=>'Text','u.office_phone'=>'Text','u.office_fax'=>'Text','u.email'=>'Text','u.datec'=>"Date",'u.tms'=>"Date",'u.admin'=>"Boolean",'u.statut'=>'Status','u.note'=>"Text",'u.datelastlogin'=>'Date','u.datepreviouslogin'=>'Date','u.fk_soc'=>"List:societe:nom:rowid",'u.fk_member'=>"List:adherent:firstname");
|
||||
$this->export_entities_array[$r]=array('u.rowid'=>"user",'u.login'=>"user",'u.lastname'=>"user",'u.firstname'=>"user",'u.accountancy_code'=>'user','u.office_phone'=>'user','u.office_fax'=>'user','u.email'=>'user','u.datec'=>"user",'u.tms'=>"user",'u.admin'=>"user",'u.statut'=>'user','u.note'=>"user",'u.datelastlogin'=>'user','u.datepreviouslogin'=>'user','u.fk_socpeople'=>"contact",'u.fk_soc'=>"company",'u.fk_member'=>"member");
|
||||
if (empty($conf->adherent->enabled))
|
||||
{
|
||||
unset($this->export_fields_array[$r]['u.fk_member']);
|
||||
|
||||
@ -1829,7 +1829,6 @@ else
|
||||
$defaultvat=-1;
|
||||
if (! empty($conf->global->EXPENSEREPORT_NO_DEFAULT_VAT)) $conf->global->MAIN_VAT_DEFAULT_IF_AUTODETECT_FAILS = 'none';
|
||||
print '<select class="flat" name="vatrate">';
|
||||
print '<option name="none" value="" selected>';
|
||||
print $form->load_tva('vatrate', ($vatrate!=''?$vatrate:$defaultvat), $mysoc, '', 0, 0, '', true);
|
||||
print '</select>';
|
||||
print '</td>';
|
||||
@ -2087,7 +2086,28 @@ if($user->rights->expensereport->export && $object->fk_statut>0 && $action != 'e
|
||||
|
||||
print '</div>';
|
||||
|
||||
if ($action != 'create' && $action != 'edit' && ($id || $ref))
|
||||
{
|
||||
$permissiondellink=$user->rights->facture->creer; // Used by the include of actions_dellink.inc.php
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be include, not include_once
|
||||
|
||||
// Link invoice to intervention
|
||||
if (GETPOST('LinkedFichinter')) {
|
||||
$object->fetch($id);
|
||||
$object->fetch_thirdparty();
|
||||
$result = $object->add_object_linked('fichinter', GETPOST('LinkedFichinter'));
|
||||
}
|
||||
// Linked object block
|
||||
$somethingshown = $form->showLinkedObjectBlock($object);
|
||||
|
||||
// Show links to link elements
|
||||
$linktoelements=array();
|
||||
if($conf->global->EXPENSES_LINK_TO_INTERVENTION) $linktoelements[]='fichinter';
|
||||
$linktoelem='';
|
||||
$linktoelem = $form->showLinkToObjectBlock($object,$linktoelements);
|
||||
if ($linktoelem) print '<br>'.$linktoelem;
|
||||
|
||||
}
|
||||
llxFooter();
|
||||
|
||||
$db->close();
|
||||
|
||||
@ -35,7 +35,7 @@ $id = GETPOST('id','int');
|
||||
|
||||
// Security check
|
||||
if ($user->societe_id) $socid=$user->societe_id;
|
||||
$result = restrictedArea($user, 'ficheinter', $fichinterid, 'fichinter');
|
||||
$result = restrictedArea($user, 'ficheinter', $id, 'fichinter');
|
||||
|
||||
$object = new Fichinter($db);
|
||||
|
||||
|
||||
@ -220,4 +220,5 @@ AddExtraReport=Extra reports
|
||||
OtherCountriesCustomersReport=Foreign customers report
|
||||
BasedOnTwoFirstLettersOfVATNumberBeingDifferentFromYourCompanyCountry=Based on the two first letters of the VAT number being different from your own company's country code
|
||||
SameCountryCustomersWithVAT=National customers report
|
||||
BasedOnTwoFirstLettersOfVATNumberBeingTheSameAsYourCompanyCountry=Based on the two first letters of the VAT number being the same as your own company's country code
|
||||
BasedOnTwoFirstLettersOfVATNumberBeingTheSameAsYourCompanyCountry=Based on the two first letters of the VAT number being the same as your own company's country code
|
||||
LinkedFichinter=Link to an intervention
|
||||
|
||||
@ -122,3 +122,4 @@ LoginUsingOpenID=Use OpenID to login
|
||||
WeeklyHours=Weekly hours
|
||||
ColorUser=Color of the user
|
||||
DisabledInMonoUserMode=Disabled in maintenance mode
|
||||
UserAccountancyCode=User accountancy code
|
||||
@ -221,3 +221,4 @@ OtherCountriesCustomersReport=Rapport client étranger
|
||||
BasedOnTwoFirstLettersOfVATNumberBeingDifferentFromYourCompanyCountry=Basé sur les deux premières lettres du numéro de TVA étant différent du code de pays de votre propre entreprise
|
||||
SameCountryCustomersWithVAT=Rapport clients nationaux
|
||||
BasedOnTwoFirstLettersOfVATNumberBeingTheSameAsYourCompanyCountry=Basé sur les deux premières lettres du numéro de TVA étant les mêmes que le code pays de votre propre entreprise
|
||||
LinkedFichinter=Lier à une intervention
|
||||
|
||||
Loading…
Reference in New Issue
Block a user