Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/3.7' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Nov 17, 2014
2 parents 27a3ee1 + 05059da commit 3800f22
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 14 deletions.
2 changes: 2 additions & 0 deletions htdocs/accountancy/class/bookkeeping.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
class BookKeeping
{
var $db;
var $error;

var $id;
var $doc_date;
var $doc_type;
Expand Down
18 changes: 12 additions & 6 deletions htdocs/accountancy/journal/purchasesjournal.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@

$action = GETPOST('action');



/*
* View
* Actions
*/

$year_current = strftime("%Y", dol_now());
Expand Down Expand Up @@ -152,9 +154,6 @@
dol_print_error($db);
}

/*
* Actions
*/
// Bookkeeping Write
if ($action == 'writebookkeeping') {
$now = dol_now();
Expand Down Expand Up @@ -237,9 +236,16 @@
}
}

// export csv

if ($action == 'export_csv') {
/*
* View
*/

$companystatic = new Societe($db);

// export csv
if ($action == 'export_csv')
{
$sep = $conf->global->ACCOUNTING_SEPARATORCSV;

header('Content-Type: text/csv');
Expand Down
2 changes: 1 addition & 1 deletion htdocs/comm/propal.php
Original file line number Diff line number Diff line change
Expand Up @@ -2000,7 +2000,7 @@
{
$var = true;

// Add free products/services
// Add products/services form
$object->formAddObjectLine(1, $mysoc, $soc);

$parameters = array();
Expand Down
2 changes: 2 additions & 0 deletions htdocs/core/class/commonobject.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,8 @@ function fetch_thirdparty()

require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';

require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';

$thirdparty = new Societe($this->db);
$result=$thirdparty->fetch(isset($this->socid)?$this->socid:(isset($this->fk_soc)?$this->fk_soc:$this->fk_thirdparty));
$this->client = $thirdparty; // deprecated
Expand Down
6 changes: 5 additions & 1 deletion htdocs/core/lib/functions.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1100,7 +1100,11 @@ function dol_mktime($hour,$minute,$second,$month,$day,$year,$gm=false,$check=1)
$default_timezone=@date_default_timezone_get();
}
}
else $localtz = new DateTimeZone('UTC');

if (empty($localtz)) {
$localtz = new DateTimeZone('UTC');
}

$dt = new DateTime(null,$localtz);
$dt->setDate($year,$month,$day);
$dt->setTime((int) $hour, (int) $minute, (int) $second);
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/tpl/objectline_create.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@
</tr>

<?php
if (! empty($conf->service->enabled) && $dateSelector)
if (! empty($conf->service->enabled) && $dateSelector && GETPOST('type') != '0')
{
if(! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) $colspan = 10;
else $colspan = 9;
Expand Down
5 changes: 5 additions & 0 deletions htdocs/install/mysql/migration/3.6.0-3.7.0.sql
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ insert into llx_c_action_trigger (code,label,description,elementtype,rang) value
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('FICHINTER_REOPEN','Intervention opened','Executed when a intervention is re-opened','ficheinter',19);
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PROPAL_CLASSIFY_BILLED','Customer proposal set billed','Executed when a customer proposal is set to billed','propal',2);

-- VPGSQL8.2 ALTER TABLE llx_contrat ALTER COLUMN fk_commercial_signature DROP NOT NULL;
-- VPGSQL8.2 ALTER TABLE llx_contrat ALTER COLUMN fk_commercial_suivi DROP NOT NULL;
ALTER TABLE llx_contrat MODIFY fk_commercial_signature integer NULL;
ALTER TABLE llx_contrat MODIFY fk_commercial_suivi integer NULL;

ALTER TABLE llx_notify ADD COLUMN fk_soc integer NULL after fk_action;
ALTER TABLE llx_notify ADD COLUMN type varchar(16) DEFAULT 'email' after fk_soc;

Expand Down
4 changes: 2 additions & 2 deletions htdocs/install/mysql/tables/llx_contrat.sql
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ create table llx_contrat
date_cloture datetime,
fk_soc integer NOT NULL,
fk_projet integer,
fk_commercial_signature integer NOT NULL, -- obsolete
fk_commercial_suivi integer NOT NULL, -- obsolete
fk_commercial_signature integer, -- obsolete
fk_commercial_suivi integer, -- obsolete
fk_user_author integer NOT NULL default 0,
fk_user_mise_en_service integer,
fk_user_cloture integer,
Expand Down
2 changes: 1 addition & 1 deletion htdocs/product/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
print '</td></tr>';
print '</table>';

if (! empty($conf->categorie->enabled))
if (! empty($conf->categorie->enabled) && ! empty($conf->global->CATEGORY_GRAPHSTATS_ON_PRODUCTS))
{
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
print '<br>';
Expand Down
2 changes: 1 addition & 1 deletion htdocs/societe/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
print '</td></tr>';
print '</table>';

if (! empty($conf->categorie->enabled))
if (! empty($conf->categorie->enabled) && ! empty($conf->global->CATEGORY_GRAPHSTATS_ON_THIRDPARTIES))
{
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
$elementtype = 'societe';
Expand Down
1 change: 0 additions & 1 deletion htdocs/user/card.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
//if (! empty($conf->agenda->enabled))require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
if (! empty($conf->ldap->enabled)) require_once DOL_DOCUMENT_ROOT.'/core/class/ldap.class.php';
if (! empty($conf->adherent->enabled)) require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
if (! empty($conf->multicompany->enabled)) dol_include_once('/multicompany/class/actions_multicompany.class.php');
Expand Down

0 comments on commit 3800f22

Please sign in to comment.