Skip to content

Commit

Permalink
Merge branch 'develop' of git+ssh://git@github.com/Dolibarr/dolibarr.…
Browse files Browse the repository at this point in the history
…git into develop
  • Loading branch information
hregis committed Mar 28, 2012
2 parents d8d9062 + a8e3742 commit 973146e
Show file tree
Hide file tree
Showing 56 changed files with 273 additions and 220 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Expand Up @@ -9,6 +9,7 @@ to make a backup of your database before making upgrade.

For users:
- New: Each user can remove/add its own boxes.
- New: Add signature at end of predefined email text.
- New: Can use personalized fields of products/services.
- New: Can attach files on social contributions.
- New: Show payments terms and conditions onto muscadet template.
Expand Down
2 changes: 1 addition & 1 deletion build/debian/dolibarr.postinst
Expand Up @@ -83,7 +83,7 @@ case "$1" in
chown -R root:www-data $installconfig
chmod -R 660 $installconfig

if [ ! -f $config ]
if [ ! -s $config ]
then
# Create an empty conf.php with permission to web server
echo Create empty file $config
Expand Down
20 changes: 20 additions & 0 deletions build/launchpad/README
Expand Up @@ -61,5 +61,25 @@ DEBEMAIL="<Your email address>"
sudo pbuilder build <working-dir>/<project>_<version>.dsc


# To get/download package:
Add signing key of the Launchpad repository:
> gpg --keyserver keyserver.ubuntu.com --recv-key A38BF8FD
> sudo apt-key add ~/.gnupg/pubring.gpg

Add Dolibarr Launchpad repository to your system setup by adding the two lines to /etc/apt/sources.list
For the development snapshot version:
deb http://ppa.launchpad.net/eldy/dolibarr-dev/ubuntu precise main
deb-src http://ppa.launchpad.net/eldy/dolibarr-dev/ubuntu precise main
For the stable version:
deb http://ppa.launchpad.net/eldy/dolibarr-stable/ubuntu precise main
deb-src http://ppa.launchpad.net/eldy/dolibarr-stable/ubuntu precise main

Update your package cache:
> apt-get update

Install Dolibarr:
> apt-get install dolibarr




Binary file modified doc/images/dolibarr_120x90.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/dolibarr_124x124.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed doc/images/dolibarr_125x125.png
Binary file not shown.
Binary file removed doc/images/dolibarr_192x192.png
Binary file not shown.
Binary file added doc/images/dolibarr_256x256.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/images/dolibarr_48x48.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/images/dolibarr_73x73.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/dolibarr_logo.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/images/dolibarr_logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed doc/images/dolibarr_logo1.jpg
Binary file not shown.
Binary file removed doc/images/dolibarr_logo1.png
Binary file not shown.
Binary file removed doc/images/dolibarr_logo2.png
Binary file not shown.
19 changes: 15 additions & 4 deletions htdocs/admin/boxes.php
Expand Up @@ -169,14 +169,25 @@
$objto=new ModeleBoxes($db);
$objto->fetch($_GET["switchto"]);

$resultupdatefrom=0;
$resultupdateto=0;
if (is_object($objfrom) && is_object($objto))
{
$sql="UPDATE ".MAIN_DB_PREFIX."boxes set box_order='".$objto->box_order."' WHERE rowid=".$objfrom->rowid;
//print "xx".$sql;
$newfirst=$objto->box_order;
$newsecond=$objfrom->box_order;
if ($newfirst == $newsecond)
{
$newsecondchar=preg_replace('/[0-9]+/','',$newsecond);
$newsecondnum=preg_replace('/[a-zA-Z]+/','',$newsecond);
$newsecond=sprintf("%s%02d",$newsecondchar?$newsecondchar:'A',$newsecondnum+1);
}
$sql="UPDATE ".MAIN_DB_PREFIX."boxes set box_order='".$newfirst."' WHERE rowid=".$objfrom->rowid;
dol_syslog($sql);
$resultupdatefrom = $db->query($sql);
if (! $resultupdatefrom) { dol_print_error($db); }
$sql="UPDATE ".MAIN_DB_PREFIX."boxes set box_order='".$objfrom->box_order."' WHERE rowid=".$objto->rowid;
//print "xx".$sql;

$sql="UPDATE ".MAIN_DB_PREFIX."boxes set box_order='".$newsecond."' WHERE rowid=".$objto->rowid;
dol_syslog($sql);
$resultupdateto = $db->query($sql);
if (! $resultupdateto) { dol_print_error($db); }
}
Expand Down
18 changes: 13 additions & 5 deletions htdocs/admin/mails.php
Expand Up @@ -162,8 +162,7 @@
/*
* Send mail
*/
if (($action == 'send' || $action == 'sendhtml')
&& ! $_POST['addfile'] && ! $_POST['addfilehtml'] && ! $_POST["removedfile"] && ! $_POST['cancel'])
if (($action == 'send' || $action == 'sendhtml') && ! $_POST['addfile'] && ! $_POST['addfilehtml'] && ! $_POST["removedfile"] && ! $_POST['cancel'])
{
$error=0;

Expand Down Expand Up @@ -212,9 +211,18 @@

require_once(DOL_DOCUMENT_ROOT."/core/class/CMailFile.class.php");
$mailfile = new CMailFile(
$subject, $sendto, $email_from, $body,
$filepath, $mimetype, $filename,
$sendtocc, $sendtoccc, $deliveryreceipt, $msgishtml, $errors_to
$subject,
$sendto,
$email_from,
$body,
$filepath,
$mimetype,
$filename,
$sendtocc,
$sendtoccc,
$deliveryreceipt,
$msgishtml,
$errors_to
);

$result=$mailfile->sendfile();
Expand Down
18 changes: 9 additions & 9 deletions htdocs/admin/propal.php
Expand Up @@ -46,8 +46,8 @@

if ($action == 'updateMask')
{
$maskconstpropal=GETPOST("maskconstpropal");
$maskpropal=GETPOST("maskpropal");
$maskconstpropal=GETPOST('maskconstpropal','alpha');
$maskpropal=GETPOST('maskpropal','alpha');
if ($maskconstpropal) $res = dolibarr_set_const($db,$maskconstpropal,$maskpropal,'chaine',0,'',$conf->entity);

if (! $res > 0) $error++;
Expand All @@ -64,7 +64,7 @@

if ($action == 'specimen')
{
$modele=GETPOST("module");
$modele=GETPOST('module','alpha');

$propal = new Propal($db);
$propal->initAsSpecimen();
Expand Down Expand Up @@ -109,7 +109,7 @@

if ($action == 'set_PROPALE_DRAFT_WATERMARK')
{
$draft = GETPOST("PROPALE_DRAFT_WATERMARK");
$draft = GETPOST('PROPALE_DRAFT_WATERMARK','alpha');

$res = dolibarr_set_const($db, "PROPALE_DRAFT_WATERMARK",trim($draft),'chaine',0,'',$conf->entity);
if (! $res > 0) $error++;
Expand All @@ -126,7 +126,7 @@

if ($action == 'set_PROPALE_FREE_TEXT')
{
$freetext = GETPOST("PROPALE_FREE_TEXT");
$freetext = GETPOST('PROPALE_FREE_TEXT','alpha');

$res = dolibarr_set_const($db, "PROPALE_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity);

Expand Down Expand Up @@ -183,8 +183,8 @@

if ($action == 'set')
{
$label = GETPOST("label");
$scandir = GETPOST("scandir");
$label = GETPOST('label','alpha');
$scandir = GETPOST('scandir','alpha');

$type='propal';
$sql = "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity, libelle, description)";
Expand All @@ -210,8 +210,8 @@

else if ($action == 'setdoc')
{
$label = GETPOST("label");
$scandir = GETPOST("scandir");
$label = GETPOST('label','alpha');
$scandir = GETPOST('scandir','alpha');

$db->begin();

Expand Down
52 changes: 26 additions & 26 deletions htdocs/admin/tools/export.php
Expand Up @@ -102,7 +102,7 @@
// MYSQL
if ($what == 'mysql')
{
$cmddump=$_POST["mysqldump"];
$cmddump=GETPOST("mysqldump"); // Do not sanitize here with 'alpha', will be sanitize later by escapeshellarg
if ($cmddump)
{
dolibarr_set_const($db, 'SYSTEMTOOLS_MYSQLDUMP', $cmddump,'chaine',0,'',$conf->entity);
Expand All @@ -111,7 +111,7 @@
$outputdir = $conf->admin->dir_output.'/backup';
$outputfile = $outputdir.'/'.$file;
// for compression format, we add extension
$compression=isset($_POST['compression']) ? $_POST['compression'] : 'none';
$compression=GETPOST('compression') ? GETPOST('compression','alpha') : 'none';
if ($compression == 'gz') $outputfile.='.gz';
if ($compression == 'bz') $outputfile.='.bz2';
$outputerror = $outputfile.'.err';
Expand All @@ -125,28 +125,28 @@
$param=$dolibarr_main_db_name." -h ".$dolibarr_main_db_host;
$param.=" -u ".$dolibarr_main_db_user;
if (! empty($dolibarr_main_db_port)) $param.=" -P ".$dolibarr_main_db_port;
if (! $_POST["use_transaction"]) $param.=" -l --single-transaction";
if ($_POST["disable_fk"]) $param.=" -K";
if ($_POST["sql_compat"] && $_POST["sql_compat"] != 'NONE') $param.=" --compatible=".$_POST["sql_compat"];
if ($_POST["drop_database"]) $param.=" --add-drop-database";
if ($_POST["sql_structure"])
if (! GETPOST("use_transaction")) $param.=" -l --single-transaction";
if (GETPOST("disable_fk")) $param.=" -K";
if (GETPOST("sql_compat") && GETPOST("sql_compat") != 'NONE') $param.=" --compatible=".GETPOST("sql_compat","alpha");
if (GETPOST("drop_database")) $param.=" --add-drop-database";
if (GETPOST("sql_structure"))
{
if ($_POST["drop"]) $param.=" --add-drop-table";
if (GETPOST("drop")) $param.=" --add-drop-table";
}
else
{
$param.=" -t";
}
if ($_POST["disable-add-locks"]) $param.=" --add-locks=FALSE";
if ($_POST["sql_data"])
if (GETPOST("disable-add-locks")) $param.=" --add-locks=FALSE";
if (GETPOST("sql_data"))
{
$param.=" --tables";
if ($_POST["showcolumns"]) $param.=" -c";
if ($_POST["extended_ins"]) $param.=" -e";
if (GETPOST("showcolumns")) $param.=" -c";
if (GETPOST("extended_ins")) $param.=" -e";
else $param.=" --skip-extended-insert";
if ($_POST["delayed"]) $param.=" --delayed-insert";
if ($_POST["sql_ignore"]) $param.=" --insert-ignore";
if ($_POST["hexforbinary"]) $param.=" --hex-blob";
if (GETPOST("delayed")) $param.=" --delayed-insert";
if (GETPOST("sql_ignore")) $param.=" --insert-ignore";
if (GETPOST("hexforbinary")) $param.=" --hex-blob";
}
else
{
Expand Down Expand Up @@ -244,7 +244,7 @@
$outputfile = $outputdir.'/'.$file;
$outputfiletemp = $outputfile.'-TMP.sql';
// for compression format, we add extension
$compression=isset($_POST['compression']) ? $_POST['compression'] : 'none';
$compression=GETPOST('compression') ? GETPOST('compression','alpha') : 'none';
if ($compression == 'gz') $outputfile.='.gz';
if ($compression == 'bz') $outputfile.='.bz2';
$outputerror = $outputfile.'.err';
Expand All @@ -265,7 +265,7 @@
// POSTGRESQL
if ($what == 'postgresql')
{
$cmddump=$_POST["postgresqldump"];
$cmddump=GETPOST("postgresqldump"); // Do not sanitize here with 'alpha', will be sanitize later by escapeshellarg
if ($cmddump)
{
dolibarr_set_const($db, 'SYSTEMTOOLS_POSTGRESQLDUMP', $cmddump,'chaine',0,'',$conf->entity);
Expand All @@ -274,7 +274,7 @@
$outputdir = $conf->admin->dir_output.'/backup';
$outputfile = $outputdir.'/'.$file;
// for compression format, we add extension
$compression=isset($_POST['compression']) ? $_POST['compression'] : 'none';
$compression=GETPOST('compression') ? GETPOST('compression','alpha') : 'none';
if ($compression == 'gz') $outputfile.='.gz';
if ($compression == 'bz') $outputfile.='.bz2';
$outputerror = $outputfile.'.err';
Expand All @@ -288,17 +288,17 @@
$param=" --no-tablespaces --inserts -h ".$dolibarr_main_db_host;
$param.=" -U ".$dolibarr_main_db_user;
if (! empty($dolibarr_main_db_port)) $param.=" -p ".$dolibarr_main_db_port;
if ($_POST["sql_compat"] && $_POST["sql_compat"] == 'ANSI') $param.=" --disable-dollar-quoting";
if ($_POST["drop_database"]) $param.=" -c -C";
if ($_POST["sql_structure"])
if (GETPOST("sql_compat") && GETPOST("sql_compat") == 'ANSI') $param.=" --disable-dollar-quoting";
if (GETPOST("drop_database")) $param.=" -c -C";
if (GETPOST("sql_structure"))
{
if ($_POST["drop"]) $param.=" --add-drop-table";
if (empty($_POST["sql_data"])) $param.=" -s";
if (GETPOST("drop")) $param.=" --add-drop-table";
if (! GETPOST("sql_data")) $param.=" -s";
}
if ($_POST["sql_data"])
if (GETPOST("sql_data"))
{
if (empty($_POST["sql_structure"])) $param.=" -a";
if ($_POST["showcolumns"]) $param.=" -c";
if (! GETPOST("sql_structure")) $param.=" -a";
if (GETPOST("showcolumns")) $param.=" -c";
}
$param.=' -f "'.$outputfile.'"';
//if ($compression == 'none')
Expand Down
4 changes: 2 additions & 2 deletions htdocs/cashdesk/affContenu.php
Expand Up @@ -47,8 +47,8 @@

require ('tpl/liste_articles.tpl.php');

$obj_facturation->prix_total_ht($lst_total_ht);
$obj_facturation->prix_total_ttc($lst_total_ttc);
$obj_facturation->prixTotalHt($lst_total_ht);
$obj_facturation->prixTotalTtc($lst_total_ttc);

print '</div>';

Expand Down
12 changes: 6 additions & 6 deletions htdocs/cashdesk/class/Facturation.class.php
Expand Up @@ -253,9 +253,9 @@ private function razPers()
$this->montantRendu('RESET');
$this->paiementLe('RESET');

$this->prix_total_ht('RESET');
$this->montant_tva('RESET');
$this->prix_total_ttc('RESET');
$this->prixTotalHt('RESET');
$this->montantTva('RESET');
$this->prixTotalTtc('RESET');

}

Expand Down Expand Up @@ -588,7 +588,7 @@ public function paiementLe( $aPaiementLe=null )
* @param int $aTotalHt Total amount
* @return int Total amount
*/
public function prix_total_ht( $aTotalHt=null )
public function prixTotalHt( $aTotalHt=null )
{
if ( !$aTotalHt ) {

Expand All @@ -611,7 +611,7 @@ public function prix_total_ht( $aTotalHt=null )
* @param int $aMontantTva Amount vat
* @return int Amount vat
*/
public function montant_tva( $aMontantTva=null )
public function montantTva( $aMontantTva=null )
{
if ( !$aMontantTva ) {

Expand All @@ -635,7 +635,7 @@ public function montant_tva( $aMontantTva=null )
* @param int $aTotalTtc Amount ttc
* @return int Amount ttc
*/
public function prix_total_ttc( $aTotalTtc=null )
public function prixTotalTtc( $aTotalTtc=null )
{
if ( !$aTotalTtc )
{
Expand Down
2 changes: 1 addition & 1 deletion htdocs/cashdesk/tpl/facturation1.tpl.php
Expand Up @@ -169,7 +169,7 @@
<tr><th class="label1"><?php echo $langs->trans("TotalTicket"); ?></th><th class="label1"><?php echo $langs->trans("Received"); ?></th><th class="label1"><?php echo $langs->trans("Change"); ?></th></tr>
<tr>
<!-- Affichage du montant du -->
<td><input class="texte2_off" type="text" name="txtDu" value="<?php echo price2num($obj_facturation->prix_total_ttc(), 'MT'); ?>" disabled="disabled" /></td>
<td><input class="texte2_off" type="text" name="txtDu" value="<?php echo price2num($obj_facturation->prixTotalTtc(), 'MT'); ?>" disabled="disabled" /></td>
<!-- Choix du montant encaisse -->
<td><input class="texte2" type="text" name="txtEncaisse" value="" onkeyup="javascript: verifDifference();" onfocus="javascript: this.select();" /></td>
<!-- Affichage du montant rendu -->
Expand Down
2 changes: 1 addition & 1 deletion htdocs/cashdesk/tpl/liste_articles.tpl.php
Expand Up @@ -68,7 +68,7 @@
}

$obj_facturation->calculTotaux();
$total_ttc = $obj_facturation->prix_total_ttc();
$total_ttc = $obj_facturation->prixTotalTtc();
echo ('<p class="cadre_prix_total">'.$langs->trans("Total").' : '.price2num($total_ttc, 'MT').' '.$conf->currency.'<br></p>'."\n");

?></div>
Expand Down
6 changes: 3 additions & 3 deletions htdocs/cashdesk/tpl/ticket.tpl.php
Expand Up @@ -138,9 +138,9 @@

<table class="totaux">
<?php
echo '<tr><th nowrap="nowrap">'.$langs->trans("TotalHT").'</th><td nowrap="nowrap">'.price2num($obj_facturation->prix_total_ht(),'MT')." ".$conf->currency."</td></tr>\n";
echo '<tr><th nowrap="nowrap">'.$langs->trans("TotalVAT").'</th><td nowrap="nowrap">'.price2num($obj_facturation->montant_tva(),'MT')." ".$conf->currency."</td></tr>\n";
echo '<tr><th nowrap="nowrap">'.$langs->trans("TotalTTC").'</th><td nowrap="nowrap">'.price2num($obj_facturation->prix_total_ttc(),'MT')." ".$conf->currency."</td></tr>\n";
echo '<tr><th nowrap="nowrap">'.$langs->trans("TotalHT").'</th><td nowrap="nowrap">'.price2num($obj_facturation->prixTotalHt(),'MT')." ".$conf->currency."</td></tr>\n";
echo '<tr><th nowrap="nowrap">'.$langs->trans("TotalVAT").'</th><td nowrap="nowrap">'.price2num($obj_facturation->montantTva(),'MT')." ".$conf->currency."</td></tr>\n";
echo '<tr><th nowrap="nowrap">'.$langs->trans("TotalTTC").'</th><td nowrap="nowrap">'.price2num($obj_facturation->prixTotalTtc(),'MT')." ".$conf->currency."</td></tr>\n";
?>
</table>

Expand Down
8 changes: 4 additions & 4 deletions htdocs/cashdesk/tpl/validation1.tpl.php
Expand Up @@ -26,12 +26,12 @@
<table class="table_resume">

<tr><td class="resume_label"><?php echo $langs->trans("Invoice"); ?></td><td><?php echo $obj_facturation->numInvoice(); ?></td></tr>
<tr><td class="resume_label"><?php echo $langs->trans("TotalHT"); ?></td><td><?php echo price2num($obj_facturation->prix_total_ht(),'MT').' '.$conf->currency; ?></td></tr>
<tr><td class="resume_label"><?php echo $langs->trans("TotalHT"); ?></td><td><?php echo price2num($obj_facturation->prixTotalHt(),'MT').' '.$conf->currency; ?></td></tr>
<?php
// Affichage de la tva par taux
if ( $obj_facturation->montant_tva() ) {
if ( $obj_facturation->montantTva() ) {

echo ('<tr><td class="resume_label">'.$langs->trans("VAT").'</td><td>'.price2num($obj_facturation->montant_tva(),'MT').' '.$conf->currency.'</td></tr>');
echo ('<tr><td class="resume_label">'.$langs->trans("VAT").'</td><td>'.price2num($obj_facturation->montantTva(),'MT').' '.$conf->currency.'</td></tr>');

}
else
Expand All @@ -41,7 +41,7 @@

}
?>
<tr><td class="resume_label"><?php echo $langs->trans("TotalTTC"); ?> </td><td><?php echo price2num($obj_facturation->prix_total_ttc(),'MT').' '.$conf->currency; ?></td></tr>
<tr><td class="resume_label"><?php echo $langs->trans("TotalTTC"); ?> </td><td><?php echo price2num($obj_facturation->prixTotalTtc(),'MT').' '.$conf->currency; ?></td></tr>
<tr><td class="resume_label"><?php echo $langs->trans("PaymentMode"); ?> </td><td>
<?php
switch ($obj_facturation->getSetPaymentMode())
Expand Down

0 comments on commit 973146e

Please sign in to comment.