forked from Wavyzz/dolibarr
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/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/compta/paiement_charge.php htdocs/compta/sociales/charges.php htdocs/core/db/mysql.class.php htdocs/filefunc.inc.php htdocs/societe/class/societe.class.php
This commit is contained in:
12
ChangeLog
12
ChangeLog
@@ -107,9 +107,15 @@ Fix: Can disable features with PHPEXCEL (no DLSF compatible).
|
||||
Fix: Can disable features with CKEDITOR.
|
||||
Fix: Pb of records not correctly cleaned when module marge is
|
||||
uninstalled (conflict between 'margin' and 'margins').
|
||||
Fix: [ bug #1341 ] Lastname not added by file or direct input in mass e-mailing
|
||||
Fix: [ bug #1357 ] Invoice creator state not printed in generated invoice documents
|
||||
Fix: Suppliers invoice mask fails using {tttt} in numbering
|
||||
Fix: [ bug #1341 ] Lastname not added by file or direct input in mass e-mailing.
|
||||
Fix: [ bug #1357 ] Invoice creator state not printed in generated invoice documents.
|
||||
Fix: Suppliers invoice mask fails using {tttt} in numbering.
|
||||
Fix: pdf template name for typhon was not correctly et when enabling module.
|
||||
Fix: Navigation on notes for shipments was not working.
|
||||
Fix: [ bug #1353 ] Email notifications, wrong URL.
|
||||
Fix: [ bug #1362 ] Note is not saved.
|
||||
Fix: tr/td balance.
|
||||
Fix: [ bug #1360 ] note indicator for member tab.
|
||||
|
||||
***** ChangeLog for 3.5.2 compared to 3.5.1 *****
|
||||
Fix: Can't add user for a task.
|
||||
|
||||
@@ -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> Sat, 8 Feb 2014 12:00:00 +0100
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Sat, 9 May 2014 12:00:00 +0100
|
||||
|
||||
dolibarr (3.5.3-3) unstable; urgency=low
|
||||
|
||||
[ Laurent Destailleur (eldy) ]
|
||||
* New upstream release.
|
||||
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Fri, 2 May 2014 12:00:00 +0100
|
||||
|
||||
dolibarr (3.5.2-3) unstable; urgency=low
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ $force_install_lockinstall='444';
|
||||
//$force_dolibarr_lib_GEOIP_PATH='';
|
||||
//$force_dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap';
|
||||
//$force_dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip';
|
||||
//$force_dolibarr_lib_PHPEXCEL_PATH='';
|
||||
//$force_dolibarr_lib_PHPEXCEL_PATH=''; // Use '' or 'disabled'
|
||||
//$force_dolibarr_js_CKEDITOR='/javascript/ckeditor'; // Use '/javascript/ckeditor' or 'disabled'
|
||||
//$force_dolibarr_js_JQUERY='/javascript/jquery';
|
||||
//$force_dolibarr_js_JQUERY_UI='/javascript/jquery-ui';
|
||||
|
||||
@@ -516,12 +516,13 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$FILENAMETGZ/htdocs/includes/ckeditor/_source`; # We can't remove it with exclude file, we need it for some tarball packages
|
||||
|
||||
print "Compress $FILENAMETGZ into $FILENAMETGZ.tgz...\n";
|
||||
$cmd="tar --exclude-vcs --exclude-from \"$BUILDROOT/$PROJECT/build/tgz/tar_exclude.txt\" --directory \"$BUILDROOT\" --mode=go-w --group=500 --owner=500 -czvf \"$FILENAMETGZ.tgz\" $FILENAMETGZ";
|
||||
$cmd="tar --exclude-vcs --exclude-from \"$BUILDROOT/$PROJECT/build/tgz/tar_exclude.txt\" --directory \"$BUILDROOT\" --mode=go-w --group=500 --owner=500 -czvf \"$BUILDROOT/$FILENAMETGZ.tgz\" $FILENAMETGZ";
|
||||
print "$cmd\n";
|
||||
$ret=`$cmd`;
|
||||
|
||||
# Move to final dir
|
||||
print "Move $FILENAMETGZ.tgz to $NEWDESTI/$FILENAMETGZ.tgz\n";
|
||||
$ret=`mv "$FILENAMETGZ.tgz" "$NEWDESTI/$FILENAMETGZ.tgz"`;
|
||||
print "Move $BUILDROOT/$FILENAMETGZ.tgz to $NEWDESTI/$FILENAMETGZ.tgz\n";
|
||||
$ret=`mv "$BUILDROOT/$FILENAMETGZ.tgz" "$NEWDESTI/$FILENAMETGZ.tgz"`;
|
||||
next;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,8 @@ beta version of Dolibarr, step by step.
|
||||
- Create a branch (x.y).
|
||||
|
||||
- Run makepack-dolibarr.pl to generate all packages.
|
||||
- Move build files into www.dolibarr.org web site (/home/dolibarr/wwwroot/files).
|
||||
- Move build files into www.dolibarr.org web site
|
||||
(/home/dolibarr/wwwroot/files/lastbuild).
|
||||
|
||||
- Post a news on dolibarr.org/dolibarr.fr
|
||||
- Send mail on mailings-list
|
||||
@@ -36,17 +37,17 @@ complete release of Dolibarr, step by step.
|
||||
- Update version number with x.y.z in build/debian/changelog
|
||||
- Update version number with x.y.z in build/exe/doliwamp/doliwamp.iss
|
||||
- Update version number with x.y.z in build/rpm/*.spec
|
||||
- Update PAD files.
|
||||
- Commit all changes.
|
||||
- Add a Tag (x.y.z)
|
||||
|
||||
- Build Dolibarr and DoliWamp packages with makepack-dolibarr.pl
|
||||
- Check content of built packages.
|
||||
- Move build files (tgz+exe+deb+rpm...), ChangeLog and PAD files
|
||||
into www.dolibarr.org web site (/home/dolibarr/wwwroot/files).
|
||||
- Edit symbolic links in directory "/home/dolibarr/wwwroot/files" on server to
|
||||
point to new files (used by PAD descriptor).
|
||||
- Upload files dolibarr.*.tgz and doliwamp.*.exe on sourceforge.
|
||||
- Move build files into www.dolibarr.org web site
|
||||
(/home/dolibarr/wwwroot/files/stable).
|
||||
- Run makepack-dolibarr.pl again with option to publish files on
|
||||
sourceforge.
|
||||
- Edit symbolic links in directory "/home/dolibarr/wwwroot/files/stable/xxx"
|
||||
on server to point to new files (used by some web sites).
|
||||
|
||||
- Send mail on mailings-list
|
||||
- Send news on OpenSource web sites (if major beta or release)
|
||||
|
||||
@@ -30,7 +30,7 @@ return "Regis Houssin";
|
||||
# script_dolibarr_versions()
|
||||
sub script_dolibarr_versions
|
||||
{
|
||||
return ( "3.6.0", "3.5.2", "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" );
|
||||
return ( "3.6.0", "3.5.3", "3.5.2", "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
|
||||
|
||||
@@ -332,7 +332,10 @@ 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
|
||||
* Fri Feb 21 2014 Laurent Destailleur 3.6.0-0.2.b
|
||||
* Fri May 9 2014 Laurent Destailleur 3.6.0-0.2.b
|
||||
- Upstream release
|
||||
|
||||
* Fri May 2 2014 Laurent Destailleur 3.5.3-0.3
|
||||
- Upstream release
|
||||
|
||||
* Fri Feb 14 2014 Laurent Destailleur 3.5.2-0.3
|
||||
|
||||
@@ -568,7 +568,10 @@ 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 Feb 21 2014 Laurent Destailleur 3.6.0-0.2.b
|
||||
* Fri May 9 2014 Laurent Destailleur 3.6.0-0.2.b
|
||||
- Upstream release
|
||||
|
||||
* Fri May 2 2014 Laurent Destailleur 3.5.3-0.3
|
||||
- Upstream release
|
||||
|
||||
* Fri Feb 14 2014 Laurent Destailleur 3.5.2-0.3
|
||||
|
||||
@@ -337,7 +337,10 @@ 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 Feb 21 2014 Laurent Destailleur 3.6.0-0.2.b
|
||||
* Fri May 9 2014 Laurent Destailleur 3.6.0-0.2.b
|
||||
- Upstream release
|
||||
|
||||
* Fri May 2 2014 Laurent Destailleur 3.5.3-0.3
|
||||
- Upstream release
|
||||
|
||||
* Fri Feb 14 2014 Laurent Destailleur 3.5.2-0.3
|
||||
|
||||
@@ -348,7 +348,10 @@ 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 Feb 21 2014 Laurent Destailleur 3.6.0-0.2.b
|
||||
* Fri May 9 2014 Laurent Destailleur 3.6.0-0.2.b
|
||||
- Upstream release
|
||||
|
||||
* Fri May 2 2014 Laurent Destailleur 3.5.3-0.3
|
||||
- Upstream release
|
||||
|
||||
* Fri Feb 14 2014 Laurent Destailleur 3.5.2-0.3
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -19,7 +19,7 @@
|
||||
/**
|
||||
* \file htdocs/adherents/note.php
|
||||
* \ingroup member
|
||||
* \brief Fiche de notes sur un adherent
|
||||
* \brief Tabe for note of a member
|
||||
*/
|
||||
|
||||
require '../main.inc.php';
|
||||
|
||||
@@ -47,7 +47,7 @@ class Categorie extends CommonObject
|
||||
var $label;
|
||||
var $description;
|
||||
var $socid;
|
||||
var $type; // 0=Product, 1=Supplier, 2=Customer/Prospect, 3=Member
|
||||
var $type; // 0=Product, 1=Supplier, 2=Customer/Prospect, 3=Member, 4=Contact
|
||||
var $import_key;
|
||||
|
||||
var $cats=array(); // Tableau en memoire des categories
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -28,7 +28,8 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
|
||||
$langs->load("bills");
|
||||
|
||||
$chid=isset($_GET["id"])?$_GET["id"]:$_POST["id"];
|
||||
$chid=GETPOST("id");
|
||||
$action=GETPOST('action');
|
||||
$amounts = array();
|
||||
|
||||
// Security check
|
||||
@@ -43,7 +44,7 @@ if ($user->societe_id > 0)
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if ($_POST["action"] == 'add_payment')
|
||||
if ($action == 'add_payment')
|
||||
{
|
||||
$error=0;
|
||||
|
||||
@@ -171,20 +172,19 @@ if ($_GET["action"] == 'create')
|
||||
|
||||
print '<form name="add_payment" action="'.$_SERVER['PHP_SELF'].'" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="id" value="'.$charge->id.'">';
|
||||
print '<input type="hidden" name="id" value="'.$chid.'">';
|
||||
print '<input type="hidden" name="chid" value="'.$chid.'">';
|
||||
print '<input type="hidden" name="action" value="add_payment">';
|
||||
|
||||
print '<table cellspacing="0" class="border" width="100%" cellpadding="2">';
|
||||
|
||||
print "<tr class=\"liste_titre\"><td colspan=\"3\">Charge</td>";
|
||||
|
||||
print '<tr><td>'.$langs->trans("Ref").'</td><td colspan="2">';
|
||||
print '<a href="'.DOL_URL_ROOT.'/compta/sociales/charges.php?id='.$chid.'">'.$chid.'</a></td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Ref").'</td><td colspan="2"><a href="'.DOL_URL_ROOT.'/compta/sociales/charges.php?id='.$chid.'">'.$chid.'</a></td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Type")."</td><td colspan=\"2\">".$charge->type_libelle."</td></tr>\n";
|
||||
print '<tr><td>'.$langs->trans("Period")."</td><td colspan=\"2\">".dol_print_date($charge->periode,'day')."</td></tr>\n";
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td colspan="2">'.$charge->lib."</td></tr>\n";
|
||||
print '<tr><td>'.$langs->trans("DateDue")."</td><td colspan=\"2\">".dol_print_date($charge->date_ech,'day')."</td></tr>\n";
|
||||
|
||||
print '<tr><td>'.$langs->trans("Amount")."</td><td colspan=\"2\">".price($charge->amount,0,$outputlangs,1,-1,-1,$conf->currency).'</td></tr>';
|
||||
|
||||
$sql = "SELECT sum(p.amount) as total";
|
||||
@@ -198,44 +198,52 @@ if ($_GET["action"] == 'create')
|
||||
$db->free();
|
||||
}
|
||||
print '<tr><td>'.$langs->trans("AlreadyPaid").'</td><td colspan="2">'.price($sumpaid,0,$outputlangs,1,-1,-1,$conf->currency).'</td></tr>';
|
||||
print "<tr><td valign=\"top\">".$langs->trans("RemainderToPay")."</td><td colspan=\"3\">".price($total-$sumpaid,0,$outputlangs,1,-1,-1,$conf->currency).'</td></tr>';
|
||||
print '<tr><td valign="top">'.$langs->trans("RemainderToPay").'</td><td colspan="2">'.price($total-$sumpaid,0,$outputlangs,1,-1,-1,$conf->currency).'</td></tr>';
|
||||
|
||||
print "<tr class=\"liste_titre\"><td colspan=\"3\">".$langs->trans("Payment").'</td>';
|
||||
print '<tr class="liste_titre">';
|
||||
print "<td colspan=\"3\">".$langs->trans("Payment").'</td>';
|
||||
print '</tr>';
|
||||
|
||||
print "<input type=\"hidden\" name=\"chid\" value=\"$chid\">";
|
||||
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("Date").'</td><td>';
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("Date").'</td><td colspan="2">';
|
||||
$datepaye = dol_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]);
|
||||
$datepayment=empty($conf->global->MAIN_AUTOFILL_DATE)?(empty($_POST["remonth"])?-1:$datepaye):0;
|
||||
$form->select_date($datepayment,'','','','',"add_payment",1,1);
|
||||
print "</td>";
|
||||
print '<td>'.$langs->trans("Comments").'</td></tr>';
|
||||
print '</tr>';
|
||||
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("PaymentMode").'</td><td>';
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("PaymentMode").'</td><td colspan="2">';
|
||||
$form->select_types_paiements(isset($_POST["paiementtype"])?$_POST["paiementtype"]:$charge->paiementtype, "paiementtype");
|
||||
print "</td>\n";
|
||||
|
||||
print '<td rowspan="3" valign="top"><textarea name="comment" wrap="soft" cols="40" rows="'.ROWS_3.'"></textarea></td></tr>';
|
||||
print '</tr>';
|
||||
|
||||
print '<tr>';
|
||||
print '<td class="fieldrequired">'.$langs->trans('AccountToDebit').'</td>';
|
||||
print '<td>';
|
||||
print '<td colspan="2">';
|
||||
$form->select_comptes(isset($_POST["accountid"])?$_POST["accountid"]:$charge->accountid, "accountid", 0, '',1); // Show opend bank account list
|
||||
print '</td></tr>';
|
||||
|
||||
// Number
|
||||
print '<tr><td>'.$langs->trans('Numero');
|
||||
print ' <em>('.$langs->trans("ChequeOrTransferNumber").')</em>';
|
||||
print '<td><input name="num_paiement" type="text" value="'.GETPOST('num_paiement').'"></td></tr>'."\n";
|
||||
print '</td>';
|
||||
print '<td colspan="2"><input name="num_paiement" type="text" value="'.GETPOST('num_paiement').'"></td></tr>'."\n";
|
||||
|
||||
print '<tr>';
|
||||
print '<td valign="top">'.$langs->trans("Comments").'</td>';
|
||||
print '<td valign="top" colspan="2"><textarea name="note" wrap="soft" cols="60" rows="'.ROWS_3.'"></textarea></td>';
|
||||
print '</tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
/*
|
||||
* Autres charges impayees
|
||||
*/
|
||||
$num = 1;
|
||||
$i = 0;
|
||||
print '<tr><td colspan="3">';
|
||||
|
||||
print '<table class="nobordernopadding" width="100%">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
//print '<td>'.$langs->trans("SocialContribution").'</td>';
|
||||
print '<td align="left">'.$langs->trans("DateDue").'</td>';
|
||||
@@ -251,15 +259,12 @@ if ($_GET["action"] == 'create')
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
//$objp = $db->fetch_object($result);
|
||||
$objp = $charge;
|
||||
|
||||
$var=!$var;
|
||||
|
||||
print "<tr ".$bc[$var].">";
|
||||
|
||||
//print '<td>'.$charge->getNomUrl(1)."</td>\n";
|
||||
|
||||
if ($objp->date_ech > 0)
|
||||
{
|
||||
print "<td align=\"left\">".dol_print_date($objp->date_ech,'day')."</td>\n";
|
||||
@@ -273,7 +278,7 @@ if ($_GET["action"] == 'create')
|
||||
|
||||
print '<td align="right">'.price($sumpaid)."</td>";
|
||||
|
||||
print '<td align="right">'.price($objp->amount-$sumpaid)."</td>";
|
||||
print '<td align="right">'.price($objp->amount - $sumpaid)."</td>";
|
||||
|
||||
print '<td align="center">';
|
||||
if ($sumpaid < $objp->amount)
|
||||
@@ -304,7 +309,6 @@ if ($_GET["action"] == 'create')
|
||||
print '<td align="center"> </td>';
|
||||
print "</tr>\n";
|
||||
}
|
||||
print "</table></td></tr>\n";
|
||||
|
||||
print "</table>";
|
||||
|
||||
|
||||
@@ -250,7 +250,7 @@ if ($id > 0)
|
||||
|
||||
$head=tax_prepare_head($object);
|
||||
|
||||
print dol_get_fiche_head($head, 'card', $langs->trans("SocialContribution"),0,'bill');
|
||||
dol_fiche_head($head, 'card', $langs->trans("SocialContribution"),0,'bill');
|
||||
|
||||
// Confirmation de la suppression de la charge
|
||||
if ($action == 'paid')
|
||||
@@ -297,7 +297,7 @@ if ($id > 0)
|
||||
print '<td rowspan="'.$rowspan.'" valign="top">';
|
||||
|
||||
/*
|
||||
* Paiements
|
||||
* Payments
|
||||
*/
|
||||
$sql = "SELECT p.rowid, p.num_paiement, datep as dp, p.amount,";
|
||||
$sql.= "c.libelle as paiement_type";
|
||||
@@ -318,8 +318,12 @@ if ($id > 0)
|
||||
$i = 0; $total = 0;
|
||||
echo '<table class="nobordernopadding" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Payments").'</td><td>'.$langs->trans("Type").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Amount").'</td><td> </td></tr>';
|
||||
print '<td>'.$langs->trans("RefPayment").'</td>';
|
||||
print '<td>'.$langs->trans("Date").'</td>';
|
||||
print '<td>'.$langs->trans("Type").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Amount").'</td>';
|
||||
print '<td> </td>';
|
||||
print '</tr>';
|
||||
|
||||
$var=True;
|
||||
while ($i < $num)
|
||||
@@ -327,8 +331,8 @@ if ($id > 0)
|
||||
$objp = $db->fetch_object($resql);
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var]."><td>";
|
||||
print '<a href="'.DOL_URL_ROOT.'/compta/payment_sc/fiche.php?id='.$objp->rowid.'">'.img_object($langs->trans("Payment"),"payment").'</a> ';
|
||||
print dol_print_date($db->jdate($objp->dp),'day')."</td>\n";
|
||||
print '<a href="'.DOL_URL_ROOT.'/compta/payment_sc/fiche.php?id='.$objp->rowid.'">'.img_object($langs->trans("Payment"),"payment").' '.$objp->rowid.'</a></td>';
|
||||
print '<td>'.dol_print_date($db->jdate($objp->dp),'day')."</td>\n";
|
||||
print "<td>".$objp->paiement_type.' '.$objp->num_paiement."</td>\n";
|
||||
print '<td align="right">'.price($objp->amount)."</td><td> ".$langs->trans("Currency".$conf->currency)."</td>\n";
|
||||
print "</tr>";
|
||||
@@ -400,7 +404,7 @@ if ($id > 0)
|
||||
|
||||
if ($action == 'edit') print "</form>\n";
|
||||
|
||||
print '</div>';
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -133,7 +133,7 @@ class Notify
|
||||
|
||||
$langs->load("other");
|
||||
|
||||
dol_syslog("Notify::send action=$action, socid=$socid, texte=$texte, objet_type=$objet_type, objet_id=$objet_id, file=$file");
|
||||
dol_syslog(get_class($this)."::send action=".$action.", socid=".$socid.", texte=".$texte.", objet_type=".$objet_type.", objet_id=".$objet_id.", file=".$file);
|
||||
|
||||
$sql = "SELECT s.nom, c.email, c.rowid as cid, c.lastname, c.firstname,";
|
||||
$sql.= " a.rowid as adid, a.label, a.code, n.rowid";
|
||||
@@ -185,10 +185,10 @@ class Notify
|
||||
$link='/compta/facture.php?facid='.$objet_id;
|
||||
break;
|
||||
case 'order':
|
||||
$link='/commande/fiche.php?facid='.$objet_id;
|
||||
$link='/commande/fiche.php?id='.$objet_id;
|
||||
break;
|
||||
case 'order_supplier':
|
||||
$link='/fourn/commande/fiche.php?facid='.$objet_id;
|
||||
$link='/fourn/commande/fiche.php?id='.$objet_id;
|
||||
break;
|
||||
}
|
||||
// Define $urlwithroot
|
||||
|
||||
@@ -397,6 +397,7 @@ class DoliDBMysql extends DoliDB
|
||||
1006 => 'DB_ERROR_CANNOT_CREATE',
|
||||
1007 => 'DB_ERROR_ALREADY_EXISTS',
|
||||
1008 => 'DB_ERROR_CANNOT_DROP',
|
||||
1022 => 'DB_ERROR_KEY_NAME_ALREADY_EXISTS',
|
||||
1025 => 'DB_ERROR_NO_FOREIGN_KEY_TO_DROP',
|
||||
1044 => 'DB_ERROR_ACCESSDENIED',
|
||||
1046 => 'DB_ERROR_NODBSELECTED',
|
||||
|
||||
@@ -406,6 +406,7 @@ class DoliDBMysqli extends DoliDB
|
||||
1006 => 'DB_ERROR_CANNOT_CREATE',
|
||||
1007 => 'DB_ERROR_ALREADY_EXISTS',
|
||||
1008 => 'DB_ERROR_CANNOT_DROP',
|
||||
1022 => 'DB_ERROR_KEY_NAME_ALREADY_EXISTS',
|
||||
1025 => 'DB_ERROR_NO_FOREIGN_KEY_TO_DROP',
|
||||
1044 => 'DB_ERROR_ACCESSDENIED',
|
||||
1046 => 'DB_ERROR_NODBSELECTED',
|
||||
|
||||
@@ -1286,6 +1286,7 @@ function getListOfModels($db,$type,$maxfilenamelength=0)
|
||||
$sql.= " WHERE type = '".$type."'";
|
||||
$sql.= " AND entity IN (0,".(! empty($conf->multicompany->enabled) && ! empty($conf->multicompany->transverse_mode)?"1,":"").$conf->entity.")";
|
||||
|
||||
dol_syslog(get_class($this).'::getListOfModels sql='.$sql, LOG_DEBUG);
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
|
||||
@@ -81,9 +81,14 @@ function member_prepare_head($object)
|
||||
// $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'member');
|
||||
|
||||
$nbNote = 0;
|
||||
if(!empty($object->note)) $nbNote++;
|
||||
if(!empty($object->note_private)) $nbNote++;
|
||||
if(!empty($object->note_public)) $nbNote++;
|
||||
$head[$h][0] = DOL_URL_ROOT.'/adherents/note.php?id='.$object->id;
|
||||
$head[$h][1] = $langs->trans("Note");
|
||||
$head[$h][2] = 'note';
|
||||
if($nbNote > 0) $head[$h][1].= ' ('.$nbNote.')';
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/adherents/document.php?id='.$object->id;
|
||||
|
||||
@@ -846,8 +846,8 @@ function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_bass
|
||||
{
|
||||
$pdf->SetXY(-20,-$posy);
|
||||
//print 'xxx'.$pdf->PageNo().'-'.$pdf->getAliasNbPages().'-'.$pdf->getAliasNumPage();exit;
|
||||
if (empty($conf->global->MAIN_USE_FPDF)) $pdf->MultiCell(11, 2, $pdf->PageNo().'/'.$pdf->getAliasNbPages(), 0, 'R', 0);
|
||||
else $pdf->MultiCell(11, 2, $pdf->PageNo().'/{nb}', 0, 'R', 0);
|
||||
if (empty($conf->global->MAIN_USE_FPDF)) $pdf->MultiCell(13, 2, $pdf->PageNo().'/'.$pdf->getAliasNbPages(), 0, 'R', 0);
|
||||
else $pdf->MultiCell(13, 2, $pdf->PageNo().'/{nb}', 0, 'R', 0);
|
||||
}
|
||||
|
||||
return $marginwithfooter;
|
||||
|
||||
@@ -110,16 +110,15 @@ function delivery_prepare_head($object)
|
||||
$head[$h][2] = 'delivery';
|
||||
$h++;
|
||||
|
||||
/* We are on id of delivery, no shipment
|
||||
$head[$h][0] = DOL_URL_ROOT."/expedition/contact.php?id=".$object->id;
|
||||
$head[$h][0] = DOL_URL_ROOT."/expedition/contact.php?id=".$object->origin_id;
|
||||
$head[$h][1] = $langs->trans("ContactsAddresses");
|
||||
$head[$h][2] = 'contact';
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT."/expedition/note.php?id=".$object->id;
|
||||
$head[$h][0] = DOL_URL_ROOT."/expedition/note.php?id=".$object->origin_id;
|
||||
$head[$h][1] = $langs->trans("Notes");
|
||||
$head[$h][2] = 'note';
|
||||
$h++;*/
|
||||
$h++;
|
||||
|
||||
// Show more tabs from modules
|
||||
// Entries must be declared in modules descriptor with line
|
||||
|
||||
@@ -197,16 +197,16 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
$tplidx = $pdf->importPage(1);
|
||||
}
|
||||
|
||||
// Complete object by loading several other informations
|
||||
// We get the shipment that is the origin of delivery receipt
|
||||
$expedition=new Expedition($this->db);
|
||||
$result = $expedition->fetch($object->expedition_id);
|
||||
|
||||
$result = $expedition->fetch($object->origin_id);
|
||||
// Now we get the order that is origin of shipment
|
||||
$commande = new Commande($this->db);
|
||||
if ($expedition->origin == 'commande')
|
||||
{
|
||||
$commande->fetch($expedition->origin_id);
|
||||
}
|
||||
$object->commande=$commande;
|
||||
$object->commande=$commande; // We set order of shipment onto delivery.
|
||||
|
||||
|
||||
$pdf->Open();
|
||||
|
||||
@@ -166,7 +166,7 @@ class mailing_xinputfile extends MailingTargets
|
||||
{
|
||||
$cibles[$j] = array(
|
||||
'email' => $email,
|
||||
'name' => $name,
|
||||
'lastname' => $name,
|
||||
'firstname' => $firstname,
|
||||
'other' => $other,
|
||||
'source_url' => '',
|
||||
|
||||
@@ -134,7 +134,7 @@ class mailing_xinputuser extends MailingTargets
|
||||
{
|
||||
$cibles[] = array(
|
||||
'email' => $email,
|
||||
'name' => $lastname,
|
||||
'lastname' => $lastname,
|
||||
'firstname' => $firstname,
|
||||
'other' => $other,
|
||||
'source_url' => '',
|
||||
|
||||
@@ -97,12 +97,12 @@ class modExpedition extends DolibarrModules
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
||||
$r++;
|
||||
$this->const[$r][0] = "EXPEDITION_ADDON_PDF_ODT_PATH";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "DOL_DATA_ROOT/doctemplates/shipment";
|
||||
$this->const[$r][3] = "";
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
||||
$this->const[$r][0] = "LIVRAISON_ADDON_PDF";
|
||||
$this->const[$r][1] = "chaine";
|
||||
@@ -118,7 +118,6 @@ class modExpedition extends DolibarrModules
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
||||
$r++;
|
||||
$this->const[$r][0] = "LIVRAISON_ADDON_PDF_ODT_PATH";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "DOL_DATA_ROOT/doctemplates/delivery";
|
||||
@@ -272,7 +271,7 @@ class modExpedition extends DolibarrModules
|
||||
"DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->const[0][2]."' AND entity = ".$conf->entity,
|
||||
"INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('".$this->const[0][2]."','shipping',".$conf->entity.")",
|
||||
"DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->const[2][2]."' AND entity = ".$conf->entity,
|
||||
"INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('".$this->const[2][2]."','delivery',".$conf->entity.")",
|
||||
"INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('".$this->const[3][2]."','delivery',".$conf->entity.")",
|
||||
);
|
||||
|
||||
return $this->_init($sql,$options);
|
||||
|
||||
@@ -42,7 +42,7 @@ class modMargin extends DolibarrModules
|
||||
// Use here a free id (See in Home -> System information -> Dolibarr for list of used modules id).
|
||||
$this->numero = 59000;
|
||||
// Key text used to identify module (for permissions, menus, etc...)
|
||||
$this->rights_class = 'margin';
|
||||
$this->rights_class = 'margins';
|
||||
|
||||
// Family can be 'crm','financial','hr','projects','products','ecm','technic','other'
|
||||
// It is used to group modules in module setup page
|
||||
@@ -114,7 +114,6 @@ class modMargin extends DolibarrModules
|
||||
|
||||
// Permissions
|
||||
$this->rights = array();
|
||||
$this->rights_class = 'margins';
|
||||
$r=0;
|
||||
|
||||
$r++;
|
||||
|
||||
@@ -47,7 +47,30 @@ if ($user->societe_id) $socid=$user->societe_id;
|
||||
$result=restrictedArea($user, $origin, $origin_id);
|
||||
|
||||
$object = new Expedition($db);
|
||||
$object->fetch($id);
|
||||
if ($id > 0 || ! empty($ref))
|
||||
{
|
||||
$object->fetch($id, $ref);
|
||||
$object->fetch_thirdparty();
|
||||
|
||||
if (!empty($object->origin))
|
||||
{
|
||||
$typeobject = $object->origin;
|
||||
$origin = $object->origin;
|
||||
$object->fetch_origin();
|
||||
}
|
||||
|
||||
// Linked documents
|
||||
if ($typeobject == 'commande' && $object->$typeobject->id && ! empty($conf->commande->enabled))
|
||||
{
|
||||
$objectsrc=new Commande($db);
|
||||
$objectsrc->fetch($object->$typeobject->id);
|
||||
}
|
||||
if ($typeobject == 'propal' && $object->$typeobject->id && ! empty($conf->propal->enabled))
|
||||
{
|
||||
$objectsrc=new Propal($db);
|
||||
$objectsrc->fetch($object->$typeobject->id);
|
||||
}
|
||||
}
|
||||
|
||||
$permissionnote=$user->rights->expedition->creer; // Used by the include of actions_setnotes.inc.php
|
||||
|
||||
|
||||
@@ -117,7 +117,6 @@ create table llx_links
|
||||
objectid INTEGER NOT NULL
|
||||
)ENGINE=innodb;
|
||||
|
||||
|
||||
ALTER TABLE llx_categorie_contact ADD PRIMARY KEY pk_categorie_contact (fk_categorie, fk_socpeople);
|
||||
ALTER TABLE llx_categorie_contact ADD INDEX idx_categorie_contact_fk_categorie (fk_categorie);
|
||||
ALTER TABLE llx_categorie_contact ADD INDEX idx_categorie_contact_fk_socpeople (fk_socpeople);
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
-- when current version is 2.6.0 or higher.
|
||||
--
|
||||
|
||||
|
||||
-- Requests to clean corrupted database
|
||||
|
||||
|
||||
-- delete foreign key that should never exists
|
||||
ALTER TABLE llx_propal DROP FOREIGN KEY fk_propal_fk_currency;
|
||||
ALTER TABLE llx_commande DROP FOREIGN KEY fk_commande_fk_currency;
|
||||
@@ -65,6 +65,7 @@ drop table tmp_categorie;
|
||||
delete from llx_categorie_product where fk_categorie not in (select rowid from llx_categorie where type = 0);
|
||||
delete from llx_categorie_societe where fk_categorie not in (select rowid from llx_categorie where type in (1, 2));
|
||||
delete from llx_categorie_member where fk_categorie not in (select rowid from llx_categorie where type = 3);
|
||||
delete from llx_categorie_contact where fk_categorie not in (select rowid from llx_categorie where type = 4);
|
||||
|
||||
|
||||
-- Fix: delete orphelin deliveries. Note: deliveries are linked to shipment by llx_element_element only. No other links.
|
||||
@@ -77,8 +78,9 @@ UPDATE llx_product SET canvas = NULL where canvas = 'service@product';
|
||||
|
||||
DELETE FROM llx_boxes where box_id NOT IN (SELECT rowid FROM llx_boxes_def);
|
||||
|
||||
update llx_document_model set nom = 'typhon' where (nom = '' OR nom is null) and type = 'delivery';
|
||||
DELETE FROM llx_document_model WHERE nom ='elevement' AND type='delivery';
|
||||
DELETE FROM llx_document_model WHERE nom ='' AND type='delivery';
|
||||
|
||||
|
||||
-- Fix: It seems this is missing for some users
|
||||
insert into llx_c_actioncomm (id, code, type, libelle, module, position) values ( 1, 'AC_TEL', 'system', 'Phone call' ,NULL, 2);
|
||||
@@ -101,6 +103,10 @@ UPDATE llx_product p SET p.stock= (SELECT SUM(ps.reel) FROM llx_product_stock ps
|
||||
-- VMYSQL4.1 DELETE T1 FROM llx_boxes_def as T1, llx_boxes_def as T2 where T1.entity = T2.entity AND T1.file = T2.file AND T1.note = T2.note and T1.rowid > T2.rowid;
|
||||
-- VPGSQL8.2 DELETE FROM llx_boxes_def as T1 WHERE rowid NOT IN (SELECT min(rowid) FROM llx_boxes_def GROUP BY file, entity, note);
|
||||
|
||||
-- We delete old entries into menu for module margin (pb with margin and margins)
|
||||
-- VMYSQL DELETE from llx_menu where module = 'margin' and url = '/margin/index.php' and not exists (select * from llx_const where name = 'MAIN_MODULE_MARGIN' or name = 'MAIN_MODULE_MARGINS');
|
||||
-- VMYSQL DELETE from llx_menu where module = 'margins' and url = '/margin/index.php' and not exists (select * from llx_const where name = 'MAIN_MODULE_MARGIN' or name = 'MAIN_MODULE_MARGINS');
|
||||
|
||||
|
||||
-- Requests to clean old tables or fields
|
||||
|
||||
|
||||
@@ -54,8 +54,6 @@ class Livraison extends CommonObject
|
||||
var $note_public;
|
||||
var $note_private;
|
||||
|
||||
var $expedition_id;
|
||||
|
||||
var $date_delivery; // Date really received
|
||||
var $date_creation;
|
||||
var $date_valid;
|
||||
|
||||
@@ -46,6 +46,7 @@ $langs->load('orders');
|
||||
|
||||
$action=GETPOST('action', 'alpha');
|
||||
$confirm=GETPOST('confirm', 'alpha');
|
||||
$backtourl=GETPOST('backtourl');
|
||||
|
||||
// Security check
|
||||
$id = GETPOST('id', 'int');
|
||||
@@ -149,7 +150,8 @@ if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->expeditio
|
||||
if ($result > 0)
|
||||
{
|
||||
$db->commit();
|
||||
header("Location: ".DOL_URL_ROOT.'/expedition/index.php');
|
||||
if (! empty($backtourl)) header("Location: ".$backtourl);
|
||||
else header("Location: ".DOL_URL_ROOT.'/expedition/index.php');
|
||||
exit;
|
||||
}
|
||||
else
|
||||
@@ -464,11 +466,13 @@ else
|
||||
$result = $delivery->fetch($id);
|
||||
$delivery->fetch_thirdparty();
|
||||
|
||||
// Origin of a 'livraison' (delivery) is ALWAYS 'expedition' (shipment).
|
||||
// However, origin of shipment in future may differs (commande, proposal, ...)
|
||||
|
||||
$expedition=new Expedition($db);
|
||||
$result = $expedition->fetch($delivery->origin_id);
|
||||
$typeobject = $expedition->origin;
|
||||
|
||||
if ($delivery->origin_id)
|
||||
$typeobject = $expedition->origin; // example: commande
|
||||
if ($delivery->origin_id > 0)
|
||||
{
|
||||
$delivery->fetch_origin();
|
||||
}
|
||||
@@ -487,14 +491,13 @@ else
|
||||
*/
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$expedition_id = $_GET["expid"];
|
||||
print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$delivery->id.'&expid='.$expedition_id,$langs->trans("DeleteDeliveryReceipt"),$langs->trans("DeleteDeliveryReceiptConfirm",$delivery->ref),'confirm_delete','','',1);
|
||||
$expedition_id = GETPOST("expid");
|
||||
print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$delivery->id.'&expid='.$expedition_id.'&backtourl='.urlencode($backtourl),$langs->trans("DeleteDeliveryReceipt"),$langs->trans("DeleteDeliveryReceiptConfirm",$delivery->ref),'confirm_delete','','',1);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* Confirmation de la validation
|
||||
*
|
||||
*/
|
||||
if ($action == 'valid')
|
||||
{
|
||||
@@ -508,6 +511,20 @@ else
|
||||
*/
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// Shipment
|
||||
if (($delivery->origin == 'shipment' || $delivery->origin == 'expedition') && $delivery->origin_id > 0)
|
||||
{
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/expedition/liste.php">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
// Ref
|
||||
print '<tr><td width="20%">'.$langs->trans("RefSending").'</td>';
|
||||
print '<td colspan="3">';
|
||||
// Nav is hidden because on a delivery receipt of a shipment, if we go on next shipment, we may find no tab (a shipment may not have delivery receipt yet)
|
||||
//print $form->showrefnav($expedition, 'refshipment', $linkback, 1, 'ref', 'ref');
|
||||
print $form->showrefnav($expedition, 'refshipment', $linkback, 0, 'ref', 'ref');
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Ref
|
||||
print '<tr><td width="20%">'.$langs->trans("Ref").'</td>';
|
||||
print '<td colspan="3">'.$delivery->ref.'</td></tr>';
|
||||
@@ -721,7 +738,7 @@ else
|
||||
{
|
||||
if ($conf->expedition_bon->enabled)
|
||||
{
|
||||
print '<a class="butActionDelete" href="fiche.php?id='.$delivery->id.'&expid='.$delivery->expedition_id.'&action=delete">'.$langs->trans("Delete").'</a>';
|
||||
print '<a class="butActionDelete" href="fiche.php?id='.$delivery->id.'&expid='.$delivery->origin_id.'&action=delete&backtourl='.urlencode(DOL_URL_ROOT.'/expedition/fiche.php?id='.$delivery->origin_id).'">'.$langs->trans("Delete").'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -2721,7 +2721,17 @@ class Societe extends CommonObject
|
||||
$this->address=empty($conf->global->MAIN_INFO_SOCIETE_ADDRESS)?'':$conf->global->MAIN_INFO_SOCIETE_ADDRESS;
|
||||
$this->zip=empty($conf->global->MAIN_INFO_SOCIETE_ZIP)?'':$conf->global->MAIN_INFO_SOCIETE_ZIP;
|
||||
$this->town=empty($conf->global->MAIN_INFO_SOCIETE_TOWN)?'':$conf->global->MAIN_INFO_SOCIETE_TOWN;
|
||||
$this->state_id=empty($conf->global->MAIN_INFO_SOCIETE_DEPARTEMENT)?'':$conf->global->MAIN_INFO_SOCIETE_DEPARTEMENT;
|
||||
$this->state_id=empty($conf->global->MAIN_INFO_SOCIETE_STATE)?'':$conf->global->MAIN_INFO_SOCIETE_STATE;
|
||||
|
||||
/* Disabled: we don't want any SQL request into method setMySoc. This method set object from env only.
|
||||
If we need label, label must be loaded by output that need it from id (label depends on output language)
|
||||
require_once DOL_DOCUMENT_ROOT .'/core/lib/company.lib.php';
|
||||
if (!empty($conf->global->MAIN_INFO_SOCIETE_STATE)) {
|
||||
$this->state_id= $conf->global->MAIN_INFO_SOCIETE_STATE;
|
||||
$this->state = getState($this->state_id);
|
||||
}
|
||||
*/
|
||||
|
||||
$this->note_private=empty($conf->global->MAIN_INFO_SOCIETE_NOTE)?'':$conf->global->MAIN_INFO_SOCIETE_NOTE;
|
||||
|
||||
$this->nom=$this->name; // deprecated
|
||||
@@ -2741,8 +2751,8 @@ class Societe extends CommonObject
|
||||
{
|
||||
dol_syslog("Your country setup use an old syntax. Reedit it using setup area.", LOG_WARNING);
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||
$country_code=getCountry($country_id,2,$this->db); // This need a SQL request, but it's the old feature
|
||||
$country_label=getCountry($country_id,0,$this->db); // This need a SQL request, but it's the old feature
|
||||
$country_code=getCountry($country_id,2,$this->db); // This need a SQL request, but it's the old feature that should not be used anymore
|
||||
$country_label=getCountry($country_id,0,$this->db); // This need a SQL request, but it's the old feature that should not be used anymore
|
||||
}
|
||||
}
|
||||
$this->country_id=$country_id;
|
||||
|
||||
Reference in New Issue
Block a user