diff --git a/build/perl/virtualmin/dolibarr.pl b/build/perl/virtualmin/dolibarr.pl index 35de30e9868..84975633f3d 100644 --- a/build/perl/virtualmin/dolibarr.pl +++ b/build/perl/virtualmin/dolibarr.pl @@ -30,7 +30,7 @@ return "Regis Houssin"; # script_dolibarr_versions() sub script_dolibarr_versions { -return ( "3.2.0", "3.1.0", "3.0.1", "2.9.0" ); +return ( "3.2.0", "3.1.1", "3.0.1", "2.9.0" ); } sub script_dolibarr_category @@ -43,13 +43,6 @@ sub script_dolibarr_php_vers return ( 5 ); } -sub script_dolibarr_php_vars -{ -return ( [ 'memory_limit', '64M', '+' ], - [ 'upload_max_filesize', '10M', '+' ], - [ 'max_execution_time', '60', '+' ] ); -} - sub script_dolibarr_php_modules { local ($d, $ver, $phpver, $opts) = @_; @@ -348,21 +341,32 @@ if ($opts->{'newdb'}) { return (1, "Dolibarr directory and tables deleted."); } -# script_dolibarr_latest(version) -# Returns a URL and regular expression or callback func to get the version -sub script_dolibarr_latest +# script_dolibarr_realversion(&domain, &opts) +# Returns the real version number of some script install, or undef if unknown +sub script_dolibarr_realversion +{ +local ($d, $opts, $sinfo) = @_; +local $lref = &read_file_lines("$opts->{'dir'}/filefunc.inc.php", 1); +foreach my $l (@$lref) { + if ($l =~ /'DOL_VERSION','([0-9a-z\.\-]+)'/) { + return $1; + } + } +return undef; +} + +# script_dolibarr_check_latest(version) +# Checks if some version is the latest for this project, and if not returns +# a newer one. Otherwise returns undef. +sub script_dolibarr_check_latest { local ($ver) = @_; -if ($ver >= 3.0) { - return ( "http://sourceforge.net/projects/dolibarr/files/". - "Dolibarr%20ERP-CRM", - "(3\\.[0-9\\.]+)" ); - } -elsif ($ver >= 2.9) { - return ( "http://www.dolibarr.fr/files/stable/", - "dolibarr\\-(2\\.[0-9\\.]+)" ); - } -return ( ); +local @vers = &osdn_package_versions("dolibarr", + $ver >= 3 ? "dolibarr\\-(3\\.[0-9\\.]+)\\.tgz" : + $ver >= 2.9 ? "dolibarr\\-(2\\.9\\.[0-9\\.]+)\\.tgz" : + "dolibarr\\-(2\\.8\\.[0-9\\.]+)\\.tgz"); +return "Failed to find versions" if (!@vers); +return $ver eq $vers[0] ? undef : $vers[0]; } sub script_dolibarr_site @@ -376,4 +380,3 @@ return 2; } 1; - diff --git a/htdocs/expedition/tpl/linkedobjectblock.tpl.php b/htdocs/expedition/tpl/linkedobjectblock.tpl.php new file mode 100644 index 00000000000..7b08335f31f --- /dev/null +++ b/htdocs/expedition/tpl/linkedobjectblock.tpl.php @@ -0,0 +1,65 @@ + + * + * 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +?> + + + +load("sendings"); +echo '
'; +print_titre($langs->trans('RelatedShippings')); + +?> + + + + + + + + + + > + + + + + +total_ht; +} + +?> + + + + + +
trans("Ref"); ?>trans("Date"); ?>trans("DateSendingShort"); ?>trans("AmountHTShort"); ?>trans("Status"); ?>
+ trans("ShowShipping"),"sending").' '.$object->ref; ?>date_creation,'day'); ?>date_delivery,'day'); ?>total_ht); ?>getLibStatut(3); ?>
trans('TotalHT'); ?> 
+ + \ No newline at end of file diff --git a/htdocs/langs/en_US/sendings.lang b/htdocs/langs/en_US/sendings.lang index b43bff67777..90fc0c7c3e2 100644 --- a/htdocs/langs/en_US/sendings.lang +++ b/htdocs/langs/en_US/sendings.lang @@ -57,6 +57,7 @@ SendShippingRef=Send shipment %s ActionsOnShipping=Events on shipment LinkToTrackYourPackage=Link to track your package ShipmentCreationIsDoneFromOrder=For the moment, creation of a new shipment is done from the order card. +RelatedShippings=Related shippings # Sending methods SendingMethodCATCH=Catch by customer diff --git a/htdocs/langs/fr_FR/sendings.lang b/htdocs/langs/fr_FR/sendings.lang index f703323ad04..1b316ab6c70 100644 --- a/htdocs/langs/fr_FR/sendings.lang +++ b/htdocs/langs/fr_FR/sendings.lang @@ -57,6 +57,7 @@ SendShippingRef=Envoi bon d'expédition %s ActionsOnShipping=Événements sur l'expédition LinkToTrackYourPackage=Lien pour suivi de votre colis ShipmentCreationIsDoneFromOrder=Pour le moment, la création d'une nouvelle expédition se fait depuis la fiche commande. +RelatedShippings=Expédition(s) associée(s) # Sending methods SendingMethodCATCH=Enlèvement par le client