mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-05 09:08:09 +01:00
Merge remote-tracking branch 'origin/3.5' into develop
Conflicts: ChangeLog build/debian/changelog build/doxygen/dolibarr-doxygen.doxyfile build/exe/doliwamp/doliwamp.iss build/makepack-dolibarr.pl build/perl/virtualmin/dolibarr.pl build/rpm/dolibarr_fedora.spec build/rpm/dolibarr_generic.spec build/rpm/dolibarr_mandriva.spec build/rpm/dolibarr_opensuse.spec htdocs/comm/action/fiche.php htdocs/filefunc.inc.php htdocs/install/check.php
This commit is contained in:
18
ChangeLog
18
ChangeLog
@@ -51,6 +51,24 @@ removed. You must now use the 6 parameters way. See file modMyModule.class.php f
|
||||
- Remove the javascrit function ac_delay() that is not used anymore by core code.
|
||||
|
||||
|
||||
***** ChangeLog for 3.5.1 compared to 3.5.0 *****
|
||||
Fix: Bug of import of agenda when using https link
|
||||
Fix: Field nature not saved correctly
|
||||
Fix: Substituion of extra field was ko for order
|
||||
Fix: Bad translation of date format for pt_BR.
|
||||
Fix: priority field of agenda record is smallint.
|
||||
Fix: Missing loading of lang in some pages.
|
||||
Fix: Write note in invoice when using pos module.
|
||||
Fix: Link to paypal was invalid into email text.
|
||||
Fix: ref and date of supplier invoice.
|
||||
Fix: Check on bank account.
|
||||
Fix: Problem with file upload and download.
|
||||
Fix: Page load not ending when large number of thirdparies. We
|
||||
added option MAIN_DISABLE_AJAX_COMBOX to disable javascript
|
||||
combo feature that is root cause of problem.
|
||||
Fix: [ bug #1231 ] PDF always generated in interventions
|
||||
Fix: Be sure there is no duplicate default rib.
|
||||
|
||||
***** ChangeLog for 3.5 compared to 3.4.* *****
|
||||
For users:
|
||||
- New: Add hidden option BANK_DISABLE_DIRECT_INPUT.
|
||||
|
||||
@@ -3,7 +3,14 @@ dolibarr (3.6.0-1) unstable; urgency=low
|
||||
[ Laurent Destailleur (eldy) ]
|
||||
* New upstream release.
|
||||
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Mon, 30 Dec 2013 12:00:00 +0100
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Sat, 8 Feb 2014 12:00:00 +0100
|
||||
|
||||
dolibarr (3.5.1-3) unstable; urgency=low
|
||||
|
||||
[ Laurent Destailleur (eldy) ]
|
||||
* New upstream release.
|
||||
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Fri, 7 Feb 2014 12:00:00 +0100
|
||||
|
||||
dolibarr (3.5.0-3) unstable; urgency=low
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ return "Regis Houssin";
|
||||
# script_dolibarr_versions()
|
||||
sub script_dolibarr_versions
|
||||
{
|
||||
return ( "3.6.0", "3.5.0", "3.4.1", "3.4.0", "3.3.3", "3.3.2", "3.3.1", "3.3.0", "3.2.1", "3.1.1" );
|
||||
return ( "3.6.0", "3.5.1", "3.5.0", "3.4.1", "3.4.0", "3.3.3", "3.3.2", "3.3.1", "3.3.0", "3.2.1", "3.1.1" );
|
||||
}
|
||||
|
||||
sub script_dolibarr_category
|
||||
|
||||
@@ -331,5 +331,8 @@ fi
|
||||
|
||||
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
|
||||
%changelog
|
||||
* Mon Dec 30 2013 Laurent Destailleur 3.6.0-0.2.b
|
||||
* Fri Feb 7 2014 Laurent Destailleur 3.6.0-0.2.b
|
||||
- Upstream release
|
||||
|
||||
* Mon Dec 30 2013 Laurent Destailleur 3.5.0-0.3
|
||||
- Initial version (#723326)
|
||||
|
||||
@@ -559,5 +559,8 @@ fi
|
||||
|
||||
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
|
||||
%changelog
|
||||
* Mon Dec 30 2013 Laurent Destailleur 3.6.0-0.2.b
|
||||
* Mon Feb 7 2014 Laurent Destailleur 3.6.0-0.2.b
|
||||
- Upstream release
|
||||
|
||||
* Mon Dec 30 2013 Laurent Destailleur 3.5.0-0.3
|
||||
- Initial version (#723326)
|
||||
|
||||
@@ -336,5 +336,8 @@ fi
|
||||
|
||||
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
|
||||
%changelog
|
||||
* Mon Dec 30 2013 Laurent Destailleur 3.6.0-0.2.b
|
||||
* Mon Feb 7 2014 Laurent Destailleur 3.6.0-0.2.b
|
||||
- Upstream release
|
||||
|
||||
* Mon Dec 30 2013 Laurent Destailleur 3.5.0-0.3
|
||||
- Initial version (#723326)
|
||||
|
||||
@@ -346,5 +346,8 @@ fi
|
||||
|
||||
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
|
||||
%changelog
|
||||
* Mon Dec 30 2013 Laurent Destailleur 3.6.0-0.2.b
|
||||
* Mon Feb 7 2014 Laurent Destailleur 3.6.0-0.2.b
|
||||
- Upstream release
|
||||
|
||||
* Mon Dec 30 2013 Laurent Destailleur 3.5.0-0.3
|
||||
- Initial version (#723326)
|
||||
|
||||
@@ -67,7 +67,7 @@ if ($actionsave)
|
||||
$color=trim(GETPOST('agenda_ext_color'.$i,'alpha'));
|
||||
if ($color=='-1') $color='';
|
||||
|
||||
if (! empty($src) && ! preg_match('/^(http\s*|ftp\s*):/', $src))
|
||||
if (! empty($src) && ! dol_is_url($src))
|
||||
{
|
||||
setEventMessage($langs->trans("ErrorParamMustBeAnUrl"),'errors');
|
||||
$error++;
|
||||
|
||||
@@ -55,16 +55,16 @@ if ($user->societe_id > 0)
|
||||
}
|
||||
$result = restrictedArea($user, 'agenda', $objectid, 'actioncomm&societe', 'myactions&allactions', 'fk_soc', 'id');
|
||||
|
||||
$act = new ActionComm($db);
|
||||
$object = new ActionComm($db);
|
||||
|
||||
if ($objectid > 0)
|
||||
{
|
||||
$ret = $act->fetch($objectid);
|
||||
$ret = $object->fetch($objectid);
|
||||
if ($ret > 0) {
|
||||
$company=new Societe($db);
|
||||
$company->fetch($act->societe->id);
|
||||
$act->societe=$company; // For backward compatibility
|
||||
$act->thirdparty=$company;
|
||||
$company->fetch($object->societe->id);
|
||||
$object->societe=$company; // For backward compatibility
|
||||
$object->thirdparty=$company;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,6 +79,9 @@ $pagenext = $page + 1;
|
||||
if (! $sortorder) $sortorder="ASC";
|
||||
if (! $sortfield) $sortfield="name";
|
||||
|
||||
$upload_dir = $conf->agenda->dir_output.'/'.dol_sanitizeFileName($object->ref);
|
||||
$modulepart='contract';
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
@@ -96,17 +99,15 @@ $help_url='EN:Module_Agenda_En|FR:Module_Agenda|ES:M&omodulodulo_Agenda';
|
||||
llxHeader('',$langs->trans("Agenda"),$help_url);
|
||||
|
||||
|
||||
if ($act->id > 0)
|
||||
if ($object->id > 0)
|
||||
{
|
||||
$upload_dir = $conf->agenda->dir_output.'/'.dol_sanitizeFileName($objectid);
|
||||
|
||||
$author=new User($db);
|
||||
$author->fetch($act->author->id);
|
||||
$act->author=$author;
|
||||
$author->fetch($object->author->id);
|
||||
$object->author=$author;
|
||||
|
||||
if ($act->contact->id) $act->fetch_contact($act->contact->id);
|
||||
if ($object->contact->id) $object->fetch_contact($object->contact->id);
|
||||
|
||||
$head=actions_prepare_head($act);
|
||||
$head=actions_prepare_head($object);
|
||||
dol_fiche_head($head, 'documents', $langs->trans("Action"),0,'action');
|
||||
|
||||
// Affichage fiche action en mode visu
|
||||
@@ -116,53 +117,53 @@ if ($act->id > 0)
|
||||
|
||||
// Ref
|
||||
print '<tr><td width="30%">'.$langs->trans("Ref").'</td><td colspan="3">';
|
||||
print $form->showrefnav($act, 'id', $linkback, ($user->societe_id?0:1), 'id', 'ref', '');
|
||||
print $form->showrefnav($object, 'id', $linkback, ($user->societe_id?0:1), 'id', 'ref', '');
|
||||
print '</td></tr>';
|
||||
|
||||
// Type
|
||||
if (! empty($conf->global->AGENDA_USE_EVENT_TYPE))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Type").'</td><td colspan="3">'.$act->type.'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Type").'</td><td colspan="3">'.$object->type.'</td></tr>';
|
||||
}
|
||||
|
||||
// Title
|
||||
print '<tr><td>'.$langs->trans("Title").'</td><td colspan="3">'.$act->label.'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Title").'</td><td colspan="3">'.$object->label.'</td></tr>';
|
||||
|
||||
// Full day event
|
||||
print '<tr><td>'.$langs->trans("EventOnFullDay").'</td><td colspan="3">'.yn($act->fulldayevent).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("EventOnFullDay").'</td><td colspan="3">'.yn($object->fulldayevent).'</td></tr>';
|
||||
|
||||
// Date start
|
||||
print '<tr><td width="30%">'.$langs->trans("DateActionStart").'</td><td colspan="2">';
|
||||
if (! $act->fulldayevent) print dol_print_date($act->datep,'dayhour');
|
||||
else print dol_print_date($act->datep,'day');
|
||||
if ($act->percentage == 0 && $act->datep && $act->datep < ($now - $delay_warning)) print img_warning($langs->trans("Late"));
|
||||
if (! $object->fulldayevent) print dol_print_date($object->datep,'dayhour');
|
||||
else print dol_print_date($object->datep,'day');
|
||||
if ($object->percentage == 0 && $object->datep && $object->datep < ($now - $delay_warning)) print img_warning($langs->trans("Late"));
|
||||
print '</td>';
|
||||
print '<td rowspan="4" align="center" valign="middle" width="180">'."\n";
|
||||
print '<form name="listactionsfiltermonth" action="'.DOL_URL_ROOT.'/comm/action/index.php" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="show_month">';
|
||||
print '<input type="hidden" name="year" value="'.dol_print_date($act->datep,'%Y').'">';
|
||||
print '<input type="hidden" name="month" value="'.dol_print_date($act->datep,'%m').'">';
|
||||
print '<input type="hidden" name="day" value="'.dol_print_date($act->datep,'%d').'">';
|
||||
//print '<input type="hidden" name="day" value="'.dol_print_date($act->datep,'%d').'">';
|
||||
print '<input type="hidden" name="year" value="'.dol_print_date($object->datep,'%Y').'">';
|
||||
print '<input type="hidden" name="month" value="'.dol_print_date($object->datep,'%m').'">';
|
||||
print '<input type="hidden" name="day" value="'.dol_print_date($object->datep,'%d').'">';
|
||||
//print '<input type="hidden" name="day" value="'.dol_print_date($object->datep,'%d').'">';
|
||||
print img_picto($langs->trans("ViewCal"),'object_calendar').' <input type="submit" style="width: 120px" class="button" name="viewcal" value="'.$langs->trans("ViewCal").'">';
|
||||
print '</form>'."\n";
|
||||
print '<form name="listactionsfilterweek" action="'.DOL_URL_ROOT.'/comm/action/index.php" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="show_week">';
|
||||
print '<input type="hidden" name="year" value="'.dol_print_date($act->datep,'%Y').'">';
|
||||
print '<input type="hidden" name="month" value="'.dol_print_date($act->datep,'%m').'">';
|
||||
print '<input type="hidden" name="day" value="'.dol_print_date($act->datep,'%d').'">';
|
||||
//print '<input type="hidden" name="day" value="'.dol_print_date($act->datep,'%d').'">';
|
||||
print '<input type="hidden" name="year" value="'.dol_print_date($object->datep,'%Y').'">';
|
||||
print '<input type="hidden" name="month" value="'.dol_print_date($object->datep,'%m').'">';
|
||||
print '<input type="hidden" name="day" value="'.dol_print_date($object->datep,'%d').'">';
|
||||
//print '<input type="hidden" name="day" value="'.dol_print_date($object->datep,'%d').'">';
|
||||
print img_picto($langs->trans("ViewCal"),'object_calendarweek').' <input type="submit" style="width: 120px" class="button" name="viewweek" value="'.$langs->trans("ViewWeek").'">';
|
||||
print '</form>'."\n";
|
||||
print '<form name="listactionsfilterday" action="'.DOL_URL_ROOT.'/comm/action/index.php" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="show_day">';
|
||||
print '<input type="hidden" name="year" value="'.dol_print_date($act->datep,'%Y').'">';
|
||||
print '<input type="hidden" name="month" value="'.dol_print_date($act->datep,'%m').'">';
|
||||
print '<input type="hidden" name="day" value="'.dol_print_date($act->datep,'%d').'">';
|
||||
//print '<input type="hidden" name="day" value="'.dol_print_date($act->datep,'%d').'">';
|
||||
print '<input type="hidden" name="year" value="'.dol_print_date($object->datep,'%Y').'">';
|
||||
print '<input type="hidden" name="month" value="'.dol_print_date($object->datep,'%m').'">';
|
||||
print '<input type="hidden" name="day" value="'.dol_print_date($object->datep,'%d').'">';
|
||||
//print '<input type="hidden" name="day" value="'.dol_print_date($object->datep,'%d').'">';
|
||||
print img_picto($langs->trans("ViewCal"),'object_calendarday').' <input type="submit" style="width: 120px" class="button" name="viewday" value="'.$langs->trans("ViewDay").'">';
|
||||
print '</form>'."\n";
|
||||
print '</td>';
|
||||
@@ -170,43 +171,43 @@ if ($act->id > 0)
|
||||
|
||||
// Date end
|
||||
print '<tr><td>'.$langs->trans("DateActionEnd").'</td><td colspan="2">';
|
||||
if (! $act->fulldayevent) print dol_print_date($act->datef,'dayhour');
|
||||
else print dol_print_date($act->datef,'day');
|
||||
if ($act->percentage > 0 && $act->percentage < 100 && $act->datef && $act->datef < ($now- $delay_warning)) print img_warning($langs->trans("Late"));
|
||||
if (! $object->fulldayevent) print dol_print_date($object->datef,'dayhour');
|
||||
else print dol_print_date($object->datef,'day');
|
||||
if ($object->percentage > 0 && $object->percentage < 100 && $object->datef && $object->datef < ($now- $delay_warning)) print img_warning($langs->trans("Late"));
|
||||
print '</td></tr>';
|
||||
|
||||
// Status
|
||||
print '<tr><td class="nowrap">'.$langs->trans("Status").' / '.$langs->trans("Percentage").'</td><td colspan="2">';
|
||||
print $act->getLibStatut(4);
|
||||
print $object->getLibStatut(4);
|
||||
print '</td></tr>';
|
||||
|
||||
// Location
|
||||
print '<tr><td>'.$langs->trans("Location").'</td><td colspan="2">'.$act->location.'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Location").'</td><td colspan="2">'.$object->location.'</td></tr>';
|
||||
|
||||
|
||||
print '</table><br><br><table class="border" width="100%">';
|
||||
|
||||
|
||||
// Third party - Contact
|
||||
print '<tr><td width="30%">'.$langs->trans("ActionOnCompany").'</td><td>'.($act->societe->id?$act->societe->getNomUrl(1):$langs->trans("None"));
|
||||
if ($act->societe->id && $act->type_code == 'AC_TEL')
|
||||
print '<tr><td width="30%">'.$langs->trans("ActionOnCompany").'</td><td>'.($object->societe->id?$object->societe->getNomUrl(1):$langs->trans("None"));
|
||||
if ($object->societe->id && $object->type_code == 'AC_TEL')
|
||||
{
|
||||
if ($act->societe->fetch($act->societe->id))
|
||||
if ($object->societe->fetch($object->societe->id))
|
||||
{
|
||||
print "<br>".dol_print_phone($act->societe->phone);
|
||||
print "<br>".dol_print_phone($object->societe->phone);
|
||||
}
|
||||
}
|
||||
print '</td>';
|
||||
print '<td>'.$langs->trans("Contact").'</td>';
|
||||
print '<td>';
|
||||
if ($act->contact->id > 0)
|
||||
if ($object->contact->id > 0)
|
||||
{
|
||||
print $act->contact->getNomUrl(1);
|
||||
if ($act->contact->id && $act->type_code == 'AC_TEL')
|
||||
print $object->contact->getNomUrl(1);
|
||||
if ($object->contact->id && $object->type_code == 'AC_TEL')
|
||||
{
|
||||
if ($act->contact->fetch($act->contact->id))
|
||||
if ($object->contact->fetch($object->contact->id))
|
||||
{
|
||||
print "<br>".dol_print_phone($act->contact->phone_pro);
|
||||
print "<br>".dol_print_phone($object->contact->phone_pro);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -221,10 +222,10 @@ if ($act->id > 0)
|
||||
if (! empty($conf->projet->enabled))
|
||||
{
|
||||
print '<tr><td valign="top">'.$langs->trans("Project").'</td><td colspan="3">';
|
||||
if ($act->fk_project)
|
||||
if ($object->fk_project)
|
||||
{
|
||||
$project=new Project($db);
|
||||
$project->fetch($act->fk_project);
|
||||
$project->fetch($object->fk_project);
|
||||
print $project->getNomUrl(1);
|
||||
}
|
||||
print '</td></tr>';
|
||||
@@ -232,7 +233,7 @@ if ($act->id > 0)
|
||||
|
||||
// Priority
|
||||
print '<tr><td class="nowrap">'.$langs->trans("Priority").'</td><td colspan="3">';
|
||||
print ($act->priority?$act->priority:'');
|
||||
print ($object->priority?$object->priority:'');
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@@ -255,7 +256,7 @@ if ($act->id > 0)
|
||||
|
||||
$modulepart = 'actions';
|
||||
$permission = $user->rights->agenda->myactions->create||$user->rights->agenda->allactions->create;
|
||||
$param = '&id=' . $act->id;
|
||||
$param = '&id=' . $object->id;
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php';
|
||||
}
|
||||
else
|
||||
|
||||
@@ -196,8 +196,8 @@ if ($result)
|
||||
print_liste_field_titre($langs->trans("CustomerCode"),$_SERVER["PHP_SELF"],"s.code_client","",$param,"",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("AccountancyCode"),$_SERVER["PHP_SELF"],"s.code_compta","",$param,'align="left"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"datec","",$param,'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"s.status","",$param,'align="right"',$sortfield,$sortorder);
|
||||
print '<td class="liste_titre" width="1%"> </td>';
|
||||
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"s.status","",$param,'align="center"',$sortfield,$sortorder);
|
||||
print '<td class="liste_titre"> </td>';
|
||||
$parameters=array();
|
||||
$formconfirm=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
||||
|
||||
|
||||
@@ -3910,7 +3910,10 @@ else if ($id > 0 || ! empty($ref))
|
||||
$formmail->frommail = $user->email;
|
||||
$formmail->withfrom=1;
|
||||
$liste=array();
|
||||
foreach ($object->thirdparty->thirdparty_and_contact_email_array(1) as $key=>$value) $liste[$key]=$value;
|
||||
foreach ($object->thirdparty->thirdparty_and_contact_email_array(1) as $key=>$value)
|
||||
{
|
||||
$liste[$key]=$value;
|
||||
}
|
||||
$formmail->withto=GETPOST('sendto')?GETPOST('sendto'):$liste;
|
||||
$formmail->withtocc=$liste;
|
||||
$formmail->withtoccc=$conf->global->MAIN_EMAIL_USECCC;
|
||||
|
||||
@@ -683,16 +683,16 @@ class BonPrelevement extends CommonObject
|
||||
$sql = "SELECT count(f.rowid)";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."facture as f";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd";
|
||||
if ($banque == 1 || $agence == 1) $sql.=", ".MAIN_DB_PREFIX."societe_rib as sr";
|
||||
if ($banque || $agence) $sql.=", ".MAIN_DB_PREFIX."societe_rib as sr";
|
||||
$sql.= " WHERE f.fk_statut = 1";
|
||||
$sql.= " AND f.entity = ".$conf->entity;
|
||||
$sql.= " AND f.rowid = pfd.fk_facture";
|
||||
$sql.= " AND f.paye = 0";
|
||||
$sql.= " AND pfd.traite = 0";
|
||||
$sql.= " AND f.total_ttc > 0";
|
||||
if ($banque == 1 || $agence == 1) $sql.= " AND f.fk_soc = sr.rowid";
|
||||
if ($banque == 1) $sql.= " AND sr.code_banque = '".$conf->global->PRELEVEMENT_CODE_BANQUE."'";
|
||||
if ($agence == 1) $sql.= " AND sr.code_guichet = '".$conf->global->PRELEVEMENT_CODE_GUICHET."'";
|
||||
if ($banque || $agence) $sql.= " AND f.fk_soc = sr.rowid";
|
||||
if ($banque) $sql.= " AND sr.code_banque = '".$conf->global->PRELEVEMENT_CODE_BANQUE."'";
|
||||
if ($agence) $sql.= " AND sr.code_guichet = '".$conf->global->PRELEVEMENT_CODE_GUICHET."'";
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
|
||||
@@ -716,8 +716,8 @@ class BonPrelevement extends CommonObject
|
||||
/**
|
||||
* Create a withdraw
|
||||
*
|
||||
* @param int $banque code of bank
|
||||
* @param int $agence code of bank office (guichet)
|
||||
* @param int $banque code of bank (to withdraw a specific bankof a specific customer. By default '')
|
||||
* @param int $agence code of bank office (guichet) (to withdraw a specific bankof a specific customer. By default '')
|
||||
* @param string $mode real=do action, simu=test only
|
||||
* @return int <0 if KO, nbre of invoice withdrawed if OK
|
||||
*/
|
||||
@@ -755,17 +755,17 @@ class BonPrelevement extends CommonObject
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."facture as f";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd";
|
||||
if ($banque == 1 || $agence ==1) $sql.= ", ".MAIN_DB_PREFIX."societe_rib as sr";
|
||||
if ($banque || $agence) $sql.= ", ".MAIN_DB_PREFIX."societe_rib as sr";
|
||||
$sql.= " WHERE f.rowid = pfd.fk_facture";
|
||||
$sql.= " AND f.entity = ".$conf->entity;
|
||||
$sql.= " AND s.rowid = f.fk_soc";
|
||||
if ($banque == 1 || $agence ==1) $sql.= " AND s.rowid = sr.fk_soc";
|
||||
if ($banque || $agence) $sql.= " AND s.rowid = sr.fk_soc";
|
||||
$sql.= " AND f.fk_statut = 1";
|
||||
$sql.= " AND f.paye = 0";
|
||||
$sql.= " AND pfd.traite = 0";
|
||||
$sql.= " AND f.total_ttc > 0";
|
||||
if ($banque == 1) $sql.= " AND sr.code_banque = '".$conf->global->PRELEVEMENT_CODE_BANQUE."'";
|
||||
if ($agence == 1) $sql.= " AND sr.code_guichet = '".$conf->global->PRELEVEMENT_CODE_GUICHET."'";
|
||||
if ($banque) $sql.= " AND sr.code_banque = '".$conf->global->PRELEVEMENT_CODE_BANQUE."'";
|
||||
if ($agence) $sql.= " AND sr.code_guichet = '".$conf->global->PRELEVEMENT_CODE_GUICHET."'";
|
||||
|
||||
dol_syslog(get_class($this)."::Create sql=".$sql, LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
@@ -777,7 +777,7 @@ class BonPrelevement extends CommonObject
|
||||
while ($i < $num)
|
||||
{
|
||||
$row = $this->db->fetch_row($resql);
|
||||
$factures[$i] = $row;
|
||||
$factures[$i] = $row; // All fields
|
||||
$i++;
|
||||
}
|
||||
$this->db->free($resql);
|
||||
@@ -802,10 +802,10 @@ class BonPrelevement extends CommonObject
|
||||
|
||||
if (count($factures) > 0)
|
||||
{
|
||||
foreach ($factures as $fac)
|
||||
foreach ($factures as $key => $fac)
|
||||
{
|
||||
$fact = new Facture($this->db);
|
||||
if ($fact->fetch($fac[0]) >= 0)
|
||||
if ($fact->fetch($fac[0]) >= 0) // Field 0 of $fac is rowid of invoice
|
||||
{
|
||||
if ($soc->fetch($fact->socid) >= 0)
|
||||
{
|
||||
@@ -820,8 +820,8 @@ class BonPrelevement extends CommonObject
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_syslog("Error on third party bank number RIB/IBAN ".$fact->socid." ".$soc->nom, LOG_ERR);
|
||||
$facture_errors[$fac[0]]="Error on third party bank number RIB/IBAN ".$fact->socid." ".$soc->nom;
|
||||
dol_syslog("Error on default bank number RIB/IBAN for thirdparty reported by verif() ".$fact->socid." ".$soc->nom, LOG_ERR);
|
||||
$facture_errors[$fac[0]]="Error on default bank number RIB/IBAN for thirdparty reported by function verif() ".$fact->socid." ".$soc->nom;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -58,9 +58,9 @@ if ($action == 'modify')
|
||||
dolibarr_set_const($db, GETPOST("nom$i"), GETPOST("value$i"),'chaine',0,'',$conf->entity);
|
||||
}
|
||||
}
|
||||
|
||||
if ($action == 'create')
|
||||
{
|
||||
// $conf->global->PRELEVEMENT_CODE_BANQUE and $conf->global->PRELEVEMENT_CODE_GUICHET should be empty
|
||||
$bprev = new BonPrelevement($db);
|
||||
$result=$bprev->create($conf->global->PRELEVEMENT_CODE_BANQUE, $conf->global->PRELEVEMENT_CODE_GUICHET);
|
||||
if ($result < 0)
|
||||
|
||||
@@ -81,6 +81,12 @@ class box_graph_invoices_permonth extends ModeleBoxes
|
||||
'target'=>'none' // Set '' to get target="_blank"
|
||||
);
|
||||
|
||||
$dir=''; // We don't need a path because image file will not be saved into disk
|
||||
$prefix='';
|
||||
$socid=0;
|
||||
if ($user->societe_id) $socid=$user->societe_id;
|
||||
if (! $user->rights->societe->client->voir || $socid) $prefix.='private-'.$user->id.'-'; // If user has no permission to see all, output dir is specific to user
|
||||
|
||||
if ($user->rights->facture->lire)
|
||||
{
|
||||
$param_year='DOLUSERCOOKIE_box_'.$this->boxcode.'_year';
|
||||
@@ -119,9 +125,9 @@ class box_graph_invoices_permonth extends ModeleBoxes
|
||||
{
|
||||
$data1 = $stats->getNbByMonthWithPrevYear($endyear,$startyear,(GETPOST('action')==$refreshaction?-1:(3600*24)));
|
||||
|
||||
$filenamenb = $dir."/invoicesnbinyear-".$year.".png";
|
||||
if ($mode == 'customer') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=billstats&file=invoicesnbinyear-'.$year.'.png';
|
||||
if ($mode == 'supplier') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=billstatssupplier&file=invoicessuppliernbinyear-'.$year.'.png';
|
||||
$filenamenb = $dir."/".$prefix."invoicesnbinyear-".$endyear.".png";
|
||||
if ($mode == 'customer') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=billstats&file=invoicesnbinyear-'.$endyear.'.png';
|
||||
if ($mode == 'supplier') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=billstatssupplier&file=invoicessuppliernbinyear-'.$endyear.'.png';
|
||||
|
||||
$px1 = new DolGraph();
|
||||
$mesg = $px1->isGraphKo();
|
||||
@@ -157,9 +163,9 @@ class box_graph_invoices_permonth extends ModeleBoxes
|
||||
{
|
||||
$data2 = $stats->getAmountByMonthWithPrevYear($endyear,$startyear,(GETPOST('action')==$refreshaction?-1:(3600*24)));
|
||||
|
||||
$filenamenb = $dir."/invoicesamountinyear-".$year.".png";
|
||||
if ($mode == 'customer') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=billstats&file=invoicesamountinyear-'.$year.'.png';
|
||||
if ($mode == 'supplier') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=billstatssupplier&file=invoicessupplieramountinyear-'.$year.'.png';
|
||||
$filenamenb = $dir."/".$prefix."invoicesamountinyear-".$endyear.".png";
|
||||
if ($mode == 'customer') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=billstats&file=invoicesamountinyear-'.$endyear.'.png';
|
||||
if ($mode == 'supplier') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=billstatssupplier&file=invoicessupplieramountinyear-'.$endyear.'.png';
|
||||
|
||||
$px2 = new DolGraph();
|
||||
$mesg = $px2->isGraphKo();
|
||||
|
||||
@@ -80,6 +80,12 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes
|
||||
'target'=>'none' // Set '' to get target="_blank"
|
||||
);
|
||||
|
||||
$dir=''; // We don't need a path because image file will not be saved into disk
|
||||
$prefix='';
|
||||
$socid=0;
|
||||
if ($user->societe_id) $socid=$user->societe_id;
|
||||
if (! $user->rights->societe->client->voir || $socid) $prefix.='private-'.$user->id.'-'; // If user has no permission to see all, output dir is specific to user
|
||||
|
||||
if ($user->rights->fournisseur->facture->lire)
|
||||
{
|
||||
$param_year='DOLUSERCOOKIE_box_'.$this->boxcode.'_year';
|
||||
@@ -118,7 +124,7 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes
|
||||
{
|
||||
$data1 = $stats->getNbByMonthWithPrevYear($endyear,$startyear,(GETPOST('action')==$refreshaction?-1:(3600*24)));
|
||||
|
||||
$filenamenb = $dir."/invoicessuppliernbinyear-".$year.".png";
|
||||
$filenamenb = $dir."/".$prefix."invoicessuppliernbinyear-".$year.".png";
|
||||
if ($mode == 'customer') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=billstats&file=invoicesnbinyear-'.$year.'.png';
|
||||
if ($mode == 'supplier') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=billstatssupplier&file=invoicessuppliernbinyear-'.$year.'.png';
|
||||
|
||||
@@ -156,7 +162,7 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes
|
||||
{
|
||||
$data2 = $stats->getAmountByMonthWithPrevYear($endyear,$startyear,(GETPOST('action')==$refreshaction?-1:(3600*24)));
|
||||
|
||||
$filenamenb = $dir."/invoicessupplieramountinyear-".$year.".png";
|
||||
$filenamenb = $dir."/".$prefix."invoicessupplieramountinyear-".$year.".png";
|
||||
if ($mode == 'customer') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=billstats&file=invoicesamountinyear-'.$year.'.png';
|
||||
if ($mode == 'supplier') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=billstatssupplier&file=invoicessupplieramountinyear-'.$year.'.png';
|
||||
|
||||
|
||||
@@ -81,6 +81,12 @@ class box_graph_orders_permonth extends ModeleBoxes
|
||||
'target'=>'none' // Set '' to get target="_blank"
|
||||
);
|
||||
|
||||
$dir=''; // We don't need a path because image file will not be saved into disk
|
||||
$prefix='';
|
||||
$socid=0;
|
||||
if ($user->societe_id) $socid=$user->societe_id;
|
||||
if (! $user->rights->societe->client->voir || $socid) $prefix.='private-'.$user->id.'-'; // If user has no permission to see all, output dir is specific to user
|
||||
|
||||
if ($user->rights->commande->lire)
|
||||
{
|
||||
$param_year='DOLUSERCOOKIE_box_'.$this->boxcode.'_year';
|
||||
@@ -119,9 +125,9 @@ class box_graph_orders_permonth extends ModeleBoxes
|
||||
{
|
||||
$data1 = $stats->getNbByMonthWithPrevYear($endyear,$startyear,(GETPOST('action')==$refreshaction?-1:(3600*24)));
|
||||
|
||||
$filenamenb = $dir."/ordersnbinyear-".$year.".png";
|
||||
if ($mode == 'customer') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersnbinyear-'.$year.'.png';
|
||||
if ($mode == 'supplier') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstatssupplier&file=ordersnbinyear-'.$year.'.png';
|
||||
$filenamenb = $dir."/".$prefix."ordersnbinyear-".$endyear.".png";
|
||||
if ($mode == 'customer') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersnbinyear-'.$endyear.'.png';
|
||||
if ($mode == 'supplier') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstatssupplier&file=ordersnbinyear-'.$endyear.'.png';
|
||||
|
||||
$px1 = new DolGraph();
|
||||
$mesg = $px1->isGraphKo();
|
||||
@@ -157,9 +163,9 @@ class box_graph_orders_permonth extends ModeleBoxes
|
||||
{
|
||||
$data2 = $stats->getAmountByMonthWithPrevYear($endyear,$startyear,(GETPOST('action')==$refreshaction?-1:(3600*24)));
|
||||
|
||||
$filenamenb = $dir."/ordersamountinyear-".$year.".png";
|
||||
if ($mode == 'customer') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersamountinyear-'.$year.'.png';
|
||||
if ($mode == 'supplier') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstatssupplier&file=ordersamountinyear-'.$year.'.png';
|
||||
$filenamenb = $dir."/".$prefix."ordersamountinyear-".$endyear.".png";
|
||||
if ($mode == 'customer') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersamountinyear-'.$endyear.'.png';
|
||||
if ($mode == 'supplier') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstatssupplier&file=ordersamountinyear-'.$endyear.'.png';
|
||||
|
||||
$px2 = new DolGraph();
|
||||
$mesg = $px2->isGraphKo();
|
||||
|
||||
@@ -80,6 +80,12 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes
|
||||
'target'=>'none' // Set '' to get target="_blank"
|
||||
);
|
||||
|
||||
$dir=''; // We don't need a path because image file will not be saved into disk
|
||||
$prefix='';
|
||||
$socid=0;
|
||||
if ($user->societe_id) $socid=$user->societe_id;
|
||||
if (! $user->rights->societe->client->voir || $socid) $prefix.='private-'.$user->id.'-'; // If user has no permission to see all, output dir is specific to user
|
||||
|
||||
if ($user->rights->fournisseur->commande->lire)
|
||||
{
|
||||
$param_year='DOLUSERCOOKIE_box_'.$this->boxcode.'_year';
|
||||
@@ -118,9 +124,9 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes
|
||||
{
|
||||
$data1 = $stats->getNbByMonthWithPrevYear($endyear,$startyear,(GETPOST('action')==$refreshaction?-1:(3600*24)));
|
||||
|
||||
$filenamenb = $dir."/orderssuppliernbinyear-".$year.".png";
|
||||
if ($mode == 'customer') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersnbinyear-'.$year.'.png';
|
||||
if ($mode == 'supplier') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstatssupplier&file=orderssuppliernbinyear-'.$year.'.png';
|
||||
$filenamenb = $dir."/".$prefix."orderssuppliernbinyear-".$endyear.".png";
|
||||
if ($mode == 'customer') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersnbinyear-'.$endyear.'.png';
|
||||
if ($mode == 'supplier') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstatssupplier&file=orderssuppliernbinyear-'.$endyear.'.png';
|
||||
|
||||
$px1 = new DolGraph();
|
||||
$mesg = $px1->isGraphKo();
|
||||
@@ -156,9 +162,9 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes
|
||||
{
|
||||
$data2 = $stats->getAmountByMonthWithPrevYear($endyear,$startyear,(GETPOST('action')==$refreshaction?-1:(3600*24)));
|
||||
|
||||
$filenamenb = $dir."/orderssupplieramountinyear-".$year.".png";
|
||||
if ($mode == 'customer') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersamountinyear-'.$year.'.png';
|
||||
if ($mode == 'supplier') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstatssupplier&file=orderssupplieramountinyear-'.$year.'.png';
|
||||
$filenamenb = $dir."/".$prefix."orderssupplieramountinyear-".$endyear.".png";
|
||||
if ($mode == 'customer') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersamountinyear-'.$endyear.'.png';
|
||||
if ($mode == 'supplier') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstatssupplier&file=orderssupplieramountinyear-'.$endyear.'.png';
|
||||
|
||||
$px2 = new DolGraph();
|
||||
$mesg = $px2->isGraphKo();
|
||||
|
||||
@@ -81,6 +81,12 @@ class box_graph_propales_permonth extends ModeleBoxes
|
||||
'target'=>'none' // Set '' to get target="_blank"
|
||||
);
|
||||
|
||||
$dir=''; // We don't need a path because image file will not be saved into disk
|
||||
$prefix='';
|
||||
$socid=0;
|
||||
if ($user->societe_id) $socid=$user->societe_id;
|
||||
if (! $user->rights->societe->client->voir || $socid) $prefix.='private-'.$user->id.'-'; // If user has no permission to see all, output dir is specific to user
|
||||
|
||||
if ($user->rights->propal->lire)
|
||||
{
|
||||
$param_year='DOLUSERCOOKIE_box_'.$this->boxcode.'_year';
|
||||
@@ -120,9 +126,9 @@ class box_graph_propales_permonth extends ModeleBoxes
|
||||
$data1 = $stats->getNbByMonthWithPrevYear($endyear,$startyear,(GETPOST('action')==$refreshaction?-1:(3600*24)));
|
||||
$datatype1 = array_pad(array(), ($endyear-$startyear+1), 'bars');
|
||||
|
||||
$filenamenb = $dir."/propalsnbinyear-".$year.".png";
|
||||
if ($mode == 'customer') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=propalstats&file=propalsnbinyear-'.$year.'.png';
|
||||
if ($mode == 'supplier') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=propalstatssupplier&file=propalsnbinyear-'.$year.'.png';
|
||||
$filenamenb = $dir."/".$prefix."propalsnbinyear-".$endyear.".png";
|
||||
if ($mode == 'customer') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=propalstats&file=propalsnbinyear-'.$endyear.'.png';
|
||||
if ($mode == 'supplier') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=propalstatssupplier&file=propalsnbinyear-'.$endyear.'.png';
|
||||
|
||||
$px1 = new DolGraph();
|
||||
$mesg = $px1->isGraphKo();
|
||||
@@ -161,9 +167,9 @@ class box_graph_propales_permonth extends ModeleBoxes
|
||||
$datatype2 = array_pad(array(), ($endyear-$startyear+1), 'bars');
|
||||
//$datatype2 = array('lines','bars');
|
||||
|
||||
$filenamenb = $dir."/propalsamountinyear-".$year.".png";
|
||||
if ($mode == 'customer') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=propalstats&file=propalsamountinyear-'.$year.'.png';
|
||||
if ($mode == 'supplier') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=propalstatssupplier&file=propalsamountinyear-'.$year.'.png';
|
||||
$filenamenb = $dir."/".$prefix."propalsamountinyear-".$endyear.".png";
|
||||
if ($mode == 'customer') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=propalstats&file=propalsamountinyear-'.$endyear.'.png';
|
||||
if ($mode == 'supplier') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=propalstatssupplier&file=propalsamountinyear-'.$endyear.'.png';
|
||||
|
||||
$px2 = new DolGraph();
|
||||
$mesg = $px2->isGraphKo();
|
||||
|
||||
@@ -516,7 +516,7 @@ class ExtraFields
|
||||
/**
|
||||
* Load array this->attribute_label
|
||||
*
|
||||
* @param string $elementtype Type of element
|
||||
* @param string $elementtype Type of element ('adherent', 'commande', societe', 'facture', 'propal', 'product', ...)
|
||||
* @param boolean $forceload Force load of extra fields whatever is option MAIN_EXTRAFIELDS_DISABLED
|
||||
* @return array Array of attributes for all extra fields
|
||||
*/
|
||||
|
||||
@@ -765,6 +765,7 @@ class FormFile
|
||||
{
|
||||
$relativepath=(! empty($object->ref)?dol_sanitizeFileName($object->ref):'').'/';
|
||||
if ($object->element == 'invoice_supplier') $relativepath=get_exdir($object->id,2).$relativepath;
|
||||
if ($object->element == 'member') $relativepath=get_exdir($object->id,2).$relativepath;
|
||||
}
|
||||
|
||||
$var=!$var;
|
||||
|
||||
@@ -566,12 +566,12 @@ class FormMail
|
||||
if ($this->param["models"]=='order_send')
|
||||
{
|
||||
$url=getPaypalPaymentUrl(0,'order',$this->substit['__ORDERREF__']);
|
||||
$this->substit['__PERSONALIZED__']=$langs->transnoentitiesnoconv("PredefinedMailContentLink",$url);
|
||||
$this->substit['__PERSONALIZED__']=str_replace('\n',"\n",$langs->transnoentitiesnoconv("PredefinedMailContentLink",$url));
|
||||
}
|
||||
if ($this->param["models"]=='facture_send')
|
||||
{
|
||||
$url=getPaypalPaymentUrl(0,'invoice',$this->substit['__FACREF__']);
|
||||
$this->substit['__PERSONALIZED__']=$langs->transnoentitiesnoconv("PredefinedMailContentLink",$url);
|
||||
$this->substit['__PERSONALIZED__']=str_replace('\n',"\n",$langs->transnoentitiesnoconv("PredefinedMailContentLink",$url));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1564,6 +1564,15 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu
|
||||
$original_file=$conf->projet->dir_output.'/'.$original_file;
|
||||
$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."projet WHERE ref='".$db->escape($refname)."' AND entity=".$conf->entity;
|
||||
}
|
||||
else if ($modulepart == 'project_task')
|
||||
{
|
||||
if ($fuser->rights->projet->lire || preg_match('/^specimen/i',$original_file))
|
||||
{
|
||||
$accessallowed=1;
|
||||
}
|
||||
$original_file=$conf->projet->dir_output.'/'.$original_file;
|
||||
$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."projet WHERE ref='".$db->escape($refname)."' AND entity=".$conf->entity;
|
||||
}
|
||||
|
||||
// Wrapping pour les commandes fournisseurs
|
||||
else if ($modulepart == 'commande_fournisseur' || $modulepart == 'order_supplier')
|
||||
@@ -1786,6 +1795,12 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu
|
||||
}
|
||||
else
|
||||
{
|
||||
if (empty($conf->$modulepart->dir_output)) // modulepart not supported
|
||||
{
|
||||
dol_print_error('','Error call dol_check_secure_access_document with not supported value for modulepart parameter ('.$modulepart.')');
|
||||
exit;
|
||||
}
|
||||
|
||||
$perm=GETPOST('perm');
|
||||
$subperm=GETPOST('subperm');
|
||||
if ($perm || $subperm)
|
||||
|
||||
@@ -45,8 +45,8 @@
|
||||
* @param string $price_base_type HT=on calcule sur le HT, TTC=on calcule sur le TTC
|
||||
* @param int $info_bits Miscellaneous informations on line
|
||||
* @param int $type 0/1=Product/service
|
||||
* @param string $seller Thirdparty seller (we need $seller->country_code property). Provided only if seller is the supplier.
|
||||
* @param array $localtaxes_array Array with localtaxes info (loaded by getLocalTaxesFromRate function)
|
||||
* @param string $seller Thirdparty seller (we need $seller->country_id property). Provided only if seller is the supplier, otherwise $seller will be $mysoc.
|
||||
* @param array $localtaxes_array Array with localtaxes info (loaded by getLocalTaxesFromRate function).
|
||||
* @return result[ 0=total_ht,
|
||||
* 1=total_vat,
|
||||
* 2=total_ttc,
|
||||
|
||||
@@ -140,6 +140,16 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
||||
$resarray['object_total_vat_'.$line->tva_tx]+=$line->total_tva;
|
||||
}
|
||||
|
||||
// Retrieve extrafields
|
||||
if(is_array($object->array_options) && count($object->array_options))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||
$extrafields = new ExtraFields($this->db);
|
||||
$extralabels = $extrafields->fetch_name_optionals_label('commande',true);
|
||||
$object->fetch_optionals($object->id,$extralabels);
|
||||
|
||||
$resarray = $this->fill_substitutionarray_with_extrafields($object,$resarray,$extrafields,$array_key='object',$outputlangs);
|
||||
}
|
||||
return $resarray;
|
||||
}
|
||||
|
||||
|
||||
@@ -142,6 +142,8 @@ class doc_generic_invoice_odt extends ModelePDFFactures
|
||||
'object_note_private'=>$object->note,
|
||||
'object_note'=>$object->note_public,
|
||||
// Payments
|
||||
'object_already_payed_locale'=>price($alreadypayed, 0, $outputlangs),
|
||||
'object_remain_to_pay_locale'=>price($object->total_ttc - $sumpayed, 0, $outputlangs),
|
||||
'object_already_payed'=>$alreadypayed,
|
||||
'object_remain_to_pay'=>price2num($object->total_ttc - $sumpayed)
|
||||
);
|
||||
|
||||
@@ -42,7 +42,7 @@ $formfile=new FormFile($db);
|
||||
|
||||
// Show upload form (document and links)
|
||||
$formfile->form_attach_new_file(
|
||||
$_SERVER["PHP_SELF"].'?id='.$object->id,
|
||||
$_SERVER["PHP_SELF"].'?id='.$object->id.(empty($withproject)?'':'&withproject=1'),
|
||||
'',
|
||||
0,
|
||||
0,
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
* or see http://www.gnu.org/
|
||||
*/
|
||||
|
||||
// Variable $upload_dir must be defined when entering here
|
||||
|
||||
// Send file/link
|
||||
if (GETPOST('sendit') && ! empty($conf->global->MAIN_UPLOAD_DOC)) {
|
||||
|
||||
@@ -168,7 +168,7 @@ if (! file_exists($original_file_osencoded))
|
||||
exit;
|
||||
}
|
||||
|
||||
// Les drois sont ok et fichier trouve, on l'envoie
|
||||
// Permissions are ok and file found, so we return it
|
||||
|
||||
header('Content-Description: File Transfer');
|
||||
if ($encoding) header('Content-Encoding: '.$encoding);
|
||||
|
||||
@@ -112,7 +112,8 @@ if ($action == 'confirm_validate' && $confirm == 'yes' && $user->rights->fichein
|
||||
$outputlangs = new Translate("",$conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
$result=fichinter_create($db, $object, GETPOST('model','alpha'), $outputlangs);
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) $result=fichinter_create($db, $object, GETPOST('model','alpha'), $outputlangs);
|
||||
|
||||
header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id);
|
||||
exit;
|
||||
}
|
||||
@@ -137,7 +138,8 @@ else if ($action == 'confirm_modify' && $confirm == 'yes' && $user->rights->fich
|
||||
$outputlangs = new Translate("",$conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
$result=fichinter_create($db, $object, (!GETPOST('model','alpha'))?$object->model:GETPOST('model','apha'), $outputlangs);
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) $result=fichinter_create($db, $object, (!GETPOST('model','alpha'))?$object->model:GETPOST('model','apha'), $outputlangs);
|
||||
|
||||
header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id);
|
||||
exit;
|
||||
}
|
||||
@@ -452,7 +454,7 @@ else if ($action == "addline" && $user->rights->ficheinter->creer)
|
||||
{
|
||||
$db->commit();
|
||||
|
||||
fichinter_create($db, $object, $object->modelpdf, $outputlangs);
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) fichinter_create($db, $object, $object->modelpdf, $outputlangs);
|
||||
header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id);
|
||||
exit;
|
||||
}
|
||||
@@ -522,7 +524,7 @@ else if ($action == 'updateline' && $user->rights->ficheinter->creer && GETPOST(
|
||||
$outputlangs = new Translate("",$conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
fichinter_create($db, $object, $object->modelpdf, $outputlangs);
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) fichinter_create($db, $object, $object->modelpdf, $outputlangs);
|
||||
|
||||
header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id);
|
||||
exit;
|
||||
@@ -557,7 +559,7 @@ else if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->
|
||||
$outputlangs = new Translate("",$conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
fichinter_create($db, $object, $object->modelpdf, $outputlangs);
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) fichinter_create($db, $object, $object->modelpdf, $outputlangs);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -578,7 +580,8 @@ else if ($action == 'up' && $user->rights->ficheinter->creer)
|
||||
$outputlangs = new Translate("",$conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
fichinter_create($db, $object, $object->modelpdf, $outputlangs);
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) fichinter_create($db, $object, $object->modelpdf, $outputlangs);
|
||||
|
||||
header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'#'.GETPOST('line_id','int'));
|
||||
exit;
|
||||
}
|
||||
@@ -597,7 +600,8 @@ else if ($action == 'down' && $user->rights->ficheinter->creer)
|
||||
$outputlangs = new Translate("",$conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
fichinter_create($db, $object, $object->modelpdf, $outputlangs);
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) fichinter_create($db, $object, $object->modelpdf, $outputlangs);
|
||||
|
||||
header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'#'.GETPOST('line_id','int'));
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -394,24 +394,32 @@ else
|
||||
foreach ($migrationscript as $migarray)
|
||||
{
|
||||
$count++;
|
||||
$versionfrom=$migarray['from'];
|
||||
$version=preg_split('/[\.-]/',DOL_VERSION);
|
||||
$versionfrom=$migarray['from'];
|
||||
$versionto=$migarray['to'];
|
||||
$newversionfrom=preg_replace('/(\.[0-9]+)$/i','.*',$versionfrom);
|
||||
$newversionto=preg_replace('/(\.[0-9]+)$/i','.*',$versionto);
|
||||
$versionarray=preg_split('/[\.-]/',$version);
|
||||
$dolibarrversionfromarray=preg_split('/[\.-]/',$versionfrom);
|
||||
$dolibarrversiontoarray=preg_split('/[\.-]/',$versionto);
|
||||
$version=preg_split('/[\.-]/',DOL_VERSION);
|
||||
// Define string newversionxxx that are used for text to show
|
||||
$newversionfrom=preg_replace('/(\.[0-9]+)$/i','.*',$versionfrom);
|
||||
$newversionto=preg_replace('/(\.[0-9]+)$/i','.*',$versionto);
|
||||
$newversionfrombis='';
|
||||
if (versioncompare($dolibarrversiontoarray,$version) < -2) $newversionfrombis=' '.$langs->trans("or").' '.$versionto;
|
||||
if (versioncompare($dolibarrversiontoarray,$version) < -2) // From x.y.z -> x.y.z+1
|
||||
{
|
||||
$newversionfrombis=' '.$langs->trans("or").' '.$versionto;
|
||||
}
|
||||
print '<tr class="listofchoices"><td class="listofchoices nowrap" align="center"><b>'.$langs->trans("Upgrade").'<br>'.$newversionfrom.$newversionfrombis.' -> '.$newversionto.'</b></td>';
|
||||
print '<td class="listofchoices">';
|
||||
print $langs->trans("UpgradeDesc");
|
||||
|
||||
if ($ok)
|
||||
{
|
||||
if (count($dolibarrlastupgradeversionarray) >= 2) // If a database access is available and a version x.y already available
|
||||
if (count($dolibarrlastupgradeversionarray) >= 2) // If a database access is available and last upgrade version is known
|
||||
{
|
||||
// Now we check if this is the first qualified choice
|
||||
if ($allowupgrade && empty($foundrecommandedchoice) && versioncompare($dolibarrversiontoarray,$dolibarrlastupgradeversionarray) > 0)
|
||||
if ($allowupgrade && empty($foundrecommandedchoice) &&
|
||||
(versioncompare($dolibarrversiontoarray,$dolibarrlastupgradeversionarray) > 0 || versioncompare($dolibarrversiontoarray,$version) < -2)
|
||||
)
|
||||
{
|
||||
print '<br>';
|
||||
//print $langs->trans("InstallChoiceRecommanded",DOL_VERSION,$conf->global->MAIN_VERSION_LAST_UPGRADE);
|
||||
|
||||
@@ -1459,7 +1459,7 @@ function migrate_price_propal($db,$langs,$conf)
|
||||
}
|
||||
|
||||
/**
|
||||
* Mise a jour des totaux lignes de propal
|
||||
* Update total of contract lines
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param Translate $langs Object langs
|
||||
@@ -1470,6 +1470,10 @@ function migrate_price_contrat($db,$langs,$conf)
|
||||
{
|
||||
$db->begin();
|
||||
|
||||
$tmpmysoc=new Societe($db);
|
||||
$tmpmysoc->setMysoc($conf);
|
||||
if (empty($tmpmysoc->country_id)) $tmpmysoc->country_id=0; // Ti not have this set to '' or will make sql syntax error.
|
||||
|
||||
print '<tr><td colspan="4">';
|
||||
|
||||
print '<br>';
|
||||
@@ -1506,7 +1510,7 @@ function migrate_price_contrat($db,$langs,$conf)
|
||||
//$contratligne->fetch($rowid); Non requis car le update_total ne met a jour que chp redefinis
|
||||
$contratligne->rowid=$rowid;
|
||||
|
||||
$result=calcul_price_total($qty,$pu,$remise_percent,$txtva,0,0,0,'HT',$info_bits,0);
|
||||
$result=calcul_price_total($qty,$pu,$remise_percent,$txtva,0,0,0,'HT',$info_bits,0,$tmpmysoc);
|
||||
$total_ht = $result[0];
|
||||
$total_tva = $result[1];
|
||||
$total_ttc = $result[2];
|
||||
|
||||
@@ -32,7 +32,7 @@ LastWithdrawalReceipt=Les %s derniers bons de prélèvements
|
||||
MakeWithdrawRequest=Faire une demande de prélèvement
|
||||
ThirdPartyBankCode=Code banque du tiers
|
||||
ThirdPartyDeskCode=Code guichet du tiers
|
||||
NoInvoiceCouldBeWithdrawed=Aucune facture percevable, prélevée avec succès. Vérifiez que les factures sont sur des sociétés dont le RIB est correctement renseigné.
|
||||
NoInvoiceCouldBeWithdrawed=Aucune facture percevable, prélevée avec succès. Vérifiez que les factures sont sur des sociétés dont le compte bancaire par défaut est correctement renseigné.
|
||||
ClassCredited=Classer crédité
|
||||
ClassCreditedConfirm=Êtes-vous sûr de vouloir classer ce bon de prélèvement comme crédité sur votre compte bancaire ?
|
||||
TransData=Date de transmission
|
||||
|
||||
@@ -8,12 +8,12 @@ FONTFORPDF=helvetica
|
||||
FONTSIZEFORPDF=10
|
||||
SeparatorDecimal=,
|
||||
SeparatorThousand=None
|
||||
FormatDateShort=%m/%d/%Y
|
||||
FormatDateShortInput=%m/%d/%Y
|
||||
FormatDateShortJava=mm/dd/aaaa
|
||||
FormatDateShortJavaInput=mm/dd/aaaa
|
||||
FormatDateShortJQuery=mm/dd/aa
|
||||
FormatDateShortJQueryInput=mm/dd/aa
|
||||
FormatDateShort=%d/%m/%Y
|
||||
FormatDateShortInput=%d/%m/%Y
|
||||
FormatDateShortJava=dd/mm/yyyy
|
||||
FormatDateShortJavaInput=dd/mm/yyyy
|
||||
FormatDateShortJQuery=dd/mm/yy
|
||||
FormatDateShortJQueryInput=dd/mm/yy
|
||||
FormatHourShort=%I:%M %p
|
||||
FormatHourShortDuration=%H:%M
|
||||
FormatDateTextShort=%b %d, %Y
|
||||
|
||||
@@ -349,7 +349,7 @@ class Product extends CommonObject
|
||||
$sql.= ", '".$this->accountancy_code_buy."'";
|
||||
$sql.= ", '".$this->accountancy_code_sell."'";
|
||||
$sql.= ", '".$this->canvas."'";
|
||||
$sql.= ", ".((empty($this->finished) || $this->finished < 0)?'null':$this->finished);
|
||||
$sql.= ", ".((! isset($this->finished) || $this->finished < 0)?'null':$this->finished);
|
||||
$sql.= ")";
|
||||
|
||||
dol_syslog(get_class($this)."::Create sql=".$sql);
|
||||
@@ -493,7 +493,7 @@ class Product extends CommonObject
|
||||
|
||||
$sql.= ", tosell = " . $this->status;
|
||||
$sql.= ", tobuy = " . $this->status_buy;
|
||||
$sql.= ", finished = " . ((empty($this->finished) || $this->finished < 0) ? "null" : $this->finished);
|
||||
$sql.= ", finished = " . ((! isset($this->finished) || $this->finished < 0) ? "null" : $this->finished);
|
||||
$sql.= ", weight = " . ($this->weight!='' ? "'".$this->weight."'" : 'null');
|
||||
$sql.= ", weight_units = " . ($this->weight_units!='' ? "'".$this->weight_units."'": 'null');
|
||||
$sql.= ", length = " . ($this->length!='' ? "'".$this->length."'" : 'null');
|
||||
|
||||
@@ -60,7 +60,7 @@ if ($action == 'update' && ! $_POST["cancel"])
|
||||
|
||||
$account->fetch($id);
|
||||
|
||||
$account->socid = $soc->id;
|
||||
$account->socid = $soc->id;
|
||||
|
||||
$account->bank = $_POST["bank"];
|
||||
$account->label = $_POST["label"];
|
||||
@@ -84,6 +84,12 @@ if ($action == 'update' && ! $_POST["cancel"])
|
||||
}
|
||||
else
|
||||
{
|
||||
// If this account is the default bank account, we disable others
|
||||
if ($account->default_rib)
|
||||
{
|
||||
$account->setAsDefault($id); // This will make sure there is only one default rib
|
||||
}
|
||||
|
||||
$url=DOL_URL_ROOT.'/societe/rib.php?socid='.$soc->id;
|
||||
header('Location: '.$url);
|
||||
exit;
|
||||
|
||||
Reference in New Issue
Block a user