Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
a5b53028
Commit
a5b53028
authored
9 years ago
by
Juanjo Menent
Browse files
Options
Downloads
Plain Diff
Merge pull request #3255 from aspangaro/3.8-patch8
Fix: #3253 #3252 #3251 Remove print_r
parents
06684ea3
7b197604
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
dev/examples/get_contracts.php
+1
-1
1 addition, 1 deletion
dev/examples/get_contracts.php
htdocs/accountancy/admin/productaccount.php
+14
-15
14 additions, 15 deletions
htdocs/accountancy/admin/productaccount.php
with
15 additions
and
16 deletions
dev/examples/get_contracts.php
+
1
−
1
View file @
a5b53028
...
@@ -73,7 +73,7 @@ $obj->socid=$argv[1];
...
@@ -73,7 +73,7 @@ $obj->socid=$argv[1];
$listofcontractsforcompany
=
$obj
->
getListOfContracts
(
'all'
);
$listofcontractsforcompany
=
$obj
->
getListOfContracts
(
'all'
);
print
_r
(
$listofcontractsforcompany
)
;
print
$listofcontractsforcompany
;
// -------------------- END OF YOUR CODE --------------------
// -------------------- END OF YOUR CODE --------------------
...
...
This diff is collapsed.
Click to expand it.
htdocs/accountancy/admin/productaccount.php
+
14
−
15
View file @
a5b53028
...
@@ -106,13 +106,8 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both
...
@@ -106,13 +106,8 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both
$search_desc
=
''
;
$search_desc
=
''
;
}
}
//debug move header to top
llxHeader
(
''
,
$langs
->
trans
(
"Accounts"
));
//TODO: modify to update all selected product with a sell account
//TODO: modify to update all selected product with a sell account
if
(
is_array
(
$changeaccount
)
&&
count
(
$changeaccount
)
>
0
&&
$action
==
$langs
->
trans
(
"Accountancy_code_sell"
))
{
if
(
is_array
(
$changeaccount
)
&&
count
(
$changeaccount
)
>
0
&&
$action
==
$langs
->
trans
(
"Accountancy_code_sell"
))
{
//print_r ($changeaccount);
$error
=
0
;
$error
=
0
;
$db
->
begin
();
$db
->
begin
();
...
@@ -121,8 +116,11 @@ if (is_array($changeaccount) && count($changeaccount) > 0 && $action == $langs->
...
@@ -121,8 +116,11 @@ if (is_array($changeaccount) && count($changeaccount) > 0 && $action == $langs->
$sql1
.
=
" SET p.accountancy_code_sell="
.
$account_number_sell
;
$sql1
.
=
" SET p.accountancy_code_sell="
.
$account_number_sell
;
$sql1
.
=
' WHERE p.rowid IN ('
.
implode
(
','
,
$changeaccount
)
.
')'
;
$sql1
.
=
' WHERE p.rowid IN ('
.
implode
(
','
,
$changeaccount
)
.
')'
;
// Debug
// print_r ($sql1);
dol_syslog
(
'accountancy/customer/lines.php::changeaccount product sell sql= '
.
$sql1
);
dol_syslog
(
'accountancy/customer/lines.php::changeaccount product sell sql= '
.
$sql1
);
print_r
(
$sql1
);
$resql1
=
$db
->
query
(
$sql1
);
$resql1
=
$db
->
query
(
$sql1
);
if
(
!
$resql1
)
{
if
(
!
$resql1
)
{
$error
++
;
$error
++
;
...
@@ -137,7 +135,6 @@ print_r ($sql1);
...
@@ -137,7 +135,6 @@ print_r ($sql1);
}
}
}
}
//TODO: modify to update all selected product with a buy account
//TODO: modify to update all selected product with a buy account
if
(
is_array
(
$changeaccount
)
&&
count
(
$changeaccount
)
>
0
&&
$action
==
$langs
->
trans
(
"Accountancy_code_buy"
))
{
if
(
is_array
(
$changeaccount
)
&&
count
(
$changeaccount
)
>
0
&&
$action
==
$langs
->
trans
(
"Accountancy_code_buy"
))
{
$error
=
0
;
$error
=
0
;
...
@@ -147,8 +144,12 @@ if (is_array($changeaccount) && count($changeaccount) > 0 && $action == $langs->
...
@@ -147,8 +144,12 @@ if (is_array($changeaccount) && count($changeaccount) > 0 && $action == $langs->
$sql1
=
"UPDATE "
.
MAIN_DB_PREFIX
.
"product as p"
;
$sql1
=
"UPDATE "
.
MAIN_DB_PREFIX
.
"product as p"
;
$sql1
.
=
" SET p.accountancy_code_buy="
.
$account_number_buy
;
$sql1
.
=
" SET p.accountancy_code_buy="
.
$account_number_buy
;
$sql1
.
=
' WHERE p.rowid IN ('
.
implode
(
','
,
$changeaccount
)
.
')'
;
$sql1
.
=
' WHERE p.rowid IN ('
.
implode
(
','
,
$changeaccount
)
.
')'
;
print_r
(
$sql1
);
// Debug
// print_r ($sql1);
dol_syslog
(
'accountancy/customer/lines.php::changeaccount product buy sql= '
.
$sql1
);
dol_syslog
(
'accountancy/customer/lines.php::changeaccount product buy sql= '
.
$sql1
);
$resql1
=
$db
->
query
(
$sql1
);
$resql1
=
$db
->
query
(
$sql1
);
if
(
!
$resql1
)
{
if
(
!
$resql1
)
{
$error
++
;
$error
++
;
...
@@ -166,12 +167,10 @@ print_r ($sql1);
...
@@ -166,12 +167,10 @@ print_r ($sql1);
/*
/*
* View
* View
*/
*/
//DEBUG elarifr
llxHeader
(
''
,
$langs
->
trans
(
"Accounts"
));
//llxHeader('', $langs->trans("Accounts"));
// For updating account export
// For updating account export
print
'<script type="text/javascript">
print
'<script type="text/javascript">
function launch_export() {
function launch_export() {
$("div.fiche div.tabBar form input[name=\"action\"]").val("export_csv");
$("div.fiche div.tabBar form input[name=\"action\"]").val("export_csv");
$("div.fiche div.tabBar form input[type=\"submit\"]").click();
$("div.fiche div.tabBar form input[type=\"submit\"]").click();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment