2
0
forked from Wavyzz/dolibarr

Merge pull request #1 from Dolibarr/develop

merge from develop
This commit is contained in:
Tobias Sekan
2020-02-26 14:31:03 +01:00
committed by GitHub
60 changed files with 2059 additions and 1491 deletions

View File

@@ -9,7 +9,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: Dolibarr/stale@v1.1.0
- uses: Dolibarr/stale@master
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue is stale because it has been open 1 year with no activity. If this is a bug, please comment to confirm it is still present on latest stable version. if this is a feature request, please comment to notify the request is still relevant and not yet covered by latest stable version. Without comment, this issue will be closed automatically by stale bot in 15 days.'
@@ -17,7 +17,7 @@ jobs:
exempt-issue-label: 'Priority High / Blocking'
days-before-stale: 365
days-before-close: 15
operations-per-run: 10
operations-per-run: 50
#stale-pr-message: 'This PR is stale because it has been open 1 year with no activity. If this PR is still mergeable (no conflict, nor Continuous Integration errors), please comment to confirm this merge is still expected. Without comment, this issue will be closed automatically by stale bot in 15 days.'
stale-pr-label: 'PR Stale (automatic label)'
stale-pr-message:

View File

@@ -45,9 +45,12 @@ Dolibarr working. It is here only to build Dolibarr packages, and those
generated packages will not contains this "build" directory.
We can find in "build", following sub-directories:
You can find in "build", following sub-directories:
* debian:
* composer
To test an upgrade of a lib.
* debian
To build Debian package.
* dmg:

View File

@@ -1,20 +1,24 @@
README (English)
##################################################
OBS Package tools
OBE - openSUSE Build Service
##################################################
This directory contains files to explain how to publish
a package onto OBS
This directory contains an instruction to explain
how to publish a package onto OBS.
# Create a project onto OBS
#----------------------------------
https://build.opensuse.org
# Create a project onto OBS
---------------------------
https://build.opensuse.org
Packaging rules: http://en.opensuse.org/Portal:Packaging
# Packaging rules:
------------------
https://en.opensuse.org/Portal:Packaging
Add attributes:
OBS:Screenshots URL of screenshot http://www.dolibarr.org/images/dolibarr_screenshot1.png
OBS:Screenshots URL of screenshot https://www.dolibarr.org/images/dolibarr_screenshot1.png
OBS:QualityCategory Development|Testing|Stable|Private
OBS:Maintained 1
@@ -28,22 +32,24 @@ To submit a snapshot for building, we should have a service file with content
</service>
</services>
How to have such a service file created automatically ?
Go into project you want to update. It mught be:
# How to have such a service file created automatically ?
---------------------------------------------------------
Go into project you want to update. It might be:
- openSUSE Build Service > Projects > Application:ERP:Dolibarr > dolibarr
- or your private project
Once logged, click on "Add file" in section "Source Files", then select mode "Upload From: Remote URL"
Keep empty for "Filename", choose "Remote URL" and enter into last field, URL that should looks like this:
http://www.dolibarr.org/files/stable/package_rpm_generic/dolibarr-x.y.v-0.4.src.rpm
https://www.dolibarr.org/files/stable/package_rpm_generic/dolibarr-x.y.v-0.4.src.rpm
Then add into Advanded - Attributes
OBS:Screenshots http://www.dolibarr.org/images/dolibarr_screenshot1.png
OBS:QualityCategory Stable|Testing|Development|Private
OBS:Screenshots https://www.dolibarr.org/images/dolibarr_screenshot1.png
OBS:QualityCategory Stable|Testing|Development|Private
# Move project into official directory
--------------------------------------
- Enter a bug to ask to be a maintener of a category or to add a new one.
For example: https://bugzilla.novell.com/show_bug.cgi?id=848083 to be a maintener of category
https://build.opensuse.org/project/show/Application:ERP

View File

@@ -0,0 +1,215 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<profiles>
<profile name="PSR-12 [built-in]">
<setting id="indentationChar" value="&#9;"/>
<setting id="insert_space_after_opening_paren_in_declare" value="false"/>
<setting id="insert_space_before_closing_paren_in_declare" value="false"/>
<setting id="insert_space_before_opening_paren_in_declare" value="false"/>
<setting id="org.eclipse.php.core.formatter.insert_new_line_in_function_invoke" value="3"/>
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_arguments_in_allocation_expression_force_split" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_arguments_in_allocation_expression_indent_policy" value="0"/>
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_arguments_in_allocation_expression_line_wrap_policy" value="0"/>
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_arguments_in_method_invocation_force_split" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_arguments_in_method_invocation_indent_policy" value="0"/>
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_arguments_in_method_invocation_line_wrap_policy" value="0"/>
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_assignment_force_split" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_assignment_indent_policy" value="0"/>
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_assignment_line_wrap_policy" value="0"/>
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_binary_expression_force_split" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_binary_expression_indent_policy" value="0"/>
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_binary_expression_line_wrap_policy" value="1"/>
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_compact_if_force_split" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_compact_if_indent_policy" value="0"/>
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_compact_if_line_wrap_policy" value="0"/>
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_conditional_expression_force_split" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_conditional_expression_indent_policy" value="0"/>
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_conditional_expression_line_wrap_policy" value="0"/>
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_expressions_in_array_initializer_force_split" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_expressions_in_array_initializer_indent_policy" value="2"/>
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_expressions_in_array_initializer_line_wrap_policy" value="1"/>
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_parameters_in_method_declaration_force_split" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_parameters_in_method_declaration_indent_policy" value="0"/>
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_parameters_in_method_declaration_line_wrap_policy" value="0"/>
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_superclass_in_type_declaration_force_split" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_superclass_in_type_declaration_indent_policy" value="0"/>
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_superclass_in_type_declaration_line_wrap_policy" value="0"/>
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_superinterfaces_in_type_declaration_force_split" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_superinterfaces_in_type_declaration_indent_policy" value="0"/>
<setting id="org.eclipse.php.formatter.core.formatter.alignment_for_superinterfaces_in_type_declaration_line_wrap_policy" value="0"/>
<setting id="org.eclipse.php.formatter.core.formatter.blank_lines_before_field" value="1"/>
<setting id="org.eclipse.php.formatter.core.formatter.blank_lines_before_member_type" value="1"/>
<setting id="org.eclipse.php.formatter.core.formatter.blank_lines_before_method" value="1"/>
<setting id="org.eclipse.php.formatter.core.formatter.blank_lines_between_type_declarations" value="1"/>
<setting id="org.eclipse.php.formatter.core.formatter.brace_position_for_block" value="0"/>
<setting id="org.eclipse.php.formatter.core.formatter.brace_position_for_lambda_function_declaration" value="0"/>
<setting id="org.eclipse.php.formatter.core.formatter.brace_position_for_method_declaration" value="1"/>
<setting id="org.eclipse.php.formatter.core.formatter.brace_position_for_switch" value="0"/>
<setting id="org.eclipse.php.formatter.core.formatter.brace_position_for_type_declaration" value="1"/>
<setting id="org.eclipse.php.formatter.core.formatter.comment.clear_blank_lines_in_block_comment" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.comment.format_block_comments" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.comment.format_header" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.comment.format_html" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.comment.format_javadoc_comments" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.comment.format_line_comments" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.comment.format_source_code" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.comment.indent_parameter_description" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.comment.indent_root_tags" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.comment.insert_new_line_before_root_tags" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.comment.insert_new_line_for_parameter" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.comment.keep_empty_line_for_empty_description" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.comment.line_length" value="1000"/>
<setting id="org.eclipse.php.formatter.core.formatter.comment.never_format_unknown_tags" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.comment.new_lines_at_block_boundaries" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.comment.new_lines_at_javadoc_boundaries" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.comment.preserve_white_space_between_code_and_line_comments" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.continuation_indentation" value="1"/>
<setting id="org.eclipse.php.formatter.core.formatter.continuation_indentation_for_array_initializer" value="1"/>
<setting id="org.eclipse.php.formatter.core.formatter.disabling_tag" value="@formatter:off"/>
<setting id="org.eclipse.php.formatter.core.formatter.enabling_tag" value="@formatter:on"/>
<setting id="org.eclipse.php.formatter.core.formatter.format_guardian_clause_on_one_line" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.format_line_comment_starting_on_first_column" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.indent_breaks_compare_to_cases" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.indent_empty_lines" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.indent_heredocs" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.indent_statements_compare_to_block" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.indent_statements_compare_to_body" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.indent_switchstatements_compare_to_switch" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.indentation.size" value="1"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_new_line_before_catch_in_try_statement" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_new_line_before_else_in_if_statement" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_new_line_before_finally_in_try_statement" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_new_line_before_while_in_do_statement" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_new_line_in_empty_block" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_new_line_in_empty_method_body" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_new_line_in_empty_type_declaration" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_arrow_in_array_creation" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_arrow_in_field_access" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_arrow_in_foreach" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_arrow_in_method_invocation" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_arrow_in_yield" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_assignment_operator" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_binary_operator" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_closing_brace_in_block" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_closing_paren_in_cast" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_colon_in_conditional" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_coloncolon_in_field_access" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_coloncolon_in_method_invocation" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_comma_in_array_creation" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_comma_in_echo" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_comma_in_for_inits" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_comma_in_global" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_comma_in_list" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_comma_in_multiple_constant_declarations" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_comma_in_static" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_comma_in_superinterfaces" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_opening_paren_in_array_creation" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_opening_paren_in_cast" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_opening_paren_in_catch" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_opening_paren_in_for" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_opening_paren_in_foreach" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_opening_paren_in_if" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_opening_paren_in_list" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_opening_paren_in_switch" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_opening_paren_in_while" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_postfix_operator" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_prefix_operator" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_question_in_conditional" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_reference_symbol_in_referenced_expression" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_semicolon_in_for" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_after_unary_operator" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_arrow_in_array_creation" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_arrow_in_field_access" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_arrow_in_foreach" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_arrow_in_method_invocation" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_arrow_in_yield" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_assignment_operator" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_binary_operator" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_closing_paren_in_array_creation" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_closing_paren_in_cast" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_closing_paren_in_catch" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_closing_paren_in_for" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_closing_paren_in_foreach" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_closing_paren_in_if" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_closing_paren_in_list" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_closing_paren_in_switch" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_closing_paren_in_while" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_colon_in_case" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_colon_in_conditional" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_colon_in_default" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_coloncolon_in_field_access" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_coloncolon_in_method_invocation" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_comma_in_array_creation" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_comma_in_echo" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_comma_in_for_inits" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_comma_in_global" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_comma_in_list" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_comma_in_multiple_constant_declarations" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_comma_in_static" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_comma_in_superinterfaces" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_opening_brace_in_block" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_opening_brace_in_switch" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_opening_paren_in_array_creation" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_opening_paren_in_catch" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_opening_paren_in_for" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_opening_paren_in_foreach" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_opening_paren_in_if" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_opening_paren_in_list" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_opening_paren_in_switch" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_opening_paren_in_while" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_postfix_operator" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_prefix_operator" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_question_in_conditional" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_semicolon" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_semicolon_in_for" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_before_unary_operator" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_between_brackets_in_array_type_reference" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.join_lines_in_comments" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.keep_else_statement_on_same_line" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.keep_elseif_statement_on_same_line" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.keep_imple_if_on_one_line" value="true"/>
<setting id="org.eclipse.php.formatter.core.formatter.keep_then_statement_on_same_line" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.keep_trailing_comma_in_list" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.lineSplit" value="200"/>
<setting id="org.eclipse.php.formatter.core.formatter.never_indent_block_comments_on_first_column" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.never_indent_line_comments_on_first_column" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.number_of_blank_lines_after_namespace" value="1"/>
<setting id="org.eclipse.php.formatter.core.formatter.number_of_blank_lines_after_use_statements" value="0"/>
<setting id="org.eclipse.php.formatter.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
<setting id="org.eclipse.php.formatter.core.formatter.number_of_blank_lines_at_end_of_class_body" value="0"/>
<setting id="org.eclipse.php.formatter.core.formatter.number_of_blank_lines_at_end_of_method_body" value="0"/>
<setting id="org.eclipse.php.formatter.core.formatter.number_of_blank_lines_before_namespace" value="0"/>
<setting id="org.eclipse.php.formatter.core.formatter.number_of_blank_lines_before_use_statements" value="0"/>
<setting id="org.eclipse.php.formatter.core.formatter.number_of_blank_lines_between_namespaces" value="1"/>
<setting id="org.eclipse.php.formatter.core.formatter.number_of_blank_lines_between_use_statements" value="0"/>
<setting id="org.eclipse.php.formatter.core.formatter.number_of_empty_lines_to_preserve" value="3"/>
<setting id="org.eclipse.php.formatter.core.formatter.put_empty_statement_on_new_line" value="false"/>
<setting id="org.eclipse.php.formatter.core.formatter.tabulation.size" value="4"/>
<setting id="org.eclipse.php.formatter.core.formatter.use_on_off_tags" value="false"/>
</profile>
</profiles>

View File

@@ -1,17 +1,25 @@
comparison of terms
Term Dolibarr SAP Odoo ...
----------------------------------------------------------------------------
Thirdparty Contact partner Partner/Contact (company)
Contact/address Contact person Partner/Contact (individual)
Dolibarr SAP ERP Odoo
-------------------------------------------------------------------------
Thirdparty Contact partner Partner/Contact (company)
Contact/address Contact person Partner/Contact (individual)
Financial ?? Invoicing
Income / Expense ?? Profit / Loss
Balance ?? Net profit
Subledger account Subledger account ??
Financial Finance (FI) Accounting
Accounting
Proposal ?? Quotation Proposal is ok but proposition looks better (proposal is for a detailed proposition). We can say also "business proposition or business proposal".
Indian are using "Quotation".
Income / Expense ?? Profit / Loss
Balance ?? Net profit
Subledger account Subledger account ??
CRM Sales & Distribution Sales
Proposal ?? Quotation
Proposal is ok but proposition looks better (proposal is for a detailed proposition).
We can say also "business proposition or business proposal".
In India they are using "Quotation".

View File

@@ -283,6 +283,8 @@ if ($resql)
<script type="text/javascript">
$(document).ready(function () {
$("#searchFormList").on("submit", function (e) {
//event.preventDefault();
//var form = this;
console.log("chartofaccounts focus = "+$("#chartofaccounts").is(":focus"));
console.log("change_chart focus = "+$("#change_chart").is(":focus"));
if ($("#change_chart").is(":focus"))
@@ -290,6 +292,7 @@ if ($resql)
console.log("We set valid_change_chart to 1");
$("#valid_change_chart").val(1);
}
//form.submit();
return true;
});
});

View File

@@ -161,6 +161,7 @@ print '<input type="hidden" name="action" value="update">';
// Define main accounts for thirdparty
print '<table class="noborder centpercent">';
print '<tr class="liste_titre"><td>'.$langs->trans("ThirdParties").' | '.$langs->trans("Users").'</td><td></td></tr>';
foreach ($list_account_main as $key) {
print '<tr class="oddeven value">';
@@ -180,15 +181,6 @@ foreach ($list_account_main as $key) {
}
print "</table>\n";
print '<br>';
// Define default accounts
print '<table class="noborder centpercent">';
foreach ($list_account as $key) {
$reg=array();
if (preg_match('/---(.*)---/', $key, $reg)) {

View File

@@ -134,13 +134,13 @@ if ($action == 'update') {
$form = new Form($db);
$title = $langs->trans('ConfigAccountingExpert');
$title = $langs->trans('ExportOptions');
llxHeader('', $title);
$linkback = '';
// $linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php?restore_lastsearch_values=1">' . $langs->trans("BackToModuleList") . '</a>';
print load_fiche_titre($langs->trans('ConfigAccountingExpert'), $linkback, 'accountancy');
print load_fiche_titre($langs->trans('ExportOptions'), $linkback, 'accountancy');
print "\n".'<script type="text/javascript" language="javascript">'."\n";

File diff suppressed because it is too large Load Diff

View File

@@ -201,14 +201,14 @@ print '<div class="div-table-responsive-no-min">';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print getTitleFieldOfList('Name', 0, $_SERVER['PHP_SELF'], 'name', '', $param, '', $sortfield, $sortorder, '')."\n";
print '<td>'.$langs->trans("Value").'</td>';
print '<td>'.$langs->trans("Comment").'</td>';
print getTitleFieldOfList('DateModificationShort', 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center')."\n";
print getTitleFieldOfList("Value", 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
print getTitleFieldOfList("Comment", 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
print getTitleFieldOfList('DateModificationShort', 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ')."\n";
if (! empty($conf->multicompany->enabled) && !$user->entity)
{
print getTitleFieldOfList('Entity', 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center')."\n";
print getTitleFieldOfList('Entity', 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ')."\n";
}
print '<td class="center">'.$langs->trans("Action").'</td>';
print getTitleFieldOfList("Action", 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'center ');
print "</tr>\n";

View File

@@ -87,7 +87,10 @@ if ($action == 'edit')
print '<tr class="oddeven"><td>';
$tooltiphelp = (($langs->trans($key.'Tooltip') != $key.'Tooltip') ? $langs->trans($key.'Tooltip') : '');
$label = $langs->trans($key);
if ($key == 'DAV_RESTICT_ON_IP') $label = $langs->trans("RESTRICT_ON_IP");
if ($key == 'DAV_RESTICT_ON_IP') {
$label = $langs->trans("RESTRICT_ON_IP");
$label .= ' '.$langs->trans("Example").': '.$langs->trans("IPListExample");
}
print $form->textwithpicto($label, $tooltiphelp);
print '</td><td>';
if ($key == 'DAV_ALLOW_PRIVATE_DIR')
@@ -124,7 +127,10 @@ else
print '<tr class="oddeven"><td>';
$tooltiphelp = (($langs->trans($key.'Tooltip') != $key.'Tooltip') ? $langs->trans($key.'Tooltip') : '');
$label = $langs->trans($key);
if ($key == 'DAV_RESTICT_ON_IP') $label = $langs->trans("RESTRICT_ON_IP");
if ($key == 'DAV_RESTICT_ON_IP') {
$label = $langs->trans("RESTRICT_ON_IP");
$label .= ' '.$langs->trans("Example").': '.$langs->trans("IPListExample");
}
print $form->textwithpicto($label, $tooltiphelp);
print '</td><td>';
if ($key == 'DAV_ALLOW_PRIVATE_DIR')

View File

@@ -130,7 +130,9 @@ print '<td>&nbsp;</td>';
print '</tr>';
print '<tr class="oddeven">';
print '<td>'.$langs->trans("RESTRICT_API_ON_IP").'</td>';
print '<td>'.$langs->trans("RESTRICT_ON_IP");
print ' '.$langs->trans("Example").': '.$langs->trans("IPListExample");
print '</td>';
print '<td><input type="text" name="API_RESTRICT_ON_IP" value="'.dol_escape_htmltag($conf->global->API_RESTRICT_ON_IP).'"></td>';
print '<td>';
print '<input type="submit" class="button" name="save" value="'.dol_escape_htmltag($langs->trans("Save")).'"></td>';

View File

@@ -80,7 +80,18 @@ class Documents extends DolibarrApi
//--- Finds and returns the document
$entity = $conf->entity;
$check_access = dol_check_secure_access_document($modulepart, $original_file, $entity, DolibarrApiAccess::$user, '', 'read');
// Special cases that need to use get_exdir to get real dir of object
// If future, all object should use this to define path of documents.
/*
$tmpreldir = '';
if ($modulepart == 'supplier_invoice') {
$tmpreldir = get_exdir($object->id, 2, 0, 0, $object, 'invoice_supplier');
}
$relativefile = $tmpreldir.dol_sanitizeFileName($object->ref); */
$relativefile = $original_file;
$check_access = dol_check_secure_access_document($modulepart, $relativefile, $entity, DolibarrApiAccess::$user, '', 'read');
$accessallowed = $check_access['accessallowed'];
$sqlprotectagainstexternals = $check_access['sqlprotectagainstexternals'];
$original_file = $check_access['original_file'];
@@ -146,7 +157,18 @@ class Documents extends DolibarrApi
//--- Finds and returns the document
$entity = $conf->entity;
$check_access = dol_check_secure_access_document($modulepart, $original_file, $entity, DolibarrApiAccess::$user, '', 'write');
// Special cases that need to use get_exdir to get real dir of object
// If future, all object should use this to define path of documents.
/*
$tmpreldir = '';
if ($modulepart == 'supplier_invoice') {
$tmpreldir = get_exdir($object->id, 2, 0, 0, $object, 'invoice_supplier');
}
$relativefile = $tmpreldir.dol_sanitizeFileName($object->ref); */
$relativefile = $original_file;
$check_access = dol_check_secure_access_document($modulepart, $relativefile, $entity, DolibarrApiAccess::$user, '', 'write');
$accessallowed = $check_access['accessallowed'];
$sqlprotectagainstexternals = $check_access['sqlprotectagainstexternals'];
$original_file = $check_access['original_file'];
@@ -228,7 +250,7 @@ class Documents extends DolibarrApi
/**
* Return the list of documents of a dedicated element (from its ID or Ref)
*
* @param string $modulepart Name of module or area concerned ('thirdparty', 'member', 'proposal', 'order', 'invoice', 'shipment', 'project', ...)
* @param string $modulepart Name of module or area concerned ('thirdparty', 'member', 'proposal', 'order', 'invoice', 'supplier_invoice', 'shipment', 'project', ...)
* @param int $id ID of element
* @param string $ref Ref of element
* @param string $sortfield Sort criteria ('','fullname','relativename','name','date','size')
@@ -369,6 +391,24 @@ class Documents extends DolibarrApi
$upload_dir = $conf->facture->dir_output."/".get_exdir(0, 0, 0, 1, $object, 'invoice');
}
elseif ($modulepart == 'facture_fournisseur' || $modulepart == 'supplier_invoice')
{
$modulepart = 'supplier_invoice';
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
if (!DolibarrApiAccess::$user->rights->fournisseur->facture->lire) {
throw new RestException(401);
}
$object = new FactureFournisseur($this->db);
$result = $object->fetch($id, $ref);
if (!$result) {
throw new RestException(404, 'Invoice not found');
}
$upload_dir = $conf->fournisseur->dir_output."/facture/".get_exdir($object->id, 2, 0, 0, $object, 'invoice_supplier').dol_sanitizeFileName($object->ref);
}
elseif ($modulepart == 'produit' || $modulepart == 'product')
{
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
@@ -401,6 +441,22 @@ class Documents extends DolibarrApi
$upload_dir = $conf->agenda->dir_output.'/'.dol_sanitizeFileName($object->ref);
}
elseif ($modulepart == 'expensereport')
{
require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
if (!DolibarrApiAccess::$user->rights->expensereport->read && !DolibarrApiAccess::$user->rights->expensereport->read) {
throw new RestException(401);
}
$object = new ExpenseReport($this->db);
$result = $object->fetch($id, $ref);
if (!$result) {
throw new RestException(404, 'Expense report not found');
}
$upload_dir = $conf->expensereport->dir_output.'/'.dol_sanitizeFileName($object->ref);
}
else
{
throw new RestException(500, 'Modulepart '.$modulepart.' not implemented yet.');
@@ -432,8 +488,9 @@ class Documents extends DolibarrApi
/**
* Upload a file.
*
* Test sample 1: { "filename": "mynewfile.txt", "modulepart": "facture", "ref": "FA1701-001", "subdir": "", "filecontent": "content text", "fileencoding": "", "overwriteifexists": "0" }.
* Test sample 2: { "filename": "mynewfile.txt", "modulepart": "medias", "ref": "", "subdir": "image/mywebsite", "filecontent": "Y29udGVudCB0ZXh0Cg==", "fileencoding": "base64", "overwriteifexists": "0" }.
* Test sample for invoice: { "filename": "mynewfile.txt", "modulepart": "invoice", "ref": "FA1701-001", "subdir": "", "filecontent": "content text", "fileencoding": "", "overwriteifexists": "0" }.
* Test sample for supplier invoice: { "filename": "mynewfile.txt", "modulepart": "supplier_invoice", "ref": "FA1701-001", "subdir": "", "filecontent": "content text", "fileencoding": "", "overwriteifexists": "0" }.
* Test sample for medias file: { "filename": "mynewfile.txt", "modulepart": "medias", "ref": "", "subdir": "image/mywebsite", "filecontent": "Y29udGVudCB0ZXh0Cg==", "fileencoding": "base64", "overwriteifexists": "0" }.
*
* @param string $filename Name of file to create ('FA1705-0123.txt')
* @param string $modulepart Name of module or area concerned by file upload ('facture', 'project', 'project_task', ...)
@@ -489,6 +546,13 @@ class Documents extends DolibarrApi
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
$object = new Facture($this->db);
}
elseif ($modulepart == 'facture_fournisseur' || $modulepart == 'supplier_invoice')
{
$modulepart = 'supplier_invoice';
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
$object = new FactureFournisseur($this->db);
}
elseif ($modulepart == 'project')
{
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
@@ -523,6 +587,11 @@ class Documents extends DolibarrApi
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
$object = new Product($this->db);
}
elseif ($modulepart == 'expensereport')
{
require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
$object = new ExpenseReport($this->db);
}
// TODO Implement additional moduleparts
else
{
@@ -548,6 +617,12 @@ class Documents extends DolibarrApi
throw new RestException(404, 'The object '.$modulepart." with ref '".$ref."' was not found.");
}
// Special cases that need to use get_exdir to get real dir of object
// If future, all object should use this to define path of documents.
if ($modulepart == 'supplier_invoice') {
$tmpreldir = get_exdir($object->id, 2, 0, 0, $object, 'invoice_supplier');
}
$relativefile = $tmpreldir.dol_sanitizeFileName($object->ref);
$tmp = dol_check_secure_access_document($modulepart, $relativefile, $entity, DolibarrApiAccess::$user, $ref, 'write');
@@ -643,7 +718,18 @@ class Documents extends DolibarrApi
//--- Finds and returns the document
$entity = $conf->entity;
$check_access = dol_check_secure_access_document($modulepart, $original_file, $entity, DolibarrApiAccess::$user, '', 'read');
// Special cases that need to use get_exdir to get real dir of object
// If future, all object should use this to define path of documents.
/*
$tmpreldir = '';
if ($modulepart == 'supplier_invoice') {
$tmpreldir = get_exdir($object->id, 2, 0, 0, $object, 'invoice_supplier');
}
$relativefile = $tmpreldir.dol_sanitizeFileName($object->ref); */
$relativefile = $original_file;
$check_access = dol_check_secure_access_document($modulepart, $relativefile, $entity, DolibarrApiAccess::$user, '', 'read');
$accessallowed = $check_access['accessallowed'];
$sqlprotectagainstexternals = $check_access['sqlprotectagainstexternals'];
$original_file = $check_access['original_file'];

View File

@@ -554,6 +554,70 @@ class Setup extends DolibarrApi
return $list;
}
/**
* Get the list of Expense Report types.
*
* @param string $sortfield Sort field
* @param string $sortorder Sort order
* @param int $limit Number of items per page
* @param int $page Page number (starting from zero)
* @param string $module To filter on module
* @param int $active Event's type is active or not {@min 0} {@max 1}
* @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)"
* @return array List of expense report types
*
* @url GET dictionary/expensereport_types
*
* @throws RestException
*/
public function getListOfExpenseReportsTypes($sortfield = "code", $sortorder = 'ASC', $limit = 100, $page = 0, $module = '', $active = 1, $sqlfilters = '')
{
$list = array();
$sql = "SELECT id, code, label, accountancy_code, active, module, position";
$sql .= " FROM ".MAIN_DB_PREFIX."c_type_fees as t";
$sql .= " WHERE t.active = ".$active;
if ($module) $sql .= " AND t.module LIKE '%".$this->db->escape($module)."%'";
// Add sql filters
if ($sqlfilters)
{
if (!DolibarrApi::_checkFilters($sqlfilters))
{
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)';
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";
}
$sql .= $this->db->order($sortfield, $sortorder);
if ($limit) {
if ($page < 0) {
$page = 0;
}
$offset = $limit * $page;
$sql .= $this->db->plimit($limit, $offset);
}
$result = $this->db->query($sql);
if ($result) {
$num = $this->db->num_rows($result);
$min = min($num, ($limit <= 0 ? $num : $limit));
for ($i = 0; $i < $min; $i++) {
$list[] = $this->db->fetch_object($result);
}
} else {
throw new RestException(503, 'Error when retrieving list of expense report types : '.$this->db->lasterror());
}
return $list;
}
/**
* Get the list of contacts types.
*

View File

@@ -137,9 +137,9 @@ if ($id > 0 || !empty($ref)) {
$modulepart = 'bank';
$permission = $user->rights->banque->modifier;
$permtoedit = $user->rights->banque->modifier;
$param = '&id='.$object->id.'&num='.$num;
$uri = '&num='.$num;
$relativepathwithnofile = $id."/statement/".$num."/";
$param = '&id='.$object->id.'&num='.urlencode($num);
$moreparam = '&num='.urlencode($num);;
$relativepathwithnofile = $id."/statement/".dol_sanitizeFileName($num)."/";
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
}
else {

View File

@@ -49,7 +49,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php';
$langs->loadLangs(array("banks", "categories", "companies", "bills", "trips", "donations", "loan"));
$action = GETPOST('action', 'alpha');
$id = GETPOST('account', 'int');
$id = GETPOST('account', 'int') ? GETPOST('account', 'int') : GETPOST('id', 'int');
$ref = GETPOST('ref', 'alpha');
$dvid = GETPOST('dvid', 'alpha');
$numref = GETPOST('num', 'alpha');

View File

@@ -67,8 +67,7 @@ if (!$sortorder) $sortorder = 'ASC';
// Date range
$year = GETPOST('year', 'int');
if (empty($year))
{
if (empty($year)) {
$year_current = strftime("%Y", dol_now());
$month_current = strftime("%m", dol_now());
$year_start = $year_current;
@@ -114,7 +113,7 @@ $tmps = dol_getdate($date_start);
$year_start = $tmps['year'];
$tmpe = dol_getdate($date_end);
$year_end = $tmpe['year'];
$nbofyear = ($year_end - $start_year) + 1;
$nbofyear = ($year_end - $year_start) + 1;
//var_dump("year_start=".$year_start." year_end=".$year_end." nbofyear=".$nbofyear." date_start=".dol_print_date($date_start, 'dayhour')." date_end=".dol_print_date($date_end, 'dayhour'));
// Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES' or 'BOOKKEEPING')
@@ -193,17 +192,21 @@ if (!empty($conf->accounting->enabled) && $modecompta != 'BOOKKEEPING')
}
// Show report array
$param = '&modecompta='.$modecompta;
$param = '&modecompta='.urlencode($modecompta).'&showaccountdetail='.urlencode($showaccountdetail);
if ($date_startday) $param .= '&date_startday='.$date_startday;
if ($date_startmonth) $param .= '&date_startmonth='.$date_startmonth;
if ($date_startyear) $param .= '&date_startyear='.$date_startyear;
if ($date_endday) $param .= '&date_endday='.$date_endday;
if ($date_endmonth) $param .= '&date_endmonth='.$date_endmonth;
if ($date_endyear) $param .= '&date_endyear='.$date_startyear;
if ($date_endyear) $param .= '&date_endyear='.$date_endyear;
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print_liste_field_titre("PredefinedGroups", $_SERVER["PHP_SELF"], 'f.thirdparty_code,f.rowid', '', $param, '', $sortfield, $sortorder, 'width200 ');
if ($modecompta == 'BOOKKEEPING') {
print_liste_field_titre("PredefinedGroups", $_SERVER["PHP_SELF"], 'f.thirdparty_code,f.rowid', '', $param, '', $sortfield, $sortorder, 'width200 ');
} else {
print_liste_field_titre("", $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'width200 ');
}
print_liste_field_titre('');
if ($modecompta == 'BOOKKEEPING')
{

View File

@@ -536,14 +536,16 @@ abstract class CommonDocGenerator
*
* @param Object $line Object line
* @param Translate $outputlangs Lang object to use for output
* @param int $linenumber The number of the line for the substitution of "object_line_pos"
* @return array Return a substitution array
*/
public function get_substitutionarray_lines($line, $outputlangs)
public function get_substitutionarray_lines($line, $outputlangs, $linenumber = 0)
{
// phpcs:enable
global $conf;
$resarray = array(
'line_pos' => $linenumber,
'line_fulldesc'=>doc_getlinedesc($line, $outputlangs),
'line_product_ref'=>$line->product_ref,
'line_product_ref_fourn'=>$line->ref_fourn, // for supplier doc lines

View File

@@ -3369,6 +3369,9 @@ abstract class CommonObject
elseif ($objecttype == 'subscription') {
$classpath = 'adherents/class'; $module = 'adherent';
}
elseif ($objecttype == 'contact') {
$module = 'societe';
}
// Set classfile
$classfile = strtolower($subelement); $classname = ucfirst($subelement);
@@ -3391,6 +3394,9 @@ abstract class CommonObject
elseif ($objecttype == 'subscription') {
$classfile = 'subscription'; $classname = 'Subscription';
}
elseif ($objecttype == 'project' || $objecttype == 'projet') {
$classpath = 'projet/class'; $classfile = 'project'; $classname = 'Project';
}
// Here $module, $classfile and $classname are set
if ($conf->$module->enabled && (($element != $this->element) || $alsosametype))

View File

@@ -476,13 +476,14 @@ function ajax_combobox($htmlname, $events = array(), $minLengthToAutocomplete =
*
* @param string $code Name of constant
* @param array $input Array of options. ("disabled"|"enabled'|'set'|'del') => CSS element to switch, 'alert' => message to show, ... Example: array('disabled'=>array(0=>'cssid'))
* @param int $entity Entity to set
* @param int $entity Entity to set. Use current entity if null.
* @param int $revertonoff Revert on/off
* @param bool $strict Use only "disabled" with delConstant and "enabled" with setConstant
* @param int $strict Use only "disabled" with delConstant and "enabled" with setConstant
* @param int $forcereload Force to reload page if we click/change value (this is supported only when there is no 'alert' option in input)
* @param string $marginleftonlyshort 1 = Add a short left margin on picto, 2 = Add a larger left margin on picto, 0 = No margin left. Works for fontawesome picto only.
* @return string
*/
function ajax_constantonoff($code, $input = array(), $entity = null, $revertonoff = 0, $strict = 0, $forcereload = 0)
function ajax_constantonoff($code, $input = array(), $entity = null, $revertonoff = 0, $strict = 0, $forcereload = 0, $marginleftonlyshort = 2)
{
global $conf, $langs;
@@ -531,8 +532,8 @@ function ajax_constantonoff($code, $input = array(), $entity = null, $revertonof
</script>'."\n";
$out .= '<div id="confirm_'.$code.'" title="" style="display: none;"></div>';
$out .= '<span id="set_'.$code.'" class="linkobject '.(!empty($conf->global->$code) ? 'hideobject' : '').'">'.($revertonoff ?img_picto($langs->trans("Enabled"), 'switch_on') : img_picto($langs->trans("Disabled"), 'switch_off')).'</span>';
$out .= '<span id="del_'.$code.'" class="linkobject '.(!empty($conf->global->$code) ? '' : 'hideobject').'">'.($revertonoff ?img_picto($langs->trans("Disabled"), 'switch_off') : img_picto($langs->trans("Enabled"), 'switch_on')).'</span>';
$out .= '<span id="set_'.$code.'" class="linkobject '.(!empty($conf->global->$code) ? 'hideobject' : '').'">'.($revertonoff ?img_picto($langs->trans("Enabled"), 'switch_on', '', false, 0, 0, '', '', $marginleftonlyshort) : img_picto($langs->trans("Disabled"), 'switch_off', '', false, 0, 0, '', '', $marginleftonlyshort)).'</span>';
$out .= '<span id="del_'.$code.'" class="linkobject '.(!empty($conf->global->$code) ? '' : 'hideobject').'">'.($revertonoff ?img_picto($langs->trans("Disabled"), 'switch_off', '', false, 0, 0, '', '', $marginleftonlyshort) : img_picto($langs->trans("Enabled"), 'switch_on', '', false, 0, 0, '', '', $marginleftonlyshort)).'</span>';
$out .= "\n";
}

View File

@@ -1145,15 +1145,16 @@ function dol_syslog($message, $level = LOG_INFO, $ident = 0, $suffixinfilename =
* @param int $pictoisfullpath If 1, image path is a full path. If you set this to 1, you can use url returned by dol_buildpath('/mymodyle/img/myimg.png',1) for $picto.
* @param string $morehtmlright Add more html content on right of tabs title
* @param string $morecss More Css
* @param int $limittoshow Limit number of tabs to show. Use 0 to use automatic default value.
* @return void
*/
function dol_fiche_head($links = array(), $active = '0', $title = '', $notab = 0, $picto = '', $pictoisfullpath = 0, $morehtmlright = '', $morecss = '')
function dol_fiche_head($links = array(), $active = '0', $title = '', $notab = 0, $picto = '', $pictoisfullpath = 0, $morehtmlright = '', $morecss = '', $limittoshow = 0)
{
print dol_get_fiche_head($links, $active, $title, $notab, $picto, $pictoisfullpath, $morehtmlright, $morecss);
print dol_get_fiche_head($links, $active, $title, $notab, $picto, $pictoisfullpath, $morehtmlright, $morecss, $limittoshow);
}
/**
* Show tab header of a card
* Show tabs of a record
*
* @param array $links Array of tabs
* @param string $active Active tab name
@@ -1163,9 +1164,10 @@ function dol_fiche_head($links = array(), $active = '0', $title = '', $notab = 0
* @param int $pictoisfullpath If 1, image path is a full path. If you set this to 1, you can use url returned by dol_buildpath('/mymodyle/img/myimg.png',1) for $picto.
* @param string $morehtmlright Add more html content on right of tabs title
* @param string $morecss More Css
* @param int $limittoshow Limit number of tabs to show. Use 0 to use automatic default value.
* @return string
*/
function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab = 0, $picto = '', $pictoisfullpath = 0, $morehtmlright = '', $morecss = '')
function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab = 0, $picto = '', $pictoisfullpath = 0, $morehtmlright = '', $morecss = '', $limittoshow = 0)
{
global $conf, $langs, $hookmanager;
@@ -1202,11 +1204,13 @@ function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab
if (count($keys)) $maxkey = max($keys);
}
if (!empty($conf->dol_optimize_smallscreen)) $conf->global->MAIN_MAXTABS_IN_CARD = 2;
// Show tabs
// if =0 we don't use the feature
$limittoshow = (empty($conf->global->MAIN_MAXTABS_IN_CARD) ? 99 : $conf->global->MAIN_MAXTABS_IN_CARD);
if (empty($limittoshow)) {
$limittoshow = (empty($conf->global->MAIN_MAXTABS_IN_CARD) ? 99 : $conf->global->MAIN_MAXTABS_IN_CARD);
}
if (!empty($conf->dol_optimize_smallscreen)) $limittoshow = 2;
$displaytab = 0;
$nbintab = 0;
$popuptab = 0;
@@ -3073,7 +3077,7 @@ function dol_trunc($string, $size = 40, $trunc = 'right', $stringencoding = 'UTF
* @param int $srconly Return only content of the src attribute of img.
* @param int $notitle 1=Disable tag title. Use it if you add js tooltip, to avoid duplicate tooltip.
* @param string $alt Force alt for bind people
* @param string $morecss Add more class css on img tag (For example 'myclascss'). Work only if $moreatt is empty.
* @param string $morecss Add more class css on img tag (For example 'myclascss').
* @param string $marginleftonlyshort 1 = Add a short left margin on picto, 2 = Add a larger left margin on picto, 0 = No margin left. Works for fontawesome picto only.
* @return string Return img tag
* @see img_object(), img_picto_common()
@@ -4082,11 +4086,22 @@ function getTitleFieldOfList($name, $thead = 0, $file = "", $field = "", $begin
$tmpfield = explode(',', $field);
$field1 = trim($tmpfield[0]); // If $field is 'd.datep,d.id', it becomes 'd.datep'
if (empty($conf->global->MAIN_DISABLE_WRAPPING_ON_COLUMN_TITLE)) {
$prefix = 'wrapcolumntitle '.$prefix;
}
//var_dump('field='.$field.' field1='.$field1.' sortfield='.$sortfield.' sortfield1='.$sortfield1);
// If field is used as sort criteria we use a specific css class liste_titre_sel
// Example if (sortfield,field)=("nom","xxx.nom") or (sortfield,field)=("nom","nom")
if ($field1 && ($sortfield1 == $field1 || $sortfield1 == preg_replace("/^[^\.]+\./", "", $field1))) $out .= '<'.$tag.' class="'.$prefix.'liste_titre_sel" '.$moreattrib.'>';
else $out .= '<'.$tag.' class="'.$prefix.'liste_titre" '.$moreattrib.'>';
if ($field1 && ($sortfield1 == $field1 || $sortfield1 == preg_replace("/^[^\.]+\./", "", $field1))) {
$out .= '<'.$tag.' class="'.$prefix.'liste_titre_sel" '.$moreattrib;
$out .= (($field && empty($conf->global->MAIN_DISABLE_WRAPPING_ON_COLUMN_TITLE) && preg_match('/^[a-zA-Z_0-9\s\.\-:]*$/', $name)) ? ' title="'.dol_escape_htmltag($langs->trans($name)).'"' : '');
$out .= '>';
}
else {
$out .= '<'.$tag.' class="'.$prefix.'liste_titre" '.$moreattrib;
$out .= (($field && empty($conf->global->MAIN_DISABLE_WRAPPING_ON_COLUMN_TITLE) && preg_match('/^[a-zA-Z_0-9\s\.\-:]*$/', $name)) ? ' title="'.dol_escape_htmltag($langs->trans($name)).'"' : '');
$out .= '>';
}
if (empty($thead) && $field && empty($disablesortlink)) // If this is a sort field
{
@@ -4119,7 +4134,9 @@ function getTitleFieldOfList($name, $thead = 0, $file = "", $field = "", $begin
}
}
$sortordertouseinlink = preg_replace('/,$/', '', $sortordertouseinlink);
$out .= '<a class="reposition" href="'.$file.'?sortfield='.$field.'&sortorder='.$sortordertouseinlink.'&begin='.$begin.$options.'">';
$out .= '<a class="reposition" href="'.$file.'?sortfield='.$field.'&sortorder='.$sortordertouseinlink.'&begin='.$begin.$options.'"';
//$out .= (empty($conf->global->MAIN_DISABLE_WRAPPING_ON_COLUMN_TITLE) ? ' title="'.dol_escape_htmltag($langs->trans($name)).'"' : '');
$out .= '>';
}
if ($tooltip) $out .= $form->textwithpicto($langs->trans($name), $langs->trans($tooltip));
@@ -4287,7 +4304,7 @@ function print_barre_liste($titre, $page, $file, $options = '', $sortfield = '',
if ($picto && $titre) print '<td class="nobordernopadding widthpictotitle opacityhigh valignmiddle col-picto">'.img_picto('', $picto, 'class="valignmiddle pictotitle widthpictotitle"', $pictoisfullpath).'</td>';
print '<td class="nobordernopadding valignmiddle col-title">';
print '<div class="titre inline-block">'.$titre;
if (!empty($titre) && $savtotalnboflines >= 0 && (string) $savtotalnboflines != '') print ' ('.$totalnboflines.')';
if (!empty($titre) && $savtotalnboflines >= 0 && (string) $savtotalnboflines != '') print '<span class="opacitymedium colorblack paddingleft">('.$totalnboflines.')</span>';
print '</div></td>';
// Center

View File

@@ -2035,15 +2035,19 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
$listofstatus = array_keys($listofoppstatus);
$statusOppList = array();
$themeColorId = 0;
foreach ($listofstatus as $oppStatus) {
$oppStatusCode = dol_getIdFromCode($db, $oppStatus, 'c_lead_status', 'rowid', 'code');
if ($oppStatusCode) {
$statusOppList[$oppStatus]['code'] = $oppStatusCode;
$statusOppList[$oppStatus]['color'] = isset($theme_datacolor[$themeColorId]) ? implode(', ', $theme_datacolor[$themeColorId]) : '';
if (is_array($listofstatus) && ! empty($conf->global->USE_COLOR_FOR_PROSPECTION_STATUS)) {
// Define $themeColorId and array $statusOppList for each $listofstatus
$themeColorId = 0;
$statusOppList = array();
foreach ($listofstatus as $oppStatus) {
$oppStatusCode = dol_getIdFromCode($db, $oppStatus, 'c_lead_status', 'rowid', 'code');
if ($oppStatusCode) {
$statusOppList[$oppStatus]['code'] = $oppStatusCode;
$statusOppList[$oppStatus]['color'] = isset($theme_datacolor[$themeColorId]) ? implode(', ', $theme_datacolor[$themeColorId]) : '';
}
$themeColorId++;
}
$themeColorId++;
}
$projectstatic = new Project($db);
@@ -2175,7 +2179,8 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks
if ($userAccess >= 0)
{
$projectstatic->ref = $objp->ref;
$projectstatic->statut = $objp->status;
$projectstatic->statut = $objp->status; // deprecated
$projectstatic->status = $objp->status;
$projectstatic->title = $objp->title;
$projectstatic->datee = $db->jdate($objp->datee);
$projectstatic->dateo = $db->jdate($objp->dateo);
@@ -2202,6 +2207,7 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks
print '<td class="right">';
// Because color of prospection status has no meaning yet, it is used if hidden constant is set
if (empty($conf->global->USE_COLOR_FOR_PROSPECTION_STATUS)) {
$oppStatusCode = dol_getIdFromCode($db, $objp->opp_status, 'c_lead_status', 'rowid', 'code');
if ($langs->trans("OppStatus".$oppStatusCode) != "OppStatus".$oppStatusCode) {
print $langs->trans("OppStatus".$oppStatusCode);
}
@@ -2454,7 +2460,7 @@ function getTaskProgressView($task, $label = true, $progressNumber = true, $hide
*/
function getTaskProgressBadge($task, $label = '', $tooltip = '')
{
global $conf;
global $conf, $langs;
$out = '';
$badgeClass = '';
@@ -2472,12 +2478,15 @@ function getTaskProgressBadge($task, $label = '', $tooltip = '')
if (doubleval($progressCalculated) > doubleval($task->progress * $warningRatio)) {
$badgeClass .= 'badge-danger';
if (empty($tooltip)) $tooltip = $task->progress.'% < '.$langs->trans("Expected").' '.$progressCalculated.'%';
}
elseif (doubleval($progressCalculated) > doubleval($task->progress)) { // warning if close at 10%
$badgeClass .= 'badge-warning';
if (empty($tooltip)) $tooltip = $task->progress.'% < '.$langs->trans("Expected").' '.$progressCalculated.'%';
}
else {
$badgeClass .= 'badge-success';
if (empty($tooltip)) $tooltip = $task->progress.'% >= '.$langs->trans("Expected").' '.$progressCalculated.'%';
}
}
}

View File

@@ -52,7 +52,12 @@ function takepos_prepare_head()
$h++;
}
complete_head_from_modules($conf, $langs, null, $head, $h, 'takepos');
$head[$h][0] = DOL_URL_ROOT.'/takepos/admin/other.php';
$head[$h][1] = $langs->trans("Other");
$head[$h][2] = 'other';
$h++;
complete_head_from_modules($conf, $langs, null, $head, $h, 'takepos');
return $head;
}

View File

@@ -411,9 +411,11 @@ class doc_generic_bom_odt extends ModelePDFBom
}
if ($foundtagforlines)
{
$linenumber = 0;
foreach ($object->lines as $line)
{
$tmparray = $this->get_substitutionarray_lines($line, $outputlangs);
$linenumber++;
$tmparray = $this->get_substitutionarray_lines($line, $outputlangs, $linenumber);
complete_substitutions_array($tmparray, $outputlangs, $object, $line, "completesubstitutionarray_lines");
// Call the ODTSubstitutionLine hook
$parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray, 'line'=>$line);

View File

@@ -427,9 +427,11 @@ class doc_generic_order_odt extends ModelePDFCommandes
}
if ($foundtagforlines)
{
$linenumber = 0;
foreach ($object->lines as $line)
{
$tmparray = $this->get_substitutionarray_lines($line, $outputlangs);
$linenumber++;
$tmparray = $this->get_substitutionarray_lines($line, $outputlangs, $linenumber);
complete_substitutions_array($tmparray, $outputlangs, $object, $line, "completesubstitutionarray_lines");
// Call the ODTSubstitutionLine hook
$parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray, 'line'=>$line);

View File

@@ -408,9 +408,11 @@ class doc_generic_contract_odt extends ModelePDFContract
}
if ($foundtagforlines)
{
$linenumber = 0;
foreach ($object->lines as $line)
{
$tmparray = $this->get_substitutionarray_lines($line, $outputlangs);
$linenumber++;
$tmparray = $this->get_substitutionarray_lines($line, $outputlangs, $linenumber);
complete_substitutions_array($tmparray, $outputlangs, $object, $line, "completesubstitutionarray_lines");
// Call the ODTSubstitutionLine hook
$parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray, 'line'=>$line);

View File

@@ -435,9 +435,11 @@ class doc_generic_invoice_odt extends ModelePDFFactures
}
if ($foundtagforlines)
{
$linenumber = 0;
foreach ($object->lines as $line)
{
$tmparray = $this->get_substitutionarray_lines($line, $outputlangs);
$linenumber++;
$tmparray = $this->get_substitutionarray_lines($line, $outputlangs, $linenumber);
complete_substitutions_array($tmparray, $outputlangs, $object, $line, "completesubstitutionarray_lines");
// Call the ODTSubstitutionLine hook
$parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray, 'line'=>$line);

View File

@@ -687,7 +687,9 @@ class modSociete extends DolibarrModules
'sr.domiciliation' => "BankAccountDomiciliation",
'sr.proprio' => "BankAccountOwner",
'sr.owner_address' => "BankAccountOwnerAddress",
'sr.default_rib' => 'Default'
'sr.default_rib' => 'Default',
'sr.rum' => 'RUM',
'sr.type' => "Type ban is defaut",
);
$this->import_convertvalue_array[$r] = array(
@@ -714,7 +716,9 @@ class modSociete extends DolibarrModules
'sr.domiciliation' => 'bank branch address eg. "PARIS"',
'sr.proprio' => 'name on the bank account',
'sr.owner_address' => 'address of account holder',
'sr.default_rib' => '1 (default account) / 0 (not default)'
'sr.default_rib' => '1 (default account) / 0 (not default)',
'sr.rum' => 'RUM code',
'sr.type' => 'ban',
);
// Import Company Sales representatives

View File

@@ -418,9 +418,11 @@ class doc_generic_mo_odt extends ModelePDFMo
}
if ($foundtagforlines)
{
$linenumber = 0;
foreach ($object->lines as $line)
{
$tmparray = $this->get_substitutionarray_lines($line, $outputlangs);
$linenumber++;
$tmparray = $this->get_substitutionarray_lines($line, $outputlangs, $linenumber);
complete_substitutions_array($tmparray, $outputlangs, $object, $line, "completesubstitutionarray_lines");
// Call the ODTSubstitutionLine hook
$parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray, 'line'=>$line);

View File

@@ -456,9 +456,11 @@ class doc_generic_proposal_odt extends ModelePDFPropales
}
if ($foundtagforlines)
{
$linenumber = 0;
foreach ($object->lines as $line)
{
$tmparray = $this->get_substitutionarray_lines($line, $outputlangs);
$linenumber++;
$tmparray = $this->get_substitutionarray_lines($line, $outputlangs, $linenumber);
complete_substitutions_array($tmparray, $outputlangs, $object, $line, "completesubstitutionarray_lines");
// Call the ODTSubstitutionLine hook
$parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray, 'line'=>$line);

View File

@@ -421,9 +421,11 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders
}
if ($foundtagforlines)
{
$linenumber = 0;
foreach ($object->lines as $line)
{
$tmparray = $this->get_substitutionarray_lines($line, $outputlangs);
$linenumber++;
$tmparray = $this->get_substitutionarray_lines($line, $outputlangs, $linenumber);
complete_substitutions_array($tmparray, $outputlangs, $object, $line, "completesubstitutionarray_lines");
// Call the ODTSubstitutionLine hook
$parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray, 'line'=>$line);

View File

@@ -445,9 +445,11 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal
}
if ($foundtagforlines)
{
$linenumber = 0;
foreach ($object->lines as $line)
{
$tmparray = $this->get_substitutionarray_lines($line, $outputlangs);
$linenumber++;
$tmparray = $this->get_substitutionarray_lines($line, $outputlangs, $linenumber);
complete_substitutions_array($tmparray, $outputlangs, $object, $line, "completesubstitutionarray_lines");
// Call the ODTSubstitutionLine hook
$parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray, 'line'=>$line);

View File

@@ -38,6 +38,10 @@ $original_file = GETPOST("file");
$backtourl = GETPOST('backtourl');
$cancel = GETPOST('cancel', 'alpha');
$file = GETPOST('file', 'alpha');
$num = GETPOST('num', 'alpha'); // Used for document on bank statement
// Security check
if (empty($modulepart)) accessforbidden('Bad value for modulepart');
$accessallowed = 0;
@@ -249,19 +253,25 @@ else {
if (empty($backtourl))
{
if (in_array($modulepart, array('product', 'produit', 'service', 'produit|service'))) $backtourl = DOL_URL_ROOT."/product/document.php?id=".$id.'&file='.urldecode($_POST["file"]);
elseif (in_array($modulepart, array('expensereport'))) $backtourl = DOL_URL_ROOT."/expensereport/document.php?id=".$id.'&file='.urldecode($_POST["file"]);
elseif (in_array($modulepart, array('holiday'))) $backtourl = DOL_URL_ROOT."/holiday/document.php?id=".$id.'&file='.urldecode($_POST["file"]);
elseif (in_array($modulepart, array('member'))) $backtourl = DOL_URL_ROOT."/adherents/document.php?id=".$id.'&file='.urldecode($_POST["file"]);
elseif (in_array($modulepart, array('project'))) $backtourl = DOL_URL_ROOT."/projet/document.php?id=".$id.'&file='.urldecode($_POST["file"]);
elseif (in_array($modulepart, array('propal'))) $backtourl = DOL_URL_ROOT."/comm/propal/document.php?id=".$id.'&file='.urldecode($_POST["file"]);
elseif (in_array($modulepart, array('societe'))) $backtourl = DOL_URL_ROOT."/societe/document.php?id=".$id.'&file='.urldecode($_POST["file"]);
elseif (in_array($modulepart, array('tax'))) $backtourl = DOL_URL_ROOT."/compta/sociales/document.php?id=".$id.'&file='.urldecode($_POST["file"]);
elseif (in_array($modulepart, array('ticket'))) $backtourl = DOL_URL_ROOT."/ticket/document.php?id=".$id.'&file='.urldecode($_POST["file"]);
elseif (in_array($modulepart, array('user'))) $backtourl = DOL_URL_ROOT."/user/document.php?id=".$id.'&file='.urldecode($_POST["file"]);
elseif (in_array($modulepart, array('bank'))) $backtourl = DOL_URL_ROOT."/compta/bank/document.php?id=".$id.'&file='.urldecode($_POST["file"]);
elseif (in_array($modulepart, array('mrp'))) $backtourl = DOL_URL_ROOT."/mrp/mo_document.php?id=".$id.'&file='.urldecode($_POST["file"]);
else $backtourl = DOL_URL_ROOT."/".$modulepart."/".$modulepart."_document.php?id=".$id.'&file='.urldecode($_POST["file"]);
$regs = array();
if (in_array($modulepart, array('product', 'produit', 'service', 'produit|service'))) $backtourl = DOL_URL_ROOT."/product/document.php?id=".$id.'&file='.urldecode($file);
elseif (in_array($modulepart, array('expensereport'))) $backtourl = DOL_URL_ROOT."/expensereport/document.php?id=".$id.'&file='.urldecode($file);
elseif (in_array($modulepart, array('holiday'))) $backtourl = DOL_URL_ROOT."/holiday/document.php?id=".$id.'&file='.urldecode($file);
elseif (in_array($modulepart, array('member'))) $backtourl = DOL_URL_ROOT."/adherents/document.php?id=".$id.'&file='.urldecode($file);
elseif (in_array($modulepart, array('project'))) $backtourl = DOL_URL_ROOT."/projet/document.php?id=".$id.'&file='.urldecode($file);
elseif (in_array($modulepart, array('propal'))) $backtourl = DOL_URL_ROOT."/comm/propal/document.php?id=".$id.'&file='.urldecode($file);
elseif (in_array($modulepart, array('societe'))) $backtourl = DOL_URL_ROOT."/societe/document.php?id=".$id.'&file='.urldecode($file);
elseif (in_array($modulepart, array('tax'))) $backtourl = DOL_URL_ROOT."/compta/sociales/document.php?id=".$id.'&file='.urldecode($file);
elseif (in_array($modulepart, array('ticket'))) $backtourl = DOL_URL_ROOT."/ticket/document.php?id=".$id.'&file='.urldecode($file);
elseif (in_array($modulepart, array('user'))) $backtourl = DOL_URL_ROOT."/user/document.php?id=".$id.'&file='.urldecode($file);
elseif (in_array($modulepart, array('bank')) && preg_match('/\/statement\/([^\/]+)\//', $file, $regs)) {
$num = $regs[1];
$backtourl = DOL_URL_ROOT."/compta/bank/account_statement_document.php?id=".$id.'&num='.urlencode($num).'&file='.urldecode($file);
}
elseif (in_array($modulepart, array('bank'))) $backtourl = DOL_URL_ROOT."/compta/bank/document.php?id=".$id.'&file='.urldecode($file);
elseif (in_array($modulepart, array('mrp'))) $backtourl = DOL_URL_ROOT."/mrp/mo_document.php?id=".$id.'&file='.urldecode($file);
else $backtourl = DOL_URL_ROOT."/".$modulepart."/".$modulepart."_document.php?id=".$id.'&file='.urldecode($file);
}
@@ -283,11 +293,11 @@ if ($cancel)
}
}
if ($action == 'confirm_resize' && (isset($_POST["file"]) != "") && (isset($_POST["sizex"]) != "") && (isset($_POST["sizey"]) != ""))
if ($action == 'confirm_resize' && GETPOSTISSET("file") && GETPOSTISSET("sizex") && GETPOSTISSET("sizey"))
{
$fullpath = $dir."/".$original_file;
$result = dol_imageResizeOrCrop($fullpath, 0, $_POST['sizex'], $_POST['sizey']);
$result = dol_imageResizeOrCrop($fullpath, 0, GETPOST('sizex', 'int'), GETPOST('sizey', 'int'));
if ($result == $fullpath)
{
@@ -357,7 +367,7 @@ if ($action == 'confirm_crop')
$fullpath = $dir."/".$original_file;
//var_dump($_POST['w'].'x'.$_POST['h'].'-'.$_POST['x'].'x'.$_POST['y']);exit;
$result = dol_imageResizeOrCrop($fullpath, 1, $_POST['w'], $_POST['h'], $_POST['x'], $_POST['y']);
$result = dol_imageResizeOrCrop($fullpath, 1, GETPOST('w', 'int'), GETPOST('h', 'int'), GETPOST('x', 'int'), GETPOST('y', 'int'));
if ($result == $fullpath)
{
@@ -445,7 +455,7 @@ print '<br>'."\n";
*/
print '<!-- Form to resize -->'."\n";
print '<form name="redim_file" action="'.$_SERVER["PHP_SELF"].'?id='.$id.'" method="POST">';
print '<form name="redim_file" action="'.$_SERVER["PHP_SELF"].'?id='.$id.($num ? '&num='.$num : '').'" method="POST">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<fieldset id="redim_file">';
@@ -454,7 +464,7 @@ print $langs->trans("ResizeDesc").'<br>';
print $langs->trans("NewLength").': <input name="sizex" type="number" class="flat maxwidth50"> px &nbsp; '.$langs->trans("or").' &nbsp; ';
print $langs->trans("NewHeight").': <input name="sizey" type="number" class="flat maxwidth50"> px &nbsp; <br>';
print '<input type="hidden" name="file" value="'.dol_escape_htmltag(GETPOST('file')).'" />';
print '<input type="hidden" name="file" value="'.dol_escape_htmltag($file).'" />';
print '<input type="hidden" name="action" value="confirm_resize" />';
print '<input type="hidden" name="product" value="'.$id.'" />';
print '<input type="hidden" name="modulepart" value="'.dol_escape_htmltag($modulepart).'" />';
@@ -497,7 +507,8 @@ if (!empty($conf->use_javascript_ajax))
print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$modulepart.'&entity='.$object->entity.'&file='.urlencode($original_file).'" alt="" id="cropbox" width="'.$widthforcrop.'px"/>';
print '</div>';
print '</div><br>';
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$id.'" method="POST">';
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$id.($num ? '&num='.$num : '').'" method="POST">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '
<div class="jc_coords">

View File

@@ -23,6 +23,7 @@
// $permissiontoadd = permission or not to add a file (can use also $permission) and permission or not to edit file name or crop file (can use also $permtoedit)
// $modulepart = for download
// $param = param to add to download links
// $moreparam = param to add to download link for the form_attach_new_file function
// $upload_dir
// $object
// $filearray
@@ -109,7 +110,7 @@ if (!isset($savingdocmask) || !empty($conf->global->MAIN_DISABLE_SUGGEST_REF_AS_
// Show upload form (document and links)
$formfile->form_attach_new_file(
$_SERVER["PHP_SELF"].'?id='.$object->id.(empty($withproject)?'':'&withproject=1'),
$_SERVER["PHP_SELF"].'?id='.$object->id.(empty($withproject)?'':'&withproject=1').(empty($moreparam)?'':$moreparam),
'',
0,
0,

View File

@@ -33,7 +33,7 @@ class ExpenseReports extends DolibarrApi
* @var array $FIELDS Mandatory fields, checked when create and update object
*/
static $FIELDS = array(
'socid'
'fk_user_author'
);
/**
@@ -384,6 +384,10 @@ class ExpenseReports extends DolibarrApi
* @param array $request_data Datas
*
* @return int
*
* @throws RestException 401 Not allowed
* @throws RestException 404 Expense report not found
* @throws RestException 500
*/
public function put($id, $request_data = null)
{
@@ -501,6 +505,11 @@ class ExpenseReports extends DolibarrApi
// phpcs:enable
$object = parent::_cleanObjectDatas($object);
unset($object->fk_statut);
unset($object->statut);
unset($object->user);
unset($object->thirdparty);
unset($object->cond_reglement);
unset($object->shipping_method_id);
@@ -509,6 +518,32 @@ class ExpenseReports extends DolibarrApi
unset($object->barcode_type_label);
unset($object->barcode_type_coder);
unset($object->code_paiement);
unset($object->code_statut);
unset($object->fk_c_paiement);
unset($object->fk_incoterms);
unset($object->label_incoterms);
unset($object->location_incoterms);
unset($object->mode_reglement_id);
unset($object->cond_reglement_id);
unset($object->name);
unset($object->lastname);
unset($object->firstname);
unset($object->civility_id);
unset($object->cond_reglement_id);
unset($object->contact);
unset($object->contact_id);
unset($object->state);
unset($object->state_id);
unset($object->state_code);
unset($object->country);
unset($object->country_id);
unset($object->country_code);
unset($object->note); // We already use note_public and note_pricate
return $object;
}

View File

@@ -58,19 +58,20 @@ class ExpenseReport extends CommonObject
public $date_fin;
/**
* 0=draft, 2=validated (attente approb), 4=canceled, 5=approved, 6=payed, 99=denied
*
* @var int Status
*/
public $status;
public $fk_statut; // -- 0=draft, 2=validated (attente approb), 4=canceled, 5=approved, 6=payed, 99=denied
public $fk_statut;
public $fk_c_paiement;
public $paid;
public $user_author_infos;
public $user_validator_infos;
public $fk_typepayment;
public $num_payment;
public $code_paiement;
public $code_statut;
// ACTIONS
// Create
@@ -285,10 +286,33 @@ class ExpenseReport extends CommonObject
{
if (is_array($this->lines) && count($this->lines) > 0)
{
foreach ($this->lines as $i => $val)
foreach ($this->lines as $line)
{
// Test and convert into object this->lines[$i]. When coming from REST API, we may still have an array
//if (! is_object($line)) $line=json_decode(json_encode($line), false); // convert recursively array into object.
if (!is_object($line)) {
$line = (object) $line;
$newndfline = new ExpenseReportLine($this->db);
$newndfline->fk_expensereport = $line->fk_expensereport;
$newndfline->fk_c_type_fees = $line->fk_c_type_fees;
$newndfline->fk_project = $line->fk_project;
$newndfline->vatrate = $line->vatrate;
$newndfline->vat_src_code = $line->vat_src_code;
$newndfline->comments = $line->comments;
$newndfline->qty = $line->qty;
$newndfline->value_unit = $line->value_unit;
$newndfline->total_ht = $line->total_ht;
$newndfline->total_ttc = $line->total_ttc;
$newndfline->total_tva = $line->total_tva;
$newndfline->date = $line->date;
$newndfline->rule_warning_message = $line->rule_warning_message;
$newndfline->fk_c_exp_tax_cat = $line->fk_c_exp_tax_cat;
$newndfline->fk_ecm_files = $line->fk_ecm_files;
}
else {
$newndfline = $line;
}
//$newndfline=new ExpenseReportLine($this->db);
$newndfline = $this->lines[$i];
$newndfline->fk_expensereport = $this->id;
$result = $newndfline->insert();
if ($result < 0)
@@ -514,10 +538,8 @@ class ExpenseReport extends CommonObject
$sql .= " d.date_debut, d.date_fin, d.date_create, d.tms as date_modif, d.date_valid, d.date_approve,"; // DATES (datetime)
$sql .= " d.fk_user_author, d.fk_user_modif, d.fk_user_validator,";
$sql .= " d.fk_user_valid, d.fk_user_approve,";
$sql .= " d.fk_statut as status, d.fk_c_paiement, d.paid,";
$sql .= " dp.libelle as label_payment, dp.code as code_paiement"; // INNER JOIN paiement
$sql .= " d.fk_statut as status, d.fk_c_paiement, d.paid";
$sql .= " FROM ".MAIN_DB_PREFIX.$this->table_element." as d";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as dp ON d.fk_c_paiement = dp.id";
if ($ref) $sql .= " WHERE d.ref = '".$this->db->escape($ref)."'";
else $sql .= " WHERE d.rowid = ".$id;
//$sql.= $restrict;
@@ -566,7 +588,7 @@ class ExpenseReport extends CommonObject
elseif ($this->fk_user_validator > 0) $user_approver->fetch($this->fk_user_validator); // For backward compatibility
$this->user_validator_infos = dolGetFirstLastname($user_approver->firstname, $user_approver->lastname);
$this->fk_statut = $obj->status;
$this->fk_statut = $obj->status; // deprecated
$this->status = $obj->status;
$this->fk_c_paiement = $obj->fk_c_paiement;
$this->paid = $obj->paid;
@@ -578,9 +600,6 @@ class ExpenseReport extends CommonObject
$this->user_valid_infos = dolGetFirstLastname($user_valid->firstname, $user_valid->lastname);
}
$this->code_statut = $obj->code_statut;
$this->code_paiement = $obj->code_paiement;
$this->lines = array();
$result = $this->fetch_lines();
@@ -2650,7 +2669,7 @@ class ExpenseReportLine
$sql .= " ".$this->db->escape($this->total_ht).",";
$sql .= " ".$this->db->escape($this->total_tva).",";
$sql .= " ".$this->db->escape($this->total_ttc).",";
$sql .= "'".$this->db->idate($this->date)."',";
$sql .= " '".$this->db->idate($this->date)."',";
$sql .= " '".$this->db->escape($this->rule_warning_message)."',";
$sql .= " ".$this->db->escape($this->fk_c_exp_tax_cat).",";
$sql .= " ".($this->fk_ecm_files > 0 ? $this->fk_ecm_files : 'null');

View File

@@ -286,99 +286,100 @@ if (empty($reshook))
$lines = $srcobject->lines;
}
$fk_parent_line = 0;
$num = count($lines);
if (is_array($lines)) {
$num = count($lines);
for ($i = 0; $i < $num; $i++)
{
$product_type = ($lines[$i]->product_type ? $lines[$i]->product_type : Product::TYPE_PRODUCT);
for ($i = 0; $i < $num; $i++)
{
$product_type = ($lines[$i]->product_type ? $lines[$i]->product_type : Product::TYPE_PRODUCT);
if ($product_type == Product::TYPE_SERVICE || !empty($conf->global->FICHINTER_PRINT_PRODUCTS)) { //only services except if config includes products
$duration = 3600; // Default to one hour
if ($product_type == Product::TYPE_SERVICE || !empty($conf->global->FICHINTER_PRINT_PRODUCTS)) { //only services except if config includes products
$duration = 3600; // Default to one hour
// Predefined products & services
if ($lines[$i]->fk_product > 0)
{
$prod = new Product($db);
$prod->id = $lines[$i]->fk_product;
// Predefined products & services
if ($lines[$i]->fk_product > 0)
{
$prod = new Product($db);
$prod->id = $lines[$i]->fk_product;
// Define output language
if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) {
$prod->getMultiLangs();
// We show if duration is present on service (so we get it)
$prod->fetch($lines[$i]->fk_product);
$outputlangs = $langs;
$newlang = '';
if (empty($newlang) && GETPOST('lang_id', 'aZ09')) $newlang = GETPOST('lang_id', 'aZ09');
if (empty($newlang)) $newlang = $srcobject->thirdparty->default_lang;
if (!empty($newlang)) {
$outputlangs = new Translate("", $conf);
$outputlangs->setDefaultLang($newlang);
// Define output language
if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) {
$prod->getMultiLangs();
// We show if duration is present on service (so we get it)
$prod->fetch($lines[$i]->fk_product);
$outputlangs = $langs;
$newlang = '';
if (empty($newlang) && GETPOST('lang_id', 'aZ09')) $newlang = GETPOST('lang_id', 'aZ09');
if (empty($newlang)) $newlang = $srcobject->thirdparty->default_lang;
if (!empty($newlang)) {
$outputlangs = new Translate("", $conf);
$outputlangs->setDefaultLang($newlang);
}
$label = (!empty($prod->multilangs[$outputlangs->defaultlang]["libelle"])) ? $prod->multilangs[$outputlangs->defaultlang]["libelle"] : $lines[$i]->product_label;
} else {
$prod->fetch($lines[$i]->fk_product);
$label = $lines[$i]->product_label;
}
$label = (!empty($prod->multilangs[$outputlangs->defaultlang]["libelle"])) ? $prod->multilangs[$outputlangs->defaultlang]["libelle"] : $lines[$i]->product_label;
} else {
$prod->fetch($lines[$i]->fk_product);
$label = $lines[$i]->product_label;
}
if ($prod->duration_value && $conf->global->FICHINTER_USE_SERVICE_DURATION) {
switch ($prod->duration_unit) {
default:
case 'h':
$mult = 3600;
break;
case 'd':
$mult = 3600 * 24;
break;
case 'w':
$mult = 3600 * 24 * 7;
break;
case 'm':
$mult = (int) 3600 * 24 * (365 / 12); // Average month duration
break;
case 'y':
$mult = 3600 * 24 * 365;
break;
if ($prod->duration_value && $conf->global->FICHINTER_USE_SERVICE_DURATION) {
switch ($prod->duration_unit) {
default:
case 'h':
$mult = 3600;
break;
case 'd':
$mult = 3600 * 24;
break;
case 'w':
$mult = 3600 * 24 * 7;
break;
case 'm':
$mult = (int) 3600 * 24 * (365 / 12); // Average month duration
break;
case 'y':
$mult = 3600 * 24 * 365;
break;
}
$duration = $prod->duration_value * $mult * $lines[$i]->qty;
}
$duration = $prod->duration_value * $mult * $lines[$i]->qty;
}
$desc = $lines[$i]->product_ref;
$desc .= ' - ';
$desc .= $label;
$desc = $lines[$i]->product_ref;
$desc .= ' - ';
$desc .= $label;
$desc .= '<br>';
}
// Common part (predefined or free line)
$desc .= dol_htmlentitiesbr($lines[$i]->desc);
$desc .= '<br>';
}
// Common part (predefined or free line)
$desc .= dol_htmlentitiesbr($lines[$i]->desc);
$desc .= '<br>';
$desc .= ' ('.$langs->trans('Quantity').': '.$lines[$i]->qty.')';
$desc .= ' ('.$langs->trans('Quantity').': '.$lines[$i]->qty.')';
$timearray = dol_getdate(dol_now());
$date_intervention = dol_mktime(0, 0, 0, $timearray['mon'], $timearray['mday'], $timearray['year']);
$timearray = dol_getdate(dol_now());
$date_intervention = dol_mktime(0, 0, 0, $timearray['mon'], $timearray['mday'], $timearray['year']);
if ($product_type == Product::TYPE_PRODUCT) {
$duration = 0;
}
if ($product_type == Product::TYPE_PRODUCT) {
$duration = 0;
}
$predef = '';
$predef = '';
// Extrafields
$extrafields->fetch_name_optionals_label($object->table_element_line);
$array_options = $extrafields->getOptionalsFromPost($object->table_element_line, $predef);
// Extrafields
$extrafields->fetch_name_optionals_label($object->table_element_line);
$array_options = $extrafields->getOptionalsFromPost($object->table_element_line, $predef);
$result = $object->addline(
$user,
$id,
$desc,
$date_intervention,
$duration,
$array_options
);
$result = $object->addline(
$user,
$id,
$desc,
$date_intervention,
$duration,
$array_options
);
if ($result < 0)
{
$error++;
break;
if ($result < 0)
{
$error++;
break;
}
}
}
}

View File

@@ -1,8 +1,8 @@
README (English)
--------------------------------
This directory contains samples of odttemplates used by install
This directory contains samples of odt-templates used by install
process.
WARNING:
Do not edit files in those directories, but in installed data
directory instead.
Do not edit/change files in these directories,
only in installed data directory instead (e.g. //dolibarr/documents/doctemplates/).

View File

@@ -59,11 +59,14 @@ ALTER TABLE llx_emailcollector_emailcollectoraction ADD COLUMN position integer
-- For v11
ALTER TABLE llx_product_price MODIFY COLUMN tva_tx double(6,3) DEFAULT 0 NOT NULL;
ALTER TABLE llx_facturedet MODIFY COLUMN situation_percent real DEFAULT 100;
UPDATE llx_facturedet SET situation_percent = 100 WHERE situation_percent IS NULL AND fk_prev_id IS NULL;
-- Set country to null for deprecated accounting system (there is now one per country)
UPDATE llx_accounting_system SET fk_country = NULL, active = 0 WHERE pcg_version = 'SYSCOHADA';
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 20, 'BAS-K1-MINI', 'The Swedish mini chart of accounts', 1);
ALTER TABLE llx_c_action_trigger MODIFY COLUMN elementtype varchar(64) NOT NULL;

View File

@@ -5024,7 +5024,7 @@ function migrate_users_socialnetworks()
$obj->socialnetworks = '[]';
}
$socialnetworks = array_merge($arraysocialnetworks, json_decode($obj->socialnetworks, true));
$sqlupd = 'UPDATE '.MAIN_DB_PREFIX.'user SET socialnetworks="'.$db->escape(json_encode($socialnetworks, true)).'"';
$sqlupd = 'UPDATE '.MAIN_DB_PREFIX."user SET socialnetworks='".$db->escape(json_encode($socialnetworks, true))."'";
$sqlupd.= ', skype=null';
$sqlupd.= ', twitter=null';
$sqlupd.= ', facebook=null';

View File

@@ -1,8 +1,9 @@
--- Translation How to ---
Document explaining how to translate Dolibarr in a new language is
available on wiki:
An instruction guide for translating Dolibarr in a new language is
available on Dolibarr wiki:
English: http://wiki.dolibarr.org/index.php/Translator_documentation
French: http://wiki.dolibarr.org/index.php/Documentation_traducteur
Spanish: http://wiki.dolibarr.org/index.php/Documentaci%C3%B3n_traductores
English: https://wiki.dolibarr.org/index.php/Translator_documentation
French: https://wiki.dolibarr.org/index.php/Documentation_traducteur
Spanish: https://wiki.dolibarr.org/index.php/Documentaci%C3%B3n_traductores
German: https://wiki.dolibarr.org/index.php/Dokumentation_Uebersetzung

View File

@@ -328,7 +328,7 @@ SetupIsReadyForUse=Module deployment is finished. You must however enable and se
NotExistsDirect=The alternative root directory is not defined to an existing directory.<br>
InfDirAlt=Since version 3, it is possible to define an alternative root directory. This allows you to store, into a dedicated directory, plug-ins and custom templates.<br>Just create a directory at the root of Dolibarr (eg: custom).<br>
InfDirExample=<br>Then declare it in the file <strong>conf.php</strong><br> $dolibarr_main_url_root_alt='/custom'<br>$dolibarr_main_document_root_alt='/path/of/dolibarr/htdocs/custom'<br>If these lines are commented with "#", to enable them, just uncomment by removing the "#" character.
YouCanSubmitFile=Alternatively, you may upload the module .zip file package:
YouCanSubmitFile=You can upload the .zip file of module package from here:
CurrentVersion=Dolibarr current version
CallUpdatePage=Browse to the page that updates the database structure and data: %s.
LastStableVersion=Latest stable version
@@ -642,7 +642,7 @@ Module50000Desc=Offer customers a PayBox online payment page (credit/debit cards
Module50100Name=POS SimplePOS
Module50100Desc=Point of Sale module SimplePOS (simple POS).
Module50150Name=POS TakePOS
Module50150Desc=Point of Sale module TakePOS (touchscreen POS).
Module50150Desc=Point of Sale module TakePOS (touchscreen POS, for shops, bars or restaurants).
Module50200Name=Paypal
Module50200Desc=Offer customers a PayPal online payment page (PayPal account or credit/debit cards). This can be used to allow your customers to make ad-hoc payments or payments related to a specific Dolibarr object (invoice, order etc...)
Module50300Name=Stripe
@@ -1688,6 +1688,7 @@ StockDecreaseForPointOfSaleDisabledbyBatch=Stock decrease in POS is not compatib
CashDeskYouDidNotDisableStockDecease=You did not disable stock decrease when making a sale from Point of Sale. Hence a warehouse is required.
CashDeskForceDecreaseStockLabel=Stock decrease for batch products was forced.
CashDeskForceDecreaseStockDesc=Decrease first by the oldest eatby and sellby dates.
CashDeskReaderKeyCodeForEnter=Key code for "Enter" defined in barcode reader (Example: 13)
##### Bookmark #####
BookmarkSetup=Bookmark module setup
BookmarkDesc=This module allows you to manage bookmarks. You can also add shortcuts to any Dolibarr pages or external web sites on your left menu.
@@ -1970,8 +1971,8 @@ DeleteEmailCollector=Delete email collector
ConfirmDeleteEmailCollector=Are you sure you want to delete this email collector?
RecipientEmailsWillBeReplacedWithThisValue=Recipient emails will be always replaced with this value
AtLeastOneDefaultBankAccountMandatory=At least 1 default bank account must be defined
RESTRICT_API_ON_IP=Allow available APIs to some host IP only (wildcard not allowed, use space between values). Empty means every hosts can use the available APIs.
RESTRICT_ON_IP=Allow access to some host IP only (wildcard not allowed, use space between values). Empty means every hosts can access.
IPListExample=127.0.0.1 192.168.0.2 [::1]
BaseOnSabeDavVersion=Based on the library SabreDAV version
NotAPublicIp=Not a public IP
MakeAnonymousPing=Make an anonymous Ping '+1' to the Dolibarr foundation server (done 1 time only after installation) to allow the foundation to count the number of Dolibarr installation.

View File

@@ -1685,6 +1685,7 @@ StockDecreaseForPointOfSaleDisabledbyBatch=La décrémentation de stock depuis c
CashDeskYouDidNotDisableStockDecease=Vous n'avez pas désactivé la réduction de stock lors d'une vente depuis le Point de vente. Par conséquent, un entrepôt est nécessaire.
CashDeskForceDecreaseStockLabel=Décrémentation des stocks pour les lots a été forcé.
CashDeskForceDecreaseStockDesc=Décrémentation des lots par DLC et DLUO les plus anciennes.
CashDeskReaderKeyCodeForEnter=Code pour la touche "Entrée" du lecteur de codes à barres.
##### Bookmark #####
BookmarkSetup=Configuration du module Marque-pages
BookmarkDesc=Ce module vous permet de gérer des liens et raccourcis. Il permet aussi d'ajouter n'importe quelle page de Dolibarr ou lien web dans le menu d'accès rapide sur la gauche.

View File

@@ -1757,9 +1757,11 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead
/**
* Build the tooltip on user login
*
* @return string HTML content
* @param int $hideloginname Hide login name. Show only the image.
* @param string $urllogout URL for logout
* @return string HTML content
*/
function top_menu_user()
function top_menu_user($hideloginname = 0, $urllogout = '')
{
global $langs, $conf, $db, $hookmanager, $user;
global $dolibarr_main_authentication, $dolibarr_main_demo;
@@ -1830,9 +1832,10 @@ function top_menu_user()
}
}
$logoutLink = '<a accesskey="l" href="'.DOL_URL_ROOT.'/user/logout.php" class="button-top-menu-dropdown" ><i class="fa fa-sign-out-alt"></i> '.$langs->trans("Logout").'</a>';
if (empty($urllogout)) {
$urllogout = DOL_URL_ROOT.'/user/logout.php';
}
$logoutLink = '<a accesskey="l" href="'.$urllogout.'" class="button-top-menu-dropdown" ><i class="fa fa-sign-out-alt"></i> '.$langs->trans("Logout").'</a>';
$profilLink = '<a accesskey="l" href="'.DOL_URL_ROOT.'/user/card.php?id='.$user->id.'" class="button-top-menu-dropdown" ><i class="fa fa-user"></i> '.$langs->trans("Card").'</a>';
@@ -1857,9 +1860,12 @@ function top_menu_user()
$btnUser = '<!-- div for user link -->
<div id="topmenu-login-dropdown" class="userimg atoplogin dropdown user user-menu inline-block">
<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$user->id.'" class="dropdown-toggle login-dropdown-a" data-toggle="dropdown">
'.$userImage.'
<span class="hidden-xs maxwidth200 atoploginusername hideonsmartphone">'.dol_trunc($user->firstname ? $user->firstname : $user->login, 10).'</span>
<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$user->id.'" class="dropdown-toggle login-dropdown-a" data-toggle="dropdown">';
$btnUser .= $userImage;
if (empty($hideloginname)) {
$btnUser .= '<span class="hidden-xs maxwidth200 atoploginusername hideonsmartphone paddingleft">'.dol_trunc($user->firstname ? $user->firstname : $user->login, 10).'</span>';
}
$btnUser .= '
</a>
<div class="dropdown-menu">
<!-- User image -->

View File

@@ -1652,8 +1652,7 @@ $head[$h][1] = $langs->trans("DangerZone");
$head[$h][2] = 'deletemodule';
$h++;
dol_fiche_head($head, $module, $langs->trans("Modules"), -1, 'generic', 0, $infomodulesfound); // Modules
dol_fiche_head($head, $module, $langs->trans("Modules"), -1, 'generic', 0, $infomodulesfound, '', 8); // Modules
if ($module == 'initmodule')
{

View File

@@ -422,9 +422,11 @@ class doc_generic_myobject_odt extends ModelePDFMyObject
}
if ($foundtagforlines)
{
$linenumber = 0;
foreach ($object->lines as $line)
{
$tmparray = $this->get_substitutionarray_lines($line, $outputlangs);
$linenumber++;
$tmparray = $this->get_substitutionarray_lines($line, $outputlangs, $linenumber);
complete_substitutions_array($tmparray, $outputlangs, $object, $line, "completesubstitutionarray_lines");
// Call the ODTSubstitutionLine hook
$parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray, 'line'=>$line);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 683 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 323 B

View File

@@ -493,7 +493,7 @@ class Project extends CommonObject
if (empty($id) && empty($ref)) return -1;
$sql = "SELECT rowid, ref, title, description, public, datec, opp_amount, budget_amount,";
$sql .= " tms, dateo, datee, date_close, fk_soc, fk_user_creat, fk_user_modif, fk_user_close, fk_statut, fk_opp_status, opp_percent,";
$sql .= " tms, dateo, datee, date_close, fk_soc, fk_user_creat, fk_user_modif, fk_user_close, fk_statut as status, fk_opp_status, opp_percent,";
$sql .= " note_private, note_public, model_pdf, usage_opportunity, usage_task, usage_bill_time, usage_organize_event, entity";
$sql .= " FROM ".MAIN_DB_PREFIX."projet";
if (!empty($id))
@@ -534,7 +534,8 @@ class Project extends CommonObject
$this->user_modification_id = $obj->fk_user_modif;
$this->user_close_id = $obj->fk_user_close;
$this->public = $obj->public;
$this->statut = $obj->fk_statut;
$this->statut = $obj->status; // deprecated
$this->status = $obj->status;
$this->opp_status = $obj->fk_opp_status;
$this->opp_amount = $obj->opp_amount;
$this->opp_percent = $obj->opp_percent;
@@ -994,7 +995,7 @@ class Project extends CommonObject
*/
public function getLibStatut($mode = 0)
{
return $this->LibStatut($this->statut, $mode);
return $this->LibStatut(isset($this->statut)?$this->statut:$this->status, $mode);
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
@@ -1055,6 +1056,9 @@ class Project extends CommonObject
if (!empty($this->datee))
$label .= ($label ? '<br>' : '').'<b>'.$langs->trans('DateEnd').': </b>'.dol_print_date($this->datee, 'day'); // The space must be after the : to not being explode when showing the title in img_picto
if ($moreinpopup) $label .= '<br>'.$moreinpopup;
if (isset($this->status)) {
$label .= '<br><b>'.$langs->trans("Status").":</b> ".$this->getLibStatut(5);
}
$url = '';
if ($option != 'nolink')

View File

@@ -172,8 +172,8 @@ print_projecttasks_array($db, $form, $socid, $projectsListId, 0, 0, $listofoppst
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
// Latest modified projects
$sql = "SELECT p.rowid, p.ref, p.title, p.fk_statut, p.tms as datem,";
$sql .= " s.rowid as socid, s.nom as name, s.email, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.canvas";
$sql = "SELECT p.rowid, p.ref, p.title, p.fk_statut as status, p.tms as datem,";
$sql .= " s.rowid as socid, s.nom as name, s.email, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.canvas, s.status as thirdpartystatus";
$sql .= " FROM ".MAIN_DB_PREFIX."projet as p";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on p.fk_soc = s.rowid";
$sql .= " WHERE p.entity IN (".getEntity('project').")";
@@ -208,6 +208,7 @@ if ($resql)
$projectstatic->dateo = $obj->dateo;
$projectstatic->datep = $obj->datep;
$projectstatic->thirdparty_name = $obj->name;
$projectstatic->status = $obj->status;
$companystatic->id = $obj->socid;
$companystatic->name = $obj->name;
@@ -217,6 +218,7 @@ if ($resql)
$companystatic->code_client = $obj->code_client;
$companystatic->code_fournisseur = $obj->code_fournisseur;
$companystatic->canvas = $obj->canvas;
$companystatic->status = $obj->thirdpartystatus;
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
print '<td width="96" class="nobordernopadding nowrap">';
@@ -243,7 +245,7 @@ if ($resql)
}
print '</td>';
print '<td>'.dol_print_date($db->jdate($obj->datem), 'day').'</td>';
print '<td class="right">'.$projectstatic->LibStatut($obj->fk_statut, 3).'</td>';
print '<td class="right">'.$projectstatic->LibStatut($obj->status, 3).'</td>';
print '</tr>';
$i++;
}
@@ -265,14 +267,14 @@ print_liste_field_titre("NbOfProjects", "", "", "", "", '', $sortfield, $sortord
print "</tr>\n";
$sql = "SELECT COUNT(p.rowid) as nb, SUM(p.opp_amount)";
$sql .= ", s.nom as name, s.rowid as socid";
$sql .= ", s.rowid as socid, s.nom as name, s.email, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.canvas, s.status";
$sql .= " FROM ".MAIN_DB_PREFIX."projet as p";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on p.fk_soc = s.rowid";
$sql .= " WHERE p.entity IN (".getEntity('project').")";
$sql .= " AND p.fk_statut = 1";
if ($mine || empty($user->rights->projet->all->lire)) $sql .= " AND p.rowid IN (".$projectsListId.")"; // If we have this test true, it also means projectset is not 2
if ($socid) $sql .= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")";
$sql .= " GROUP BY s.nom, s.rowid";
$sql .= " GROUP BY s.rowid, s.nom, s.email, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.canvas, s.status";
$sql .= $db->order($sortfield, $sortorder);
//$sql .= $db->plimit($max + 1, 0);
@@ -299,6 +301,9 @@ if ($resql)
{
$companystatic->id = $obj->socid;
$companystatic->name = $obj->name;
$companystatic->email = $obj->email;
$companystatic->status = $obj->status;
print $companystatic->getNomUrl(1);
}
else

View File

@@ -0,0 +1,172 @@
<?php
/* Copyright (C) 2008-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2011-2017 Juanjo Menent <jmenent@2byte.es>
*
* 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 3 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 <https://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/takepos/admin/setup.php
* \ingroup takepos
* \brief Setup page for TakePos module
*/
require '../../main.inc.php'; // Load $user and permissions
require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT . '/product/class/html.formproduct.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/pdf.lib.php';
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
require_once DOL_DOCUMENT_ROOT . "/core/lib/takepos.lib.php";
// If socid provided by ajax company selector
if (!empty($_REQUEST['CASHDESK_ID_THIRDPARTY_id'])) {
$_GET['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha');
$_POST['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha');
$_REQUEST['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha');
}
// Security check
if (!$user->admin) accessforbidden();
$langs->loadLangs(array("admin", "cashdesk"));
global $db;
$sql = "SELECT code, libelle FROM " . MAIN_DB_PREFIX . "c_paiement";
$sql .= " WHERE entity IN (" . getEntity('c_paiement') . ")";
$sql .= " AND active = 1";
$sql .= " ORDER BY libelle";
$resql = $db->query($sql);
$paiements = array();
if ($resql) {
while ($obj = $db->fetch_object($resql)) {
array_push($paiements, $obj);
}
}
/*
* Actions
*/
if (GETPOST('action', 'alpha') == 'set') {
$db->begin();
if (GETPOST('socid', 'int') < 0) $_POST["socid"] = '';
$res = dolibarr_set_const($db, "CASHDESK_SERVICES", GETPOST('CASHDESK_SERVICES', 'alpha'), 'chaine', 0, '', $conf->entity);
$res = dolibarr_set_const($db, "TAKEPOS_ROOT_CATEGORY_ID", GETPOST('TAKEPOS_ROOT_CATEGORY_ID', 'alpha'), 'chaine', 0, '', $conf->entity);
$res = dolibarr_set_const($db, "TAKEPOS_BAR_RESTAURANT", GETPOST('TAKEPOS_BAR_RESTAURANT', 'alpha'), 'chaine', 0, '', $conf->entity);
$res = dolibarr_set_const($db, "TAKEPOS_TICKET_VAT_GROUPPED", GETPOST('TAKEPOS_TICKET_VAT_GROUPPED', 'alpha'), 'chaine', 0, '', $conf->entity);
$res = dolibarr_set_const($db, "TAKEPOS_ORDER_PRINTERS", GETPOST('TAKEPOS_ORDER_PRINTERS', 'alpha'), 'chaine', 0, '', $conf->entity);
$res = dolibarr_set_const($db, "TAKEPOS_ORDER_NOTES", GETPOST('TAKEPOS_ORDER_NOTES', 'alpha'), 'chaine', 0, '', $conf->entity);
$res = dolibarr_set_const($db, "TAKEPOS_PHONE_BASIC_LAYOUT", GETPOST('TAKEPOS_PHONE_BASIC_LAYOUT', 'alpha'), 'chaine', 0, '', $conf->entity);
$res = dolibarr_set_const($db, "TAKEPOS_SUPPLEMENTS", GETPOST('TAKEPOS_SUPPLEMENTS', 'alpha'), 'chaine', 0, '', $conf->entity);
$res = dolibarr_set_const($db, "TAKEPOS_SUPPLEMENTS_CATEGORY", GETPOST('TAKEPOS_SUPPLEMENTS_CATEGORY', 'alpha'), 'chaine', 0, '', $conf->entity);
$res = dolibarr_set_const($db, "TAKEPOS_NUMPAD", GETPOST('TAKEPOS_NUMPAD', 'alpha'), 'chaine', 0, '', $conf->entity);
$res = dolibarr_set_const($db, "TAKEPOS_SORTPRODUCTFIELD", GETPOST('TAKEPOS_SORTPRODUCTFIELD', 'alpha'), 'chaine', 0, '', $conf->entity);
$res = dolibarr_set_const($db, "TAKEPOS_COLOR_THEME", GETPOST('TAKEPOS_COLOR_THEME', 'alpha'), 'chaine', 0, '', $conf->entity);
$res = dolibarr_set_const($db, "TAKEPOS_NUM_TERMINALS", GETPOST('TAKEPOS_NUM_TERMINALS', 'alpha'), 'chaine', 0, '', $conf->entity);
$res = dolibarr_set_const($db, "TAKEPOS_DIRECT_PAYMENT", GETPOST('TAKEPOS_DIRECT_PAYMENT', 'int'), 'int', 0, '', $conf->entity);
$res = dolibarr_set_const($db, "TAKEPOS_CUSTOM_RECEIPT", GETPOST('TAKEPOS_CUSTOM_RECEIPT', 'int'), 'int', 0, '', $conf->entity);
//$res = dolibarr_set_const($db, "TAKEPOS_HEAD_BAR", GETPOST('TAKEPOS_HEAD_BAR', 'int'), 'int', 0, '', $conf->entity);
$res = dolibarr_set_const($db, "TAKEPOS_EMAIL_TEMPLATE_INVOICE", GETPOST('TAKEPOS_EMAIL_TEMPLATE_INVOICE', 'alpha'), 'chaine', 0, '', $conf->entity);
if (!empty($conf->global->TAKEPOS_ENABLE_SUMUP)) {
$res = dolibarr_set_const($db, "TAKEPOS_SUMUP_AFFILIATE", GETPOST('TAKEPOS_SUMUP_AFFILIATE', 'alpha'), 'chaine', 0, '', $conf->entity);
$res = dolibarr_set_const($db, "TAKEPOS_SUMUP_APPID", GETPOST('TAKEPOS_SUMUP_APPID', 'alpha'), 'chaine', 0, '', $conf->entity);
}
if ($conf->global->TAKEPOS_ORDER_NOTES == 1) {
$extrafields = new ExtraFields($db);
$extrafields->addExtraField('order_notes', 'Order notes', 'varchar', 0, 255, 'facturedet', 0, 0, '', '', 0, '', 0, 1);
}
dol_syslog("admin/cashdesk: level " . GETPOST('level', 'alpha'));
if (!$res > 0) $error++;
if (!$error) {
$db->commit();
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
$db->rollback();
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
/*
* View
*/
llxHeader('', $langs->trans("CashDeskSetup"));
$linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php">' . $langs->trans("BackToModuleList") . '</a>';
print load_fiche_titre($langs->trans("CashDeskSetup") . ' (TakePOS)', $linkback, 'title_setup');
$head = takepos_prepare_head();
dol_fiche_head($head, 'other', 'TakePOS', -1);
print '<br>';
// Mode
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">';
print '<input type="hidden" name="token" value="' . newToken() . '">';
print '<input type="hidden" name="action" value="set">';
print '<div class="div-table-responsive-no-min">';
// Marketplace
print "<table summary=\"list_of_modules\" class=\"noborder\" width=\"100%\">\n";
print '<tr class="liste_titre">' . "\n";
print '<td class="titlefield" colspan="2">' . $langs->trans("WebSiteDesc") . '</td>';
print '<td>' . $langs->trans("URL") . '</td>';
print '</tr>';
$url = 'https://www.dolistore.com/45-pos';
print '<tr class="oddeven">' . "\n";
print '<td class="titlefield"><a href="' . $url . '" target="_blank" rel="external"><img border="0" class="imgautosize imgmaxwidth180" src="' . DOL_URL_ROOT . '/theme/dolistore_logo.png"></a></td>';
print '<td>' . $langs->trans("DolistorePosCategory") . '</td>';
print '<td><a href="' . $url . '" target="_blank" rel="external">' . $url . '</a></td>';
print '</tr>';
print "</table>\n";
print '</div>';
print '<br>';
print '<div class="div-table-responsive-no-min">';
// Support
print "<table summary=\"list_of_modules\" class=\"noborder\" width=\"100%\">\n";
print '<tr class="liste_titre">' . "\n";
print '<td colspan="2">TakePOS Support</td>';
print '<td>' . $langs->trans("URL") . '</td>';
print '</tr>';
$url = 'http://www.takepos.com';
print '<tr class="oddeven">' . "\n";
print '<td class="left"><a href="' . $url . '" target="_blank" rel="external"><img border="0" class="imgautosize imgmaxwidth180" src="../img/takepos.png"></a></td>';
print '<td>TakePOS original developers</td>';
print '<td><a href="' . $url . '" target="_blank" rel="external">' . $url . '</a></td>';
print '</tr>';
print "</table>\n";
print '</div>';
print '<br>';
llxFooter();
$db->close();

View File

@@ -132,7 +132,7 @@ print '<div class="div-table-responsive-no-min">';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Parameters").'</td><td>'.$langs->trans("Value").'</td>';
print '<td class="titlefield">'.$langs->trans("Parameters").'</td><td>'.$langs->trans("Value").'</td>';
print "</tr>\n";
// Terminals
@@ -149,7 +149,8 @@ if (!empty($conf->service->enabled))
print '<tr class="oddeven"><td>';
print $langs->trans("CashdeskShowServices");
print '<td colspan="2">';
print $form->selectyesno("CASHDESK_SERVICES", $conf->global->CASHDESK_SERVICES, 1);
print ajax_constantonoff("CASHDESK_SERVICES", array(), $conf->entity, 0, 0, 1, 0);
//print $form->selectyesno("CASHDESK_SERVICES", $conf->global->CASHDESK_SERVICES, 1);
print "</td></tr>\n";
}
@@ -161,65 +162,12 @@ print $form->select_all_categories(Categorie::TYPE_PRODUCT, $conf->global->TAKEP
print ajax_combobox('TAKEPOS_ROOT_CATEGORY_ID');
print "</td></tr>\n";
// Bar Restaurant mode
print '<tr class="oddeven"><td>';
print $langs->trans("EnableBarOrRestaurantFeatures");
print '</td>';
print '<td colspan="2">';
print $form->selectyesno("TAKEPOS_BAR_RESTAURANT", $conf->global->TAKEPOS_BAR_RESTAURANT, 1);
print "</td></tr>\n";
if ($conf->global->TAKEPOS_BAR_RESTAURANT && $conf->global->TAKEPOS_PRINT_METHOD != "browser") {
print '<tr class="oddeven value"><td>';
print $langs->trans("OrderPrinters").' (<a href="'.DOL_URL_ROOT.'/takepos/admin/orderprinters.php?leftmenu=setup">'.$langs->trans("Setup").'</a>)';
print '<td colspan="2">';
print $form->selectyesno("TAKEPOS_ORDER_PRINTERS", $conf->global->TAKEPOS_ORDER_PRINTERS, 1);
print '</td></tr>';
print '<tr class="oddeven value"><td>';
print $langs->trans("OrderNotes");
print '<td colspan="2">';
print $form->selectyesno("TAKEPOS_ORDER_NOTES", $conf->global->TAKEPOS_ORDER_NOTES, 1);
print '</td></tr>';
}
if ($conf->global->TAKEPOS_BAR_RESTAURANT)
{
print '<tr class="oddeven value"><td>';
print $langs->trans("BasicPhoneLayout");
print '<td colspan="2">';
print $form->selectyesno("TAKEPOS_PHONE_BASIC_LAYOUT", $conf->global->TAKEPOS_PHONE_BASIC_LAYOUT, 1);
print '</td></tr>';
print '<tr class="oddeven value"><td>';
print $langs->trans("ProductSupplements");
print '<td colspan="2">';
print $form->selectyesno("TAKEPOS_SUPPLEMENTS", $conf->global->TAKEPOS_SUPPLEMENTS, 1);
print '</td></tr>';
if ($conf->global->TAKEPOS_SUPPLEMENTS)
{
print '<tr class="oddeven"><td>';
print $langs->trans("SupplementCategory");
print '<td colspan="2">';
print $form->select_all_categories(Categorie::TYPE_PRODUCT, $conf->global->TAKEPOS_SUPPLEMENTS_CATEGORY, 'TAKEPOS_SUPPLEMENTS_CATEGORY', 64, 0, 0);
print ajax_combobox('TAKEPOS_SUPPLEMENTS_CATEGORY');
print "</td></tr>\n";
}
}
// VAT Grouped on ticket
print '<tr class="oddeven"><td>';
print $langs->trans('TicketVatGrouped');
print '<td colspan="2">';
print $form->selectyesno("TAKEPOS_TICKET_VAT_GROUPPED", $conf->global->TAKEPOS_TICKET_VAT_GROUPPED, 1);
print "</td></tr>\n";
// Payment numpad
print '<tr class="oddeven"><td>';
print $langs->trans("Paymentnumpad");
print '<td colspan="2">';
$array = array(0=>$langs->trans("Numberspad"), 1=>$langs->trans("BillsCoinsPad"));
print $form->selectarray('TAKEPOS_NUMPAD', $array, (empty($conf->global->TAKEPOS_NUMPAD) ? '0' : $conf->global->TAKEPOS_NUMPAD), 0);
print ajax_constantonoff("TAKEPOS_TICKET_VAT_GROUPPED", array(), $conf->entity, 0, 0, 1, 0);
//print $form->selectyesno("TAKEPOS_TICKET_VAT_GROUPPED", $conf->global->TAKEPOS_TICKET_VAT_GROUPPED, 1);
print "</td></tr>\n";
// Sort product
@@ -227,11 +175,8 @@ print '<tr class="oddeven"><td>';
print $langs->trans("SortProductField");
print '<td colspan="2">';
$prod = new Product($db);
$array = [];
foreach ($prod->fields as $k => $v) {
$array[$k] = $k;
}
print $form->selectarray('TAKEPOS_SORTPRODUCTFIELD', $array, (empty($conf->global->TAKEPOS_SORTPRODUCTFIELD) ? 'rowid' : $conf->global->TAKEPOS_SORTPRODUCTFIELD), 0);
$array = array('rowid' => 'ID', 'ref' => 'Ref', 'datec' => 'DateCreation', 'tms' => 'DateModification');
print $form->selectarray('TAKEPOS_SORTPRODUCTFIELD', $array, (empty($conf->global->TAKEPOS_SORTPRODUCTFIELD) ? 'rowid' : $conf->global->TAKEPOS_SORTPRODUCTFIELD), 0, 0, 0, '', 1);
print "</td></tr>\n";
$substitutionarray = pdf_getSubstitutionArray($langs, null, null, 2);
@@ -248,11 +193,20 @@ $array = array(0=>"eldy", 1=>$langs->trans("Colorful"));
print $form->selectarray('TAKEPOS_COLOR_THEME', $array, (empty($conf->global->TAKEPOS_COLOR_THEME) ? '0' : $conf->global->TAKEPOS_COLOR_THEME), 0);
print "</td></tr>\n";
// Payment numpad
print '<tr class="oddeven"><td>';
print $langs->trans("Paymentnumpad");
print '<td colspan="2">';
$array = array(0=>$langs->trans("Numberspad"), 1=>$langs->trans("BillsCoinsPad"));
print $form->selectarray('TAKEPOS_NUMPAD', $array, (empty($conf->global->TAKEPOS_NUMPAD) ? '0' : $conf->global->TAKEPOS_NUMPAD), 0);
print "</td></tr>\n";
// Direct Payment
print '<tr class="oddeven"><td>';
print $langs->trans('DirectPaymentButton');
print '<td colspan="2">';
print $form->selectyesno("TAKEPOS_DIRECT_PAYMENT", $conf->global->TAKEPOS_DIRECT_PAYMENT, 1);
print ajax_constantonoff("TAKEPOS_DIRECT_PAYMENT", array(), $conf->entity, 0, 0, 1, 0);
//print $form->selectyesno("TAKEPOS_DIRECT_PAYMENT", $conf->global->TAKEPOS_DIRECT_PAYMENT, 1);
print "</td></tr>\n";
// Head Bar
@@ -290,6 +244,70 @@ print "</td></tr>\n";
print '</table>';
print '</div>';
print '<br>';
// Bar Restaurant mode
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td class="titlefield">'.$langs->trans("Other").'</td><td>'.$langs->trans("Value").'</td>';
print "</tr>\n";
print '<tr class="oddeven"><td>';
print $langs->trans("EnableBarOrRestaurantFeatures");
print '</td>';
print '<td colspan="2">';
print ajax_constantonoff("TAKEPOS_BAR_RESTAURANT", array(), $conf->entity, 0, 0, 1, 0);
//print $form->selectyesno("TAKEPOS_BAR_RESTAURANT", $conf->global->TAKEPOS_BAR_RESTAURANT, 1);
print "</td></tr>\n";
if ($conf->global->TAKEPOS_BAR_RESTAURANT && $conf->global->TAKEPOS_PRINT_METHOD != "browser") {
print '<tr class="oddeven value"><td>';
print $langs->trans("OrderPrinters").' (<a href="'.DOL_URL_ROOT.'/takepos/admin/orderprinters.php?leftmenu=setup">'.$langs->trans("Setup").'</a>)';
print '<td colspan="2">';
print ajax_constantonoff("TAKEPOS_ORDER_PRINTERS", array(), $conf->entity, 0, 0, 1, 0);
//print $form->selectyesno("TAKEPOS_ORDER_PRINTERS", $conf->global->TAKEPOS_ORDER_PRINTERS, 1);
print '</td></tr>';
print '<tr class="oddeven value"><td>';
print $langs->trans("OrderNotes");
print '<td colspan="2">';
print ajax_constantonoff("TAKEPOS_ORDER_NOTES", array(), $conf->entity, 0, 0, 1, 0);
//print $form->selectyesno("TAKEPOS_ORDER_NOTES", $conf->global->TAKEPOS_ORDER_NOTES, 1);
print '</td></tr>';
}
if ($conf->global->TAKEPOS_BAR_RESTAURANT)
{
print '<tr class="oddeven value"><td>';
print $langs->trans("BasicPhoneLayout");
print '<td colspan="2">';
//print $form->selectyesno("TAKEPOS_PHONE_BASIC_LAYOUT", $conf->global->TAKEPOS_PHONE_BASIC_LAYOUT, 1);
print ajax_constantonoff("TAKEPOS_PHONE_BASIC_LAYOUT", array(), $conf->entity, 0, 0, 1, 0);
print '</td></tr>';
print '<tr class="oddeven value"><td>';
print $langs->trans("ProductSupplements");
print '<td colspan="2">';
//print $form->selectyesno("TAKEPOS_SUPPLEMENTS", $conf->global->TAKEPOS_SUPPLEMENTS, 1);
print ajax_constantonoff("TAKEPOS_SUPPLEMENTS", array(), $conf->entity, 0, 0, 1, 0);
print '</td></tr>';
if ($conf->global->TAKEPOS_SUPPLEMENTS)
{
print '<tr class="oddeven"><td>';
print $langs->trans("SupplementCategory");
print '<td colspan="2">';
print $form->select_all_categories(Categorie::TYPE_PRODUCT, $conf->global->TAKEPOS_SUPPLEMENTS_CATEGORY, 'TAKEPOS_SUPPLEMENTS_CATEGORY', 64, 0, 0);
print ajax_combobox('TAKEPOS_SUPPLEMENTS_CATEGORY');
print "</td></tr>\n";
}
}
print '</table>';
print '</div>';
// Sumup options
if ($conf->global->TAKEPOS_ENABLE_SUMUP) {
print '<br>';
@@ -298,7 +316,7 @@ if ($conf->global->TAKEPOS_ENABLE_SUMUP) {
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Parameters").'</td><td>'.$langs->trans("Value").'</td>';
print '<td class="titlefield">'.$langs->trans("Sumup").'</td><td>'.$langs->trans("Value").'</td>';
print "</tr>\n";
print '<tr class="oddeven"><td>';
@@ -322,42 +340,5 @@ print '<div class="center"><input type="submit" class="button" value="'.$langs->
print "</form>\n";
print '<br><br>';
// Marketplace
print "<table summary=\"list_of_modules\" class=\"noborder\" width=\"100%\">\n";
print "<tr class=\"liste_titre\">\n";
print '<td colspan="2">'.$langs->trans("WebSiteDesc").'</td>';
print '<td>'.$langs->trans("URL").'</td>';
print '</tr>';
print "<tr class=\"oddeven\">\n";
$url = 'https://www.dolistore.com/45-pos';
print '<td class="left"><a href="'.$url.'" target="_blank" rel="external"><img border="0" class="imgautosize imgmaxwidth180" src="'.DOL_URL_ROOT.'/theme/dolistore_logo.png"></a></td>';
print '<td>'.$langs->trans("DolistorePosCategory").'</td>';
print '<td><a href="'.$url.'" target="_blank" rel="external">'.$url.'</a></td>';
print '</tr>';
print "</table>\n";
print '<br>';
// Support
print "<table summary=\"list_of_modules\" class=\"noborder\" width=\"100%\">\n";
print "<tr class=\"liste_titre\">\n";
print '<td colspan="2">TakePOS Support</td>';
print '<td>'.$langs->trans("URL").'</td>';
print '</tr>';
print "<tr class=\"oddeven\">\n";
$url = 'http://www.takepos.com';
print '<td class="left"><a href="'.$url.'" target="_blank" rel="external"><img border="0" class="imgautosize imgmaxwidth180" src="../img/takepos.png"></a></td>';
print '<td>TakePOS original developers</td>';
print '<td><a href="'.$url.'" target="_blank" rel="external">'.$url.'</a></td>';
print '</tr>';
print "</table>\n";
print '<br>';
llxFooter();
$db->close();

View File

@@ -88,6 +88,8 @@ if (GETPOST('action', 'alpha') == 'set')
$res = dolibarr_set_const($db, "TAKEPOS_TEMPLATE_TO_USE_FOR_INVOICES".$terminaltouse, GETPOST('TAKEPOS_TEMPLATE_TO_USE_FOR_INVOICES'.$terminaltouse, 'alpha'), 'chaine', 0, '', $conf->entity);
$res = dolibarr_set_const($db, "TAKEPOS_TEMPLATE_TO_USE_FOR_ORDERS".$terminaltouse, GETPOST('TAKEPOS_TEMPLATE_TO_USE_FOR_ORDERS'.$terminaltouse, 'alpha'), 'chaine', 0, '', $conf->entity);
$res = dolibarr_set_const($db, 'CASHDESK_READER_KEYCODE_FOR_ENTER'.$terminaltouse, (GETPOST('CASHDESK_READER_KEYCODE_FOR_ENTER'.$terminaltouse, 'int') > 0 ? GETPOST('CASHDESK_READER_KEYCODE_FOR_ENTER'.$terminaltouse, 'int') : ''), 'chaine', 0, '', $conf->entity);
dol_syslog("admin/cashdesk: level ".GETPOST('level', 'alpha'));
if (!$res > 0) $error++;
@@ -244,6 +246,11 @@ if ($conf->global->TAKEPOS_PRINT_METHOD == "receiptprinter") {
print '</td></tr>';
}
print '<tr class="oddeven"><td>' . $langs->trans('CashDeskReaderKeyCodeForEnter') . '</td>';
print '<td>';
print '<input type="text" name="' . 'CASHDESK_READER_KEYCODE_FOR_ENTER'.$terminaltouse . '" value="' . $conf->global->{'CASHDESK_READER_KEYCODE_FOR_ENTER'.$terminaltouse} . '" />';
print '</td></tr>';
print '</table>';
print '</div>';

View File

@@ -233,8 +233,10 @@ table.postablelines tr td {
padding-top: 3px;
padding-bottom: 3px;
}
.posinvoiceline td {
height: 40px !important;
background-color: var(--colorbacklineimpair1);
}
div.paymentbordline
@@ -268,7 +270,7 @@ div.paymentbordline
.row1withhead{
margin: 0 auto;
width: 100%;
height: calc(50% - 35px);
height: calc(40% - 50px);
padding-top: 5px;
}
@@ -281,7 +283,7 @@ div.paymentbordline
.row2withhead{
margin: 0 auto;
width: 100%;
height: 50%;
height: 60%;
}
.div1{
@@ -401,26 +403,51 @@ div.description_content {
.header{
margin: 0 auto;
width: 100%;
height: 35px;
height: 50px;
background: rgb(60,70,100);
}
.topnav-left {
float: left;
}
.topnav-right {
}
.topnav div.login_block_other, .topnav div.login_block_user {
max-width: unset;
width: unset;
}
.topnav{
background: rgb(<?php echo $colorbackhmenu1 ?>);
background-image: linear-gradient(-45deg, <?php echo colorAdjustBrightness(colorArrayToHex(colorStringToArray($colorbackhmenu1)), '5'); ?>, rgb(<?php echo $colorbackhmenu1 ?>));
overflow: hidden;
height: 100%;
}
.topnav .tmenu {
display: block;
}
.topnav a{
float: left;
color: #f2f2f2;
padding: 6px 16px;
text-decoration: none;
}
.topnav .login_block_other a {
padding: 5px 10px;
margin-left: 4px;
font-size: 1.3em;
}
.topnav-right > a {
font-size: 17px;
}
.topnav a:hover{
.topnav-left a {
padding: 7px 4px 7px 4px;
margin: 8px;
margin-left: 4px;
}
.topnav-left a:hover, .topnav .login_block_other a:hover {
background-color: #ddd;
color: black;
}
@@ -434,8 +461,10 @@ div.description_content {
color: #000;
float: left;
border-bottom: none !important;
margin-top: 4px;
margin-left: 6px;
font-size: 1.3em;
max-width: 250px;
border-radius: 5px;
}
@media screen and (min-width: 892px) {
@@ -494,7 +523,23 @@ div.description_content {
/* For small screens */
@media screen and (max-width: 1024px) {
.topnav input[type="text"] {
max-width: 150px;
}
}
@media screen and (max-width: 767px) {
.header {
position: sticky;
top: 0;
z-index: 10;
}
.topnav input[type="text"] {
max-width: 100px;
}
.topnav-right {
float: unset;
}
@@ -511,6 +556,11 @@ div.description_content {
width: 25%;
}
.row1withhead{
height: calc(40% - 100px);
}
div.div1 {
padding-bottom: 0;
margin-bottom: 10px;
@@ -528,6 +578,7 @@ div.description_content {
}
div.div3 {
margin-top: 8px;
height: unset;
}

View File

@@ -438,9 +438,15 @@ function New() {
}
}
function Search2() {
/**
* Search products
*
* @param {int} keyCodeForEnter Key code for "enter"
* return {void}
*/
function Search2(keyCodeForEnter) {
console.log("Search2 Call ajax search to replace products");
if(window.event.keyCode == 13) var key=13;
if(window.event.keyCode == keyCodeForEnter) var key=13;
pageproducts=0;
jQuery(".wrapper2 .catwatermark").hide();
$.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=search&term='+$('#search').val(), function(data) {
@@ -455,12 +461,12 @@ function Search2() {
$("#prodesc"+i).text(data[i]['label']);
$("#prodivdesc"+i).show();
$("#proimg"+i).attr("title", titlestring);
$("#proimg"+i).attr("src", "genimg/?query=pro&id="+data[i]['rowid']);
$("#proimg"+i).attr("src", "genimg/index.php?query=pro&id="+data[i]['rowid']);
$("#prodiv"+i).data("rowid", data[i]['rowid']);
$("#prodiv"+i).data("iscat", 0);
}
}).always(function() {
if(key==13) ClickProduct(0);
}).always(function(data) {
if(key==13 && data.length==1) ClickProduct(0);
});
}
@@ -649,6 +655,7 @@ $( document ).ready(function() {
<body class="bodytakepos" style="overflow: hidden;">
<?php
if ($conf->global->TAKEPOS_NUM_TERMINALS != "1" && $_SESSION["takeposterminal"] == "") print '<div id="dialog-info" title="TakePOS">'.$langs->trans('TerminalSelect').'</div>';
$keyCodeForEnter = $conf->global->{'CASHDESK_READER_KEYCODE_FOR_ENTER'.$_SESSION['takeposterminal']} > 0 ? $conf->global->{'CASHDESK_READER_KEYCODE_FOR_ENTER'.$_SESSION['takeposterminal']} : 13;
?>
<div class="container">
@@ -658,20 +665,27 @@ if (empty($conf->global->TAKEPOS_HIDE_HEAD_BAR)) {
<div class="header">
<div class="topnav">
<div class="topnav-left">
<a onclick="TerminalsDialog();">
<a class="topnav-terminalhour" onclick="TerminalsDialog();">
<?php echo $langs->trans("Terminal")." ";
if ($_SESSION["takeposterminal"] == "") echo "1"; else echo $_SESSION["takeposterminal"];
echo " - ".dol_print_date(dol_now(), "dayhour");
if ($_SESSION["takeposterminal"] == "") echo "1";
else echo $_SESSION["takeposterminal"];
echo '<span class="hideonsmartphone"> - '.dol_print_date(dol_now(), "dayhour").'</span>';
?>
</a>
<a onclick="Customer();"><?php echo $langs->trans("Customer"); ?></a>
</div>
<div class="topnav-right">
<input type="text" id="search" name="search" onkeyup="Search2();" placeholder="<?php echo $langs->trans("Search"); ?>" autofocus>
<div class="login_block_other">
<input type="text" id="search" name="search" onkeyup="Search2(<?php echo $keyCodeForEnter; ?>);" placeholder="<?php echo $langs->trans("Search"); ?>" autofocus>
<a onclick="ClearSearch();"><span class="fa fa-backspace"></span></a>
<a onclick="window.location.href='<?php echo DOL_URL_ROOT; ?>';"><span class="fas fa-sign-out-alt"></span></a>
<a onclick="window.location.href='<?php echo DOL_URL_ROOT; ?>/user/logout.php';"><span class="fas fa-user"></span></a>
<a onclick="window.location.href='<?php echo DOL_URL_ROOT; ?>';"><span class="fas fa-home"></span></a>
<a onclick="FullScreen();"><span class="fa fa-expand-arrows-alt"></span></a>
</div>
<div class="login_block_user">
<?php
print top_menu_user(1, DOL_URL_ROOT.'/user/logout.php');
?>
</div>
</div>
</div>
</div>
@@ -802,8 +816,6 @@ if (!empty($reshook)) {
if ($r % 3 == 2) $menus[$r++] = array('title'=>'', 'style'=>'visibility: hidden;');
$menus[$r++] = array('title'=>'<span class="fa fa-home paddingrightonly"></span><div class="trunc">'.$langs->trans("BackOffice").'</div>', 'action'=>'window.open(\''.(DOL_URL_ROOT ? DOL_URL_ROOT : '/').'\', \'_backoffice\');');
if (!empty($conf->global->TAKEPOS_HIDE_HEAD_BAR)) {
$menus[$r++] = array('title'=>'<span class="fa fa-sign-out-alt paddingrightonly"></span><div class="trunc">'.$langs->trans("Logout").'</div>', 'action'=>'window.location.href=\''.DOL_URL_ROOT.'/user/logout.php\';');
}
@@ -828,7 +840,7 @@ if (!empty($conf->global->TAKEPOS_HIDE_HEAD_BAR)) {
if (!empty($conf->global->TAKEPOS_HIDE_HEAD_BAR)) {
print '<!-- Show the search input text -->'."\n";
print '<div class="margintoponly">';
print '<input type="text" id="search" name="search" onkeyup="Search2();" style="width:80%;width:calc(100% - 51px);font-size: 150%;" placeholder="'.$langs->trans("Search").'" autofocus> ';
print '<input type="text" id="search" name="search" onkeyup="Search2('.$keyCodeForEnter.');" style="width:80%;width:calc(100% - 51px);font-size: 150%;" placeholder="'.$langs->trans("Search").'" autofocus> ';
print '<a class="marginleftonly hideonsmartphone" onclick="ClearSearch();">'.img_picto('', 'searchclear').'</a>';
print '</div>';
}

View File

@@ -122,7 +122,7 @@ button.dropdown-item.global-search-item {
.tmenu .open.dropdown, .tmenu .open.dropdown {
background: rgba(0, 0, 0, 0.1);
}
.tmenu .dropdown-menu, .login_block .dropdown-menu {
.tmenu .dropdown-menu, .login_block .dropdown-menu, .topnav .dropdown-menu {
position: absolute;
right: 2px;
<?php echo $left; ?>: auto;
@@ -135,20 +135,23 @@ button.dropdown-item.global-search-item {
.user-body {
color: #333;
}
.side-nav-vert .user-menu .dropdown-menu {
.side-nav-vert .user-menu .dropdown-menu, .topnav .user-menu .dropdown-menu {
border-top-right-radius: 0;
border-top-left-radius: 0;
padding: 1px 0 0 0;
border-top-width: 0;
width: 300px;
}
.side-nav-vert .user-menu .dropdown-menu {
.topnav .user-menu .dropdown-menu {
top: 50px;
}
.side-nav-vert .user-menu .dropdown-menu, .topnav .user-menu .dropdown-menu {
margin-top: 0;
border-top-left-radius: 0;
border-top-right-radius: 0;
}
.side-nav-vert .user-menu .dropdown-menu > .user-header {
.side-nav-vert .user-menu .dropdown-menu > .user-header, .topnav .user-menu .dropdown-menu > .user-header {
min-height: 100px;
padding: 10px;
text-align: center;
@@ -333,7 +336,7 @@ a.top-menu-dropdown-link {
margin-right: 5px;
display: inline-block;
content: "\f0da";
color: rgba(0,0,0,0.3);
/* color: rgba(0,0,0,0.3); */
}
@@ -348,22 +351,20 @@ a.top-menu-dropdown-link {
*/
.dropdown-search-input {
width: 100%;
width: 280px;
padding: 10px 35px 10px 20px;
background-color: transparent;
font-size: 14px;
line-height: 16px;
/*font-size: 14px;
line-height: 16px;*/
box-sizing: border-box;
color: #575756;
background-color: transparent;
background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-size: 16px 16px;
background-position: 95% center;
border-radius: 50px;
border-radius: 10px;
border: 1px solid #c4c4c2 !important;
transition: all 250ms ease-in-out;
backface-visibility: hidden;

View File

@@ -6,41 +6,40 @@
/* ============================================================================== */
:root {
--colorbackhmenu1: rgb(<?php print $colorbackhmenu1; ?>);
--colorbackvmenu1: rgb(<?php print $colorbackvmenu1; ?>);
--colorbacktitle1: rgb(<?php print $colorbacktitle1; ?>);
--colorbacktabcard1: rgb(<?php print $colorbacktabcard1; ?>);
--colorbacktabactive: rgb(<?php print $colorbacktabactive; ?>);
--colorbacklineimpair1: rgb(<?php print $colorbacklineimpair1; ?>);
--colorbacklineimpair2: rgb(<?php print $colorbacklineimpair2; ?>);
--colorbacklinepair1: rgb(<?php print $colorbacklinepair1; ?>);
--colorbacklinepair2: rgb(<?php print $colorbacklinepair2; ?>);
--colorbacklinepairhover: rgb(<?php print $colorbacklinepairhover; ?>);
--colorbacklinepairchecked: rgb(<?php print $colorbacklinepairchecked; ?>);
--colorbackbody: rgb(<?php print $colorbackbody; ?>);
--colortexttitlenotab: rgb(<?php print $colortexttitlenotab; ?>);
--colortexttitle: rgb(<?php print $colortexttitle; ?>);
--colortext: rgb(<?php print $colortext; ?>);
--colortextlink: rgb(<?php print $colortextlink; ?>);
--colortextbackhmenu: #<?php echo $colortextbackhmenu; ?>;
--colortextbackvmenu: #<?php print $colortextbackvmenu; ?>) ;
--listetotal: #551188;
--inputbackgroundcolor: #FFF;
--inputbordercolor: rgba(0,0,0,.2);
--tooltipbgcolor: <?php print $toolTipBgColor; ?>;
--tooltipfontcolor : <?php print $toolTipFontColor; ?>;
--oddevencolor: #202020;
--colorboxstatsborder: #ddd;
--dolgraphbg: rgba(255,255,255,0);
--fieldrequiredcolor: #000055;
--colortextbacktab: #<?php print $colortextbacktab; ?>) ;
--colorboxiconbg: #eee;
--refidnocolor:#444;
--tableforfieldcolor:#666;
--amountremaintopaycolor:#880000;
--amountpaymentcomplete:#008800;
--amountremaintopaybackcolor:none;
--colorbackhmenu1: rgb(<?php print $colorbackhmenu1; ?>);
--colorbackvmenu1: rgb(<?php print $colorbackvmenu1; ?>);
--colorbacktitle1: rgb(<?php print $colorbacktitle1; ?>);
--colorbacktabcard1: rgb(<?php print $colorbacktabcard1; ?>);
--colorbacktabactive: rgb(<?php print $colorbacktabactive; ?>);
--colorbacklineimpair1: rgb(<?php print $colorbacklineimpair1; ?>);
--colorbacklineimpair2: rgb(<?php print $colorbacklineimpair2; ?>);
--colorbacklinepair1: rgb(<?php print $colorbacklinepair1; ?>);
--colorbacklinepair2: rgb(<?php print $colorbacklinepair2; ?>);
--colorbacklinepairhover: rgb(<?php print $colorbacklinepairhover; ?>);
--colorbacklinepairchecked: rgb(<?php print $colorbacklinepairchecked; ?>);
--colorbackbody: rgb(<?php print $colorbackbody; ?>);
--colortexttitlenotab: rgb(<?php print $colortexttitlenotab; ?>);
--colortexttitle: rgb(<?php print $colortexttitle; ?>);
--colortext: rgb(<?php print $colortext; ?>);
--colortextlink: rgb(<?php print $colortextlink; ?>);
--colortextbackhmenu: #<?php echo $colortextbackhmenu; ?>;
--colortextbackvmenu: #<?php print $colortextbackvmenu; ?>) ;
--listetotal: #551188;
--inputbackgroundcolor: #FFF;
--inputbordercolor: rgba(0,0,0,.2);
--tooltipbgcolor: <?php print $toolTipBgColor; ?>;
--tooltipfontcolor : <?php print $toolTipFontColor; ?>;
--oddevencolor: #202020;
--colorboxstatsborder: #ddd;
--dolgraphbg: rgba(255,255,255,0);
--fieldrequiredcolor: #000055;
--colortextbacktab: #<?php print $colortextbacktab; ?>) ;
--colorboxiconbg: #eee;
--refidnocolor:#444;
--tableforfieldcolor:#666;
--amountremaintopaycolor:#880000;
--amountpaymentcomplete:#008800;
--amountremaintopaybackcolor:none;
}
<?php
@@ -124,6 +123,12 @@ select.vmenusearchselectcombo {
background-color: unset;
}
table.liste th.wrapcolumntitle.liste_titre:not(.maxwidthsearch), table.liste td.wrapcolumntitle.liste_titre:not(.maxwidthsearch) {
overflow: hidden;
white-space: nowrap;
max-width: 120px;
text-overflow: ellipsis;
}
.liste_titre input[name=month_date_when], .liste_titre input[name=monthvalid], .liste_titre input[name=search_ordermonth], .liste_titre input[name=search_deliverymonth],
.liste_titre input[name=search_smonth], .liste_titre input[name=search_month], .liste_titre input[name=search_emonth], .liste_titre input[name=smonth], .liste_titre input[name=month], .liste_titre select[name=month],
.liste_titre input[name=month_lim], .liste_titre input[name=month_start], .liste_titre input[name=month_end], .liste_titre input[name=month_create],
@@ -328,6 +333,13 @@ select.flat, form.flat select {
.opacitytransp {
opacity: 0;
}
.colorwhite {
color: #fff;
}
.colorblack {
color: #000;
}
select:invalid {
color: gray;
}
@@ -362,6 +374,7 @@ input#onlinepaymenturl, input#directdownloadlink {
opacity: 0.7;
}
div#moretabsList, div#moretabsListaction {
z-index: 5;
}
@@ -1983,13 +1996,7 @@ a.tmenuimage:hover{
$found = 0; $url = '';
foreach ($conf->file->dol_document_root as $dirroot)
{
if (file_exists($dirroot."/".$val."/img/".$val."_over.png"))
{
$url = dol_buildpath('/'.$val.'/img/'.$val.'_over.png', 1);
$found = 1;
break;
}
elseif (file_exists($dirroot."/".$val."/img/".$val.".png")) // Retro compatibilité
if (file_exists($dirroot."/".$val."/img/".$val.".png"))
{
$url = dol_buildpath('/'.$val.'/img/'.$val.'.png', 1);
$found = 1;
@@ -2000,10 +2007,11 @@ a.tmenuimage:hover{
if (!$found)
{
if (!defined('DISABLE_FONT_AWSOME')) {
print "/* A mainmenu entry was found but img file ".$val.".png not found (check /".$val."/img/".$val.".png), so we use a generic one */\n";
print "/* A mainmenu entry was found but img file ".$val.".png not found (check /".$val."/img/".$val.".png), so we use a generic one. */\n";
print "/* Overwrite this definition in your own css with a different content to use your own font awesome icon. */\n";
print 'div.mainmenu.'.$val.'::before {
content: "\f249";
}';
}'."\n";
}
else
{

View File

@@ -279,6 +279,12 @@ textarea.cke_source:focus
box-shadow: none;
}
th.wrapcolumntitle.liste_titre:not(.maxwidthsearch), td.wrapcolumntitle.liste_titre:not(.maxwidthsearch) {
overflow: hidden;
white-space: nowrap;
max-width: 120px;
text-overflow: ellipsis;
}
.liste_titre input[name=month_date_when], .liste_titre input[name=monthvalid], .liste_titre input[name=search_ordermonth], .liste_titre input[name=search_deliverymonth],
.liste_titre input[name=search_smonth], .liste_titre input[name=search_month], .liste_titre input[name=search_emonth], .liste_titre input[name=smonth], .liste_titre input[name=month],
.liste_titre input[name=month_lim], .liste_titre input[name=month_start], .liste_titre input[name=month_end], .liste_titre input[name=month_create],
@@ -465,6 +471,13 @@ select.flat, form.flat select {
.opacitytransp {
opacity: 0;
}
.colorwhite {
color: #fff;
}
.colorblack {
color: #000;
}
select:invalid {
color: gray;
}
@@ -2051,13 +2064,7 @@ div.mainmenu.website {
$found = 0; $url = '';
foreach ($conf->file->dol_document_root as $dirroot)
{
if (file_exists($dirroot."/".$val."/img/".$val."_over.png"))
{
$url = dol_buildpath('/'.$val.'/img/'.$val.'_over.png', 1);
$found = 1;
break;
}
elseif (file_exists($dirroot."/".$val."/img/".$val.".png")) // Retro compatibilité
if (file_exists($dirroot."/".$val."/img/".$val.".png"))
{
$url = dol_buildpath('/'.$val.'/img/'.$val.'.png', 1);
$found = 1;
@@ -2075,7 +2082,8 @@ div.mainmenu.website {
}
else
{
print "/* A mainmenu entry was found but img file ".$val.".png not found (check /".$val."/img/".$val.".png), so we use a generic one */\n";
print "/* A mainmenu entry was found but img file ".$val.".png not found (check /".$val."/img/".$val.".png), so we use a generic one. */\n";
print "/* Overwrite this definition in your own css with a different content to use your own font awesome icon. */\n";
$url = dol_buildpath($path.'/theme/'.$theme.'/img/menus/generic'.(min($generic, 4))."_over.png", 1);
print "div.mainmenu.".$val." {\n";
print " background-image: url(".$url.");\n";

View File

@@ -3,6 +3,10 @@ README (English)
This directory contains unit tests and docs for Dolibarr quality analysis.
- PHPUnit - https://phpunit.de
- PHP_CodeSniffer - https://pear.php.net/package/PHP_CodeSniffer/
- PHP Depend - https://pdepend.org/
PHPUNIT
-------

11
test/selenium/README Normal file
View File

@@ -0,0 +1,11 @@
README (English)
--------------------------------
This directory contains test files for Selenium.
Selenium is a tool for automatic testing of web applications.
https://www.selenium.dev/