diff --git a/posterita/.classpath b/posterita/.classpath
new file mode 100644
index 0000000000..3d9cd643fa
--- /dev/null
+++ b/posterita/.classpath
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/posterita/.project b/posterita/.project
new file mode 100644
index 0000000000..74ab5b9df6
--- /dev/null
+++ b/posterita/.project
@@ -0,0 +1,18 @@
+
+
+ posterita
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+ com.sysdeo.eclipse.tomcat.tomcatnature
+
+
diff --git a/posterita/.settings/org.eclipse.jdt.core.prefs b/posterita/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000000..850ee4c73b
--- /dev/null
+++ b/posterita/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,328 @@
+#Mon Apr 14 16:31:16 MUT 2008 (Ashley G Ramdass)
+eclipse.preferences.version=1
+org.eclipse.jdt.core.codeComplete.argumentPrefixes=
+org.eclipse.jdt.core.codeComplete.argumentSuffixes=
+org.eclipse.jdt.core.codeComplete.fieldPrefixes=
+org.eclipse.jdt.core.codeComplete.fieldSuffixes=
+org.eclipse.jdt.core.codeComplete.localPrefixes=
+org.eclipse.jdt.core.codeComplete.localSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nullReference=ignore
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=true
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=next_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=80
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=true
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
diff --git a/posterita/.settings/org.eclipse.jdt.ui.prefs b/posterita/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000000..5a515244bf
--- /dev/null
+++ b/posterita/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,10 @@
+#Tue May 27 10:52:59 MUT 2008 (Ashley G Ramdass)
+eclipse.preferences.version=1
+formatter_profile=_Posterita
+formatter_settings_version=11
+org.eclipse.jdt.ui.exception.name=e
+org.eclipse.jdt.ui.gettersetter.use.is=true
+org.eclipse.jdt.ui.javadoc=false
+org.eclipse.jdt.ui.keywordthis=false
+org.eclipse.jdt.ui.overrideannotation=true
+org.eclipse.jdt.ui.text.custom_code_templates=\n/**\n * @return The ${bare_field_name}\n */ \n/**\n * @param ${param} The ${bare_field_name} to set\n */ /**\n * ${tags}\n */ /******************************************************************************\n * Product\: Posterita Web-Based POS and Adempiere Plugin *\n * Copyright (C) ${year} Posterita Ltd *\n * This file is part of POSterita *\n * *\n * POSterita is free software; you can redistribute it and/or modify *\n * it under the terms of the GNU General Public License as published by *\n * the Free Software Foundation; either version 2 of the License, or *\n * (at your option) any later version. *\n * *\n * This program is distributed in the hope that it will be useful, *\n * but WITHOUT ANY WARRANTY; without even the implied warranty of *\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *\n * GNU General Public License for more details. *\n * *\n * You should have received a copy of the GNU General Public License along *\n * with this program; if not, write to the Free Software Foundation, Inc., *\n * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *\n *****************************************************************************/ /**\n * @author ${user} \n * ${date}\n * ${tags}\n */ /**\n * \n */ /**\n * ${tags}\n */ /**\n * ${see_to_overridden}\n */ /**\n * ${tags}\n * ${see_to_target}\n */ ${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration} \n \n \n \n // ${todo} Auto-generated catch block\n${exception_var}.printStackTrace(); // ${todo} Auto-generated method stub\n${body_statement}\n ${body_statement}\n// ${todo} Auto-generated constructor stub return ${field}; ${field} \= ${param};
diff --git a/posterita/.tomcatplugin b/posterita/.tomcatplugin
new file mode 100644
index 0000000000..2b55a22921
--- /dev/null
+++ b/posterita/.tomcatplugin
@@ -0,0 +1,11 @@
+
+
+ /
+ false
+ true
+ true
+ true
+
+
+ /posterita
+
diff --git a/posterita/commons/BuildPatch/Adempiere/jboss/bin/run.conf b/posterita/commons/BuildPatch/Adempiere/jboss/bin/run.conf
new file mode 100644
index 0000000000..518084d856
--- /dev/null
+++ b/posterita/commons/BuildPatch/Adempiere/jboss/bin/run.conf
@@ -0,0 +1,53 @@
+## -*- shell-script -*- ######################################################
+## ##
+## JBoss Bootstrap Script Configuration ##
+## ##
+##############################################################################
+
+### $Id: run.conf,v 1.3 2005/09/04 17:52:33 jjanke Exp $
+
+#
+# This file is optional; it may be removed if not needed.
+#
+
+#
+# Specify the maximum file descriptor limit, use "max" or "maximum" to use
+# the default, as queried by the system.
+#
+# Defaults to "maximum"
+#
+#MAX_FD="maximum"
+
+#
+# Specify the profiler configuration file to load.
+#
+# Default is to not load profiler configuration file.
+#
+#PROFILER=""
+
+#
+# Specify the location of the Java home directory. If set then $JAVA will
+# be defined to $JAVA_HOME/bin/java, else $JAVA will be "java".
+#
+#JAVA_HOME="/opt/java/jdk"
+
+#
+# Specify the exact Java VM executable to use.
+#
+#JAVA=""
+
+#
+# Specify options to pass to the Java VM.
+#
+if [ "x$JAVA_OPTS" = "x" ]; then
+ JAVA_OPTS="-server -Xms128m -Xmx128m"
+fi
+
+# Sample JPDA settings for remote socket debuging
+#JAVA_OPTS="$JAVA_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y"
+
+# Sample JPDA settings for shared memory debugging
+#JAVA_OPTS="$JAVA_OPTS -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_shmem,server=y,suspend=n,address=jboss"
+
+# AspectJ integration
+JAVA_OPTS="$JAVA_OPTS -javaagent:$ADEMPIERE_HOME/lib/aspectjweaver.jar"
diff --git a/posterita/commons/Migration/1.0-1.5 (AD331b)/build.xml b/posterita/commons/Migration/1.0-1.5 (AD331b)/build.xml
new file mode 100644
index 0000000000..c0b65f816f
--- /dev/null
+++ b/posterita/commons/Migration/1.0-1.5 (AD331b)/build.xml
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ File ${file.name} status ${sqlplus.result}
+
+
+
+
+
+
diff --git a/posterita/commons/Migration/1.0-1.5 (AD331b)/oracle/001_ad_changes.sql b/posterita/commons/Migration/1.0-1.5 (AD331b)/oracle/001_ad_changes.sql
new file mode 100644
index 0000000000..6336c6c293
--- /dev/null
+++ b/posterita/commons/Migration/1.0-1.5 (AD331b)/oracle/001_ad_changes.sql
@@ -0,0 +1,32 @@
+INSERT INTO ad_element
+(ad_element_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby,
+columnname, entitytype, name, printname, description, help, po_name, po_printname, po_description, po_help)
+VALUES(52027, 0, 0, 'Y', TO_DATE('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_DATE('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100, 'isPresentForProduct',
+'U', 'isPresentForProduct', 'Present for Product', NULL, NULL, NULL, NULL, NULL, NULL);
+
+INSERT INTO ad_column
+(ad_column_id, ad_client_id, ad_org_id, isactive, created, updated, createdby, updatedby, name,
+ description, help, version, entitytype, columnname, ad_table_id, ad_reference_id, ad_reference_value_id,
+ ad_val_rule_id, fieldlength, defaultvalue, iskey, isparent, ismandatory, isupdateable, readonlylogic,
+isidentifier, seqno, istranslated, isencrypted, callout, vformat, valuemin, valuemax, isselectioncolumn,
+ad_element_id, ad_process_id, issyncdatabase, isalwaysupdateable, columnsql, mandatorylogic)
+ VALUES( 52071, 0, 0, 'Y', TO_DATE('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), TO_DATE('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100, 100,
+'isPresentForProduct', 'Price List appears in Product Screen', '', 0, 'U', 'isPresentForProduct',
+ 255, 20, NULL, NULL, 1, NULL, 'N', 'N', 'N', 'Y', NULL,
+'N', 0, 'N', 'N', NULL, NULL, NULL, NULL, 'N',
+ 52027, NULL, 'N', 'N', NULL, NULL);
+
+INSERT INTO ad_column
+(ad_column_id, ad_client_id, ad_org_id, isactive, created, updated, createdby, updatedby,
+ name, description, help, version, entitytype, columnname, ad_table_id, ad_reference_id,
+ad_reference_value_id, ad_val_rule_id, fieldlength, defaultvalue, iskey, isparent, ismandatory,
+isupdateable, readonlylogic, isidentifier, seqno, istranslated, isencrypted, callout, vformat,
+valuemin, valuemax, isselectioncolumn, ad_element_id, ad_process_id, issyncdatabase,
+isalwaysupdateable, columnsql, mandatorylogic)
+ VALUES(52072 ,
+0, 0, 'Y', TO_DATE('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), TO_DATE('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100, 100, 'Mandatory', 'Data entry is required in this column',
+'The field must have a value for the record to be saved to the database.', 0, 'U', 'IsMandatory',
+255, 20, NULL, NULL, 1, NULL, 'N', 'N', 'N', 'Y', NULL, 'N', 0, 'N', 'N', NULL, NULL, NULL, NULL, 'N',
+ 392, NULL, 'N', 'N', NULL, NULL);
+
+
diff --git a/posterita/commons/Migration/1.0-1.5 (AD331b)/oracle/002_ad_message.sql b/posterita/commons/Migration/1.0-1.5 (AD331b)/oracle/002_ad_message.sql
new file mode 100644
index 0000000000..73d279f394
--- /dev/null
+++ b/posterita/commons/Migration/1.0-1.5 (AD331b)/oracle/002_ad_message.sql
@@ -0,0 +1,65 @@
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52441 , 0, 0, 'Y', TO_DATE('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_DATE('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'smenu.price.list', 'Price List', ' ', 'I', 'D');
+
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52442 , 0, 0, 'Y', TO_DATE('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_DATE('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'pmenu.help', 'Help', ' ', 'I', 'D');
+
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52443 , 0, 0, 'Y', TO_DATE('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_DATE('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'list.price', 'List Price', ' ', 'I', 'D');
+
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52444 , 0, 0, 'Y', TO_DATE('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_DATE('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'standard.price', 'Standard Price', ' ', 'I', 'D');
+
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52445 , 0, 0, 'Y', TO_DATE('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_DATE('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'limit.price', 'Limit Price', ' ', 'I', 'D');
+
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52446 , 0, 0, 'Y', TO_DATE('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_DATE('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'tax.incl', 'Tax Incl', ' ', 'I', 'D');
+
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52447 , 0, 0, 'Y', TO_DATE('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_DATE('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'tax.excl', 'Tax Excl', ' ', 'I', 'D');
+
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52448 , 0, 0, 'Y', TO_DATE('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_DATE('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'type.of.price.list', 'Type of Price List', ' ', 'I', 'D');
+
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52449 , 0, 0, 'Y', TO_DATE('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_DATE('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'purchase', 'Purchase', ' ', 'I', 'D');
+
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52450 , 0, 0, 'Y', TO_DATE('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_DATE('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'sales', 'Sales', ' ', 'I', 'D');
+
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52451 , 0, 0, 'Y', TO_DATE('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_DATE('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'isPresentForProduct', 'Present for Product', ' ', 'I', 'D');
diff --git a/posterita/commons/Migration/1.0-1.5 (AD331b)/oracle/003_m_pricelist.sql b/posterita/commons/Migration/1.0-1.5 (AD331b)/oracle/003_m_pricelist.sql
new file mode 100644
index 0000000000..753cec73ea
--- /dev/null
+++ b/posterita/commons/Migration/1.0-1.5 (AD331b)/oracle/003_m_pricelist.sql
@@ -0,0 +1,5 @@
+ALTER TABLE m_pricelist ADD ismandatory char(1) DEFAULT 'N';
+
+ALTER TABLE m_pricelist ADD ispresentforproduct char(1) DEFAULT 'N';
+
+
diff --git a/posterita/commons/Migration/1.0-1.5 (AD331b)/postgresql/001_ad_changes.sql b/posterita/commons/Migration/1.0-1.5 (AD331b)/postgresql/001_ad_changes.sql
new file mode 100644
index 0000000000..ea9358ee4d
--- /dev/null
+++ b/posterita/commons/Migration/1.0-1.5 (AD331b)/postgresql/001_ad_changes.sql
@@ -0,0 +1,32 @@
+INSERT INTO ad_element
+(ad_element_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby,
+columnname, entitytype, name, printname, description, help, po_name, po_printname, po_description, po_help)
+VALUES(52027, 0, 0, 'Y', TO_TIMESTAMP('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100, 'isPresentForProduct',
+'U', 'isPresentForProduct', 'Present for Product', NULL, NULL, NULL, NULL, NULL, NULL);
+
+INSERT INTO ad_column
+(ad_column_id, ad_client_id, ad_org_id, isactive, created, updated, createdby, updatedby, name,
+ description, help, version, entitytype, columnname, ad_table_id, ad_reference_id, ad_reference_value_id,
+ ad_val_rule_id, fieldlength, defaultvalue, iskey, isparent, ismandatory, isupdateable, readonlylogic,
+isidentifier, seqno, istranslated, isencrypted, callout, vformat, valuemin, valuemax, isselectioncolumn,
+ad_element_id, ad_process_id, issyncdatabase, isalwaysupdateable, columnsql, mandatorylogic)
+ VALUES( 52071, 0, 0, 'Y', TO_TIMESTAMP('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), TO_TIMESTAMP('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100, 100,
+'isPresentForProduct', 'Price List appears in Product Screen', '', 0, 'U', 'isPresentForProduct',
+ 255, 20, NULL, NULL, 1, NULL, 'N', 'N', 'N', 'Y', NULL,
+'N', 0, 'N', 'N', NULL, NULL, NULL, NULL, 'N',
+ 52027, NULL, 'N', 'N', NULL, NULL);
+
+INSERT INTO ad_column
+(ad_column_id, ad_client_id, ad_org_id, isactive, created, updated, createdby, updatedby,
+ name, description, help, version, entitytype, columnname, ad_table_id, ad_reference_id,
+ad_reference_value_id, ad_val_rule_id, fieldlength, defaultvalue, iskey, isparent, ismandatory,
+isupdateable, readonlylogic, isidentifier, seqno, istranslated, isencrypted, callout, vformat,
+valuemin, valuemax, isselectioncolumn, ad_element_id, ad_process_id, issyncdatabase,
+isalwaysupdateable, columnsql, mandatorylogic)
+ VALUES(52072 ,
+0, 0, 'Y', TO_TIMESTAMP('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), TO_TIMESTAMP('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100, 100, 'Mandatory', 'Data entry is required in this column',
+'The field must have a value for the record to be saved to the database.', 0, 'U', 'IsMandatory',
+255, 20, NULL, NULL, 1, NULL, 'N', 'N', 'N', 'Y', NULL, 'N', 0, 'N', 'N', NULL, NULL, NULL, NULL, 'N',
+ 392, NULL, 'N', 'N', NULL, NULL);
+
+
diff --git a/posterita/commons/Migration/1.0-1.5 (AD331b)/postgresql/002_ad_message.sql b/posterita/commons/Migration/1.0-1.5 (AD331b)/postgresql/002_ad_message.sql
new file mode 100644
index 0000000000..baf54a2aa5
--- /dev/null
+++ b/posterita/commons/Migration/1.0-1.5 (AD331b)/postgresql/002_ad_message.sql
@@ -0,0 +1,65 @@
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52441 , 0, 0, 'Y', TO_TIMESTAMP('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'smenu.price.list', 'Price List', ' ', 'I', 'D');
+
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52442 , 0, 0, 'Y', TO_TIMESTAMP('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'pmenu.help', 'Help', ' ', 'I', 'D');
+
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52443 , 0, 0, 'Y', TO_TIMESTAMP('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'list.price', 'List Price', ' ', 'I', 'D');
+
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52444 , 0, 0, 'Y', TO_TIMESTAMP('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'standard.price', 'Standard Price', ' ', 'I', 'D');
+
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52445 , 0, 0, 'Y', TO_TIMESTAMP('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'limit.price', 'Limit Price', ' ', 'I', 'D');
+
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52446 , 0, 0, 'Y', TO_TIMESTAMP('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'tax.incl', 'Tax Incl', ' ', 'I', 'D');
+
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52447 , 0, 0, 'Y', TO_TIMESTAMP('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'tax.excl', 'Tax Excl', ' ', 'I', 'D');
+
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52448 , 0, 0, 'Y', TO_TIMESTAMP('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'type.of.price.list', 'Type of Price List', ' ', 'I', 'D');
+
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52449 , 0, 0, 'Y', TO_TIMESTAMP('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'purchase', 'Purchase', ' ', 'I', 'D');
+
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52450 , 0, 0, 'Y', TO_TIMESTAMP('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'sales', 'Sales', ' ', 'I', 'D');
+
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52451 , 0, 0, 'Y', TO_TIMESTAMP('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-03-28 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'isPresentForProduct', 'Present for Product', ' ', 'I', 'D');
diff --git a/posterita/commons/Migration/1.0-1.5 (AD331b)/postgresql/003_m_pricelist.sql b/posterita/commons/Migration/1.0-1.5 (AD331b)/postgresql/003_m_pricelist.sql
new file mode 100644
index 0000000000..fe0893a52e
--- /dev/null
+++ b/posterita/commons/Migration/1.0-1.5 (AD331b)/postgresql/003_m_pricelist.sql
@@ -0,0 +1,5 @@
+ALTER TABLE m_pricelist ADD COLUMN ismandatory char(1) DEFAULT 'N';
+
+ALTER TABLE m_pricelist ADD COLUMN ispresentforproduct char(1) DEFAULT 'N';
+
+
diff --git a/posterita/commons/Migration/1.6(AD340)/build.xml b/posterita/commons/Migration/1.6(AD340)/build.xml
new file mode 100644
index 0000000000..219ea01d3b
--- /dev/null
+++ b/posterita/commons/Migration/1.6(AD340)/build.xml
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ File ${file.name} status ${sqlplus.result}
+
+
+
+
+
+
diff --git a/posterita/commons/Migration/1.6(AD340)/oracle/001_ad_Changes for C_Currency.sql b/posterita/commons/Migration/1.6(AD340)/oracle/001_ad_Changes for C_Currency.sql
new file mode 100644
index 0000000000..1d921d56e4
--- /dev/null
+++ b/posterita/commons/Migration/1.6(AD340)/oracle/001_ad_Changes for C_Currency.sql
@@ -0,0 +1,14 @@
+INSERT INTO AD_Element
+(ad_element_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby,
+columnname, entitytype, name, printname, description, help, po_name, po_printname, po_description, po_help)
+VALUES(52073, 0, 0, 'Y', TO_TIMESTAMP('2008-04-17 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-04-17 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'RoundOffFactor', 'U', 'Round Off Factor', 'Round Off Factor', 'Used to Round Off Payment Amount', NULL, NULL, NULL, NULL, NULL);
+
+INSERT INTO ad_column
+(ad_column_id, ad_client_id, ad_org_id, isactive, created, updated, createdby, updatedby, name,
+description, help, version, entitytype, columnname, ad_table_id, ad_reference_id, ad_reference_value_id,
+ad_val_rule_id, fieldlength, defaultvalue, iskey, isparent, ismandatory, isupdateable, readonlylogic,
+isidentifier, seqno, istranslated, isencrypted, callout, vformat, valuemin, valuemax, isselectioncolumn,
+ad_element_id, ad_process_id, issyncdatabase, isalwaysupdateable, columnsql, mandatorylogic)
+VALUES(52074, 0, 0, 'Y', TO_TIMESTAMP('2008-04-17 16:00:00','YYYY-MM-DD HH24:MI:SS'), TO_TIMESTAMP('2008-04-17 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100, 100, 'RoundOffFactor' , 'Used to Round Off Payment Amount', NULL, 0, 'U', 'RoundOffFactor', 141, 22, NULL, NULL, 14, 1, 'N', 'N', 'Y', 'Y', NULL,
+'N', 0, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 52073, NULL, 'N', 'N', NULL, NULL);
diff --git a/posterita/commons/Migration/1.6(AD340)/oracle/002_ad_message.sql b/posterita/commons/Migration/1.6(AD340)/oracle/002_ad_message.sql
new file mode 100644
index 0000000000..a0c8df625c
--- /dev/null
+++ b/posterita/commons/Migration/1.6(AD340)/oracle/002_ad_message.sql
@@ -0,0 +1,11 @@
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52467 , 0, 0, 'Y', TO_TIMESTAMP('2008-04-25 14:30:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-04-25 14:30:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'smenu.currency', 'Currency', ' ', 'I', 'D');
+
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52468 , 0, 0, 'Y', TO_TIMESTAMP('2008-04-25 14:30:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-04-25 14:30:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'smenu.delete.price.on.pricelist', 'Delete Price On Price List', ' ', 'I', 'D');
diff --git a/posterita/commons/Migration/1.6(AD340)/oracle/003_C_Currency.sql b/posterita/commons/Migration/1.6(AD340)/oracle/003_C_Currency.sql
new file mode 100644
index 0000000000..8ac2e6a7fd
--- /dev/null
+++ b/posterita/commons/Migration/1.6(AD340)/oracle/003_C_Currency.sql
@@ -0,0 +1,2 @@
+ALTER TABLE C_Currency ADD roundOffFactor NUMBER;
+
diff --git a/posterita/commons/Migration/1.6(AD340)/postgresql/001_ad_Changes for C_Currency.sql b/posterita/commons/Migration/1.6(AD340)/postgresql/001_ad_Changes for C_Currency.sql
new file mode 100644
index 0000000000..1d921d56e4
--- /dev/null
+++ b/posterita/commons/Migration/1.6(AD340)/postgresql/001_ad_Changes for C_Currency.sql
@@ -0,0 +1,14 @@
+INSERT INTO AD_Element
+(ad_element_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby,
+columnname, entitytype, name, printname, description, help, po_name, po_printname, po_description, po_help)
+VALUES(52073, 0, 0, 'Y', TO_TIMESTAMP('2008-04-17 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-04-17 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'RoundOffFactor', 'U', 'Round Off Factor', 'Round Off Factor', 'Used to Round Off Payment Amount', NULL, NULL, NULL, NULL, NULL);
+
+INSERT INTO ad_column
+(ad_column_id, ad_client_id, ad_org_id, isactive, created, updated, createdby, updatedby, name,
+description, help, version, entitytype, columnname, ad_table_id, ad_reference_id, ad_reference_value_id,
+ad_val_rule_id, fieldlength, defaultvalue, iskey, isparent, ismandatory, isupdateable, readonlylogic,
+isidentifier, seqno, istranslated, isencrypted, callout, vformat, valuemin, valuemax, isselectioncolumn,
+ad_element_id, ad_process_id, issyncdatabase, isalwaysupdateable, columnsql, mandatorylogic)
+VALUES(52074, 0, 0, 'Y', TO_TIMESTAMP('2008-04-17 16:00:00','YYYY-MM-DD HH24:MI:SS'), TO_TIMESTAMP('2008-04-17 16:00:00','YYYY-MM-DD HH24:MI:SS'), 100, 100, 'RoundOffFactor' , 'Used to Round Off Payment Amount', NULL, 0, 'U', 'RoundOffFactor', 141, 22, NULL, NULL, 14, 1, 'N', 'N', 'Y', 'Y', NULL,
+'N', 0, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 52073, NULL, 'N', 'N', NULL, NULL);
diff --git a/posterita/commons/Migration/1.6(AD340)/postgresql/002_ad_message.sql b/posterita/commons/Migration/1.6(AD340)/postgresql/002_ad_message.sql
new file mode 100644
index 0000000000..9ca9c4eee5
--- /dev/null
+++ b/posterita/commons/Migration/1.6(AD340)/postgresql/002_ad_message.sql
@@ -0,0 +1,18 @@
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52467 , 0, 0, 'Y', TO_TIMESTAMP('2008-04-25 14:30:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-04-25 14:30:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'smenu.currency', 'Currency', ' ', 'I', 'D');
+
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52468 , 0, 0, 'Y', TO_TIMESTAMP('2008-04-25 14:30:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-04-25 14:30:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'smenu.delete.price.on.pricelist', 'Delete Price On Price List', ' ', 'I', 'D');
+
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52469 , 0, 0, 'Y', TO_TIMESTAMP('2008-04-25 14:30:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-04-25 14:30:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'smenu.organisation', 'Organisation', ' ', 'I', 'D');
+
diff --git a/posterita/commons/Migration/1.6(AD340)/postgresql/003_C_Currency.sql b/posterita/commons/Migration/1.6(AD340)/postgresql/003_C_Currency.sql
new file mode 100644
index 0000000000..1743c49096
--- /dev/null
+++ b/posterita/commons/Migration/1.6(AD340)/postgresql/003_C_Currency.sql
@@ -0,0 +1,2 @@
+ALTER TABLE C_Currency ADD COLUMN roundOffFactor NUMERIC;
+
diff --git a/posterita/commons/Migration/1.7.0/build.xml b/posterita/commons/Migration/1.7.0/build.xml
new file mode 100644
index 0000000000..2a97b78db4
--- /dev/null
+++ b/posterita/commons/Migration/1.7.0/build.xml
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ File ${file.name} status ${sqlplus.result}
+
+
+
+
+
+
diff --git a/posterita/commons/Migration/1.7.0/oracle/001_MixedPayment.sql b/posterita/commons/Migration/1.7.0/oracle/001_MixedPayment.sql
new file mode 100644
index 0000000000..266516c722
--- /dev/null
+++ b/posterita/commons/Migration/1.7.0/oracle/001_MixedPayment.sql
@@ -0,0 +1,24 @@
+-- May 22, 2008 10:57:07 AM GMT+04:00
+-- Create Mixed in the payment rules list
+INSERT INTO AD_Ref_List (AD_Client_ID,AD_Org_ID,AD_Reference_ID,AD_Ref_List_ID,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,Value) VALUES (0,0,195,52000,TO_DATE('2008-05-22 10:55:30','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Mixed',TO_DATE('2008-05-22 10:55:30','YYYY-MM-DD HH24:MI:SS'),100,'M')
+;
+
+-- May 22, 2008 10:57:11 AM GMT+04:00
+-- Update the translation
+INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Ref_List_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=52000 AND EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Ref_List_ID!=t.AD_Ref_List_ID)
+;
+
+-- May 22, 2008 11:28:12 AM GMT+04:00
+-- Creates new Validation rule so that rich client does not get Mixed rule
+INSERT INTO AD_Val_Rule (AD_Client_ID,AD_Org_ID,AD_Val_Rule_ID,Code,Created,CreatedBy,EntityType,IsActive,Name,Type,Updated,UpdatedBy) VALUES (0,0,52002,'AD_Ref_List.Value <> ''M''',TO_DATE('2008-05-22 11:28:12','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','All_Payment Rule - No mixed','S',TO_DATE('2008-05-22 11:28:12','YYYY-MM-DD HH24:MI:SS'),100)
+;
+
+-- May 22, 2008 11:30:02 AM GMT+04:00
+-- Updates all columns in AD where the payment rule list is used with the validation created earlier
+UPDATE AD_Column SET AD_Val_Rule_ID=52002 WHERE AD_Reference_Value_ID=195 AND AD_Val_Rule_ID IS NULL
+;
+
+-- May 22, 2008 11:31:15 AM GMT+04:00
+-- Updates all columns in AD where an existing validation rule exist and set it to ignore the Mixed rule
+UPDATE AD_Val_Rule SET Code='AD_Ref_List.Value <> ''B'' AND AD_Ref_List.Value <> ''M''' WHERE AD_Val_Rule_ID=161
+;
diff --git a/posterita/commons/Migration/1.7.0/oracle/002_Terminals_newTableStructure.sql b/posterita/commons/Migration/1.7.0/oracle/002_Terminals_newTableStructure.sql
new file mode 100644
index 0000000000..0c4aaf8e63
--- /dev/null
+++ b/posterita/commons/Migration/1.7.0/oracle/002_Terminals_newTableStructure.sql
@@ -0,0 +1,629 @@
+-- Jun 2, 2008 9:19:48 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Table (AccessLevel,AD_Client_ID,AD_Org_ID,AD_Table_ID,CopyColumnsFromTable,Created,CreatedBy,EntityType,ImportTable,IsActive,IsChangeLog,IsDeleteable,IsHighVolume,IsSecurityEnabled,IsView,LoadSeq,Name,ReplicationType,TableName,Updated,UpdatedBy) VALUES ('1',0,0,52004,'N',TO_DATE('2008-06-02 21:19:47','YYYY-MM-DD HH24:MI:SS'),100,'A','N','Y','N','Y','N','N','N',0,'POS Terminal','L','U_POSTerminal',TO_DATE('2008-06-02 21:19:47','YYYY-MM-DD HH24:MI:SS'),100)
+;
+
+-- Jun 2, 2008 9:19:48 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Table_Trl (AD_Language,AD_Table_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Table_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Table t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Table_ID=52004 AND EXISTS (SELECT * FROM AD_Table_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Table_ID!=t.AD_Table_ID)
+;
+
+-- Jun 2, 2008 9:21:23 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52077,102,0,19,52004,129,'AD_Client_ID',TO_DATE('2008-06-02 21:21:22','YYYY-MM-DD HH24:MI:SS'),100,'@#AD_Client_ID@','Client/Tenant for this installation.','A',22,'A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','N','N','N','N','Y','N','N','N','N','Y','Client',0,TO_DATE('2008-06-02 21:21:22','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 9:21:23 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52077 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 9:22:32 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52078,113,0,19,52004,130,'AD_Org_ID',TO_DATE('2008-06-02 21:22:32','YYYY-MM-DD HH24:MI:SS'),100,'@#AD_Org_ID@','Organizational entity within client','A',22,'An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','N','N','N','N','Y','N','N','N','N','Y','Organization',0,TO_DATE('2008-06-02 21:22:32','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 9:22:32 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52078 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+
+-- Jun 2, 2008 9:23:51 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,52030,0,'AutoLock',TO_DATE('2008-06-02 21:23:51','YYYY-MM-DD HH24:MI:SS'),100,'Whether to automatically lock the terminal when till is closed','A','Y','Auto Lock','Auto Lock',TO_DATE('2008-06-02 21:23:51','YYYY-MM-DD HH24:MI:SS'),100)
+;
+
+-- Jun 2, 2008 9:23:51 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=52030 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
+;
+
+-- Jun 2, 2008 9:24:30 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52079,52030,0,20,52004,'AutoLock',TO_DATE('2008-06-02 21:24:30','YYYY-MM-DD HH24:MI:SS'),100,'N','Whether to automatically lock the terminal when till is closed','A',1,'Y','N','N','N','N','Y','N','N','N','N','Y','Auto Lock',0,TO_DATE('2008-06-02 21:24:30','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 9:24:30 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52079 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 9:26:51 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,52031,0,'CashBookTransferType',TO_DATE('2008-06-02 21:26:51','YYYY-MM-DD HH24:MI:SS'),100,'Where the money in the cash book should be transfered to. Either a Bank Account or another Cash Book','A','Y','Cash Book Transfer Type','Cash Book Transfer Type',TO_DATE('2008-06-02 21:26:51','YYYY-MM-DD HH24:MI:SS'),100)
+;
+
+-- Jun 2, 2008 9:26:51 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=52031 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
+;
+
+-- Jun 2, 2008 9:29:14 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Reference (AD_Client_ID,AD_Org_ID,AD_Reference_ID,Created,CreatedBy,Description,EntityType,IsActive,Name,Updated,UpdatedBy,ValidationType) VALUES (0,0,52002,TO_DATE('2008-06-02 21:29:14','YYYY-MM-DD HH24:MI:SS'),100,'Where money should be transfered to','A','Y','_TransferType',TO_DATE('2008-06-02 21:29:14','YYYY-MM-DD HH24:MI:SS'),100,'L')
+;
+
+-- Jun 2, 2008 9:29:14 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Reference_Trl (AD_Language,AD_Reference_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Reference_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Reference t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Reference_ID=52002 AND EXISTS (SELECT * FROM AD_Reference_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Reference_ID!=t.AD_Reference_ID)
+;
+
+-- Jun 2, 2008 9:29:42 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Ref_List (AD_Client_ID,AD_Org_ID,AD_Reference_ID,AD_Ref_List_ID,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,Value) VALUES (0,0,52002,52001,TO_DATE('2008-06-02 21:29:42','YYYY-MM-DD HH24:MI:SS'),100,'A','Y','Bank Account',TO_DATE('2008-06-02 21:29:42','YYYY-MM-DD HH24:MI:SS'),100,'B')
+;
+
+-- Jun 2, 2008 9:29:42 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Ref_List_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=52001 AND EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Ref_List_ID!=t.AD_Ref_List_ID)
+;
+
+-- Jun 2, 2008 9:29:51 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Ref_List (AD_Client_ID,AD_Org_ID,AD_Reference_ID,AD_Ref_List_ID,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,Value) VALUES (0,0,52002,52002,TO_DATE('2008-06-02 21:29:51','YYYY-MM-DD HH24:MI:SS'),100,'A','Y','CashBook',TO_DATE('2008-06-02 21:29:51','YYYY-MM-DD HH24:MI:SS'),100,'C')
+;
+
+-- Jun 2, 2008 9:29:51 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Ref_List_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=52002 AND EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Ref_List_ID!=t.AD_Ref_List_ID)
+;
+
+-- Jun 2, 2008 9:30:13 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52080,52031,0,17,52002,52004,'CashBookTransferType',TO_DATE('2008-06-02 21:30:13','YYYY-MM-DD HH24:MI:SS'),100,'Where the money in the cash book should be transfered to. Either a Bank Account or another Cash Book','A',1,'Y','N','N','N','N','Y','N','N','N','N','Y','Cash Book Transfer Type',0,TO_DATE('2008-06-02 21:30:13','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 9:30:13 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52080 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 9:32:22 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,52032,0,'CashTransferBankAccount_ID',TO_DATE('2008-06-02 21:32:22','YYYY-MM-DD HH24:MI:SS'),100,'Bank Account on which to transfer all Cash transactions','A','Y','Transfer Cash trx to','Transfer Cash trx to',TO_DATE('2008-06-02 21:32:22','YYYY-MM-DD HH24:MI:SS'),100)
+;
+
+-- Jun 2, 2008 9:32:22 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=52032 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
+;
+
+-- Jun 2, 2008 9:33:15 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Reference (AD_Client_ID,AD_Org_ID,AD_Reference_ID,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,ValidationType) VALUES (0,0,52003,TO_DATE('2008-06-02 21:33:15','YYYY-MM-DD HH24:MI:SS'),100,'A','Y','C_BankAccount',TO_DATE('2008-06-02 21:33:15','YYYY-MM-DD HH24:MI:SS'),100,'T')
+;
+
+-- Jun 2, 2008 9:33:15 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Reference_Trl (AD_Language,AD_Reference_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Reference_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Reference t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Reference_ID=52003 AND EXISTS (SELECT * FROM AD_Reference_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Reference_ID!=t.AD_Reference_ID)
+;
+
+-- Jun 2, 2008 9:33:52 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Ref_Table (AD_Client_ID,AD_Display,AD_Key,AD_Org_ID,AD_Reference_ID,AD_Table_ID,Created,CreatedBy,EntityType,IsActive,IsValueDisplayed,Updated,UpdatedBy,WhereClause) VALUES (0,3074,3077,0,52003,297,TO_DATE('2008-06-02 21:33:52','YYYY-MM-DD HH24:MI:SS'),100,'A','Y','N',TO_DATE('2008-06-02 21:33:52','YYYY-MM-DD HH24:MI:SS'),100,'C_BankAccount.IsActive=''Y''')
+;
+
+-- Jun 2, 2008 9:34:10 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52081,52032,0,18,52003,52004,'CashTransferBankAccount_ID',TO_DATE('2008-06-02 21:34:10','YYYY-MM-DD HH24:MI:SS'),100,'Bank Account on which to transfer all Cash transactions','A',22,'Y','N','N','N','N','N','N','N','N','N','Y','Transfer Cash trx to',0,TO_DATE('2008-06-02 21:34:10','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 9:34:10 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52081 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 9:35:28 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,52033,0,'CashTransferCashBook_ID',TO_DATE('2008-06-02 21:35:28','YYYY-MM-DD HH24:MI:SS'),100,'Cash Book on which to transfer all Cash transactions','A','Y','Transfer Cash trx to','Transfer Cash trx to',TO_DATE('2008-06-02 21:35:28','YYYY-MM-DD HH24:MI:SS'),100)
+;
+
+-- Jun 2, 2008 9:35:28 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=52033 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
+;
+
+-- Jun 2, 2008 9:36:18 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Reference (AD_Client_ID,AD_Org_ID,AD_Reference_ID,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,ValidationType) VALUES (0,0,52004,TO_DATE('2008-06-02 21:36:18','YYYY-MM-DD HH24:MI:SS'),100,'A','Y','C_CashBook',TO_DATE('2008-06-02 21:36:18','YYYY-MM-DD HH24:MI:SS'),100,'T')
+;
+
+-- Jun 2, 2008 9:36:18 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Reference_Trl (AD_Language,AD_Reference_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Reference_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Reference t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Reference_ID=52004 AND EXISTS (SELECT * FROM AD_Reference_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Reference_ID!=t.AD_Reference_ID)
+;
+
+-- Jun 2, 2008 9:36:54 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Ref_Table (AD_Client_ID,AD_Display,AD_Key,AD_Org_ID,AD_Reference_ID,AD_Table_ID,Created,CreatedBy,EntityType,IsActive,IsValueDisplayed,Updated,UpdatedBy,WhereClause) VALUES (0,5268,5260,0,52004,408,TO_DATE('2008-06-02 21:36:54','YYYY-MM-DD HH24:MI:SS'),100,'A','Y','N',TO_DATE('2008-06-02 21:36:54','YYYY-MM-DD HH24:MI:SS'),100,'C_CashBook.IsActive=''Y''')
+;
+
+-- Jun 2, 2008 9:37:11 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52082,52033,0,18,52004,52004,'CashTransferCashBook_ID',TO_DATE('2008-06-02 21:37:11','YYYY-MM-DD HH24:MI:SS'),100,'Cash Book on which to transfer all Cash transactions','A',22,'Y','N','N','N','N','N','N','N','N','N','Y','Transfer Cash trx to',0,TO_DATE('2008-06-02 21:37:11','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 9:37:11 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52082 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 9:37:53 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52083,1463,0,19,52004,'C_CashBook_ID',TO_DATE('2008-06-02 21:37:53','YYYY-MM-DD HH24:MI:SS'),100,'Cash Book for recording petty cash transactions','A',22,'The Cash Book identifies a unique cash book. The cash book is used to record cash transactions.','Y','N','N','N','N','Y','N','N','N','N','Y','Cash Book',0,TO_DATE('2008-06-02 21:37:53','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 9:37:53 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52083 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 9:39:00 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,52034,0,'C_CashBPartner_ID',TO_DATE('2008-06-02 21:39:00','YYYY-MM-DD HH24:MI:SS'),100,'BPartner to be used for Cash transactions','A','Y','Cash BPartner','Cash BPartner',TO_DATE('2008-06-02 21:39:00','YYYY-MM-DD HH24:MI:SS'),100)
+;
+
+-- Jun 2, 2008 9:39:00 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=52034 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
+;
+
+-- Jun 2, 2008 9:39:32 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52084,52034,0,18,173,52004,'C_CashBPartner_ID',TO_DATE('2008-06-02 21:39:32','YYYY-MM-DD HH24:MI:SS'),100,'BPartner to be used for Cash transactions','A',22,'Y','N','N','N','N','Y','N','N','N','N','Y','Cash BPartner',0,TO_DATE('2008-06-02 21:39:32','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 9:39:32 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52084 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 9:41:11 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,52035,0,'Check_BankAccount_ID',TO_DATE('2008-06-02 21:41:11','YYYY-MM-DD HH24:MI:SS'),100,'Bank Account to be used for processing Check transactions','A','Y','Check Bank Account','Check Bank Account',TO_DATE('2008-06-02 21:41:11','YYYY-MM-DD HH24:MI:SS'),100)
+;
+
+-- Jun 2, 2008 9:41:11 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=52035 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
+;
+
+-- Jun 2, 2008 9:41:34 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52085,52035,0,18,52003,52004,'Check_BankAccount_ID',TO_DATE('2008-06-02 21:41:34','YYYY-MM-DD HH24:MI:SS'),100,'Bank Account to be used for processing Check transactions','A',22,'Y','N','N','N','N','N','N','N','N','N','Y','Check Bank Account',0,TO_DATE('2008-06-02 21:41:34','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 9:41:34 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52085 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 9:42:51 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,52036,0,'CheckTransferBankAccount_ID',TO_DATE('2008-06-02 21:42:50','YYYY-MM-DD HH24:MI:SS'),100,'Bank account on which to transfer Check transactions','A','Y','Tranfer Check trx to','Transfer Check trx to',TO_DATE('2008-06-02 21:42:50','YYYY-MM-DD HH24:MI:SS'),100)
+;
+
+-- Jun 2, 2008 9:42:51 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=52036 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
+;
+
+-- Jun 2, 2008 9:43:16 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52086,52036,0,18,52003,52004,'CheckTransferBankAccount_ID',TO_DATE('2008-06-02 21:43:15','YYYY-MM-DD HH24:MI:SS'),100,'Bank account on which to transfer Check transactions','A',22,'Y','N','N','N','N','N','N','N','N','N','Y','Tranfer Check trx to',0,TO_DATE('2008-06-02 21:43:15','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 9:43:16 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52086 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 9:44:12 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,52037,0,'CheckTransferType',TO_DATE('2008-06-02 21:44:12','YYYY-MM-DD HH24:MI:SS'),100,'A','Y','Check Transfer Type','Check Transfer Type',TO_DATE('2008-06-02 21:44:12','YYYY-MM-DD HH24:MI:SS'),100)
+;
+
+-- Jun 2, 2008 9:44:12 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=52037 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
+;
+
+-- Jun 2, 2008 9:44:39 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52087,52037,0,17,52002,52004,'CheckTransferType',TO_DATE('2008-06-02 21:44:39','YYYY-MM-DD HH24:MI:SS'),100,'A',1,'Y','N','N','N','N','N','N','N','N','N','Y','Check Transfer Type',0,TO_DATE('2008-06-02 21:44:39','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 9:44:39 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52087 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 9:46:05 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,52038,0,'Card_BankAccount_ID',TO_DATE('2008-06-02 21:46:05','YYYY-MM-DD HH24:MI:SS'),100,'Bank Account on which card transactions will be processed','A','Y','Card Bank Account','Card Bank Account',TO_DATE('2008-06-02 21:46:05','YYYY-MM-DD HH24:MI:SS'),100)
+;
+
+-- Jun 2, 2008 9:46:05 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=52038 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
+;
+
+-- Jun 2, 2008 9:46:28 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52088,52038,0,18,52003,52004,'Card_BankAccount_ID',TO_DATE('2008-06-02 21:46:28','YYYY-MM-DD HH24:MI:SS'),100,'Bank Account on which card transactions will be processed','A',22,'Y','N','N','N','N','N','N','N','N','N','Y','Card Bank Account',0,TO_DATE('2008-06-02 21:46:28','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 9:46:28 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52088 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 9:47:33 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,52039,0,'CardTransferBankAccount_ID',TO_DATE('2008-06-02 21:47:33','YYYY-MM-DD HH24:MI:SS'),100,'Bank account on which to transfer Card transactions','A','Y','Transfer Card trx to','Transfer Card trx to',TO_DATE('2008-06-02 21:47:33','YYYY-MM-DD HH24:MI:SS'),100)
+;
+
+-- Jun 2, 2008 9:47:33 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=52039 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
+;
+
+-- Jun 2, 2008 9:47:59 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52089,52039,0,18,52003,52004,'CardTransferBankAccount_ID',TO_DATE('2008-06-02 21:47:59','YYYY-MM-DD HH24:MI:SS'),100,'Bank account on which to transfer Card transactions','A',22,'Y','N','N','N','N','N','N','N','N','N','Y','Transfer Card trx to',0,TO_DATE('2008-06-02 21:47:59','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 9:47:59 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52089 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 9:48:55 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,52040,0,'CardTransferCashBook_ID',TO_DATE('2008-06-02 21:48:55','YYYY-MM-DD HH24:MI:SS'),100,'Cash Book on which to transfer all Card transactions','A','Y','Transfer Card trx to','Transfer Card trx to',TO_DATE('2008-06-02 21:48:55','YYYY-MM-DD HH24:MI:SS'),100)
+;
+
+-- Jun 2, 2008 9:48:55 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=52040 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
+;
+
+-- Jun 2, 2008 9:49:35 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52090,52040,0,18,52004,52004,'CardTransferCashBook_ID',TO_DATE('2008-06-02 21:49:35','YYYY-MM-DD HH24:MI:SS'),100,'Cash Book on which to transfer all Card transactions','A',22,'Y','N','N','N','N','N','N','N','N','N','Y','Transfer Card trx to',0,TO_DATE('2008-06-02 21:49:35','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 9:49:35 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52090 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 9:50:21 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,52041,0,'CardTransferType',TO_DATE('2008-06-02 21:50:21','YYYY-MM-DD HH24:MI:SS'),100,'A','Y','Card Transfer Type','Card Transfer Type',TO_DATE('2008-06-02 21:50:21','YYYY-MM-DD HH24:MI:SS'),100)
+;
+
+-- Jun 2, 2008 9:50:21 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=52041 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
+;
+
+-- Jun 2, 2008 9:50:40 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52091,52041,0,17,52002,52004,'CardTransferType',TO_DATE('2008-06-02 21:50:40','YYYY-MM-DD HH24:MI:SS'),100,'A',1,'Y','N','N','N','N','N','N','N','N','N','Y','Card Transfer Type',0,TO_DATE('2008-06-02 21:50:40','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 9:50:40 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52091 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 9:51:10 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52092,245,0,16,52004,'Created',TO_DATE('2008-06-02 21:51:10','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was created','A',7,'The Created field indicates the date that this record was created.','Y','N','N','N','N','Y','N','N','N','N','N','Created',0,TO_DATE('2008-06-02 21:51:10','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 9:51:10 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52092 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 9:52:01 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52093,246,0,18,110,52004,'CreatedBy',TO_DATE('2008-06-02 21:52:01','YYYY-MM-DD HH24:MI:SS'),100,'User who created this records','A',22,'The Created By field indicates the user who created this record.','Y','N','N','N','N','Y','N','N','N','N','N','Created By',0,TO_DATE('2008-06-02 21:52:01','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 9:52:01 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52093 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 9:53:40 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,52042,0,'C_TemplateBPartner_ID',TO_DATE('2008-06-02 21:53:39','YYYY-MM-DD HH24:MI:SS'),100,'BPartner that is to be used as template when new customers are created','A','Y','Template BPartner','Template BPartner',TO_DATE('2008-06-02 21:53:39','YYYY-MM-DD HH24:MI:SS'),100)
+;
+
+-- Jun 2, 2008 9:53:40 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=52042 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
+;
+
+-- Jun 2, 2008 9:54:16 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52094,52042,0,18,173,52004,'C_TemplateBPartner_ID',TO_DATE('2008-06-02 21:54:16','YYYY-MM-DD HH24:MI:SS'),100,'BPartner that is to be used as template when new customers are created','A',22,'Y','N','N','N','N','N','N','N','N','N','Y','Template BPartner',0,TO_DATE('2008-06-02 21:54:16','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 9:54:16 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52094 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 9:55:01 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52095,275,0,10,52004,'Description',TO_DATE('2008-06-02 21:55:01','YYYY-MM-DD HH24:MI:SS'),100,'Optional short description of the record','A',255,'A description is limited to 255 characters.','Y','N','N','N','N','N','N','N','N','N','Y','Description',0,TO_DATE('2008-06-02 21:55:01','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 9:55:01 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52095 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 9:55:37 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52096,326,0,14,52004,'Help',TO_DATE('2008-06-02 21:55:37','YYYY-MM-DD HH24:MI:SS'),100,'Comment or Hint','A',2000,'The Help field contains a hint, comment or help about the use of this item.','Y','N','N','N','N','N','N','N','N','N','Y','Comment/Help',0,TO_DATE('2008-06-02 21:55:37','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 9:55:37 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52096 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 9:56:03 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52097,348,0,20,52004,'IsActive',TO_DATE('2008-06-02 21:56:02','YYYY-MM-DD HH24:MI:SS'),100,'Y','The record is active in the system','A',1,'There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports.
+There are two reasons for de-activating and not deleting records:
+(1) The system requires the record for audit purposes.
+(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','N','N','N','N','N','N','N','N','N','Y','Active',0,TO_DATE('2008-06-02 21:56:02','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 9:56:03 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52097 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 9:56:55 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,52043,0,'LastLockTime',TO_DATE('2008-06-02 21:56:55','YYYY-MM-DD HH24:MI:SS'),100,'Last time at which the terminal was locked','A','Y','Last Lock Time','Last Lock Time',TO_DATE('2008-06-02 21:56:55','YYYY-MM-DD HH24:MI:SS'),100)
+;
+
+-- Jun 2, 2008 9:56:55 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=52043 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
+;
+
+-- Jun 2, 2008 9:57:13 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52098,52043,0,16,52004,'LastLockTime',TO_DATE('2008-06-02 21:57:13','YYYY-MM-DD HH24:MI:SS'),100,'Last time at which the terminal was locked','A',7,'Y','N','N','N','N','N','N','N','N','N','Y','Last Lock Time',0,TO_DATE('2008-06-02 21:57:13','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 9:57:13 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52098 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 9:58:06 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,52044,0,'Locked',TO_DATE('2008-06-02 21:58:06','YYYY-MM-DD HH24:MI:SS'),100,'Whether the terminal is locked','A','Y','Locked','Locked',TO_DATE('2008-06-02 21:58:06','YYYY-MM-DD HH24:MI:SS'),100)
+;
+
+-- Jun 2, 2008 9:58:06 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=52044 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
+;
+
+-- Jun 2, 2008 9:58:26 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52099,52044,0,20,52004,'Locked',TO_DATE('2008-06-02 21:58:26','YYYY-MM-DD HH24:MI:SS'),100,'N','Whether the terminal is locked','A',1,'Y','N','N','N','N','N','N','N','N','N','Y','Locked',0,TO_DATE('2008-06-02 21:58:26','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 9:58:26 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52099 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 9:59:13 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,52045,0,'LockTime',TO_DATE('2008-06-02 21:59:13','YYYY-MM-DD HH24:MI:SS'),100,'Time in minutes the terminal should be kept in a locked state.','A','Y','Lock Time','Lock Time',TO_DATE('2008-06-02 21:59:13','YYYY-MM-DD HH24:MI:SS'),100)
+;
+
+-- Jun 2, 2008 9:59:13 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=52045 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
+;
+
+-- Jun 2, 2008 9:59:40 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,ValueMin,Version) VALUES (0,52100,52045,0,11,52004,'LockTime',TO_DATE('2008-06-02 21:59:40','YYYY-MM-DD HH24:MI:SS'),100,'Time in minutes the terminal should be kept in a locked state.','A',10,'Y','N','N','N','N','N','N','N','N','N','Y','Lock Time',0,TO_DATE('2008-06-02 21:59:40','YYYY-MM-DD HH24:MI:SS'),100,'0',0)
+;
+
+-- Jun 2, 2008 9:59:40 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52100 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 10:00:25 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52101,459,0,19,52004,'M_Warehouse_ID',TO_DATE('2008-06-02 22:00:24','YYYY-MM-DD HH24:MI:SS'),100,'Storage Warehouse and Service Point','A',22,'The Warehouse identifies a unique Warehouse where products are stored or Services are provided.','Y','N','N','N','N','N','N','N','N','N','Y','Warehouse',0,TO_DATE('2008-06-02 22:00:24','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 10:00:25 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52101 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 10:00:44 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52102,469,0,10,52004,'Name',TO_DATE('2008-06-02 22:00:44','YYYY-MM-DD HH24:MI:SS'),100,'Alphanumeric identifier of the entity','A',60,'The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.','Y','N','N','N','N','N','N','N','N','N','Y','Name',0,TO_DATE('2008-06-02 22:00:44','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 10:00:44 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52102 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 10:02:07 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52103,480,0,18,166,52004,'PO_PriceList_ID',TO_DATE('2008-06-02 22:02:07','YYYY-MM-DD HH24:MI:SS'),100,'Price List used by this Business Partner','A',22,'Identifies the price list used by a Vendor for products purchased by this organization.','Y','N','N','N','N','N','N','N','N','N','Y','Purchase Pricelist',0,TO_DATE('2008-06-02 22:02:07','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 10:02:07 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52103 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 10:02:37 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52104,2051,0,10,52004,'PrinterName',TO_DATE('2008-06-02 22:02:37','YYYY-MM-DD HH24:MI:SS'),100,'Name of the Printer','A',60,'Internal (Opereating System) Name of the Printer; Please mote that the printer name may be different on different clients. Enter a printer name, which applies to ALL clients (e.g. printer on a server).
+If none is entered, the default printer is used. You specify your default printer when you log in. You can also change the default printer in Preferences.','Y','N','N','N','N','N','N','N','N','N','Y','Printer Name',0,TO_DATE('2008-06-02 22:02:37','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 10:02:37 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52104 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 10:03:16 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52105,1063,0,18,316,52004,'SalesRep_ID',TO_DATE('2008-06-02 22:03:16','YYYY-MM-DD HH24:MI:SS'),100,'Sales Representative or Company Agent','A',22,'The Sales Representative indicates the Sales Rep for this Region. Any Sales Rep must be a valid internal user.','Y','N','N','N','N','N','N','N','N','N','Y','Sales Representative',0,TO_DATE('2008-06-02 22:03:16','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 10:03:16 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52105 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 10:04:15 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,52046,0,'SO_PriceList_ID',TO_DATE('2008-06-02 22:04:15','YYYY-MM-DD HH24:MI:SS'),100,'A','Y','Sales Pricelist','Sales Pricelist',TO_DATE('2008-06-02 22:04:15','YYYY-MM-DD HH24:MI:SS'),100)
+;
+
+-- Jun 2, 2008 10:04:15 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=52046 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
+;
+
+-- Jun 2, 2008 10:04:46 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52106,52046,0,18,166,52004,'SO_PriceList_ID',TO_DATE('2008-06-02 22:04:46','YYYY-MM-DD HH24:MI:SS'),100,'A',22,'Y','N','N','N','N','N','N','N','N','N','Y','Sales Pricelist',0,TO_DATE('2008-06-02 22:04:46','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 10:04:46 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52106 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 10:05:16 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,52047,0,'UnlockingTime',TO_DATE('2008-06-02 22:05:16','YYYY-MM-DD HH24:MI:SS'),100,'Time at which the terminal should be unlocked','A','Y','UnlockingTime','UnlockingTime',TO_DATE('2008-06-02 22:05:16','YYYY-MM-DD HH24:MI:SS'),100)
+;
+
+-- Jun 2, 2008 10:05:16 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=52047 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
+;
+
+-- Jun 2, 2008 10:05:34 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52107,52047,0,16,52004,'UnlockingTime',TO_DATE('2008-06-02 22:05:34','YYYY-MM-DD HH24:MI:SS'),100,'Time at which the terminal should be unlocked','A',7,'Y','N','N','N','N','N','N','N','N','N','Y','UnlockingTime',0,TO_DATE('2008-06-02 22:05:34','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 10:05:34 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52107 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 10:05:58 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52108,607,0,16,52004,'Updated',TO_DATE('2008-06-02 22:05:58','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was updated','A',7,'The Updated field indicates the date that this record was updated.','Y','N','N','N','N','Y','N','N','N','N','N','Updated',0,TO_DATE('2008-06-02 22:05:58','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 10:05:58 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52108 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 10:06:30 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52109,608,0,18,110,52004,'UpdatedBy',TO_DATE('2008-06-02 22:06:30','YYYY-MM-DD HH24:MI:SS'),100,'User who updated this records','A',22,'The Updated By field indicates the user who updated this record.','Y','N','N','N','N','N','N','N','N','N','Y','Updated By',0,TO_DATE('2008-06-02 22:06:30','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 10:06:30 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52109 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 10:29:01 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,52048,0,'U_POSTerminal_ID',TO_DATE('2008-06-02 22:29:01','YYYY-MM-DD HH24:MI:SS'),100,'A','Y','POS Terminal','POS Terminal',TO_DATE('2008-06-02 22:29:01','YYYY-MM-DD HH24:MI:SS'),100)
+;
+
+-- Jun 2, 2008 10:29:01 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=52048 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
+;
+
+-- Jun 2, 2008 10:29:54 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52110,52048,0,13,52004,'U_POSTerminal_ID',TO_DATE('2008-06-02 22:29:54','YYYY-MM-DD HH24:MI:SS'),100,'A',22,'Y','N','N','N','Y','Y','N','N','N','N','N','POS Terminal',0,TO_DATE('2008-06-02 22:29:54','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 10:29:54 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52110 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 10:48:55 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,52049,0,'CheckTransferCashBook_ID',TO_DATE('2008-06-02 22:48:55','YYYY-MM-DD HH24:MI:SS'),100,'Cash Book on which to transfer all Check transactions','A','Y','Transfer Check trx to','Transfer Check trx to',TO_DATE('2008-06-02 22:48:55','YYYY-MM-DD HH24:MI:SS'),100)
+;
+
+-- Jun 2, 2008 10:48:55 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=52049 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
+;
+
+-- Jun 2, 2008 10:49:35 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52111,52049,0,18,52004,52004,'CheckTransferCashBook_ID',TO_DATE('2008-06-02 22:49:35','YYYY-MM-DD HH24:MI:SS'),100,'Cash Book on which to transfer all Check transactions','A',22,'Y','N','N','N','N','N','N','N','N','N','Y','Transfer Check trx to',0,TO_DATE('2008-06-02 22:49:35','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 10:49:35 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52111 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 3, 2008 2:27:59 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (0,0,52006,TO_DATE('2008-06-03 14:27:59','YYYY-MM-DD HH24:MI:SS'),100,1000000,100,'Table U_POSTerminal',1,'Y','N','Y','Y','U_POSTerminal','N',1000000,TO_DATE('2008-06-03 14:27:59','YYYY-MM-DD HH24:MI:SS'),100)
+;
\ No newline at end of file
diff --git a/posterita/commons/Migration/1.7.0/oracle/003_Terminals_TransferConfiguration.sql b/posterita/commons/Migration/1.7.0/oracle/003_Terminals_TransferConfiguration.sql
new file mode 100644
index 0000000000..79f6330932
--- /dev/null
+++ b/posterita/commons/Migration/1.7.0/oracle/003_Terminals_TransferConfiguration.sql
@@ -0,0 +1,75 @@
+ALTER TABLE AD_OrgInfo ADD TransferBank_ID NUMBER(10);
+ALTER TABLE AD_OrgInfo ADD TransferCashBook_ID NUMBER(10);
+
+ALTER TABLE AD_OrgInfo
+ ADD CONSTRAINT "cbank_adorginfo"
+ FOREIGN KEY(TransferBank_ID)
+ REFERENCES C_Bank(C_Bank_ID);
+
+
+ALTER TABLE AD_OrgInfo
+ ADD CONSTRAINT "ccashbook_adorginfo"
+ FOREIGN KEY(TransferCashBook_ID)
+ REFERENCES C_CashBook(C_CashBook_ID);
+
+
+
+
+-- May 26, 2008 23:25:51 AM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,52028,0,'TransferBank_ID',TO_DATE('2008-05-26 23:25:50','YYYY-MM-DD HH24:MI:SS'),100,'Bank account depending on currency will be used from this bank for doing transfers','D','Y','Bank for transfers','Bank for transfers',TO_DATE('2008-05-26 23:25:50','YYYY-MM-DD HH24:MI:SS'),100)
+;
+
+-- May 26, 2008 23:25:51 AM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=52028 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
+;
+
+-- May 26, 2008 23:26:38 AM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Reference (AD_Client_ID,AD_Org_ID,AD_Reference_ID,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,ValidationType) VALUES (0,0,52001,TO_DATE('2008-05-26 23:26:38','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','C_Bank',TO_DATE('2008-05-26 23:26:38','YYYY-MM-DD HH24:MI:SS'),100,'T')
+;
+
+-- May 26, 2008 23:26:38 AM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Reference_Trl (AD_Language,AD_Reference_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Reference_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Reference t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Reference_ID=52001 AND EXISTS (SELECT * FROM AD_Reference_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Reference_ID!=t.AD_Reference_ID)
+;
+
+-- May 26, 2008 23:28:08 AM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Ref_Table (AD_Client_ID,AD_Display,AD_Key,AD_Org_ID,AD_Reference_ID,AD_Table_ID,Created,CreatedBy,EntityType,IsActive,IsValueDisplayed,Updated,UpdatedBy,WhereClause) VALUES (0,3039,3031,0,52001,296,TO_DATE('2008-05-26 23:28:08','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','N',TO_DATE('2008-05-26 23:28:08','YYYY-MM-DD HH24:MI:SS'),100,'C_Bank.IsOwnBank=''Y''')
+;
+
+-- May 26, 2008 23:28:33 AM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52075,52028,0,18,52001,228,'TransferBank_ID',TO_DATE('2008-05-26 23:28:33','YYYY-MM-DD HH24:MI:SS'),100,'Bank account depending on currency will be used from this bank for doing transfers','D',22,'Y','N','N','N','N','N','N','N','N','N','Y','Bank for transfers',0,TO_DATE('2008-05-26 23:28:33','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- May 26, 2008 23:28:33 AM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52075 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+
+
+-- Cash Book
+
+-- May 26, 2008 23:29:40 AM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,52029,0,'TransferCashBook_ID',TO_DATE('2008-05-23 23:29:40','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','CashBook for transfers','CashBook for transfers',TO_DATE('2008-05-23 23:29:40','YYYY-MM-DD HH24:MI:SS'),100)
+;
+
+-- May 26, 2008 23:29:40 AM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=52029 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
+;
+
+-- May 26, 2008 23:30:32 AM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52076,52029,0,18,52004,228,'TransferCashBook_ID',TO_DATE('2008-05-23 23:30:31','YYYY-MM-DD HH24:MI:SS'),100,'D',22,'Y','N','N','N','N','N','N','N','N','N','Y','CashBook for transfers',0,TO_DATE('2008-05-23 23:30:31','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- May 26, 2008 23:30:32 AM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52076 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
diff --git a/posterita/commons/Migration/1.7.0/oracle/004_Terminals_newTableDDL.sql b/posterita/commons/Migration/1.7.0/oracle/004_Terminals_newTableDDL.sql
new file mode 100644
index 0000000000..61e4efab46
--- /dev/null
+++ b/posterita/commons/Migration/1.7.0/oracle/004_Terminals_newTableDDL.sql
@@ -0,0 +1,4 @@
+-- Jun 2, 2008 23:58:02 AM GMT+04:00
+-- Default comment for updating dictionary
+CREATE TABLE U_POSTerminal (AD_Client_ID NUMBER(10) DEFAULT NULL NOT NULL, AD_Org_ID NUMBER(10) DEFAULT NULL NOT NULL, AutoLock CHAR(1) DEFAULT 'N' CHECK (AutoLock IN ('Y','N')) NOT NULL, Card_BankAccount_ID NUMBER(10), CardTransferBankAccount_ID NUMBER(10), CardTransferCashBook_ID NUMBER(10), CardTransferType CHAR(1), CashBookTransferType CHAR(1) NOT NULL, CashTransferBankAccount_ID NUMBER(10), CashTransferCashBook_ID NUMBER(10), C_CashBook_ID NUMBER(10) NOT NULL, C_CashBPartner_ID NUMBER(10) NOT NULL, Check_BankAccount_ID NUMBER(10), CheckTransferBankAccount_ID NUMBER(10), CheckTransferCashBook_ID NUMBER(10), CheckTransferType CHAR(1), Created DATE NOT NULL, CreatedBy NUMBER(10) NOT NULL, C_TemplateBPartner_ID NUMBER(10), Description NVARCHAR2(255), Help NVARCHAR2(2000), IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')), LastLockTime DATE, Locked CHAR(1) DEFAULT 'N' CHECK (Locked IN ('Y','N')), LockTime NUMBER(10), M_Warehouse_ID NUMBER(10), Name NVARCHAR2(60), PO_PriceList_ID NUMBER(10), PrinterName NVARCHAR2(60), SalesRep_ID NUMBER(10), SO_PriceList_ID NUMBER(10), UnlockingTime DATE, Updated DATE NOT NULL, UpdatedBy NUMBER(10), U_POSTerminal_ID NUMBER(10) NOT NULL, CONSTRAINT U_POSTerminal_Key PRIMARY KEY (U_POSTerminal_ID))
+;
\ No newline at end of file
diff --git a/posterita/commons/Migration/1.7.0/oracle/005_Messages.sql b/posterita/commons/Migration/1.7.0/oracle/005_Messages.sql
new file mode 100644
index 0000000000..3f4c27d750
--- /dev/null
+++ b/posterita/commons/Migration/1.7.0/oracle/005_Messages.sql
@@ -0,0 +1,190 @@
+-- Jun 9, 2008 1:24:35 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,52452,0,TO_DATE('2008-06-09 13:24:35','YYYY-MM-DD HH24:MI:SS'),100,'A','Y','Organisation','I',TO_DATE('2008-06-09 13:24:35','YYYY-MM-DD HH24:MI:SS'),100,'smenu.organisation')
+;
+
+-- Jun 9, 2008 1:25:48 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,52453,0,TO_DATE('2008-06-09 13:25:48','YYYY-MM-DD HH24:MI:SS'),100,'A','Y','Terminals','I',TO_DATE('2008-06-09 13:25:48','YYYY-MM-DD HH24:MI:SS'),100,'smenu.terminal')
+;
+
+-- Jun 9, 2008 1:26:06 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,52454,0,TO_DATE('2008-06-09 13:26:06','YYYY-MM-DD HH24:MI:SS'),100,'A','Y','Cash Books','I',TO_DATE('2008-06-09 13:26:06','YYYY-MM-DD HH24:MI:SS'),100,'smenu.cashbook')
+;
+
+-- Jun 9, 2008 1:26:30 PM GMT+04:00
+-- Default comment for updating dictionary
+UPDATE AD_Message SET MsgTip='Maintain POS Terminals',Updated=TO_DATE('2008-06-09 13:26:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=52453
+;
+
+-- Jun 9, 2008 1:26:39 PM GMT+04:00
+-- Default comment for updating dictionary
+UPDATE AD_Message SET MsgTip='Maintain Cash Books',Updated=TO_DATE('2008-06-09 13:26:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=52454
+;
+
+-- Jun 9, 2008 1:27:15 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,52455,0,TO_DATE('2008-06-09 13:27:15','YYYY-MM-DD HH24:MI:SS'),100,'A','Y','Completed','I',TO_DATE('2008-06-09 13:27:15','YYYY-MM-DD HH24:MI:SS'),100,'document.status.completed')
+;
+
+-- Jun 9, 2008 1:28:05 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,52456,0,TO_DATE('2008-06-09 13:28:04','YYYY-MM-DD HH24:MI:SS'),100,'A','Y','Drafted','I',TO_DATE('2008-06-09 13:28:04','YYYY-MM-DD HH24:MI:SS'),100,'document.status.drafted')
+;
+
+-- Jun 9, 2008 1:28:27 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,52457,0,TO_DATE('2008-06-09 13:28:27','YYYY-MM-DD HH24:MI:SS'),100,'A','Y','In Progress','I',TO_DATE('2008-06-09 13:28:27','YYYY-MM-DD HH24:MI:SS'),100,'document.status.inprogress')
+;
+
+-- Jun 9, 2008 1:28:44 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,52458,0,TO_DATE('2008-06-09 13:28:44','YYYY-MM-DD HH24:MI:SS'),100,'A','Y','Invalid','I',TO_DATE('2008-06-09 13:28:44','YYYY-MM-DD HH24:MI:SS'),100,'document.status.invalid')
+;
+
+-- Jun 9, 2008 1:28:58 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,52459,0,TO_DATE('2008-06-09 13:28:58','YYYY-MM-DD HH24:MI:SS'),100,'A','Y','Closed','I',TO_DATE('2008-06-09 13:28:58','YYYY-MM-DD HH24:MI:SS'),100,'document.status.closed')
+;
+
+-- Jun 9, 2008 1:29:15 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,52460,0,TO_DATE('2008-06-09 13:29:15','YYYY-MM-DD HH24:MI:SS'),100,'A','Y','Cash','I',TO_DATE('2008-06-09 13:29:15','YYYY-MM-DD HH24:MI:SS'),100,'payment.rule.cash')
+;
+
+-- Jun 9, 2008 1:29:27 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,52461,0,TO_DATE('2008-06-09 13:29:27','YYYY-MM-DD HH24:MI:SS'),100,'A','Y','Card','I',TO_DATE('2008-06-09 13:29:27','YYYY-MM-DD HH24:MI:SS'),100,'payment.rule.card')
+;
+
+-- Jun 9, 2008 1:29:42 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,52462,0,TO_DATE('2008-06-09 13:29:41','YYYY-MM-DD HH24:MI:SS'),100,'A','Y','Cheque','I',TO_DATE('2008-06-09 13:29:41','YYYY-MM-DD HH24:MI:SS'),100,'payment.rule.cheque')
+;
+
+-- Jun 9, 2008 1:29:55 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,52463,0,TO_DATE('2008-06-09 13:29:55','YYYY-MM-DD HH24:MI:SS'),100,'A','Y','Mixed','I',TO_DATE('2008-06-09 13:29:55','YYYY-MM-DD HH24:MI:SS'),100,'payment.rule.mixed')
+;
+
+-- Jun 9, 2008 1:30:14 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,52464,0,TO_DATE('2008-06-09 13:30:13','YYYY-MM-DD HH24:MI:SS'),100,'A','Y','Credit','I',TO_DATE('2008-06-09 13:30:13','YYYY-MM-DD HH24:MI:SS'),100,'payment.rule.credit')
+;
+
+-- Jun 9, 2008 1:30:46 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,52465,0,TO_DATE('2008-06-09 13:30:46','YYYY-MM-DD HH24:MI:SS'),100,'A','Y','Amount Paid','I',TO_DATE('2008-06-09 13:30:46','YYYY-MM-DD HH24:MI:SS'),100,'AmountPaid')
+;
+
+---------------------------------------------------------------------------------------------------------------------------------------------------
+
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52470 , 0, 0, 'Y', TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'html', 'HTML', ' ', 'I', 'D');
+
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52471 , 0, 0, 'Y', TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'pdf', 'PDF', ' ', 'I', 'D');
+
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52472 , 0, 0, 'Y', TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'csv', 'CSV', ' ', 'I', 'D');
+
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52473 , 0, 0, 'Y', TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'smenu.sales.report', 'Sales Report', ' ', 'I', 'D');
+
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52474 , 0, 0, 'Y', TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'smenu.best.selling.items', 'Best Selling Items', ' ', 'I', 'D');
+
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52475 , 0, 0, 'Y', TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'smenu.stock.sales.report', 'Stock Sales Report', ' ', 'I', 'D');
+
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52476 , 0, 0, 'Y', TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'smenu.transfer.stock', 'Stock Transfer', ' ', 'I', 'D');
+
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52477 , 0, 0, 'Y', TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'smenu.inventory.move', 'Inventory Move', ' ', 'I', 'D');
+
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52478 , 0, 0, 'Y', TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'smenu.move.confirmation', 'Move Confirmation', ' ', 'I', 'D');
+
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52479 , 0, 0, 'Y', TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'smenu.barcode.printing', 'Barcode Printing', ' ', 'I', 'D');
+
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52480 , 0, 0, 'Y', TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'basePriceList', 'Base Price List', ' ', 'I', 'D');
+
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52481, 0, 0, 'Y', TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'isDeleteOldRecords', 'Delete Old Records', ' ', 'I', 'D');
+
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52482, 0, 0, 'Y', TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'sales.price.list', 'Sales Price List', ' ', 'I', 'D');
+
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52483, 0, 0, 'Y', TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'purchase.price.list', 'Purchase Price List', ' ', 'I', 'D');
+
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52484, 0, 0, 'Y', TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'pos.terminal', 'Terminal', ' ', 'I', 'D');
+
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52485, 0, 0, 'Y', TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'pos.version', 'Version', ' ', 'I', 'D');
+
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52486, 0, 0, 'Y', TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'pmenu.new.reports', 'Reports', ' ', 'I', 'D');
+
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52487, 0, 0, 'Y', TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'isCreatePriceList', 'Create Price List', ' ', 'I', 'D');
+
diff --git a/posterita/commons/Migration/1.7.0/postgresql/001_MixedPayment.sql b/posterita/commons/Migration/1.7.0/postgresql/001_MixedPayment.sql
new file mode 100644
index 0000000000..266516c722
--- /dev/null
+++ b/posterita/commons/Migration/1.7.0/postgresql/001_MixedPayment.sql
@@ -0,0 +1,24 @@
+-- May 22, 2008 10:57:07 AM GMT+04:00
+-- Create Mixed in the payment rules list
+INSERT INTO AD_Ref_List (AD_Client_ID,AD_Org_ID,AD_Reference_ID,AD_Ref_List_ID,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,Value) VALUES (0,0,195,52000,TO_DATE('2008-05-22 10:55:30','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Mixed',TO_DATE('2008-05-22 10:55:30','YYYY-MM-DD HH24:MI:SS'),100,'M')
+;
+
+-- May 22, 2008 10:57:11 AM GMT+04:00
+-- Update the translation
+INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Ref_List_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=52000 AND EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Ref_List_ID!=t.AD_Ref_List_ID)
+;
+
+-- May 22, 2008 11:28:12 AM GMT+04:00
+-- Creates new Validation rule so that rich client does not get Mixed rule
+INSERT INTO AD_Val_Rule (AD_Client_ID,AD_Org_ID,AD_Val_Rule_ID,Code,Created,CreatedBy,EntityType,IsActive,Name,Type,Updated,UpdatedBy) VALUES (0,0,52002,'AD_Ref_List.Value <> ''M''',TO_DATE('2008-05-22 11:28:12','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','All_Payment Rule - No mixed','S',TO_DATE('2008-05-22 11:28:12','YYYY-MM-DD HH24:MI:SS'),100)
+;
+
+-- May 22, 2008 11:30:02 AM GMT+04:00
+-- Updates all columns in AD where the payment rule list is used with the validation created earlier
+UPDATE AD_Column SET AD_Val_Rule_ID=52002 WHERE AD_Reference_Value_ID=195 AND AD_Val_Rule_ID IS NULL
+;
+
+-- May 22, 2008 11:31:15 AM GMT+04:00
+-- Updates all columns in AD where an existing validation rule exist and set it to ignore the Mixed rule
+UPDATE AD_Val_Rule SET Code='AD_Ref_List.Value <> ''B'' AND AD_Ref_List.Value <> ''M''' WHERE AD_Val_Rule_ID=161
+;
diff --git a/posterita/commons/Migration/1.7.0/postgresql/002_Terminals_newTableStructure.sql b/posterita/commons/Migration/1.7.0/postgresql/002_Terminals_newTableStructure.sql
new file mode 100644
index 0000000000..0c4aaf8e63
--- /dev/null
+++ b/posterita/commons/Migration/1.7.0/postgresql/002_Terminals_newTableStructure.sql
@@ -0,0 +1,629 @@
+-- Jun 2, 2008 9:19:48 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Table (AccessLevel,AD_Client_ID,AD_Org_ID,AD_Table_ID,CopyColumnsFromTable,Created,CreatedBy,EntityType,ImportTable,IsActive,IsChangeLog,IsDeleteable,IsHighVolume,IsSecurityEnabled,IsView,LoadSeq,Name,ReplicationType,TableName,Updated,UpdatedBy) VALUES ('1',0,0,52004,'N',TO_DATE('2008-06-02 21:19:47','YYYY-MM-DD HH24:MI:SS'),100,'A','N','Y','N','Y','N','N','N',0,'POS Terminal','L','U_POSTerminal',TO_DATE('2008-06-02 21:19:47','YYYY-MM-DD HH24:MI:SS'),100)
+;
+
+-- Jun 2, 2008 9:19:48 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Table_Trl (AD_Language,AD_Table_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Table_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Table t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Table_ID=52004 AND EXISTS (SELECT * FROM AD_Table_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Table_ID!=t.AD_Table_ID)
+;
+
+-- Jun 2, 2008 9:21:23 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52077,102,0,19,52004,129,'AD_Client_ID',TO_DATE('2008-06-02 21:21:22','YYYY-MM-DD HH24:MI:SS'),100,'@#AD_Client_ID@','Client/Tenant for this installation.','A',22,'A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','N','N','N','N','Y','N','N','N','N','Y','Client',0,TO_DATE('2008-06-02 21:21:22','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 9:21:23 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52077 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 9:22:32 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52078,113,0,19,52004,130,'AD_Org_ID',TO_DATE('2008-06-02 21:22:32','YYYY-MM-DD HH24:MI:SS'),100,'@#AD_Org_ID@','Organizational entity within client','A',22,'An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','N','N','N','N','Y','N','N','N','N','Y','Organization',0,TO_DATE('2008-06-02 21:22:32','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 9:22:32 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52078 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+
+-- Jun 2, 2008 9:23:51 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,52030,0,'AutoLock',TO_DATE('2008-06-02 21:23:51','YYYY-MM-DD HH24:MI:SS'),100,'Whether to automatically lock the terminal when till is closed','A','Y','Auto Lock','Auto Lock',TO_DATE('2008-06-02 21:23:51','YYYY-MM-DD HH24:MI:SS'),100)
+;
+
+-- Jun 2, 2008 9:23:51 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=52030 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
+;
+
+-- Jun 2, 2008 9:24:30 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52079,52030,0,20,52004,'AutoLock',TO_DATE('2008-06-02 21:24:30','YYYY-MM-DD HH24:MI:SS'),100,'N','Whether to automatically lock the terminal when till is closed','A',1,'Y','N','N','N','N','Y','N','N','N','N','Y','Auto Lock',0,TO_DATE('2008-06-02 21:24:30','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 9:24:30 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52079 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 9:26:51 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,52031,0,'CashBookTransferType',TO_DATE('2008-06-02 21:26:51','YYYY-MM-DD HH24:MI:SS'),100,'Where the money in the cash book should be transfered to. Either a Bank Account or another Cash Book','A','Y','Cash Book Transfer Type','Cash Book Transfer Type',TO_DATE('2008-06-02 21:26:51','YYYY-MM-DD HH24:MI:SS'),100)
+;
+
+-- Jun 2, 2008 9:26:51 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=52031 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
+;
+
+-- Jun 2, 2008 9:29:14 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Reference (AD_Client_ID,AD_Org_ID,AD_Reference_ID,Created,CreatedBy,Description,EntityType,IsActive,Name,Updated,UpdatedBy,ValidationType) VALUES (0,0,52002,TO_DATE('2008-06-02 21:29:14','YYYY-MM-DD HH24:MI:SS'),100,'Where money should be transfered to','A','Y','_TransferType',TO_DATE('2008-06-02 21:29:14','YYYY-MM-DD HH24:MI:SS'),100,'L')
+;
+
+-- Jun 2, 2008 9:29:14 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Reference_Trl (AD_Language,AD_Reference_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Reference_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Reference t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Reference_ID=52002 AND EXISTS (SELECT * FROM AD_Reference_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Reference_ID!=t.AD_Reference_ID)
+;
+
+-- Jun 2, 2008 9:29:42 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Ref_List (AD_Client_ID,AD_Org_ID,AD_Reference_ID,AD_Ref_List_ID,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,Value) VALUES (0,0,52002,52001,TO_DATE('2008-06-02 21:29:42','YYYY-MM-DD HH24:MI:SS'),100,'A','Y','Bank Account',TO_DATE('2008-06-02 21:29:42','YYYY-MM-DD HH24:MI:SS'),100,'B')
+;
+
+-- Jun 2, 2008 9:29:42 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Ref_List_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=52001 AND EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Ref_List_ID!=t.AD_Ref_List_ID)
+;
+
+-- Jun 2, 2008 9:29:51 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Ref_List (AD_Client_ID,AD_Org_ID,AD_Reference_ID,AD_Ref_List_ID,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,Value) VALUES (0,0,52002,52002,TO_DATE('2008-06-02 21:29:51','YYYY-MM-DD HH24:MI:SS'),100,'A','Y','CashBook',TO_DATE('2008-06-02 21:29:51','YYYY-MM-DD HH24:MI:SS'),100,'C')
+;
+
+-- Jun 2, 2008 9:29:51 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Ref_List_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=52002 AND EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Ref_List_ID!=t.AD_Ref_List_ID)
+;
+
+-- Jun 2, 2008 9:30:13 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52080,52031,0,17,52002,52004,'CashBookTransferType',TO_DATE('2008-06-02 21:30:13','YYYY-MM-DD HH24:MI:SS'),100,'Where the money in the cash book should be transfered to. Either a Bank Account or another Cash Book','A',1,'Y','N','N','N','N','Y','N','N','N','N','Y','Cash Book Transfer Type',0,TO_DATE('2008-06-02 21:30:13','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 9:30:13 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52080 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 9:32:22 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,52032,0,'CashTransferBankAccount_ID',TO_DATE('2008-06-02 21:32:22','YYYY-MM-DD HH24:MI:SS'),100,'Bank Account on which to transfer all Cash transactions','A','Y','Transfer Cash trx to','Transfer Cash trx to',TO_DATE('2008-06-02 21:32:22','YYYY-MM-DD HH24:MI:SS'),100)
+;
+
+-- Jun 2, 2008 9:32:22 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=52032 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
+;
+
+-- Jun 2, 2008 9:33:15 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Reference (AD_Client_ID,AD_Org_ID,AD_Reference_ID,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,ValidationType) VALUES (0,0,52003,TO_DATE('2008-06-02 21:33:15','YYYY-MM-DD HH24:MI:SS'),100,'A','Y','C_BankAccount',TO_DATE('2008-06-02 21:33:15','YYYY-MM-DD HH24:MI:SS'),100,'T')
+;
+
+-- Jun 2, 2008 9:33:15 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Reference_Trl (AD_Language,AD_Reference_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Reference_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Reference t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Reference_ID=52003 AND EXISTS (SELECT * FROM AD_Reference_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Reference_ID!=t.AD_Reference_ID)
+;
+
+-- Jun 2, 2008 9:33:52 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Ref_Table (AD_Client_ID,AD_Display,AD_Key,AD_Org_ID,AD_Reference_ID,AD_Table_ID,Created,CreatedBy,EntityType,IsActive,IsValueDisplayed,Updated,UpdatedBy,WhereClause) VALUES (0,3074,3077,0,52003,297,TO_DATE('2008-06-02 21:33:52','YYYY-MM-DD HH24:MI:SS'),100,'A','Y','N',TO_DATE('2008-06-02 21:33:52','YYYY-MM-DD HH24:MI:SS'),100,'C_BankAccount.IsActive=''Y''')
+;
+
+-- Jun 2, 2008 9:34:10 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52081,52032,0,18,52003,52004,'CashTransferBankAccount_ID',TO_DATE('2008-06-02 21:34:10','YYYY-MM-DD HH24:MI:SS'),100,'Bank Account on which to transfer all Cash transactions','A',22,'Y','N','N','N','N','N','N','N','N','N','Y','Transfer Cash trx to',0,TO_DATE('2008-06-02 21:34:10','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 9:34:10 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52081 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 9:35:28 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,52033,0,'CashTransferCashBook_ID',TO_DATE('2008-06-02 21:35:28','YYYY-MM-DD HH24:MI:SS'),100,'Cash Book on which to transfer all Cash transactions','A','Y','Transfer Cash trx to','Transfer Cash trx to',TO_DATE('2008-06-02 21:35:28','YYYY-MM-DD HH24:MI:SS'),100)
+;
+
+-- Jun 2, 2008 9:35:28 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=52033 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
+;
+
+-- Jun 2, 2008 9:36:18 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Reference (AD_Client_ID,AD_Org_ID,AD_Reference_ID,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,ValidationType) VALUES (0,0,52004,TO_DATE('2008-06-02 21:36:18','YYYY-MM-DD HH24:MI:SS'),100,'A','Y','C_CashBook',TO_DATE('2008-06-02 21:36:18','YYYY-MM-DD HH24:MI:SS'),100,'T')
+;
+
+-- Jun 2, 2008 9:36:18 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Reference_Trl (AD_Language,AD_Reference_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Reference_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Reference t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Reference_ID=52004 AND EXISTS (SELECT * FROM AD_Reference_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Reference_ID!=t.AD_Reference_ID)
+;
+
+-- Jun 2, 2008 9:36:54 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Ref_Table (AD_Client_ID,AD_Display,AD_Key,AD_Org_ID,AD_Reference_ID,AD_Table_ID,Created,CreatedBy,EntityType,IsActive,IsValueDisplayed,Updated,UpdatedBy,WhereClause) VALUES (0,5268,5260,0,52004,408,TO_DATE('2008-06-02 21:36:54','YYYY-MM-DD HH24:MI:SS'),100,'A','Y','N',TO_DATE('2008-06-02 21:36:54','YYYY-MM-DD HH24:MI:SS'),100,'C_CashBook.IsActive=''Y''')
+;
+
+-- Jun 2, 2008 9:37:11 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52082,52033,0,18,52004,52004,'CashTransferCashBook_ID',TO_DATE('2008-06-02 21:37:11','YYYY-MM-DD HH24:MI:SS'),100,'Cash Book on which to transfer all Cash transactions','A',22,'Y','N','N','N','N','N','N','N','N','N','Y','Transfer Cash trx to',0,TO_DATE('2008-06-02 21:37:11','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 9:37:11 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52082 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 9:37:53 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52083,1463,0,19,52004,'C_CashBook_ID',TO_DATE('2008-06-02 21:37:53','YYYY-MM-DD HH24:MI:SS'),100,'Cash Book for recording petty cash transactions','A',22,'The Cash Book identifies a unique cash book. The cash book is used to record cash transactions.','Y','N','N','N','N','Y','N','N','N','N','Y','Cash Book',0,TO_DATE('2008-06-02 21:37:53','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 9:37:53 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52083 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 9:39:00 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,52034,0,'C_CashBPartner_ID',TO_DATE('2008-06-02 21:39:00','YYYY-MM-DD HH24:MI:SS'),100,'BPartner to be used for Cash transactions','A','Y','Cash BPartner','Cash BPartner',TO_DATE('2008-06-02 21:39:00','YYYY-MM-DD HH24:MI:SS'),100)
+;
+
+-- Jun 2, 2008 9:39:00 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=52034 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
+;
+
+-- Jun 2, 2008 9:39:32 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52084,52034,0,18,173,52004,'C_CashBPartner_ID',TO_DATE('2008-06-02 21:39:32','YYYY-MM-DD HH24:MI:SS'),100,'BPartner to be used for Cash transactions','A',22,'Y','N','N','N','N','Y','N','N','N','N','Y','Cash BPartner',0,TO_DATE('2008-06-02 21:39:32','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 9:39:32 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52084 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 9:41:11 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,52035,0,'Check_BankAccount_ID',TO_DATE('2008-06-02 21:41:11','YYYY-MM-DD HH24:MI:SS'),100,'Bank Account to be used for processing Check transactions','A','Y','Check Bank Account','Check Bank Account',TO_DATE('2008-06-02 21:41:11','YYYY-MM-DD HH24:MI:SS'),100)
+;
+
+-- Jun 2, 2008 9:41:11 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=52035 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
+;
+
+-- Jun 2, 2008 9:41:34 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52085,52035,0,18,52003,52004,'Check_BankAccount_ID',TO_DATE('2008-06-02 21:41:34','YYYY-MM-DD HH24:MI:SS'),100,'Bank Account to be used for processing Check transactions','A',22,'Y','N','N','N','N','N','N','N','N','N','Y','Check Bank Account',0,TO_DATE('2008-06-02 21:41:34','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 9:41:34 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52085 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 9:42:51 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,52036,0,'CheckTransferBankAccount_ID',TO_DATE('2008-06-02 21:42:50','YYYY-MM-DD HH24:MI:SS'),100,'Bank account on which to transfer Check transactions','A','Y','Tranfer Check trx to','Transfer Check trx to',TO_DATE('2008-06-02 21:42:50','YYYY-MM-DD HH24:MI:SS'),100)
+;
+
+-- Jun 2, 2008 9:42:51 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=52036 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
+;
+
+-- Jun 2, 2008 9:43:16 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52086,52036,0,18,52003,52004,'CheckTransferBankAccount_ID',TO_DATE('2008-06-02 21:43:15','YYYY-MM-DD HH24:MI:SS'),100,'Bank account on which to transfer Check transactions','A',22,'Y','N','N','N','N','N','N','N','N','N','Y','Tranfer Check trx to',0,TO_DATE('2008-06-02 21:43:15','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 9:43:16 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52086 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 9:44:12 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,52037,0,'CheckTransferType',TO_DATE('2008-06-02 21:44:12','YYYY-MM-DD HH24:MI:SS'),100,'A','Y','Check Transfer Type','Check Transfer Type',TO_DATE('2008-06-02 21:44:12','YYYY-MM-DD HH24:MI:SS'),100)
+;
+
+-- Jun 2, 2008 9:44:12 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=52037 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
+;
+
+-- Jun 2, 2008 9:44:39 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52087,52037,0,17,52002,52004,'CheckTransferType',TO_DATE('2008-06-02 21:44:39','YYYY-MM-DD HH24:MI:SS'),100,'A',1,'Y','N','N','N','N','N','N','N','N','N','Y','Check Transfer Type',0,TO_DATE('2008-06-02 21:44:39','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 9:44:39 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52087 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 9:46:05 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,52038,0,'Card_BankAccount_ID',TO_DATE('2008-06-02 21:46:05','YYYY-MM-DD HH24:MI:SS'),100,'Bank Account on which card transactions will be processed','A','Y','Card Bank Account','Card Bank Account',TO_DATE('2008-06-02 21:46:05','YYYY-MM-DD HH24:MI:SS'),100)
+;
+
+-- Jun 2, 2008 9:46:05 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=52038 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
+;
+
+-- Jun 2, 2008 9:46:28 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52088,52038,0,18,52003,52004,'Card_BankAccount_ID',TO_DATE('2008-06-02 21:46:28','YYYY-MM-DD HH24:MI:SS'),100,'Bank Account on which card transactions will be processed','A',22,'Y','N','N','N','N','N','N','N','N','N','Y','Card Bank Account',0,TO_DATE('2008-06-02 21:46:28','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 9:46:28 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52088 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 9:47:33 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,52039,0,'CardTransferBankAccount_ID',TO_DATE('2008-06-02 21:47:33','YYYY-MM-DD HH24:MI:SS'),100,'Bank account on which to transfer Card transactions','A','Y','Transfer Card trx to','Transfer Card trx to',TO_DATE('2008-06-02 21:47:33','YYYY-MM-DD HH24:MI:SS'),100)
+;
+
+-- Jun 2, 2008 9:47:33 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=52039 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
+;
+
+-- Jun 2, 2008 9:47:59 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52089,52039,0,18,52003,52004,'CardTransferBankAccount_ID',TO_DATE('2008-06-02 21:47:59','YYYY-MM-DD HH24:MI:SS'),100,'Bank account on which to transfer Card transactions','A',22,'Y','N','N','N','N','N','N','N','N','N','Y','Transfer Card trx to',0,TO_DATE('2008-06-02 21:47:59','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 9:47:59 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52089 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 9:48:55 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,52040,0,'CardTransferCashBook_ID',TO_DATE('2008-06-02 21:48:55','YYYY-MM-DD HH24:MI:SS'),100,'Cash Book on which to transfer all Card transactions','A','Y','Transfer Card trx to','Transfer Card trx to',TO_DATE('2008-06-02 21:48:55','YYYY-MM-DD HH24:MI:SS'),100)
+;
+
+-- Jun 2, 2008 9:48:55 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=52040 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
+;
+
+-- Jun 2, 2008 9:49:35 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52090,52040,0,18,52004,52004,'CardTransferCashBook_ID',TO_DATE('2008-06-02 21:49:35','YYYY-MM-DD HH24:MI:SS'),100,'Cash Book on which to transfer all Card transactions','A',22,'Y','N','N','N','N','N','N','N','N','N','Y','Transfer Card trx to',0,TO_DATE('2008-06-02 21:49:35','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 9:49:35 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52090 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 9:50:21 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,52041,0,'CardTransferType',TO_DATE('2008-06-02 21:50:21','YYYY-MM-DD HH24:MI:SS'),100,'A','Y','Card Transfer Type','Card Transfer Type',TO_DATE('2008-06-02 21:50:21','YYYY-MM-DD HH24:MI:SS'),100)
+;
+
+-- Jun 2, 2008 9:50:21 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=52041 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
+;
+
+-- Jun 2, 2008 9:50:40 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52091,52041,0,17,52002,52004,'CardTransferType',TO_DATE('2008-06-02 21:50:40','YYYY-MM-DD HH24:MI:SS'),100,'A',1,'Y','N','N','N','N','N','N','N','N','N','Y','Card Transfer Type',0,TO_DATE('2008-06-02 21:50:40','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 9:50:40 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52091 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 9:51:10 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52092,245,0,16,52004,'Created',TO_DATE('2008-06-02 21:51:10','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was created','A',7,'The Created field indicates the date that this record was created.','Y','N','N','N','N','Y','N','N','N','N','N','Created',0,TO_DATE('2008-06-02 21:51:10','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 9:51:10 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52092 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 9:52:01 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52093,246,0,18,110,52004,'CreatedBy',TO_DATE('2008-06-02 21:52:01','YYYY-MM-DD HH24:MI:SS'),100,'User who created this records','A',22,'The Created By field indicates the user who created this record.','Y','N','N','N','N','Y','N','N','N','N','N','Created By',0,TO_DATE('2008-06-02 21:52:01','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 9:52:01 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52093 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 9:53:40 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,52042,0,'C_TemplateBPartner_ID',TO_DATE('2008-06-02 21:53:39','YYYY-MM-DD HH24:MI:SS'),100,'BPartner that is to be used as template when new customers are created','A','Y','Template BPartner','Template BPartner',TO_DATE('2008-06-02 21:53:39','YYYY-MM-DD HH24:MI:SS'),100)
+;
+
+-- Jun 2, 2008 9:53:40 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=52042 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
+;
+
+-- Jun 2, 2008 9:54:16 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52094,52042,0,18,173,52004,'C_TemplateBPartner_ID',TO_DATE('2008-06-02 21:54:16','YYYY-MM-DD HH24:MI:SS'),100,'BPartner that is to be used as template when new customers are created','A',22,'Y','N','N','N','N','N','N','N','N','N','Y','Template BPartner',0,TO_DATE('2008-06-02 21:54:16','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 9:54:16 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52094 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 9:55:01 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52095,275,0,10,52004,'Description',TO_DATE('2008-06-02 21:55:01','YYYY-MM-DD HH24:MI:SS'),100,'Optional short description of the record','A',255,'A description is limited to 255 characters.','Y','N','N','N','N','N','N','N','N','N','Y','Description',0,TO_DATE('2008-06-02 21:55:01','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 9:55:01 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52095 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 9:55:37 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52096,326,0,14,52004,'Help',TO_DATE('2008-06-02 21:55:37','YYYY-MM-DD HH24:MI:SS'),100,'Comment or Hint','A',2000,'The Help field contains a hint, comment or help about the use of this item.','Y','N','N','N','N','N','N','N','N','N','Y','Comment/Help',0,TO_DATE('2008-06-02 21:55:37','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 9:55:37 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52096 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 9:56:03 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52097,348,0,20,52004,'IsActive',TO_DATE('2008-06-02 21:56:02','YYYY-MM-DD HH24:MI:SS'),100,'Y','The record is active in the system','A',1,'There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports.
+There are two reasons for de-activating and not deleting records:
+(1) The system requires the record for audit purposes.
+(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','N','N','N','N','N','N','N','N','N','Y','Active',0,TO_DATE('2008-06-02 21:56:02','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 9:56:03 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52097 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 9:56:55 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,52043,0,'LastLockTime',TO_DATE('2008-06-02 21:56:55','YYYY-MM-DD HH24:MI:SS'),100,'Last time at which the terminal was locked','A','Y','Last Lock Time','Last Lock Time',TO_DATE('2008-06-02 21:56:55','YYYY-MM-DD HH24:MI:SS'),100)
+;
+
+-- Jun 2, 2008 9:56:55 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=52043 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
+;
+
+-- Jun 2, 2008 9:57:13 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52098,52043,0,16,52004,'LastLockTime',TO_DATE('2008-06-02 21:57:13','YYYY-MM-DD HH24:MI:SS'),100,'Last time at which the terminal was locked','A',7,'Y','N','N','N','N','N','N','N','N','N','Y','Last Lock Time',0,TO_DATE('2008-06-02 21:57:13','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 9:57:13 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52098 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 9:58:06 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,52044,0,'Locked',TO_DATE('2008-06-02 21:58:06','YYYY-MM-DD HH24:MI:SS'),100,'Whether the terminal is locked','A','Y','Locked','Locked',TO_DATE('2008-06-02 21:58:06','YYYY-MM-DD HH24:MI:SS'),100)
+;
+
+-- Jun 2, 2008 9:58:06 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=52044 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
+;
+
+-- Jun 2, 2008 9:58:26 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52099,52044,0,20,52004,'Locked',TO_DATE('2008-06-02 21:58:26','YYYY-MM-DD HH24:MI:SS'),100,'N','Whether the terminal is locked','A',1,'Y','N','N','N','N','N','N','N','N','N','Y','Locked',0,TO_DATE('2008-06-02 21:58:26','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 9:58:26 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52099 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 9:59:13 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,52045,0,'LockTime',TO_DATE('2008-06-02 21:59:13','YYYY-MM-DD HH24:MI:SS'),100,'Time in minutes the terminal should be kept in a locked state.','A','Y','Lock Time','Lock Time',TO_DATE('2008-06-02 21:59:13','YYYY-MM-DD HH24:MI:SS'),100)
+;
+
+-- Jun 2, 2008 9:59:13 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=52045 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
+;
+
+-- Jun 2, 2008 9:59:40 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,ValueMin,Version) VALUES (0,52100,52045,0,11,52004,'LockTime',TO_DATE('2008-06-02 21:59:40','YYYY-MM-DD HH24:MI:SS'),100,'Time in minutes the terminal should be kept in a locked state.','A',10,'Y','N','N','N','N','N','N','N','N','N','Y','Lock Time',0,TO_DATE('2008-06-02 21:59:40','YYYY-MM-DD HH24:MI:SS'),100,'0',0)
+;
+
+-- Jun 2, 2008 9:59:40 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52100 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 10:00:25 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52101,459,0,19,52004,'M_Warehouse_ID',TO_DATE('2008-06-02 22:00:24','YYYY-MM-DD HH24:MI:SS'),100,'Storage Warehouse and Service Point','A',22,'The Warehouse identifies a unique Warehouse where products are stored or Services are provided.','Y','N','N','N','N','N','N','N','N','N','Y','Warehouse',0,TO_DATE('2008-06-02 22:00:24','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 10:00:25 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52101 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 10:00:44 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52102,469,0,10,52004,'Name',TO_DATE('2008-06-02 22:00:44','YYYY-MM-DD HH24:MI:SS'),100,'Alphanumeric identifier of the entity','A',60,'The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.','Y','N','N','N','N','N','N','N','N','N','Y','Name',0,TO_DATE('2008-06-02 22:00:44','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 10:00:44 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52102 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 10:02:07 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52103,480,0,18,166,52004,'PO_PriceList_ID',TO_DATE('2008-06-02 22:02:07','YYYY-MM-DD HH24:MI:SS'),100,'Price List used by this Business Partner','A',22,'Identifies the price list used by a Vendor for products purchased by this organization.','Y','N','N','N','N','N','N','N','N','N','Y','Purchase Pricelist',0,TO_DATE('2008-06-02 22:02:07','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 10:02:07 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52103 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 10:02:37 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52104,2051,0,10,52004,'PrinterName',TO_DATE('2008-06-02 22:02:37','YYYY-MM-DD HH24:MI:SS'),100,'Name of the Printer','A',60,'Internal (Opereating System) Name of the Printer; Please mote that the printer name may be different on different clients. Enter a printer name, which applies to ALL clients (e.g. printer on a server).
+If none is entered, the default printer is used. You specify your default printer when you log in. You can also change the default printer in Preferences.','Y','N','N','N','N','N','N','N','N','N','Y','Printer Name',0,TO_DATE('2008-06-02 22:02:37','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 10:02:37 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52104 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 10:03:16 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52105,1063,0,18,316,52004,'SalesRep_ID',TO_DATE('2008-06-02 22:03:16','YYYY-MM-DD HH24:MI:SS'),100,'Sales Representative or Company Agent','A',22,'The Sales Representative indicates the Sales Rep for this Region. Any Sales Rep must be a valid internal user.','Y','N','N','N','N','N','N','N','N','N','Y','Sales Representative',0,TO_DATE('2008-06-02 22:03:16','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 10:03:16 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52105 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 10:04:15 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,52046,0,'SO_PriceList_ID',TO_DATE('2008-06-02 22:04:15','YYYY-MM-DD HH24:MI:SS'),100,'A','Y','Sales Pricelist','Sales Pricelist',TO_DATE('2008-06-02 22:04:15','YYYY-MM-DD HH24:MI:SS'),100)
+;
+
+-- Jun 2, 2008 10:04:15 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=52046 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
+;
+
+-- Jun 2, 2008 10:04:46 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52106,52046,0,18,166,52004,'SO_PriceList_ID',TO_DATE('2008-06-02 22:04:46','YYYY-MM-DD HH24:MI:SS'),100,'A',22,'Y','N','N','N','N','N','N','N','N','N','Y','Sales Pricelist',0,TO_DATE('2008-06-02 22:04:46','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 10:04:46 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52106 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 10:05:16 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,52047,0,'UnlockingTime',TO_DATE('2008-06-02 22:05:16','YYYY-MM-DD HH24:MI:SS'),100,'Time at which the terminal should be unlocked','A','Y','UnlockingTime','UnlockingTime',TO_DATE('2008-06-02 22:05:16','YYYY-MM-DD HH24:MI:SS'),100)
+;
+
+-- Jun 2, 2008 10:05:16 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=52047 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
+;
+
+-- Jun 2, 2008 10:05:34 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52107,52047,0,16,52004,'UnlockingTime',TO_DATE('2008-06-02 22:05:34','YYYY-MM-DD HH24:MI:SS'),100,'Time at which the terminal should be unlocked','A',7,'Y','N','N','N','N','N','N','N','N','N','Y','UnlockingTime',0,TO_DATE('2008-06-02 22:05:34','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 10:05:34 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52107 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 10:05:58 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52108,607,0,16,52004,'Updated',TO_DATE('2008-06-02 22:05:58','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was updated','A',7,'The Updated field indicates the date that this record was updated.','Y','N','N','N','N','Y','N','N','N','N','N','Updated',0,TO_DATE('2008-06-02 22:05:58','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 10:05:58 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52108 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 10:06:30 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52109,608,0,18,110,52004,'UpdatedBy',TO_DATE('2008-06-02 22:06:30','YYYY-MM-DD HH24:MI:SS'),100,'User who updated this records','A',22,'The Updated By field indicates the user who updated this record.','Y','N','N','N','N','N','N','N','N','N','Y','Updated By',0,TO_DATE('2008-06-02 22:06:30','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 10:06:30 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52109 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 10:29:01 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,52048,0,'U_POSTerminal_ID',TO_DATE('2008-06-02 22:29:01','YYYY-MM-DD HH24:MI:SS'),100,'A','Y','POS Terminal','POS Terminal',TO_DATE('2008-06-02 22:29:01','YYYY-MM-DD HH24:MI:SS'),100)
+;
+
+-- Jun 2, 2008 10:29:01 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=52048 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
+;
+
+-- Jun 2, 2008 10:29:54 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52110,52048,0,13,52004,'U_POSTerminal_ID',TO_DATE('2008-06-02 22:29:54','YYYY-MM-DD HH24:MI:SS'),100,'A',22,'Y','N','N','N','Y','Y','N','N','N','N','N','POS Terminal',0,TO_DATE('2008-06-02 22:29:54','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 10:29:54 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52110 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 2, 2008 10:48:55 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,52049,0,'CheckTransferCashBook_ID',TO_DATE('2008-06-02 22:48:55','YYYY-MM-DD HH24:MI:SS'),100,'Cash Book on which to transfer all Check transactions','A','Y','Transfer Check trx to','Transfer Check trx to',TO_DATE('2008-06-02 22:48:55','YYYY-MM-DD HH24:MI:SS'),100)
+;
+
+-- Jun 2, 2008 10:48:55 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=52049 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
+;
+
+-- Jun 2, 2008 10:49:35 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52111,52049,0,18,52004,52004,'CheckTransferCashBook_ID',TO_DATE('2008-06-02 22:49:35','YYYY-MM-DD HH24:MI:SS'),100,'Cash Book on which to transfer all Check transactions','A',22,'Y','N','N','N','N','N','N','N','N','N','Y','Transfer Check trx to',0,TO_DATE('2008-06-02 22:49:35','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- Jun 2, 2008 10:49:35 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52111 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Jun 3, 2008 2:27:59 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (0,0,52006,TO_DATE('2008-06-03 14:27:59','YYYY-MM-DD HH24:MI:SS'),100,1000000,100,'Table U_POSTerminal',1,'Y','N','Y','Y','U_POSTerminal','N',1000000,TO_DATE('2008-06-03 14:27:59','YYYY-MM-DD HH24:MI:SS'),100)
+;
\ No newline at end of file
diff --git a/posterita/commons/Migration/1.7.0/postgresql/003_Terminals_TransferConfiguration.sql b/posterita/commons/Migration/1.7.0/postgresql/003_Terminals_TransferConfiguration.sql
new file mode 100644
index 0000000000..dab9bf8b1b
--- /dev/null
+++ b/posterita/commons/Migration/1.7.0/postgresql/003_Terminals_TransferConfiguration.sql
@@ -0,0 +1,75 @@
+ALTER TABLE AD_OrgInfo ADD COLUMN TransferBank_ID NUMERIC;
+ALTER TABLE AD_OrgInfo ADD COLUMN TransferCashBook_ID NUMERIC;
+
+ALTER TABLE AD_OrgInfo
+ ADD CONSTRAINT "cbank_adorginfo"
+ FOREIGN KEY(TransferBank_ID)
+ REFERENCES C_Bank(C_Bank_ID);
+
+
+ALTER TABLE AD_OrgInfo
+ ADD CONSTRAINT "ccashbook_adorginfo"
+ FOREIGN KEY(TransferCashBook_ID)
+ REFERENCES C_CashBook(C_CashBook_ID);
+
+
+
+
+-- May 26, 2008 23:25:51 AM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,52028,0,'TransferBank_ID',TO_DATE('2008-05-26 23:25:50','YYYY-MM-DD HH24:MI:SS'),100,'Bank account depending on currency will be used from this bank for doing transfers','D','Y','Bank for transfers','Bank for transfers',TO_DATE('2008-05-26 23:25:50','YYYY-MM-DD HH24:MI:SS'),100)
+;
+
+-- May 26, 2008 23:25:51 AM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=52028 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
+;
+
+-- May 26, 2008 23:26:38 AM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Reference (AD_Client_ID,AD_Org_ID,AD_Reference_ID,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,ValidationType) VALUES (0,0,52001,TO_DATE('2008-05-26 23:26:38','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','C_Bank',TO_DATE('2008-05-26 23:26:38','YYYY-MM-DD HH24:MI:SS'),100,'T')
+;
+
+-- May 26, 2008 23:26:38 AM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Reference_Trl (AD_Language,AD_Reference_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Reference_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Reference t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Reference_ID=52001 AND EXISTS (SELECT * FROM AD_Reference_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Reference_ID!=t.AD_Reference_ID)
+;
+
+-- May 26, 2008 23:28:08 AM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Ref_Table (AD_Client_ID,AD_Display,AD_Key,AD_Org_ID,AD_Reference_ID,AD_Table_ID,Created,CreatedBy,EntityType,IsActive,IsValueDisplayed,Updated,UpdatedBy,WhereClause) VALUES (0,3039,3031,0,52001,296,TO_DATE('2008-05-26 23:28:08','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','N',TO_DATE('2008-05-26 23:28:08','YYYY-MM-DD HH24:MI:SS'),100,'C_Bank.IsOwnBank=''Y''')
+;
+
+-- May 26, 2008 23:28:33 AM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52075,52028,0,18,52001,228,'TransferBank_ID',TO_DATE('2008-05-26 23:28:33','YYYY-MM-DD HH24:MI:SS'),100,'Bank account depending on currency will be used from this bank for doing transfers','D',22,'Y','N','N','N','N','N','N','N','N','N','Y','Bank for transfers',0,TO_DATE('2008-05-26 23:28:33','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- May 26, 2008 23:28:33 AM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52075 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+
+
+-- Cash Book
+
+-- May 26, 2008 23:29:40 AM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,52029,0,'TransferCashBook_ID',TO_DATE('2008-05-23 23:29:40','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','CashBook for transfers','CashBook for transfers',TO_DATE('2008-05-23 23:29:40','YYYY-MM-DD HH24:MI:SS'),100)
+;
+
+-- May 26, 2008 23:29:40 AM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=52029 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
+;
+
+-- May 26, 2008 23:30:32 AM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,52076,52029,0,18,52004,228,'TransferCashBook_ID',TO_DATE('2008-05-23 23:30:31','YYYY-MM-DD HH24:MI:SS'),100,'D',22,'Y','N','N','N','N','N','N','N','N','N','Y','CashBook for transfers',0,TO_DATE('2008-05-23 23:30:31','YYYY-MM-DD HH24:MI:SS'),100,0)
+;
+
+-- May 26, 2008 23:30:32 AM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52076 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
diff --git a/posterita/commons/Migration/1.7.0/postgresql/004_Terminals_newTableDDL.sql b/posterita/commons/Migration/1.7.0/postgresql/004_Terminals_newTableDDL.sql
new file mode 100644
index 0000000000..408b569bfa
--- /dev/null
+++ b/posterita/commons/Migration/1.7.0/postgresql/004_Terminals_newTableDDL.sql
@@ -0,0 +1,4 @@
+-- Jun 2, 2008 23:58:02 AM GMT+04:00
+-- Default comment for updating dictionary
+CREATE TABLE U_POSTerminal (AD_Client_ID NUMERIC(10) DEFAULT NULL NOT NULL, AD_Org_ID NUMERIC(10) DEFAULT NULL NOT NULL, AutoLock CHAR(1) DEFAULT 'N' CHECK (AutoLock IN ('Y','N')) NOT NULL, Card_BankAccount_ID NUMERIC(10), CardTransferBankAccount_ID NUMERIC(10), CardTransferCashBook_ID NUMERIC(10), CardTransferType CHAR(1), CashBookTransferType CHAR(1) NOT NULL, CashTransferBankAccount_ID NUMERIC(10), CashTransferCashBook_ID NUMERIC(10), C_CashBook_ID NUMERIC(10) NOT NULL, C_CashBPartner_ID NUMERIC(10) NOT NULL, Check_BankAccount_ID NUMERIC(10), CheckTransferBankAccount_ID NUMERIC(10), CheckTransferCashBook_ID NUMERIC(10), CheckTransferType CHAR(1), Created TIMESTAMP NOT NULL, CreatedBy NUMERIC(10) NOT NULL, C_TemplateBPartner_ID NUMERIC(10), Description VARCHAR(255), Help VARCHAR(2000), IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')), LastLockTime TIMESTAMP, Locked CHAR(1) DEFAULT 'N' CHECK (Locked IN ('Y','N')), LockTime NUMERIC(10), M_Warehouse_ID NUMERIC(10), Name VARCHAR(60), PO_PriceList_ID NUMERIC(10), PrinterName VARCHAR(60), SalesRep_ID NUMERIC(10), SO_PriceList_ID NUMERIC(10), UnlockingTime TIMESTAMP, Updated TIMESTAMP NOT NULL, UpdatedBy NUMERIC(10), U_POSTerminal_ID NUMERIC(10) NOT NULL, CONSTRAINT U_POSTerminal_Key PRIMARY KEY (U_POSTerminal_ID))
+;
\ No newline at end of file
diff --git a/posterita/commons/Migration/1.7.0/postgresql/005_Messages.sql b/posterita/commons/Migration/1.7.0/postgresql/005_Messages.sql
new file mode 100644
index 0000000000..10f0b71a0b
--- /dev/null
+++ b/posterita/commons/Migration/1.7.0/postgresql/005_Messages.sql
@@ -0,0 +1,189 @@
+-- Jun 9, 2008 1:24:35 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,52452,0,TO_DATE('2008-06-09 13:24:35','YYYY-MM-DD HH24:MI:SS'),100,'A','Y','Organisation','I',TO_DATE('2008-06-09 13:24:35','YYYY-MM-DD HH24:MI:SS'),100,'smenu.organisation')
+;
+
+-- Jun 9, 2008 1:25:48 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,52453,0,TO_DATE('2008-06-09 13:25:48','YYYY-MM-DD HH24:MI:SS'),100,'A','Y','Terminals','I',TO_DATE('2008-06-09 13:25:48','YYYY-MM-DD HH24:MI:SS'),100,'smenu.terminal')
+;
+
+-- Jun 9, 2008 1:26:06 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,52454,0,TO_DATE('2008-06-09 13:26:06','YYYY-MM-DD HH24:MI:SS'),100,'A','Y','Cash Books','I',TO_DATE('2008-06-09 13:26:06','YYYY-MM-DD HH24:MI:SS'),100,'smenu.cashbook')
+;
+
+-- Jun 9, 2008 1:26:30 PM GMT+04:00
+-- Default comment for updating dictionary
+UPDATE AD_Message SET MsgTip='Maintain POS Terminals',Updated=TO_DATE('2008-06-09 13:26:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=52453
+;
+
+-- Jun 9, 2008 1:26:39 PM GMT+04:00
+-- Default comment for updating dictionary
+UPDATE AD_Message SET MsgTip='Maintain Cash Books',Updated=TO_DATE('2008-06-09 13:26:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=52454
+;
+
+-- Jun 9, 2008 1:27:15 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,52455,0,TO_DATE('2008-06-09 13:27:15','YYYY-MM-DD HH24:MI:SS'),100,'A','Y','Completed','I',TO_DATE('2008-06-09 13:27:15','YYYY-MM-DD HH24:MI:SS'),100,'document.status.completed')
+;
+
+-- Jun 9, 2008 1:28:05 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,52456,0,TO_DATE('2008-06-09 13:28:04','YYYY-MM-DD HH24:MI:SS'),100,'A','Y','Drafted','I',TO_DATE('2008-06-09 13:28:04','YYYY-MM-DD HH24:MI:SS'),100,'document.status.drafted')
+;
+
+-- Jun 9, 2008 1:28:27 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,52457,0,TO_DATE('2008-06-09 13:28:27','YYYY-MM-DD HH24:MI:SS'),100,'A','Y','In Progress','I',TO_DATE('2008-06-09 13:28:27','YYYY-MM-DD HH24:MI:SS'),100,'document.status.inprogress')
+;
+
+-- Jun 9, 2008 1:28:44 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,52458,0,TO_DATE('2008-06-09 13:28:44','YYYY-MM-DD HH24:MI:SS'),100,'A','Y','Invalid','I',TO_DATE('2008-06-09 13:28:44','YYYY-MM-DD HH24:MI:SS'),100,'document.status.invalid')
+;
+
+-- Jun 9, 2008 1:28:58 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,52459,0,TO_DATE('2008-06-09 13:28:58','YYYY-MM-DD HH24:MI:SS'),100,'A','Y','Closed','I',TO_DATE('2008-06-09 13:28:58','YYYY-MM-DD HH24:MI:SS'),100,'document.status.closed')
+;
+
+-- Jun 9, 2008 1:29:15 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,52460,0,TO_DATE('2008-06-09 13:29:15','YYYY-MM-DD HH24:MI:SS'),100,'A','Y','Cash','I',TO_DATE('2008-06-09 13:29:15','YYYY-MM-DD HH24:MI:SS'),100,'payment.rule.cash')
+;
+
+-- Jun 9, 2008 1:29:27 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,52461,0,TO_DATE('2008-06-09 13:29:27','YYYY-MM-DD HH24:MI:SS'),100,'A','Y','Card','I',TO_DATE('2008-06-09 13:29:27','YYYY-MM-DD HH24:MI:SS'),100,'payment.rule.card')
+;
+
+-- Jun 9, 2008 1:29:42 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,52462,0,TO_DATE('2008-06-09 13:29:41','YYYY-MM-DD HH24:MI:SS'),100,'A','Y','Cheque','I',TO_DATE('2008-06-09 13:29:41','YYYY-MM-DD HH24:MI:SS'),100,'payment.rule.cheque')
+;
+
+-- Jun 9, 2008 1:29:55 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,52463,0,TO_DATE('2008-06-09 13:29:55','YYYY-MM-DD HH24:MI:SS'),100,'A','Y','Mixed','I',TO_DATE('2008-06-09 13:29:55','YYYY-MM-DD HH24:MI:SS'),100,'payment.rule.mixed')
+;
+
+-- Jun 9, 2008 1:30:14 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,52464,0,TO_DATE('2008-06-09 13:30:13','YYYY-MM-DD HH24:MI:SS'),100,'A','Y','Credit','I',TO_DATE('2008-06-09 13:30:13','YYYY-MM-DD HH24:MI:SS'),100,'payment.rule.credit')
+;
+
+-- Jun 9, 2008 1:30:46 PM GMT+04:00
+-- Default comment for updating dictionary
+INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,52465,0,TO_DATE('2008-06-09 13:30:46','YYYY-MM-DD HH24:MI:SS'),100,'A','Y','Amount Paid','I',TO_DATE('2008-06-09 13:30:46','YYYY-MM-DD HH24:MI:SS'),100,'AmountPaid')
+;
+
+--------------------------------------------------------------------------------------------------------------------------------------------------
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52470 , 0, 0, 'Y', TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'html', 'HTML', ' ', 'I', 'D');
+
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52471 , 0, 0, 'Y', TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'pdf', 'PDF', ' ', 'I', 'D');
+
+INSERT INTO AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52472 , 0, 0, 'Y', TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'csv', 'CSV', ' ', 'I', 'D');
+
+INSERT INTO adempiere.AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52473 , 0, 0, 'Y', TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'smenu.sales.report', 'Sales Report', ' ', 'I', 'D');
+
+INSERT INTO adempiere.AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52474 , 0, 0, 'Y', TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'smenu.best.selling.items', 'Best Selling Items', ' ', 'I', 'D');
+
+INSERT INTO adempiere.AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52475 , 0, 0, 'Y', TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'smenu.stock.sales.report', 'Stock Sales Report', ' ', 'I', 'D');
+
+INSERT INTO adempiere.AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52476 , 0, 0, 'Y', TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'smenu.transfer.stock', 'Stock Transfer', ' ', 'I', 'D');
+
+INSERT INTO adempiere.AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52477 , 0, 0, 'Y', TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'smenu.inventory.move', 'Inventory Move', ' ', 'I', 'D');
+
+INSERT INTO adempiere.AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52478 , 0, 0, 'Y', TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'smenu.move.confirmation', 'Move Confirmation', ' ', 'I', 'D');
+
+INSERT INTO adempiere.AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52479 , 0, 0, 'Y', TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'smenu.barcode.printing', 'Barcode Printing', ' ', 'I', 'D');
+
+INSERT INTO adempiere.AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52480 , 0, 0, 'Y', TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'basePriceList', 'Base Price List', ' ', 'I', 'D');
+
+INSERT INTO adempiere.AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52481, 0, 0, 'Y', TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'isDeleteOldRecords', 'Delete Old Records', ' ', 'I', 'D');
+
+INSERT INTO adempiere.AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52482, 0, 0, 'Y', TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'sales.price.list', 'Sales Price List', ' ', 'I', 'D');
+
+INSERT INTO adempiere.AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52483, 0, 0, 'Y', TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'purchase.price.list', 'Purchase Price List', ' ', 'I', 'D');
+
+INSERT INTO adempiere.AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52484, 0, 0, 'Y', TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'pos.terminal', 'Terminal', ' ', 'I', 'D');
+
+INSERT INTO adempiere.AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52485, 0, 0, 'Y', TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'pos.version', 'Version', ' ', 'I', 'D');
+
+INSERT INTO adempiere.AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52486, 0, 0, 'Y', TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'pmenu.new.reports', 'Reports', ' ', 'I', 'D');
+
+INSERT INTO adempiere.AD_MESSAGE
+(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby,
+updated, updatedby, VALUE, msgtext, msgtip, msgtype, entitytype)
+VALUES(52487, 0, 0, 'Y', TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100, TO_TIMESTAMP('2008-06-20 10:40:00','YYYY-MM-DD HH24:MI:SS'), 100,
+'isCreatePriceList', 'Create Price List', ' ', 'I', 'D');
+
diff --git a/posterita/commons/Migration/1.7.1/build.xml b/posterita/commons/Migration/1.7.1/build.xml
new file mode 100644
index 0000000000..2d4b5fad85
--- /dev/null
+++ b/posterita/commons/Migration/1.7.1/build.xml
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ File ${file.name} status ${sqlplus.result}
+
+
+
+
+
+
diff --git a/posterita/commons/Migration/1.7.1/oracle/001_M_Inventory.sql b/posterita/commons/Migration/1.7.1/oracle/001_M_Inventory.sql
new file mode 100644
index 0000000000..545cf9f12e
--- /dev/null
+++ b/posterita/commons/Migration/1.7.1/oracle/001_M_Inventory.sql
@@ -0,0 +1,2 @@
+-- Add QtyCsv in M_inventoryLine
+ALTER TABLE M_INVENTORYLINE ADD ( QTYCSV NUMBER(10, 0) DEFAULT 0 NOT NULL);
diff --git a/posterita/commons/Migration/1.7.1/postgresql/001_M_Inventory.sql b/posterita/commons/Migration/1.7.1/postgresql/001_M_Inventory.sql
new file mode 100644
index 0000000000..cf41dc0d88
--- /dev/null
+++ b/posterita/commons/Migration/1.7.1/postgresql/001_M_Inventory.sql
@@ -0,0 +1,2 @@
+--Add QtyCSV
+ALTER TABLE m_inventoryline ADD COLUMN qtycsv numeric NOT NULL DEFAULT 0;
\ No newline at end of file
diff --git a/posterita/commons/Migration/1.7.2/build.xml b/posterita/commons/Migration/1.7.2/build.xml
new file mode 100644
index 0000000000..6426742ad6
--- /dev/null
+++ b/posterita/commons/Migration/1.7.2/build.xml
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ File ${file.name} status ${sqlplus.result}
+
+
+
+
+
+
diff --git a/posterita/commons/Migration/1.7.2/oracle/001_ADRole.sql b/posterita/commons/Migration/1.7.2/oracle/001_ADRole.sql
new file mode 100644
index 0000000000..eae1b645aa
--- /dev/null
+++ b/posterita/commons/Migration/1.7.2/oracle/001_ADRole.sql
@@ -0,0 +1,3 @@
+-- Additional Role Configuration for Discount
+ALTER TABLE AD_ROLE ADD (IsDiscountUptoLimitPrice char(1) DEFAULT 'N' NOT NULL);
+ALTER TABLE AD_ROLE ADD (IsDiscountAllowedOnTotal char(1) DEFAULT 'N' NOT NULL);
\ No newline at end of file
diff --git a/posterita/commons/Migration/1.7.2/postgresql/001_ADRole.sql b/posterita/commons/Migration/1.7.2/postgresql/001_ADRole.sql
new file mode 100644
index 0000000000..0117237506
--- /dev/null
+++ b/posterita/commons/Migration/1.7.2/postgresql/001_ADRole.sql
@@ -0,0 +1,3 @@
+-- Additional Role Configuration for Discount
+ALTER TABLE ad_role ADD COLUMN IsDiscountUptoLimitPrice char(1) NOT NULL DEFAULT 'N';
+ALTER TABLE ad_role ADD COLUMN IsDiscountAllowedOnTotal char(1) NOT NULL DEFAULT 'N';
\ No newline at end of file
diff --git a/posterita/commons/Migration/oracle.properties b/posterita/commons/Migration/oracle.properties
new file mode 100644
index 0000000000..2feedd7454
--- /dev/null
+++ b/posterita/commons/Migration/oracle.properties
@@ -0,0 +1,6 @@
+#ORACLE_HOME
+#Example Value: oracle.home=C:/oracle/xe/app/oracle/product/10.2.0/server
+oracle.home=C:/adempiere-cd/progs/oracle-xe/app/oracle/product/10.2.0/server
+
+#sqlplus connection string
+oracle.connect.param=ademstbl/adempiere
\ No newline at end of file
diff --git a/posterita/commons/Migration/oracle.properties.template b/posterita/commons/Migration/oracle.properties.template
new file mode 100644
index 0000000000..37b4aec842
--- /dev/null
+++ b/posterita/commons/Migration/oracle.properties.template
@@ -0,0 +1,6 @@
+#ORACLE_HOME
+#Example Value: oracle.home=C:/oracle/xe/app/oracle/product/10.2.0/server
+oracle.home=C:/adempiere-cd/progs/oracle-xe/app/oracle/product/10.2.0/server
+
+#sqlplus connection string
+oracle.connect.param=adempiere/adempiere
\ No newline at end of file
diff --git a/posterita/commons/Migration/trunk/build.xml b/posterita/commons/Migration/trunk/build.xml
new file mode 100644
index 0000000000..f9f01b20f0
--- /dev/null
+++ b/posterita/commons/Migration/trunk/build.xml
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ File ${file.name} status ${sqlplus.result}
+
+
+
+
+
+
diff --git a/posterita/commons/Migration/trunk/oracle/002_ADMessage.sql b/posterita/commons/Migration/trunk/oracle/002_ADMessage.sql
new file mode 100644
index 0000000000..35e47626c5
--- /dev/null
+++ b/posterita/commons/Migration/trunk/oracle/002_ADMessage.sql
@@ -0,0 +1,14 @@
+INSERT INTO ad_message(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, value, msgtext, msgtip, msgtype, entitytype)
+ VALUES(52488, 0, 0, 'Y', sysdate, 100, sysdate, 100, 'discount.upto.price.limit', 'Enforce Discount Upto Limit Price', NULL, 'I', 'U');
+INSERT INTO ad_message(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, value, msgtext, msgtip, msgtype, entitytype)
+ VALUES(52489, 0, 0, 'Y', sysdate, 100, sysdate, 100, 'over.ride.limit.price', 'Enforce Overide Limit Price', NULL, 'I', 'U');
+INSERT INTO ad_message(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, value, msgtext, msgtip, msgtype, entitytype)
+ VALUES(52490, 0, 0, 'Y', sysdate, 100, sysdate, 100, 'discount.allowed.total', 'Allowed Discount On Total Sales', NULL, 'I', 'U');
+INSERT INTO ad_message(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, value, msgtext, msgtip, msgtype, entitytype)
+ VALUES(52491, 0, 0, 'Y', sysdate, 100, sysdate, 100, 'smenu.pos.purchase.report', 'Purchases Report', NULL, 'I', 'U');
+INSERT INTO ad_message(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, value, msgtext, msgtip, msgtype, entitytype)
+ VALUES(52492, 0, 0, 'Y', sysdate, 100, sysdate, 100, 'smenu.settle.payment.credit.purchase', 'Settle Payment For Purchases On Credit', NULL, 'I', 'U');
+INSERT INTO ad_message(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, value, msgtext, msgtip, msgtype, entitytype)
+ VALUES(52493, 0, 0, 'Y', sysdate, 100, sysdate, 100, 'smenu.user.manual', 'User Manual', NULL, 'I', 'U');
+INSERT INTO ad_message(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, value, msgtext, msgtip, msgtype, entitytype)
+ VALUES(52494, 0, 0, 'Y', sysdate, 100, sysdate, 100, 'smenu.contactus', 'Contact Us', NULL, 'I', 'U');
diff --git a/posterita/commons/Migration/trunk/oracle/003_AD_OrgInfo.sql b/posterita/commons/Migration/trunk/oracle/003_AD_OrgInfo.sql
new file mode 100644
index 0000000000..4d39cae971
--- /dev/null
+++ b/posterita/commons/Migration/trunk/oracle/003_AD_OrgInfo.sql
@@ -0,0 +1 @@
+ALTER TABLE ad_orginfo ADD (receiptfootermsg varchar(1023));
diff --git a/posterita/commons/Migration/trunk/oracle/004_AD_Changes for AD_OrgInfo.sql b/posterita/commons/Migration/trunk/oracle/004_AD_Changes for AD_OrgInfo.sql
new file mode 100644
index 0000000000..cdd020cb42
--- /dev/null
+++ b/posterita/commons/Migration/trunk/oracle/004_AD_Changes for AD_OrgInfo.sql
@@ -0,0 +1,15 @@
+INSERT INTO AD_Element
+(ad_element_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby,
+columnname, entitytype, name, printname, description, help, po_name, po_printname, po_description, po_help)
+VALUES(52050, 0, 0, 'Y', sysdate, 100, sysdate, 100,
+'ReceiptFooterMsg', 'U', 'Receipt Footer Msg', 'Receipt Footer Msg', 'This message will be displayed at the bottom of a receipt when doing a sales or purchase', NULL, NULL, NULL, NULL, NULL);
+
+
+INSERT INTO ad_column
+(ad_column_id, ad_client_id, ad_org_id, isactive, created, updated, createdby, updatedby, name,
+description, help, version, entitytype, columnname, ad_table_id, ad_reference_id, ad_reference_value_id,
+ad_val_rule_id, fieldlength, defaultvalue, iskey, isparent, ismandatory, isupdateable, readonlylogic,
+isidentifier, seqno, istranslated, isencrypted, callout, vformat, valuemin, valuemax, isselectioncolumn,
+ad_element_id, ad_process_id, issyncdatabase, isalwaysupdateable, columnsql, mandatorylogic)
+VALUES(52112, 0, 0, 'Y', sysdate, sysdate, 100, 100, 'ReceiptFooterMsg' , 'This message will be displayed at the bottom of a receipt when doing a sales or purchase', NULL, 0, 'U', 'ReceiptFooterMsg', 228, 10, NULL, NULL, 1024, 1, 'N', 'N', 'Y', 'Y', NULL,
+'N', 0, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 52050, NULL, 'N', 'N', NULL, NULL);
diff --git a/posterita/commons/Migration/trunk/oracle/005_MissingIDs.sql b/posterita/commons/Migration/trunk/oracle/005_MissingIDs.sql
new file mode 100644
index 0000000000..c2142b123d
--- /dev/null
+++ b/posterita/commons/Migration/trunk/oracle/005_MissingIDs.sql
@@ -0,0 +1,20 @@
+-- Missing Ids for M_InventoryLine & AD_Role
+-- AD Element
+INSERT INTO ad_element(ad_element_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, columnname, entitytype, name, printname, description, help, po_name, po_printname, po_description, po_help)
+ VALUES(52051, 0, 0, 'Y', sysdate, 100, sysdate, 100, 'IsDiscountUptoLimitPrice', 'U', 'IsDiscountUptoLimitPrice', 'IsDiscountUptoLimitPrice', NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO ad_element(ad_element_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, columnname, entitytype, name, printname, description, help, po_name, po_printname, po_description, po_help)
+ VALUES(52052, 0, 0, 'Y', sysdate, 100, sysdate, 100, 'IsDiscountAllowedOnTotal', 'U', 'IsDiscountAllowedOnTotal', 'IsDiscountAllowedOnTotal', NULL, NULL, NULL, NULL, NULL, NULL);
+
+-- AD Column
+INSERT INTO ad_column(ad_column_id, ad_client_id, ad_org_id, isactive, created, updated, createdby, updatedby, name, description, help, version, entitytype, columnname, ad_table_id, ad_reference_id, ad_reference_value_id, ad_val_rule_id, fieldlength, defaultvalue, iskey, isparent, ismandatory, isupdateable, readonlylogic, isidentifier, seqno, istranslated, isencrypted, callout, vformat, valuemin, valuemax, isselectioncolumn, ad_element_id, ad_process_id, issyncdatabase, isalwaysupdateable, columnsql, mandatorylogic, infofactoryclass)
+ VALUES(52113, 0, 0, 'Y', sysdate, sysdate, 100, 100, 'IsDiscountUptoLimitPrice', NULL, NULL, 0, 'U', 'IsDiscountUptoLimitPrice', 156, 20, NULL, NULL, 1, NULL, 'N', 'N', 'Y', 'Y', NULL, 'N', NULL, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 52051, NULL, 'N', 'N', NULL, NULL, NULL);
+INSERT INTO ad_column(ad_column_id, ad_client_id, ad_org_id, isactive, created, updated, createdby, updatedby, name, description, help, version, entitytype, columnname, ad_table_id, ad_reference_id, ad_reference_value_id, ad_val_rule_id, fieldlength, defaultvalue, iskey, isparent, ismandatory, isupdateable, readonlylogic, isidentifier, seqno, istranslated, isencrypted, callout, vformat, valuemin, valuemax, isselectioncolumn, ad_element_id, ad_process_id, issyncdatabase, isalwaysupdateable, columnsql, mandatorylogic, infofactoryclass)
+ VALUES(52114, 0, 0, 'Y', sysdate, sysdate, 100, 100, 'IsDiscountAllowedOnTotal', NULL, NULL, 0, 'U', 'IsDiscountAllowedOnTotal', 156, 20, NULL, NULL, 1, NULL, 'N', 'N', 'Y', 'Y', NULL, 'N', NULL, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 52052, NULL, 'N', 'N', NULL, NULL, NULL);
+
+-- AD Element
+INSERT INTO ad_element(ad_element_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, columnname, entitytype, name, printname, description, help, po_name, po_printname, po_description, po_help)
+ VALUES(52053, 0, 0, 'Y', sysdate, 100, sysdate, 100, 'QtyCsv', 'U', 'QtyCsv', 'QtyCsv', NULL, NULL, NULL, NULL, NULL, NULL);
+
+-- AD Column
+INSERT INTO ad_column(ad_column_id, ad_client_id, ad_org_id, isactive, created, updated, createdby, updatedby, name, description, help, version, entitytype, columnname, ad_table_id, ad_reference_id, ad_reference_value_id, ad_val_rule_id, fieldlength, defaultvalue, iskey, isparent, ismandatory, isupdateable, readonlylogic, isidentifier, seqno, istranslated, isencrypted, callout, vformat, valuemin, valuemax, isselectioncolumn, ad_element_id, ad_process_id, issyncdatabase, isalwaysupdateable, columnsql, mandatorylogic, infofactoryclass)
+ VALUES(52115, 0, 0, 'Y', sysdate, sysdate, 100, 100, 'QtyCsv', NULL, NULL, 0, 'U', 'QtyCsv', 322, 29, NULL, NULL, 131089, NULL, 'N', 'N', 'Y', 'Y', NULL, 'N', NULL, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 52053, NULL, 'N', 'N', NULL, NULL, NULL);
diff --git a/posterita/commons/Migration/trunk/oracle/006_PackSize_MProduct.sql b/posterita/commons/Migration/trunk/oracle/006_PackSize_MProduct.sql
new file mode 100644
index 0000000000..b4e2943c21
--- /dev/null
+++ b/posterita/commons/Migration/trunk/oracle/006_PackSize_MProduct.sql
@@ -0,0 +1,10 @@
+-- The Units Per Pack indicates the no of units of a product packed together.
+ALTER TABLE M_Product ADD (UnitsPerPack number(10,0) default 1 not null );
+
+-- AD Element --
+INSERT INTO AD_ELEMENT(ad_element_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, columnname, entitytype, name, printname, description, help, po_name, po_printname, po_description, po_help)
+ VALUES(52054, 0, 0, 'Y', sysdate, 100, sysdate, 100, 'UnitsPerPack', 'U', 'UnitsPerPack', 'UnitsPerPack', 'The Units Per Pack indicates the no of units of a product packed together.', NULL, NULL, NULL, NULL, NULL);
+
+-- AD Column --
+INSERT INTO AD_COLUMN(ad_column_id, ad_client_id, ad_org_id, isactive, created, updated, createdby, updatedby, name, description, help, version, entitytype, columnname, ad_table_id, ad_reference_id, ad_reference_value_id, ad_val_rule_id, fieldlength, defaultvalue, iskey, isparent, ismandatory, isupdateable, readonlylogic, isidentifier, seqno, istranslated, isencrypted, callout, vformat, valuemin, valuemax, isselectioncolumn, ad_element_id, ad_process_id, issyncdatabase, isalwaysupdateable, columnsql, mandatorylogic, infofactoryclass)
+ VALUES(52116, 0, 0, 'Y', sysdate, sysdate, 100, 100, 'UnitsPerPack', 'The Units Per Pack indicates the no of units of a product packed together.', NULL, 0, 'U', 'UnitsPerPack', 208, 11, NULL, NULL, 14, NULL, 'N', 'N', 'N', 'Y', NULL, 'N', 0, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 52054, NULL, 'N', 'N', NULL, NULL, NULL);
diff --git a/posterita/commons/Migration/trunk/oracle/007_CashPayment.sql b/posterita/commons/Migration/trunk/oracle/007_CashPayment.sql
new file mode 100644
index 0000000000..6a20e40e85
--- /dev/null
+++ b/posterita/commons/Migration/trunk/oracle/007_CashPayment.sql
@@ -0,0 +1,85 @@
+--- Alter table -- oracle
+--- Table: C_Payment -----------------------------------------------------------
+ALTER TABLE C_Payment
+MODIFY C_BankAccount_ID NUMBER(10,0) NULL;
+
+
+ALTER TABLE C_Payment
+ADD C_CashBook_ID NUMBER(10,0);
+
+ALTER TABLE C_Payment
+ADD CONSTRAINT C_Payment__C_CashBo_C_CashBook
+FOREIGN KEY(C_CashBook_ID) REFERENCES C_CashBook(C_CashBook_ID);
+
+--------------------------------------------------------------------------------
+ALTER TABLE C_CashLine
+ADD C_Payment_ID NUMBER(10);
+
+--- Migration scripts ----------------------------------------------------------
+-- Aug 26, 2008 11:49:31 AM MUT
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version)
+VALUES (0,52117,1463,0,19,335,'C_CashBook_ID',sysdate,100,'Cash Book for recording petty cash transactions','U',10,'The Cash Book identifies a unique cash book. The cash book is used to record cash transactions.','Y','N','N','N','N','N','N','N','N','Y','Cash Book',sysdate,100,0);
+
+-- Aug 26, 2008 11:49:31 AM MUT
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52117 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID);
+
+
+-- Aug 26, 2008 11:50:27 AM MUT
+-- Default comment for updating dictionary
+UPDATE AD_Column SET IsMandatory='N',Updated=sysdate,UpdatedBy=100 WHERE AD_Column_ID=3880;
+
+
+-- Aug 26, 2008 11:50:27 AM MUT
+-- Default comment for updating dictionary
+UPDATE AD_Field SET Name='Bank Account', Description='Account at the Bank', Help='The Bank Account identifies an account at this Bank.' WHERE AD_Column_ID=3880 AND IsCentrallyMaintained='Y';
+
+
+-- Aug 26, 2008 11:51:40 AM MUT
+-- Default comment for updating dictionary
+INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy)
+VALUES (0,52117,52052,0,330,sysdate,100,'Cash Book for recording petty cash transactions',10,'U','The Cash Book identifies a unique cash book. The cash book is used to record cash transactions.','Y','Y','Y','N','N','N','N','N','Cash Book',sysdate,100);
+
+
+-- Aug 26, 2008 11:51:40 AM MUT
+-- Default comment for updating dictionary
+INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=52052 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID);
+
+
+-- Aug 26, 2008 11:51:40 AM MUT
+-- Default comment for updating dictionary
+INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy)
+VALUES (0,13705,52053,0,330,sysdate,100,10,'D','Y','Y','Y','N','N','N','N','N','Referenced Payment',sysdate,100);
+
+
+-- Aug 26, 2008 11:51:40 AM MUT
+-- Default comment for updating dictionary
+INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=52053 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID);
+
+
+-- Aug 26, 2008 11:52:11 AM MUT
+-- Default comment for updating dictionary
+UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=52053;
+
+
+-- Aug 26, 2008 11:52:11 AM MUT
+-- Default comment for updating dictionary
+UPDATE AD_Field SET SeqNo=660,IsDisplayed='Y' WHERE AD_Field_ID=52052;
+
+
+-- Aug 26, 2008 11:52:56 AM MUT
+-- Default comment for updating dictionary
+UPDATE AD_Field SET DisplayLogic='@TenderType@ !''X''',Updated=sysdate,UpdatedBy=100 WHERE AD_Field_ID=4030;
+
+
+-- Aug 26, 2008 11:54:17 AM MUT
+-- Default comment for updating dictionary
+UPDATE AD_Field SET DisplayLength=14, DisplayLogic='@TenderType@=''X''', IsSameLine='Y',Updated=sysdate,UpdatedBy=100 WHERE AD_Field_ID=52052;
+
+
+-- Aug 26, 2008 11:54:42 AM MUT
+-- Default comment for updating dictionary
+UPDATE AD_Tab SET WhereClause=NULL,Updated=sysdate,UpdatedBy=100 WHERE AD_Tab_ID=330;
+
+
diff --git a/posterita/commons/Migration/trunk/postgresql/002_ADMessage.sql b/posterita/commons/Migration/trunk/postgresql/002_ADMessage.sql
new file mode 100644
index 0000000000..3b2096d498
--- /dev/null
+++ b/posterita/commons/Migration/trunk/postgresql/002_ADMessage.sql
@@ -0,0 +1,18 @@
+INSERT INTO ad_message(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, value, msgtext, msgtip, msgtype, entitytype)
+ VALUES(52488, 0, 0, 'Y', now(), 100, now(), 100, 'discount.upto.price.limit', 'Enforce Discount Upto Limit Price', NULL, 'I', 'U');
+INSERT INTO ad_message(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, value, msgtext, msgtip, msgtype, entitytype)
+ VALUES(52489, 0, 0, 'Y', now(), 100, now(), 100, 'over.ride.limit.price', 'Enforce Overide Limit Price', NULL, 'I', 'U');
+INSERT INTO ad_message(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, value, msgtext, msgtip, msgtype, entitytype)
+ VALUES(52490, 0, 0, 'Y', now(), 100, now(), 100, 'discount.allowed.total', 'Allowed Discount On Total Sales', NULL, 'I', 'U');
+INSERT INTO ad_message(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, value, msgtext, msgtip, msgtype, entitytype)
+ VALUES(52491, 0, 0, 'Y', now(), 100, now(), 100, 'smenu.pos.purchase.report', 'Purchases Report', NULL, 'I', 'U');
+INSERT INTO ad_message(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, value, msgtext, msgtip, msgtype, entitytype)
+ VALUES(52492, 0, 0, 'Y', now(), 100, now(), 100, 'smenu.settle.payment.credit.purchase', 'Settle Payment For Purchases On Credit', NULL, 'I', 'U');
+INSERT INTO ad_message(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, value, msgtext, msgtip, msgtype, entitytype)
+ VALUES(52493, 0, 0, 'Y', now(), 100, now(), 100, 'smenu.user.manual', 'User Manual', NULL, 'I', 'U');
+INSERT INTO ad_message(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, value, msgtext, msgtip, msgtype, entitytype)
+ VALUES(52494, 0, 0, 'Y', now(), 100, now(), 100, 'smenu.contactus', 'Contact Us', NULL, 'I', 'U');
+INSERT INTO ad_message(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, value, msgtext, msgtip, msgtype, entitytype)
+ VALUES(52495, 0, 0, 'Y', now(), 100, now(), 100, 'discount.amt.order.level', 'Discount Amount', NULL, 'I', 'U');
+INSERT INTO ad_message(ad_message_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, value, msgtext, msgtip, msgtype, entitytype)
+ VALUES(52496, 0, 0, 'Y', now(), 100, now(), 100, 'write.off.amt.order.level', 'Writeoff Amount', NULL, 'I', 'U');
diff --git a/posterita/commons/Migration/trunk/postgresql/003_AD_OrgInfo.sql b/posterita/commons/Migration/trunk/postgresql/003_AD_OrgInfo.sql
new file mode 100644
index 0000000000..b4d0793838
--- /dev/null
+++ b/posterita/commons/Migration/trunk/postgresql/003_AD_OrgInfo.sql
@@ -0,0 +1 @@
+ALTER TABLE ad_orginfo ADD COLUMN receiptfootermsg varchar(1023);
diff --git a/posterita/commons/Migration/trunk/postgresql/004_AD_Changes for AD_OrgInfo.sql b/posterita/commons/Migration/trunk/postgresql/004_AD_Changes for AD_OrgInfo.sql
new file mode 100644
index 0000000000..ab403e3f47
--- /dev/null
+++ b/posterita/commons/Migration/trunk/postgresql/004_AD_Changes for AD_OrgInfo.sql
@@ -0,0 +1,15 @@
+INSERT INTO AD_Element
+(ad_element_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby,
+columnname, entitytype, name, printname, description, help, po_name, po_printname, po_description, po_help)
+VALUES(52050, 0, 0, 'Y', now() , 100, now(), 100,
+'ReceiptFooterMsg', 'U', 'Receipt Footer Msg', 'Receipt Footer Msg', 'This message will be displayed at the bottom of a receipt when doing a sales or purchase', NULL, NULL, NULL, NULL, NULL);
+
+
+INSERT INTO ad_column
+(ad_column_id, ad_client_id, ad_org_id, isactive, created, updated, createdby, updatedby, name,
+description, help, version, entitytype, columnname, ad_table_id, ad_reference_id, ad_reference_value_id,
+ad_val_rule_id, fieldlength, defaultvalue, iskey, isparent, ismandatory, isupdateable, readonlylogic,
+isidentifier, seqno, istranslated, isencrypted, callout, vformat, valuemin, valuemax, isselectioncolumn,
+ad_element_id, ad_process_id, issyncdatabase, isalwaysupdateable, columnsql, mandatorylogic)
+VALUES(52112, 0, 0, 'Y', now(), now(), 100, 100, 'ReceiptFooterMsg' , 'This message will be displayed at the bottom of a receipt when doing a sales or purchase', NULL, 0, 'U', 'ReceiptFooterMsg', 228, 10, NULL, NULL, 1024, 1, 'N', 'N', 'Y', 'Y', NULL,
+'N', 0, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 52050, NULL, 'N', 'N', NULL, NULL);
diff --git a/posterita/commons/Migration/trunk/postgresql/005_MissingIDs.sql b/posterita/commons/Migration/trunk/postgresql/005_MissingIDs.sql
new file mode 100644
index 0000000000..230c7a4b97
--- /dev/null
+++ b/posterita/commons/Migration/trunk/postgresql/005_MissingIDs.sql
@@ -0,0 +1,20 @@
+-- Missing Ids for M_InventoryLine & AD_Role
+-- AD Element
+INSERT INTO ad_element(ad_element_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, columnname, entitytype, name, printname, description, help, po_name, po_printname, po_description, po_help)
+ VALUES(52051, 0, 0, 'Y', now(), 100, now(), 100, 'IsDiscountUptoLimitPrice', 'U', 'IsDiscountUptoLimitPrice', 'IsDiscountUptoLimitPrice', NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO ad_element(ad_element_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, columnname, entitytype, name, printname, description, help, po_name, po_printname, po_description, po_help)
+ VALUES(52052, 0, 0, 'Y', now(), 100, now(), 100, 'IsDiscountAllowedOnTotal', 'U', 'IsDiscountAllowedOnTotal', 'IsDiscountAllowedOnTotal', NULL, NULL, NULL, NULL, NULL, NULL);
+
+-- AD Column
+INSERT INTO ad_column(ad_column_id, ad_client_id, ad_org_id, isactive, created, updated, createdby, updatedby, name, description, help, version, entitytype, columnname, ad_table_id, ad_reference_id, ad_reference_value_id, ad_val_rule_id, fieldlength, defaultvalue, iskey, isparent, ismandatory, isupdateable, readonlylogic, isidentifier, seqno, istranslated, isencrypted, callout, vformat, valuemin, valuemax, isselectioncolumn, ad_element_id, ad_process_id, issyncdatabase, isalwaysupdateable, columnsql, mandatorylogic, infofactoryclass)
+ VALUES(52113, 0, 0, 'Y', now(), now(), 100, 100, 'IsDiscountUptoLimitPrice', NULL, NULL, 0, 'U', 'IsDiscountUptoLimitPrice', 156, 20, NULL, NULL, 1, NULL, 'N', 'N', 'Y', 'Y', NULL, 'N', NULL, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 52051, NULL, 'N', 'N', NULL, NULL, NULL);
+INSERT INTO ad_column(ad_column_id, ad_client_id, ad_org_id, isactive, created, updated, createdby, updatedby, name, description, help, version, entitytype, columnname, ad_table_id, ad_reference_id, ad_reference_value_id, ad_val_rule_id, fieldlength, defaultvalue, iskey, isparent, ismandatory, isupdateable, readonlylogic, isidentifier, seqno, istranslated, isencrypted, callout, vformat, valuemin, valuemax, isselectioncolumn, ad_element_id, ad_process_id, issyncdatabase, isalwaysupdateable, columnsql, mandatorylogic, infofactoryclass)
+ VALUES(52114, 0, 0, 'Y', now(), now(), 100, 100, 'IsDiscountAllowedOnTotal', NULL, NULL, 0, 'U', 'IsDiscountAllowedOnTotal', 156, 20, NULL, NULL, 1, NULL, 'N', 'N', 'Y', 'Y', NULL, 'N', NULL, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 52052, NULL, 'N', 'N', NULL, NULL, NULL);
+
+-- AD Element
+INSERT INTO ad_element(ad_element_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, columnname, entitytype, name, printname, description, help, po_name, po_printname, po_description, po_help)
+ VALUES(52053, 0, 0, 'Y', now(), 100, now(), 100, 'QtyCsv', 'U', 'QtyCsv', 'QtyCsv', NULL, NULL, NULL, NULL, NULL, NULL);
+
+-- AD Column
+INSERT INTO ad_column(ad_column_id, ad_client_id, ad_org_id, isactive, created, updated, createdby, updatedby, name, description, help, version, entitytype, columnname, ad_table_id, ad_reference_id, ad_reference_value_id, ad_val_rule_id, fieldlength, defaultvalue, iskey, isparent, ismandatory, isupdateable, readonlylogic, isidentifier, seqno, istranslated, isencrypted, callout, vformat, valuemin, valuemax, isselectioncolumn, ad_element_id, ad_process_id, issyncdatabase, isalwaysupdateable, columnsql, mandatorylogic, infofactoryclass)
+ VALUES(52115, 0, 0, 'Y', now(), now(), 100, 100, 'QtyCsv', NULL, NULL, 0, 'U', 'QtyCsv', 322, 29, NULL, NULL, 131089, NULL, 'N', 'N', 'Y', 'Y', NULL, 'N', NULL, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 52053, NULL, 'N', 'N', NULL, NULL, NULL);
diff --git a/posterita/commons/Migration/trunk/postgresql/006_PackSize_MProduct.sql b/posterita/commons/Migration/trunk/postgresql/006_PackSize_MProduct.sql
new file mode 100644
index 0000000000..d324689318
--- /dev/null
+++ b/posterita/commons/Migration/trunk/postgresql/006_PackSize_MProduct.sql
@@ -0,0 +1,10 @@
+-- The Units Per Pack indicates the no of units of a product packed together.
+ALTER TABLE M_Product ADD COLUMN UnitsPerPack numeric(10,0) not null default 1;
+
+-- AD Element --
+INSERT INTO ad_element(ad_element_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, columnname, entitytype, name, printname, description, help, po_name, po_printname, po_description, po_help)
+ VALUES(52054, 0, 0, 'Y', now(), 100, now(), 100, 'UnitsPerPack', 'U', 'UnitsPerPack', 'UnitsPerPack', 'The Units Per Pack indicates the no of units of a product packed together.', NULL, NULL, NULL, NULL, NULL);
+
+-- AD Column --
+INSERT INTO ad_column(ad_column_id, ad_client_id, ad_org_id, isactive, created, updated, createdby, updatedby, name, description, help, version, entitytype, columnname, ad_table_id, ad_reference_id, ad_reference_value_id, ad_val_rule_id, fieldlength, defaultvalue, iskey, isparent, ismandatory, isupdateable, readonlylogic, isidentifier, seqno, istranslated, isencrypted, callout, vformat, valuemin, valuemax, isselectioncolumn, ad_element_id, ad_process_id, issyncdatabase, isalwaysupdateable, columnsql, mandatorylogic, infofactoryclass)
+ VALUES(52116, 0, 0, 'Y', now(), now(), 100, 100, 'UnitsPerPack', 'The Units Per Pack indicates the no of units of a product packed together.', NULL, 0, 'U', 'UnitsPerPack', 208, 11, NULL, NULL, 14, NULL, 'N', 'N', 'N', 'Y', NULL, 'N', 0, 'N', 'N', NULL, NULL, NULL, NULL, 'N', 52054, NULL, 'N', 'N', NULL, NULL, NULL);
diff --git a/posterita/commons/Migration/trunk/postgresql/007_CashPayment.sql b/posterita/commons/Migration/trunk/postgresql/007_CashPayment.sql
new file mode 100644
index 0000000000..365ee8e988
--- /dev/null
+++ b/posterita/commons/Migration/trunk/postgresql/007_CashPayment.sql
@@ -0,0 +1,87 @@
+-- Alter table -- postgres
+
+--- Table: C_Payment -----------------------------------------------------------
+ALTER TABLE C_Payment
+ALTER COLUMN C_BankAccount_ID DROP NOT NULL;
+
+
+ALTER TABLE C_Payment
+ADD C_CashBook_ID NUMERIC(10);
+
+ALTER TABLE C_Payment
+ADD CONSTRAINT C_Payment__C_CashBo_C_CashBook
+FOREIGN KEY(C_CashBook_ID) REFERENCES C_CashBook(C_CashBook_ID);
+
+--------------------------------------------------------------------------------
+ALTER TABLE C_CashLine
+ADD C_Payment_ID NUMERIC(10);
+
+--- Migration scripts ----------------------------------------------------------
+-- Aug 26, 2008 11:49:31 AM MUT
+-- Default comment for updating dictionary
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version)
+VALUES (0,52117,1463,0,19,335,'C_CashBook_ID',now(),100,'Cash Book for recording petty cash transactions','U',10,'The Cash Book identifies a unique cash book. The cash book is used to record cash transactions.','Y','N','N','N','N','N','N','N','N','Y','Cash Book',now(),100,0)
+;
+
+-- Aug 26, 2008 11:49:31 AM MUT
+-- Default comment for updating dictionary
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=52117 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Aug 26, 2008 11:50:27 AM MUT
+-- Default comment for updating dictionary
+UPDATE AD_Column SET IsMandatory='N',Updated=now(),UpdatedBy=100 WHERE AD_Column_ID=3880
+;
+
+-- Aug 26, 2008 11:50:27 AM MUT
+-- Default comment for updating dictionary
+UPDATE AD_Field SET Name='Bank Account', Description='Account at the Bank', Help='The Bank Account identifies an account at this Bank.' WHERE AD_Column_ID=3880 AND IsCentrallyMaintained='Y'
+;
+
+-- Aug 26, 2008 11:51:40 AM MUT
+-- Default comment for updating dictionary
+INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy)
+VALUES (0,52117,52052,0,330,now(),100,'Cash Book for recording petty cash transactions',10,'U','The Cash Book identifies a unique cash book. The cash book is used to record cash transactions.','Y','Y','Y','N','N','N','N','N','Cash Book',now(),100)
+;
+
+-- Aug 26, 2008 11:51:40 AM MUT
+-- Default comment for updating dictionary
+INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=52052 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
+;
+
+-- Aug 26, 2008 11:51:40 AM MUT
+-- Default comment for updating dictionary
+INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy)
+VALUES (0,13705,52053,0,330,now(),100,10,'D','Y','Y','Y','N','N','N','N','N','Referenced Payment',now(),100)
+;
+
+-- Aug 26, 2008 11:51:40 AM MUT
+-- Default comment for updating dictionary
+INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=52053 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
+;
+
+-- Aug 26, 2008 11:52:11 AM MUT
+-- Default comment for updating dictionary
+UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=52053
+;
+
+-- Aug 26, 2008 11:52:11 AM MUT
+-- Default comment for updating dictionary
+UPDATE AD_Field SET SeqNo=660,IsDisplayed='Y' WHERE AD_Field_ID=52052
+;
+
+-- Aug 26, 2008 11:52:56 AM MUT
+-- Default comment for updating dictionary
+UPDATE AD_Field SET DisplayLogic='@TenderType@ !''X''',Updated=now(),UpdatedBy=100 WHERE AD_Field_ID=4030
+;
+
+-- Aug 26, 2008 11:54:17 AM MUT
+-- Default comment for updating dictionary
+UPDATE AD_Field SET DisplayLength=14, DisplayLogic='@TenderType@=''X''', IsSameLine='Y',Updated=now(),UpdatedBy=100 WHERE AD_Field_ID=52052
+;
+
+-- Aug 26, 2008 11:54:42 AM MUT
+-- Default comment for updating dictionary
+UPDATE AD_Tab SET WhereClause=NULL,Updated=now(),UpdatedBy=100 WHERE AD_Tab_ID=330
+;
+
diff --git a/posterita/commons/build.xml b/posterita/commons/build.xml
new file mode 100644
index 0000000000..c3a2633ba2
--- /dev/null
+++ b/posterita/commons/build.xml
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/posterita/commons/properties.xml b/posterita/commons/properties.xml
new file mode 100644
index 0000000000..be1e2401c9
--- /dev/null
+++ b/posterita/commons/properties.xml
@@ -0,0 +1,17 @@
+
+
+
+ This project file sets all properties needed during build and
+ installation. This file is imported in all other build.xml
+ files. This file provides a central place for managing
+ properties.
+
+
+
+
+
+
+
+
+
+
diff --git a/posterita/posterita/build.properties b/posterita/posterita/build.properties
new file mode 100644
index 0000000000..096807e0fc
--- /dev/null
+++ b/posterita/posterita/build.properties
@@ -0,0 +1 @@
+posterita.dev.home=
diff --git a/posterita/posterita/build.xml b/posterita/posterita/build.xml
new file mode 100644
index 0000000000..359b104ea6
--- /dev/null
+++ b/posterita/posterita/build.xml
@@ -0,0 +1,151 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/posterita/posterita/properties.xml b/posterita/posterita/properties.xml
new file mode 100644
index 0000000000..be1e2401c9
--- /dev/null
+++ b/posterita/posterita/properties.xml
@@ -0,0 +1,17 @@
+
+
+
+ This project file sets all properties needed during build and
+ installation. This file is imported in all other build.xml
+ files. This file provides a central place for managing
+ properties.
+
+
+
+
+
+
+
+
+
+
diff --git a/posterita/posterita/src/aspect/org/posterita/aspect/POAspect.aj b/posterita/posterita/src/aspect/org/posterita/aspect/POAspect.aj
new file mode 100644
index 0000000000..186fe56bf3
--- /dev/null
+++ b/posterita/posterita/src/aspect/org/posterita/aspect/POAspect.aj
@@ -0,0 +1,83 @@
+/******************************************************************************
+ * Product: Posterita Web-Based POS and Adempiere Plugin *
+ * Copyright (C) 2008 Posterita Ltd *
+ * This file is part of POSterita *
+ * *
+ * POSterita is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License along *
+ * with this program; if not, write to the Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *
+ *****************************************************************************/
+
+package org.posterita.aspect;
+
+import org.posterita.businesslogic.POSTerminalManager;
+import org.posterita.exceptions.POException;
+import org.posterita.exceptions.TerminalLockedException;
+import org.compiere.model.PO;
+import org.compiere.model.X_C_Order;
+import org.compiere.process.DocAction;
+import org.compiere.util.CLogger;
+import org.compiere.util.ValueNamePair;
+
+/**
+ * @author ashley
+ */
+public aspect POAspect
+{
+ pointcut savePO():
+ call(public boolean PO.save());
+
+ boolean around() : savePO()
+ {
+ if (thisJoinPoint.getTarget() instanceof X_C_Order)
+ {
+ X_C_Order order = (X_C_Order)thisJointPoint.getTarget();
+ int terminalId = order.getC_POS_ID();
+
+ if (terminalId > 0 && POSTerminalManager.isTerminalLocked(po.getCtx(), terminalId))
+ {
+ throw new POException("Terminal is locked");
+ }
+ }
+
+ boolean val = proceed();
+
+ if (!val)
+ {
+ Exception ex = CLogger.retrieveException();
+ ValueNamePair err = CLogger.retrieveError();
+ String msg;
+
+ if (ex != null)
+ {
+ msg = ex.getMessage();
+ }
+ else if (err != null)
+ {
+ msg = err.getValue() + " " + err.getName();
+ }
+ else if (thisJoinPoint.getTarget() instanceof DocAction)
+ {
+ msg = ((DocAction)thisJoinPoint.getTarget()).getProcessMsg();
+ }
+ else
+ {
+ msg = "Unknown";
+ }
+
+ throw new POException("Could not save PO - Class: " + thisJoinPoint.getTarget().getClass().getName() + " Cause: " + msg);
+ }
+
+ return val;
+ }
+}
\ No newline at end of file
diff --git a/posterita/posterita/src/aspect/org/posterita/aspect/TrxAspect.aj b/posterita/posterita/src/aspect/org/posterita/aspect/TrxAspect.aj
new file mode 100644
index 0000000000..059b06abac
--- /dev/null
+++ b/posterita/posterita/src/aspect/org/posterita/aspect/TrxAspect.aj
@@ -0,0 +1,36 @@
+/******************************************************************************
+ * Product: Posterita Web-Based POS and Adempiere Plugin *
+ * Copyright (C) 2008 Posterita Ltd *
+ * This file is part of POSterita *
+ * *
+ * POSterita is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License along *
+ * with this program; if not, write to the Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *
+ *****************************************************************************/
+package org.posterita.aspect;
+
+import org.compiere.util.Trx;
+
+/**
+ * @author ashley
+ */
+public aspect TrxAspect
+{
+ pointcut closeTrx():
+ call(public boolean Trx.close());
+
+ before() : closeTrx()
+ {
+ ((Trx)thisJoinPoint.getTarget()).rollback();
+ }
+}
diff --git a/posterita/posterita/src/ear/application.xml b/posterita/posterita/src/ear/application.xml
new file mode 100644
index 0000000000..924d1f2574
--- /dev/null
+++ b/posterita/posterita/src/ear/application.xml
@@ -0,0 +1,24 @@
+
+
+
+ Web POS
+ webPOS
+
+ AdempiereSLib.jar
+
+
+ Adempiere.jar
+
+
+ adempiereApps.jar
+
+
+
+ posterita.war
+ /posterita
+
+
+
diff --git a/posterita/posterita/src/main/ApproveOrderEmailTemplate.properties b/posterita/posterita/src/main/ApproveOrderEmailTemplate.properties
new file mode 100644
index 0000000000..043228afef
--- /dev/null
+++ b/posterita/posterita/src/main/ApproveOrderEmailTemplate.properties
@@ -0,0 +1,6 @@
+subject=Tamak Webstore - Order Approved
+action=action
+content=, Your order has been approved.
+signin.info=Order Information
+link=Your products will be shipped shortly. An email will be sent to notify you when it has been shipped.
+emailRegards=Regards, Tamak Webmaster
\ No newline at end of file
diff --git a/posterita/posterita/src/main/CreateCustomerEmailTemplate.properties b/posterita/posterita/src/main/CreateCustomerEmailTemplate.properties
new file mode 100644
index 0000000000..b5d2c7c746
--- /dev/null
+++ b/posterita/posterita/src/main/CreateCustomerEmailTemplate.properties
@@ -0,0 +1,12 @@
+subject=Tamak Webstore Account
+action=action
+&email=&username
+&password=&password
+signin.info=Your Login Information
+login=Login:
+password=Password:
+content=Thank you for creating an account on Tamak.com
+
+link=Please click on the link below to automatically log you on Tamak.com. Enjoy!
+
+emailRegards=Regards, Tamak Webmaster
diff --git a/posterita/posterita/src/main/CreateOrderEmailTemplate.properties b/posterita/posterita/src/main/CreateOrderEmailTemplate.properties
new file mode 100644
index 0000000000..6da43c37d7
--- /dev/null
+++ b/posterita/posterita/src/main/CreateOrderEmailTemplate.properties
@@ -0,0 +1,6 @@
+subject=Tamak Webstore - New Order Received
+action=action
+content=has created a new order on Tamak Webstore
+signin.info=New Order Information
+link=Please login on the Administration section to view the order for approval and shipping.
+emailRegards=Regards, Tamak Webmaster
diff --git a/posterita/posterita/src/main/Factory.properties b/posterita/posterita/src/main/Factory.properties
new file mode 100644
index 0000000000..0cc35a30ec
--- /dev/null
+++ b/posterita/posterita/src/main/Factory.properties
@@ -0,0 +1,127 @@
+#Factory
+#Mon Oct 24 12:14:38 GST 2005
+attribute.car.model.id=1016505
+smenu.order.history=1025273
+smenu.product.restriction.id=1056362
+smenu.dealer.transfer.request.id=1050047
+attributeset.car.id=1003664
+smenintu.dealer.transfer.history.id=1050050
+attributeset.bike.id=1003665
+pmenu.dealer.transfer.id=1050045
+smenu.view.all.users.id=1056370
+smenu.messagessent.id=1050002
+discountschema.id=1004556
+pmenu.ordersreceived.id=1050030
+taxCategory.default.id=1003155
+smenu.purchase.order.create.id=1050019
+attribute.bike.modelGroup.id=1016511
+smenu.dealer.order.history=1031333
+smenu.messagescompose.id=1050003
+smenu.movement.id=1056365
+smenu.createsco.id=1050028
+attribute.bike.model.id=1016510
+menu.createLocator.id=1056361
+productCategory.car.id=1003699
+smenu.mmovement.id=1031380
+smenu.allocation.edit.id=1050073
+smenu.view.all.banks.id=1056360
+attribute.bike.trx.id=1016513
+car.assetgroup.id=1000621
+role.HsafAutoAdmin.id=1016896
+smenu.purchase.order.history.id=1050021
+smenu.receive.new.vehicles.id=1050040
+smenu.group.models.id=1056369
+productCategory.usedCar.id=1003700
+pmenu.natis.release.id=1031345
+smenu.inquire.on.vin.number.id=1050014
+superUser.id=1016038
+smenu.createBankAccount.id=1056366
+role.udiAdmin.id=1016895
+smenu.inquiry.id=1031329
+smenu.role.id=1056373
+attribute.car.year.id=1016509
+smenu.view.wholesale.report.id=1050082
+smenu.special.colour.order.received.id=1031337
+smenu.dealer.order.received.id=1050052
+smenu.sell.release.vehicle.id=1050057
+smenu.view.sco.products.id=1031390
+smenu.allocation.orders.view.id=1050075
+smenu.my.certificates.id=1050059
+smenu.release.vehicle.id=1031347
+smenu.my.stock.id=1050012
+wholesale.priceList.purchase.id=1005554
+priceLV.sales.id=1005891
+role.stock.controller.id=1016893
+smenu.search.vin.number.id=1056374
+smenu.dealer.order.reeived.id=1031336
+smenu.view.all.orgs.id=1056371
+smenu.price.listing=1056372
+smenu.view.retail.report.id=1050081
+smenu.licensing.district.id=1031346
+pmenu.sales.id=1050055
+pmenu.stock.inquiry.id=1050008
+role.test.id=1016894
+smenu.view.sales.report.without.trans.id=1050080
+smenu.sco.history.id=1050027
+pmenu.invoice.id=1031338
+smenu.warehouse.id=1056359
+attribute.car.colour.id=1016507
+pmenu.my.details.id=1050004
+smenu.allocation.create.id=1050068
+pmenu.home.id=1049999
+pmenu.messages.id=1050000
+pmenu.payment.id=1031340
+attribute.car.make.id=1016504
+smenu.payment.history=1031341
+attribute.bike.colour.id=1016512
+role.sales.person.id=1016892
+smenu.create.customer.id=1056375
+smenu.new.car.stock.inquiry.id=1050009
+smenu.create.target.sales.id=1056368
+priceLV.purchase.id=1005889
+smenu.allocation.history.id=1050077
+smenu.invoice.history=1031339
+smenu.wholesale.order.history=1050038
+attribute.car.modelGroup.id=1016506
+smenu.productAttribute.id=1056367
+smenu.messagesinbox.id=1050001
+smenu.allocations.view.id=1031354
+role.sales.manager.id=1016891
+smenu.view.certificate.id=1031348
+smenu.upload.cvs.file.id=1050042
+pmenu.dealer.order.id=1050017
+attribute.car.trx.id=1016508
+role.system.administrator.id=1016889
+pmenu.specialcolourorder.id=1050025
+smenu.changeemail.id=1050007
+pricelist.sales.id=1005553
+pricelist.purchase.id=1005552
+pmenu.reports.id=1050078
+smenu.specialcolourorderreceived.id=1050034
+pmenu.admin.id=1050084
+smenu.allocation.order.create.id=1050071
+wholesale.priceLV.purchase.id=1005890
+smenu.create.shipper.id=1056376
+role.HsafWingAdmin.id=1016897
+smenu.view.my.details.ic=1050005
+pmenu.allocation.id=1050065
+smenu.my.used.car.stock.id=1050011
+smenu.sales.history.id=1050063
+smenu.createProduct.id=1056364
+tax.default.id=1002758
+smenu.view.receipt.history=1031344
+pmenu.logout.id=1056377
+smenu.trade.in.id=1050061
+usedCar.assetgroup.id=1000627
+pmenu.inOut.id=1031342
+smenu.view.sales.report.with.trans.id=1050079
+role.dealer.principal.id=1016890
+smenu.view.shipment.history=1031343
+smenu.closemenu.id=1031363
+smenu.changeuserpassword.id=1050006
+smenu.product.inquiry=1031373
+attribute.bike.year.id=1016514
+pmenu.allocations.id=1031350
+pmenu.wholesaler.order.id=1050036
+pmenu.history.id=1050083
+menu.createBPartner.id=1056358
diff --git a/posterita/posterita/src/main/MessageResources.properties b/posterita/posterita/src/main/MessageResources.properties
new file mode 100644
index 0000000000..e909b58b6b
--- /dev/null
+++ b/posterita/posterita/src/main/MessageResources.properties
@@ -0,0 +1,1262 @@
+asset.natisrelease.no=NaTIS Release No
+asset.natiscontrol.no=NaTIS Control No
+asset.register.no=Register No
+
+assetstatus.hsaf.stock=In Stock
+assetstatus.onwater.stock=On Water
+assetstatus.retailed=Retailed
+assetStatus.wholesaled=Wholesaled
+
+#Tamak specific
+#footer.copyright=All Contents ©2006 Tamak ICT
+#title.welcome=Welcome to Tamak POS
+#title.POS=Tamak POS
+
+footer.copyright=All Contents ©2006 Tamak ICT
+title.welcome=Welcome to Tamak POS
+title.POS=Tamak POS
+
+
+
+scostatus.update =Update SCO Status
+
+# -- standard errors --
+errors.header=
+errors.prefix=
+errors.suffix=
+errors.footer=
+# -- validator --
+
+error.minlength.customerID=Customer ID should be of 13 digits
+error.natiscustomer.alreadyexist=This customer already exists on your database.Please select the link "Existing Customer?" and choose the customer.
+error.dataAccessException=Your request cannot be processed because some important data is missing. Please contact the System Administrator for more details.
+error.operationException=Please specify an order to view
+error.systemException=An error has been detected. Please contact the System Administrator for more information.
+error.runtimeException=An runtime error has occurred. Please contact the System Administrator for more details
+errorpage.title=Errror Page
+errorpage.heading=You have performed an illegal operation.
+errors.invalid={0} is invalid.
+error.required={0} is required.
+error.match={0} do not match.
+error.date.prior.today=ArrivalDate cannot be prior to today's date.
+error.dateRangeNotValidException=Date range is not valid. Please try another one
+error.match.password=Your passwords do not match. Please retype your new password.
+error.match.newPassword=Your passwords do not match. Please retype your new password.
+error.match.newEmail=Your emails do not match. Please retype your new email.
+errors.maxlength={0} can not be greater than {1} characters.
+errors.minlength={0} can not be less than {1} characters.
+errors.range={0} is not in the range {1} through {2}.
+errors.required={0} is required.
+errors.byte={0} must be a byte.
+errors.date={0} is not a date.
+errors.double={0} must be a double.
+errors.float={0} must be a float.
+errors.integer={0} must be an integer.
+errors.long={0} must be a long.
+errors.short={0} must be a short.
+errors.creditcard={0} is not a valid credit card number.
+errors.email={0} is an invalid e-mail address.
+error.numberformatexception.quantity=Please enter a numeric value for quantity.
+error.numberformatexception.customerIdBookNumber=Please enter a numeric value for customer ID Book Number.
+error.numberformatexception.customerID=Please enter numeric values only for customerID.
+error.role.Invalid=Role cannot be found. Please try login again with another role. Contact your System Administrator if the problem persists.
+error.illegal.access=You cannot view this order because it does not belong to you.
+error.noStock.Available=Quantity available in stock is less than input quantity for {0} {1} {2} {3}
+error.webstore.noStock.Available=Quantity available for {0} is {1}. You cannot order for an amount more than {1}
+error.orderedQuantity.invalid=Ordered quantity must be greater than 0
+error.productquantity.invalid=Ordered quantiry must be greater than 0.
+error.invoice.nolineselected=Please select at least one line to generate invoice.
+error.csvfile.invalid=There are errors in File, please delete the old file and download again to see the errors.
+error.file.not.found=Please attach a file
+error.stock.not.available=The Required Stock is Not Available. {0}
+error.inventory=No Inventory Available. {0}
+error.inventory.not.available=Insufficient Inventory Available. {0}
+error.vehicle.alreadyReleased=The vehicle has already been released.
+error.shipper.alreadyExists=Shipper already exists. Please choose another name.
+error.allocationname.alreadyused=The name you supplied has already been used. Please input another one.
+error.notallvins.available=Not all VIN numbers are currently available.
+error.poReference.invalid=Please enter a valid reference number.
+error.ftp.file=The file contains a VIN number that is already present in the system. This file may have already been processed.
+error.naamsaModelCode.exist=The code you have entered already exist. Please enter another one.
+error.naamsaDealerCode.exist=The code you have entered already exist. Please enter another one.
+error.salesrep.required = Please select a sales representative.
+error.date.notselected = Please choose a date.
+error.emptycart = Your cart is empty!
+error.trackingNo.not.found=Please Specify the Tracking Number of FedEx.
+error.in.file=There is an error in the file, Please check for the for the ";" in the file and replace it by "," and no field should be empty If there is no discount and limit price, please make them same a the one for the List Price. also check whether the tax rate that has been defined in the file exists.
+error.invalid.address=The Customer does not has any address, Please Edit the customer.
+error.invalid.orderType=The Order is not a POS Order, Please check the Document No
+error.no.checkbox.selected=Please select a checkbox
+
+error.client.alreadyexist=Client with the name provided already exist
+error.client.create=Could not create client with the details provided. Please contact POSterita (info@posterita.org) for support. Cause:{0}
+
+
+error.allocation.notclosable=Cannot close allocation because one or more lines are not Accepted yet
+error.allocation.report.notselected=Please select an allocation to generate report.
+error.allocation.notselected=Please select an allocation to generate order.
+error.vin.already.exists=VIN number has already been used.
+error.role.already.exists = The name has already been used. Please enter another name.
+error.role.edit=Could not edit role
+error.attributevalue.description.exception = Please enter a description
+error.too.many.invoice=Only one invoice at a time can be allocated with payments and credit memo.
+error.allocation.amt.exceeds.openamt=Allocation amount is more than the open amount for invoice, can not allocate
+error.no.invoice.to.allocate=Please select an invoice to allocate.
+error.securityException=You are trying to view an order, that does not belong to your organisation.
+error.required.agreement=You must agree to the terms and conditions before confirmation.
+error.required.checkbox=Please make a selection.
+error.required.sernoAttributeSetInstanceIds=Please select a product.
+
+error.notfound={0} not found.
+error.required.productChange={0}
+error.required.model=model.
+error.required.colour=colour.
+error.required.transmission=transmission.
+error.required.year=year.
+error.required.bpartnerId=Please enter the customer
+error.required.amount.given=Please enter the amount given
+error.required.paymentTermId=Please select a Payment term
+error.product.name.required=Please enter a product
+error.cannot.deactivate.paymentTermName=Cannot Deactivate PaymentTerm, Some customers are associated with it;
+
+error.required.username=Name is required.
+error.required.userSurname=Surname is required.
+error.required.password=Password is required.
+error.required.oldPassword=Please enter your old password.
+error.required.newPassword=Please enter your new password.
+error.required.confirmPassword = Please confirm your new password.
+error.required.creditCardNumber=Credit Card Number is required.
+error.required.address1=Address is required
+error.required.city = City is required
+error.required.postalAddress = Postal Address is required
+error.required.email = Please enter Email Address.
+error.required.newEmail=Please enter your new email address.
+error.required.confirmEmail=Please confirm your new email address.
+error.wrong.old.password=The Old Password is wrong.
+error.wrong.password.matching=The passwords do not match
+error.wrong.password.length=The passweod should be at least six characters long
+
+error.required.warehouseName = Warehouse Name is required.
+error.required.orgName = Organisation Name is required
+error.required.poReference = Please enter a reference no.
+error.required.orderId=Please enter a valid order Id
+error.update.sequence=An error has been encountered while updating sequence, Please check database connection
+
+error.required.poreference=Please enter the purchase order number.
+error.required.assetID=Please choose a VIN number.
+error.required.description= Please enter description.
+error.required.priceEntered=Please enter purchase price.
+error.required.vinNumber=Please enter a VIN Number.
+error.numberformatexception.priceEntered=Please enter a numeric value for purchase price.
+error.invalid.barcode=Invalid Barcode! Barcode is either empty or null.
+
+error.required.name=Please enter name.
+error.required.Surname=Please enter surname.
+error.required.custIdNumber=Please enter customerID.
+error.required.physicalCity=Please enter physical city.
+error.required.physicalPostalCode=Please enter physical postal code.
+error.required.physicalStreet1=Please enter physical street1.
+error.required.postalCity=Please enter postal city.
+error.required.postalPostalCode=Please enter postal code.
+error.required.phone1=Please enter home Tel.
+error.required.phoneNo=Please enter work tel.
+error.required.cell=Please enter cell no.
+error.required.aaCardnumber=Please enter card AA No.
+error.natisRelease.firebird=Your vehicle has been transmitted to NaTIS and is queued for release.
+error.duplicate.reference=You have already used this reference. Please use another one.
+error.usernameAlreadyUsed=The username you provided already exists. Please choose another username.
+error.name.exists=The name and surname you provided already exists. Please login with your email address.
+error.email.exists=The email already exists. Please use another email address.
+error.customer.id=Only numeric values are allowed for Customer Id Number.
+error.email=Email has not been sent
+error.duplicate.vin=You have selected vehicles with the same VIN number. Please make sure that all vehicles have been assigned different VIN numbers.
+error.warehouse.alreadyexists = Warehouse already exists. Please choose another name.
+error.targetQuantity.invalid = Please enter valid quantity.
+
+error.cannot.delete.order=Cannot Delete order as it has been invoiced
+error.bp.alreadyexist=This customer already exists in your database. Please select the link /"Existing Customer" and choose the correct customer.
+error.model.alreadyGrouped = Model already grouped
+error.bank.already.exist=Bank already exists
+error.attributevalue.alreadyexist = Value already exists
+error.year.attributevalue.invalid = Please enter a valid year
+error.product.alreadyexist = Product Already Exists, Please enter a new one
+error.year.attributevalue.formatting.exception = Please enter numerical values for year
+error.year.length.invalid = Invalid year. Length should be 4.
+error.product.not.selected = Please select a product
+error.bp.notselected=Please choose a Customer
+error.no.vin.number=Please Specify a complete VIN Number
+error.invalid.period=Start date should not be greater than end date.
+error.required.fromDate = Please select start date.
+error.required.toDate = Please select end date.
+error.already.released= The Vehicle is already released, Can not swap the Vehicle
+error.product.selected.not.same.warehouse=Warehouse of the selected products are different,please select the products from same warehouse
+error.cannot.create.inventory.line==Cannot create Inventory line for the products which are service, Please make the product item and then make a purchase.
+error.ftp.novehicles = There is no vehicle for your Organisation in the FTP file uploaded
+
+error.vehicle.vinAlreadyPresent = The vin number entered is already present in the system.
+error.vehicle.unitNumberPresent = The unit number entered is already present in the system.
+error.numberformatexception.enginePower = Please enter a numeric value for Engine Power.
+error.numberformatexception.natisModelNo = Please enter a numeric value for NaTIS Model Number.
+error.numberformatexception.noOfWheels = Please enter a numeric value for No. of wheels.
+error.numberformatexception.tare = Please enter a numeric value for Tare.
+error.numberformatexception.engineCapacity = Please enter a numeric value for Engine Capacity.
+
+
+error.modelmatching.notfound = Model Matching not found.
+error.modelmatching.alreadyexist = Model Matching already exist
+error.deactivatingproductinstock = Cannot deactivate product(s) as there are still some in HSAF or Dealers' stock.
+error.orderId.null = Please enter an Order Id.
+error.order.notExist = The Order does not exist. Please enter a valid Order Id.
+error.order.noOrderline.selected = Please select at least one orderline to delete.
+
+error.product.keywords.required=Keywords are mandatory. Please set them before making a product featured in Webstore.
+
+error.colourmatching.alreadyexist=Colour Code Matching Already Exist
+error.colourmatching.invalid=Colour Code Matching is invalid
+error.colourmatching.errorsave=Could not save Colour Code Matching details
+
+error.import.nolineselected=You should choose at least one import line for processing
+error.invalid.inputQty=Please enter a quantity greater than 0
+error.invalid.totalQty=Please enter a quantity per Size!
+error.quantity.notAvailable=Entered quantity not available for {0}
+error.updating.product=Could not update the status of the selected products
+error.product.not.found=Product Not Found!
+error.check.inserted.value=Please check the value inserted qty and the barcode should be separated by + sign
+error.product.attributes.different=Cannot update Products with different attributes
+error.updating.attribute=Could not change the specified Attribute Value
+error.product.price.not.found=Product is Not On PriceList {0}
+error.product.already.exists=Product already exists
+error.barcode.already.exists=Barcode already exists
+error.barcode.required = Barcode is required
+error.reason.required = Please type in the reason
+error.qty.required = Quantity is required
+error.total.zero = Please check total amount. Cannot be zero
+error.product.cannot.inactivate=product cannot be inactivated /Make it Services {0}
+error.invalid.content= The Content of the uploaded file are wrong, should be an image
+error.pos.no.orderline=There are no orderline in the order, please create a new order
+error.no.transfer.amount=Please enter some amount
+error.transferAmt.exceeds.endingBalance=Amount exceeding the ending balance, can not create transaction
+error.cannot.close.till=The Till is already closed, can not transfer any amount until a new cash order is created To transfer only card and cheque amount insert transfer amount as 0 and press submit
+error.invalid.number=Please insert a valid number
+tax.rate.not.defined=The Tax rate is not defined,Please define it {0}
+error.required.revenue.recognition=Please enter Revenue Recognition
+error.duplicate.product=Duplicate product name in the file Or the product already exists in the system {0}
+error.duplicate.barcode=Duplicate barcode in the file Or the barcode already exists in the system {0}
+error.cannot.adjust.till=The till is closed,cannot adjust the amount now
+error.till.already.close=The Till is closed, can not close it again To transfer only card and cheque amount just press submit
+error.duplicate.userpin=The User Pin Already exists.
+error.paymentTermName.duplicate=The Payment Term Name already Exists.
+error.net.days.cannot.be.negative=Net Days cannot be negative or null.
+error.name.mandatory = Please type the name
+error.bpartner.over.credit.limit=Customer exceeds Credit Limit {0}
+error.bpartner.no.payment.term=Customer does not has a Payment Term,Please create one
+error.insufficient.qty={0}
+error.limit.price.violated={0}
+
+error.taxname.duplicate=Tax name already exists
+error.taxrate.duplicate=Tax rate already exists
+error.name.required=Please Insert the Name
+error.required.field=field required {0}
+error.tax.rate.nagative=tax rate cannot be negative
+error.discount.nagative=Discount(s) cannot be negative
+cannot.inactivate.tax=Cannot deactivate tax, some products have this tax
+
+
+error.pos.payment.invalidCashAmount=Please enter a numeric value for Cash Amt.
+error.pos.payment.invalidCardAmount=Please enter a numeric value for Card Amt.
+error.pos.payment.invalidChequeAmount=Please enter a numeric value for Cheque Amt.
+error.pos.incorrect.tendered.amount=Please enter the exact tender amount.
+error.paymentamount.mandatory=Please enter Payment Amount.
+error.allocate.amt.exceeds=Allocated Amt. exceeds the open amt of Invoice {0}
+error.allocate.amt.payamt.notequal=Allocated Amt is not equal to the Payment Amt {0}
+
+error.collection.dir=Image Collection directory does not exist: {0}
+error.inactive.collection.dir=Inactive Image Collection directory does not exist: {0}
+error.errors.dir=Error image directory does not exist: {0}
+error.synchronize.products.collection=Could not synchronize product collections: {0}
+
+error.related.product=No product found related with this attribute value
+error.invalid.datetime=The date and time provided is invalid
+
+error.order.delete=Could not delete this order
+
+error.sessions.exceeded=You cannot log into the system. Number of Licensed Sessions, ({0}) , will be exceeded. Please contact your administrator for further details.
+error.requests.exceeded=The number of operations that you have performed has exceeded the limit that has been set for your license of Tamak ICT POS. Please contact your administrator for further details.
+error.license.invalid=Your license is invalid. Please change your licensing details as appropriate.
+error.license.unexpected=An unexpected error has occurred. Please try to perform again all the operations that caused this error. In case this error occurs again, please contact your administrator. Details: {0}
+error.licensinginfo.update=Licensing information could not be updated. Cause\: {0}
+login.passwordError= Password is invalid
+error.invalid.pin=Invalid User PIN
+error.duplicate.pin=More than one user has the same PIN
+error.customer.not.exists=The customer is either not present or is not active
+error.vendor.not.exists=The vendor is either not present or is not active
+# -- other --
+errors.cancel=Operation cancelled.
+errors.detail={0}
+errors.general=The process did not complete. Details should follow.
+errors.token=Request could not be completed. Operation is not in sequence.
+
+error.required.vin.number=Please enter a VIN number
+error.invalid.orderId=Order does not exist!
+error.invoke.status=Cannot invoke order with status: {0}
+# -- welcome --
+
+
+address = Address:
+postaladdress = Postal Address:
+city = City:
+region = Region:
+
+welcome.title=Struts Blank Application
+welcome.heading=Welcome!
+welcome.message=To get started on your own application, copy the struts-blank.war to a new WAR file using the name for your application. Place it in your container's "webapp" folder (or equivalent), and let your container auto-deploy the application. Edit the skeleton configuration files as needed, restart your container, and you are on your way! (You can find the application.properties file with this message in the /WEB-INF/src/java/resources folder.)
+login.emailNotFound=There is no email set for you please check with your administrator
+login.userNotFound=Your Username can not be found on the system.
+login.alreadyLogin=You are already logged in! Please logout before you attempt to login again.
+
+admin.changeEmail.title=Change My Email Address
+admin.changeEmail.oldEmail=Old Email Address:
+admin.changeEmail.newEmail=New Email Address:
+admin.changeEmail.confirmEmail=Retype New Email Address:
+admin.viewRoles.title=View All Roles
+
+admin.changePassword.title=Change My Password
+admin.changePassword.old=Old Password:
+admin.changePassword.new=New Password\:
+admin.changePassword.confirm=Retype New Password\:
+
+admin.home.title=Dealer Admin - Document Storage
+admin.home.link.stocks=My Stock
+admin.home.link.certificates=My Certificates
+admin.home.link.invoices=Invoices
+admin.home.link.creditNotes=Credit Notes
+admin.home.link.statements=Statements
+admin.home.link.rebates=Rebates
+admin.home.link.other=Other
+admin.home.link.changePassword=Change Password
+admin.home.link.changeEmail=Change Email Address
+admin.home.link.viewMyDetails=View My Details
+admin.invalidEmailError=You entered an invalid email address.
+admin.wrongPasswordError=You wrongly entered your old password.
+
+admin.emailChanged.title=Email Address changed
+admin.emailChanged.message=Your email has been changed.
+admin.myCertificates.title=My Certificates
+admin.myStocks.title=Available Stock - Not Yet Released
+admin.passwordChanged.title=Password changed
+admin.passwordChanged.message=Your password has been changed.
+admin.userDeleted.title=User deleted
+admin.userDeleted.message=You have successfully deleted the User.
+admin.userDetails.title=User Details
+admin.userForm.title=Create User
+admin.userForm.select=Select User Role:
+admin.viewMyDetails.title=My Details
+admin.viewMyDetails.email=Email Address\:
+admin.viewMyDetails.dealerName=Dealer Name:
+admin.viewMyDetails.dealerCode=Dealer Code:
+admin.viewMyDetails.phone=Phone Number:
+admin.viewMyDetails.fax=Fax Number:
+admin.viewMyDetails.deliveryAddress=Delivery Address:
+admin.viewUsers.title=View All Users
+admin.viewUsers.username=Username
+admin.viewUsers.userRole=User Role
+admin.viewUsers.editDelete=Edit/Delete User
+
+allocation.home.title=Allocations
+allocation.home.link.result=Allocations
+allocation.home.link.request=Allocation Requests
+allocation.home.link.swap=Swap
+allocation.request.confirm=Please confirm your allocation request
+allocation.results.title=Allocations
+allocation.results.vehicle.allocation=Your vehicle allocations for March 2005 are as follows:
+allocation.results.eta=ETA
+allocation.results.action=Action
+allocation.results.accept=Accept
+allocation.results.reject=Reject
+
+mmovement.title=Material Movement\t\t\t\t\t\t\t
+mmovement.warehouse=Warehouse
+mmovement.documentNo=Document No:
+mmovement.description=Description:
+mmovement.locator=Locator:
+mmovement.destinationLocator=Destination Locator:
+mmovement.header=Material Movement
+mmovement.product.name=Name
+mmovement.product.details=Details
+mmovement.product.quantity=Quantity
+mmovement.product.move=Move
+mmovement.region=Region
+mmovement.move=Move
+mmovement.track=Track
+mmovement.allWarehouses=All
+mmovement.selectWarehouse=Move to Warehouse:
+mmovement.button.confirm=Confirm
+mmovement.button.complete=Complete
+mmovement.button.delete=Delete
+mmovement.button.cancel=Cancel
+mmovement.documentStatus=Document Status:
+
+
+mmovement.track.title=Track Material Movement
+mmovement.track.header=Track Material Movement
+
+allocation.results.time.remaining=Time Remaining for this allocation:
+allocation.results.time.numDays=22 days
+allocation.results.swap.allocation=*NB: Should you choose to swap an allocated vehicle, the system will automatically accept that allocation.
+allocation.resultsConfirm.title=Allocation - Allocation submitted
+allocation.resultsConfirm.message=Thank You. Your allocations have been submitted.
+allocation.status=Allocation Status
+allocation.swap.title=Vehicle Allocation Request
+allocation.swap.heading=Vehicle Allocation Request
+allocation.swap.vehicles=Vehicles available for swap
+allocation.swapConfirm.submit=Your request for swap has been submitted.
+allocation.swapProcess.title=Swap Process
+allocation.swap=Swap
+
+asset.status= Asset Status
+
+days.old=Days Old
+
+button.add=Add
+button.cancel=Cancel
+button.confirm=Confirm
+button.create=Create Order
+button.delete=Delete
+button.edit=Edit User
+button.process=Process Order
+button.search=Search
+button.submit=Submit
+button.save=Save
+button.reply = Reply
+button.complete=Complete
+button.createwarehouse=Create Warehouse
+button.invoice = Create Invoice
+
+
+dealer.order=Order
+dealerOrder.cancelOrder.title=Dealer Order - Order cancelled
+dealerOrder.cancelOrder.message=This order has been cancelled.
+dealerOrder.createOrder.title=Dealer Order
+dealerOrder.home.title=Orders
+dealerOrder.home.link.result=Dealer Orders
+dealerOrder.home.link.specialColour=Special Colour Orders
+dealerOrder.home.printOrder=Dealer Order - Print Order
+dealerOrder.input.all=Please input all values.
+dealerOrder.process.title=Dealer Order - Order processed
+dealerOrder.process.message=Thank You, Your orders have been processed
+dealerOrder.results.title=Dealer Order - Results
+dealerOrder.specialColour.title=Special Colour Orders
+dealerOrder.specialColour.submission=*NB: Must be submitted four months in advance for Accord, All other models - 3 months in advance.
+dealerOrder.createSpecialColour.title=Create Special Colour Order
+
+dealerOrder.terms.title=Dealer Order - Terms and Conditions
+dealerOrder.terms.heading=Terms and Conditions
+dealerOrder.terms.term1=All orders placed by the dealer (whose name and details appear on this order form) ("the Dealer") shall be final and binding on the Dealer once the Dealer has signed this order form and delivered the original signed order form or a copy thereof to Honda South Africa (Pty) Ltd (registration number 2000/010675/07) ("HSAF"). The Dealer shall not be entitled to cancel its order, return any of the Honda Products reflected on this order form or obtain a credit for Honda Products without HSAF's prior written consent.
+
+dealerOrder.terms.term2=The Dealer's order shall not be binding on HSAF until acceptance thereof by HSAF (whether in whole or in part) by the duly authorized HSAF divisional manager signing this order form in the space provided therefor.
+
+dealerOrder.terms.term3=Ownership in and to Honda Products forming the subject matter of this order form shall remain vested with HSAF until those Honda Products have been delivered to or collected by the Dealer, as the case may be, and HSAF has received payment in full of the total amounts reflected on this order form. The risk of loss and damage to the Honda Products reflected on this order form shall pass to the Dealer upon the collection or the delivery of those Honda Products to the Dealer, notwithstanding the fact that the Dealer has not paid HSAF in full for those Honda Products and that the Dealer is not the owner of those Honda Products.
+
+dealerOrder.terms.term4=Any purported variation on this order form of the provisions of any written agreement(s) concluded between HSAF and the Dealer in respect of the Honda Products shall not take precedence over the terms of those written agreements, notwithstanding HSAF's signature on this order form.
+
+dealerOrder.terms.term5=By the Dealer's signature of this order form, the Dealer acknowledges and agrees that it has read and understood the terms and conditions set out on this order form and agrees to be bound to those terms and conditions.
+
+dealerOrder.terms.term6=HSAF reserves the right at any time and from time to time to change or modify, without notice, the terms and conditions set out in this order form.
+
+dealerOrder.terms.term7=Notwithstanding the signature hereof by HSAF, HSAF will have obligation, under any circumstances, to accept orders for any Honda Products which are not in this current inventory.
+
+dealerOrder.terms.term8=For the purposes of this order form, Honda products means:
+dealerOrder.terms.term8a=such new motorcycles and automobiles as are from time to time offered for sale by HSAF to Dealer for resale as part of HSAF's motorcycle or automobile line as determined by HSAF in its sole discretion; and/or
+
+dealerOrder.terms.term8b=all industrial and domestic engines manufactured by HSAF which form part of HSAF's engine line as determined by HSAF in its sole discretion; and/or\t\t\t
+
+dealerOrder.terms.term8c=all power products which form part of HSAF's power product line as determined by HSAF in its sole discretion, including without limitation, all HSAF generators, lawn mowers, brushcutters and water pumps; and/or
+
+dealerOrder.terms.term8d=all parts, accessories and optional equipment marketed by HSAF for use of with motorcycles, engines, automobiles and power products referred to above.
+
+
+dealerOrder.qty.greaterThanZero=The quantity specified must be greater than zero.
+dealerOrder.noOrders=Please add at least an order.
+
+dealerOrder.must.agree=You must agree to the terms and conditions before confirmation.
+
+
+include.footer.poweredBy=Powered by UDI Technology
+include.footer.allContent=All Content © 2005 Honda South Africa
+include.header.link.loginSuccess= Home
+include.header.link.stockAction= Stock Inquiries
+include.header.link.dealerOrderHome= Dealer Orders
+include.header.link.natisReleaseHome= NaTIS Release
+include.header.link.allocationHome= Allocations
+include.header.link.interDealerHome= Inter Dealer Transfers
+include.header.link.adminHome= Dealer Admin
+include.header.link.loginActionNoInput= Logout
+include.header.link.myorders=My Orders
+
+interdealer.transfer=Transfer
+interDealer.cancelTransfer.message=You have cancelled this request.
+interDealer.dealerTransferOrder.title = Inter Dealer Transfer
+interDealer.dealerTransferOrder.heading = Dealer Transfer: Request
+interDealer.home.title=Dealer Transfers
+interDealer.home.link.request=Request
+interDealer.home.link.receiving=Receiving
+interDealer.process.title=Dealer Transfer - Request sent
+interDealer.process.message=Your request has been transmitted.
+interDealer.request.title=Dealer Transfer - Requests
+interDealer.receiving.title=Dealer Transfer - Receiving
+interDealer.receiving.from=From:
+interDealer.receiving.accept=Accept
+interDealer.receiving.reject=Reject
+interDealer.receiving.reason=Reason for rejection
+
+login.choose.title=Please choose a User from any of these Dealers
+login.forgot.forgotPassword=Forgot your password? Please enter your username and we will send your password to your email address
+login.forgot.username=Username\:
+login.forgot.sendPassword=Send Password
+login.home.title=Welcome to Posterita POS
+login.home.title.part1=Welcome to
+login.home.title.part2=Posterita POS
+login.home.login=Please Login
+login.home.username=Username\:
+login.home.password=Password:
+login.home.loginButton=Login
+login.home.loginForgot=Forgot password?
+login.loginForm.message=Please enter your username and password.Remember your email is your username NB: Case sensitive.
+login.logout.logoutSuccess=You have successfully logged out.
+login.logout.backToLogin= Click Here to go back to the Login Screen
+login.password.passwordSent=Your password has been sent you should receive it in a few minutes
+login.password.backToLogin= Click Here to go back to the Login Screen
+login.password.emailTitle= Your password reminder.
+login.password.emailSubject=The password to log in into the POS System is:
+login.success.welcome=Welcome to Posterita POS System
+login.userInactive=Your user has been set inactive.
+
+menu.title = Menu
+menu.close = Close Menu
+menu.closed = Menu Closed
+menu.isActive = Is Active
+menu.list = List of Menu
+menu.description = Description
+
+#============Email Errors============
+email.subject.error = Please enter a subject for the email
+email.message.error = Please enter your message
+email.send.error = Email cannot be sent. Please Check if you have properly configured your smtp host.
+
+#====================================
+
+message.title = Create Message
+message.from = From:
+message.to = To:
+message.recto = To
+message.subject = Subject:
+message.recsubject = Subject
+message.writemessage = Message:
+message.senttitle = Message Sent
+message.sent = Your Message has been sent
+message.sentmessages = Sent Messages
+message.mymessages = My Messages
+message.received = Received Messages
+message.sender = Sender
+message.date = Date
+message.viewdate = Date:
+message.view = View Message
+message.markas = Mark as
+message.delete = Delete
+message.reply = Reply Message
+message.viewreceivedmessage = View Received Message
+message.viewsentmessage = View Sent Message
+message.sendbutton = Send
+message.goback = Go Back
+
+myorders.home.title=My Orders - Home
+myorders.home.heading=My Orders
+
+myorders.orders.dealerorders.link=Dealer Orders
+myorders.orders.scoorders.link=Special Colour Orders
+myorders.orders.requesttransferorders.link=Dealer Transfer Orders
+
+myorders.purchaseorders.home.link=Purchase Orders
+upload.file = Please attach the file for creating orders
+download.file=Download file
+
+myorders.result.title=My Orders Result
+myorders.result.heading=My Orders - Result
+myorders.result.dateOrdered=Date Ordered
+myorders.result.bpartnerName=Dealer
+myorders.result.docStatus=Doc Status
+myorders.result.hsafRef=HSAF Ref ID
+myorders.result.poreference=PO Reference
+myorders.result.grandTotal=Grand Total
+myorders.result.viewOrder=View Order
+myorders.result.orderfrom=Ordered From
+
+
+
+myorders.salesorders.home.link=Sales Orders
+myorders.purchase.order= Purchase Order
+
+mycertificate.title = My Certificates
+mycertificate.viewCertificate = View Certificate
+
+
+natisRelease.home.title=NaTIS Release
+natisRelease.process.title=NaTIS Release - Vehicle released
+natisRelease.process.message=Thank you, the Vehicle has been released
+natisRelease.release.name=Name
+natisRelease.release.surname=Surname
+natisRelease.release.idNumber=ID Number\:
+natisRelease.release.physicalAddress=Physical Address
+natisRelease.release.postalAddress=Postal Address
+natisRelease.release.homeTelephone=Home Telephone
+natisRelease.release.workTelephone=Work Telephone
+natisRelease.release.cell=Cell
+natisRelease.release.fax=Fax
+natisRelease.viewCertificate.title=View Certificate
+natisRelease.viewCertificate.message=Your NaTIS Certificate for this vehicle has been released.
+natisRelease.viewCertificate.download=Click here for your certificate.
+natis.order.history = NaTIS Release Sales History
+
+order.dealerPONo=Dealer Purchase Order No:
+order.HSAFRefNo=HSAF Ref No:
+order.terms=Terms and Conditions compulsory
+order.specialColour=Special Colour Order
+order.print=Printer Friendly Version
+
+orderView.orderFooter.use=FOR OFFICE USE
+orderView.orderFooter.roNo=R/O NUMBER
+orderView.orderFooter.invoiceNo=INVOICE NUMBER
+orderView.orderFooter.dealerAuthor=DEALER AUTHORISATION:
+orderView.orderFooter.signature=SIGNATURE:
+orderView.orderFooter.recvBy=HSAF RECEIVED BY:
+orderView.orderFooter.divMgr=AUTHORISED DIV MANAGER: (Name & Sign.)
+
+orderView.orderHeader.honda=HONDA S.A AUTOMOBILE DEALER ORDER
+orderView.orderHeader.att=ATT:
+orderView.orderHeader.fax=FAX:
+orderView.orderHeader.tel=TEL:
+orderView.orderHeader.date=DATE:
+orderView.orderHeader.orderNo=DEALER ORDER NO:
+orderView.orderHeader.dealerCode=DEALER CODE:
+orderView.orderHeader.dealerName=DEALER NAME:
+orderView.orderHeader.delAddress=DELIVERY ADDRESS:
+
+orderView.orderPriceDetails.subTotal=SUB TOTAL
+orderView.orderPriceDetails.vat=VAT
+orderView.orderPriceDetails.orderTotal=ORDER TOTAL
+
+product.create.car = Create New Car
+product.create.bike = Create New Bike
+product.create.usedcar = Create Used Car
+product.create.usedbike = Create Used Bike
+product.create.usedcar.attributevalue = Create Used Car Attribute Value
+product.create.usedbike.attributevalue = Create Used Bike Attribute Value
+product.create.car.attributevalue = Create New Car Attribute Value
+product.create.bike.attributevalue = Create New Bike Attribute Value
+
+product.create = Create Product
+product.details = Product Details
+product.make=Make
+product.model=Model
+product.colour=Colour
+product.transmission=Transmission
+product.year =Year
+product.purchase.price = Purchase Price
+product.sales.price = Sales Price
+product.wholesale.price= Wholesale Price
+product.retail.price= Retail Price
+product.quantity=Quantity
+product.price=Price
+product.vinNo=VIN No.
+product.order=Order
+product.salesRegion=Sales Region
+product.request=Request
+product.sendRequest=Send Request
+product.release=Release
+product.reserved=Reserved
+product.status=Status
+product.all=All
+product.umodel=MODEL
+product.ucolour=COLOUR
+product.utransmission=TRANS
+product.frameNo=FRAME NUMBER
+product.uquantity=QTY
+product.uprice=PRICE Ex VAT
+product.uVAT=VAT
+product.dealer=DEALER
+product.uTotal=TOTAL
+product.colourType=Colour Type
+product.colour.group=Colour Group
+product.wholesaleDate=Wholesale Date
+product.natisApplicationDate=NaTIS Application Date
+product.hide=Hide
+product.refNo=Reference No
+product.ordId=Order ID
+product.ordBy=Order By
+product.ordDate=Date Ordered
+product.doctype=Doc Type
+product.type = Product Type
+product.home.title = Select Products For Order
+product.isNatisReleased = Is NaTIS Released
+product.description = Description
+product.restriction = Product Restriction
+product.name = Product Name
+product.restrict = Restrict
+product.pricelist = Pricelist
+product.newprice = New Price
+product.oldprice = Old Price
+product.price.edit = Edit Product Price
+
+reprice.orders=Reprice Orders
+
+
+customer.details=Customer's Details
+customer.licensing.desc=Licensing Option Description
+customer.finance.option=Finance Option Description
+trade.in.make=Trade In Make
+trade.in.makeModel=Trade In Make Model
+trade.in.year=Trade In Year
+customer.idBookNo=ID Book Number
+engine.no=Engine Number
+maintenance.contract=Maintenance Contract
+registration.status=Registration Status
+
+sc.dealerOrder.home.quantity=Quantity
+
+target.sales.title = Target Sales
+target.sales.month = Month
+target.sales.year = Year
+target.sales.ModelGroup = Model Group
+target.sales.Quantity = Quantity
+target.sales.organisation = Organisation
+
+stock.home.title=Stock Inquiry
+stock.inquiry.show=Show ONLY stock from HSAF
+stock.not.reserved.show=Show ONLY available stock
+stock.process.title=Stock Inquiry - Request sent
+stock.process.message=Thank You, your request has been sent
+stock.filter.by=Filter by:
+
+error.workflow.violation=You can only progress in this application using the buttons and the menu that are offered. Hitting the browser's reload button or using the back button is not allowed.
+
+user.create = Create User
+user.created = User Created
+user.username=Username:
+user.role=User Role:
+user.password=Password:
+user.address = Address:
+user.city = City:
+user.postaladdress = Postal Address:
+user.region = Region
+user.email=Email Address:
+user.phone = Phone No:
+user.cellphone=Cell Phone:
+user.confirmPassword=Confirm Password:
+user.isActive = Is Active
+user.isSalesRep = Is Sales Representative
+user.details = User Details
+user.pin=User PIN
+user.docBasisType=Document Basis for Commission
+user.comm.per=% Commission for the sales rep
+user.comm.fre=Calculation Frequency
+user.substract.amt=Substract Amt**
+user.substract.exp=**The Subtract Amount indicates the amount to subtract from the total amount prior to calculation of commission
+
+choose.VIN=Choose VIN Number
+
+select.month=Month
+select.year=Year
+select.status=Status
+view.all=All
+
+calendar.day.default=Day
+calendar.month.default=Month
+calendar.year.default=Year
+calendar.month1=Jan
+calendar.month2=Feb
+calendar.month3=Mar
+calendar.month4=Apr
+calendar.month5=May
+calendar.month6=Jun
+calendar.month7=Jul
+calendar.month8=Aug
+calendar.month9=Sep
+calendar.month10=Oct
+calendar.month11=Nov
+calendar.month12=Dec
+asset.owner=Owned By
+queryVinNo.title=Query VIN No.
+vinNo.search=Search VIN No.
+vinNo.query=Query on the Status of VIN Number
+vinNoDetails.title=VIN Number Details
+searchOrderByRef.title=Query Order Reference Number
+search.orderID=Search Order Ref No.
+text.yes=Yes
+text.no=No
+query.dealers.stock.title=Query Dealers Stock
+
+bPartner.title = Business Partner
+bPartner.create = Create Business Partner
+bpartner.details = Business Partner Details
+bpartner.name = Name
+bpartner.name2 = Name2
+bPartner.address = Address
+bPartner.address1 = Address1
+bPartner.address2 = Address2
+bPartner.postal.address = Postal Address
+bPartner.city = City
+bPartner.phone=Phone Number
+bPartner.fax=Fax Number
+bpartner.edit = Edit
+bpartner.view = View
+bPartner.isActive = Is Active:
+bPartner.isCustomer = Is Customer:
+bPartner.isVendor = Is Vendor:
+bPartner.isEmployee = Is Employee:
+bPartner.isSalesRep = Is Sales Rep:
+bPartner.region = Region
+bPartner.edit = Edit Business Partner Details
+bPartner.credit.limit = Credit Limit
+bPartner.credit.status = Credit Status
+bPartner.dunning = Dunning
+
+bank.create = Create Bank
+bank.name = Bank Name
+bank.address = Address
+bank.postaladdress = Postal Address
+postal.address = Postal Address
+bank.city = City
+bank.routingnumber = Routing Number
+bank.details = Bank Details
+
+locator.details = Locator Details
+locator.create = Create Locator
+locator.warehouse = Warehouse
+locator.aisle = Aisle
+locator.bin = Bin
+locator.level = Level
+locator.default = Is Default
+
+bAccount.create = Create Bank Account
+bAccount.bank.name = Bank Name
+bAccount.no = Account Number
+bAccount.type = Account Type
+bAccount.current.balance = Current Balance
+bAccount.type.checking = Checking
+bAccount.type.saving = Saving
+bAccount.details=Bank Account Details
+
+order.history = Order History
+invoice.history = Invoice History
+payment.history = Payment History
+inout.shipment.history = Shipment History
+inout.receipt.history = Receipt History
+
+
+history.receiptNumber = Receipt Number
+history.shipmentNumber = Shipment Number
+history.orderNumber = Order Number
+history.invoiceNumber = Invoice Number
+history.documentNumber = Document Number
+history.documentStatus = Document Status
+history.dealerName = Dealer Name
+history.date = Date
+history.dateInvoiced = Date Invoiced
+history.dateOrdered = Date Ordered
+history.grandTotal = Grand Total
+history.isDelivered = Is Delivered
+history.isInvoiced = Is Invoiced
+history.isPaid = Is Paid
+history.isReceipt = Is Receipt
+history.paymentId = Payment Id
+history.paymentAmt = Payment Amt \t
+history.transactionDate = Transaction Date
+history.orderReference = Order Reference
+history.isSotrx = Is Sales Order
+
+warehouse.create = Create Warehouse
+warehouse.created = Warehouse Created
+warehouse.details = Warehouse Details
+warehouse.wname = Warehouse Name
+warehouse.name = Warehouse
+warehouse.address = Address:
+warehouse.postaladdress = Postal Address:
+warehouse.city = City:
+warehouse.region = Region
+warehouse.isPublic = Is Accesible to Dealers
+warehouse.isActive= Is Active
+is.warehouse.allocation= Is Allocation Warehouse
+warehouse.type=Warehouse Type
+warehouse.all = All Warehouses
+product.attribute.create = Create Product Attribute Value
+product.attribute.set = Vehicle
+product.attribute.name = Attribute
+product.attribute.value = Value
+product.attribute.value.created = Product Attribute Value Created
+product.attribute.existingValues = Existing values
+product.selected = Selected Products
+quantity = Quantity
+
+engine.number= Engine Number
+natis.application.date=NaTIS Application Date
+natis.release.date=NaTIS Release Date
+natis.control.number=NaTIS Control Number
+natis.model.number=NaTIS Model Number
+natis.unit.number=NaTIS Unit Number
+natis.release.id=NaTIS Release Id
+org.name=Dealer Name\:
+register.number= Register Number
+
+customer.create.new=Create new customer
+customer.information =NaTIS Release-Customer Information
+customer.name = Customer Name:
+customer.surname=Surname:
+customer.id.number=ID Number:
+customer.phy.add = Physical Address:
+customer.street1 = Street 1:
+customer.street2 = Street 2:
+customer.city = city:
+customer.postal.address = Postal Address:
+postal.street1=Postal Street
+postal.city=Postal city
+postal.code = Postal Code:
+customer.home.telephone =Home Telephone No:
+customer.work.telephone =Work Telephone No:
+customer.cell= Customer Cell\: \t
+customer.aa.car.number=AA Card No\: \t
+customer.maintenance.contract.number=Maintenance Contract No:
+invoice.it = Invoice
+unreserve.stock = Unreserve Stock
+shipment.material.receipt=Shipment/Material Receipt
+
+#vehicle.createVehicle=Create Vehicle
+#vehicle.unitNumber=Unit Number
+#vehicle.vinNumber=Vin Number
+#vehicle.engineNumber=Engine Number
+#vehicle.natisModelDesc=Natis Model Desc
+#vehicle.enginePower=Engine Power
+#vehicle.engineCapacity=Engine Capacity
+#vehicle.tare=Tare
+#vehicle.noOfWheels=No. of Wheels
+#vehicle.cntryOfImport=Country Of Import
+#vehicle.colourCdHES=Colour Code HES
+#vehicle.mainColourCd=Main Colour Code
+#vehicle.natisModelNum=Natis Model Number
+
+
+#========= DMS Messages
+
+error.required.attributeValue = Value is required
+error.required.orgType = Choose a dealer type
+error.required.vehicleType = Choose a product type
+error.required.locator = Destination Locator required
+error.required.warehouse = Destination Warehouse required
+error.no.order.exists=The Order is already completed, Please make a new one
+
+org.create=Create Dealer
+org.details = Dealer Details
+reserved.for=Reserved For the Dealer:
+org.type=Dealer Type:
+org.product.type=Product Type:
+click.order.id=Click this OrderId to get the Order:
+org.retailer= Is Retailer:
+org.wholesaler=Is Wholesaler:
+org.automobile= Is Automobile:
+org.motocycle=Is Motocycle:
+org.address=Address:
+org.address1=Address1:
+org.address2=Address2:
+org.city=City:
+org.postalAddress=Postal Address:
+org.region=Region:
+org.isActive= Is Active
+org.isVisible= Is Visible
+
+dealer.details = Dealer Details
+dealer.name = Dealer Name
+dealer.location = Location
+dealer.phone = Phone
+dealer.fax = Fax
+
+role.create = Create Role
+role.name = Name
+role.superuser = Access to all Dealers
+role.accessibleToAll = Access to all Dealers
+role.isActive = Is Active
+
+pos.name= POS Name
+pos.begining.balance=Beginning Balance
+pos.net.transaction=Net Cash Transaction
+pos.cash.total=Cash Amount
+pos.card.total=Card Amount
+pos.cheque.total=Cheque Amount
+pos.grandtotal=Grand Total
+pos.current.till.balance= Current Till Balance
+
+
+groupModel.title = Group Models
+groupModel.group = Model Group
+groupModel.model = Model
+
+licensing.district = Licensing District
+licensing.district.code = Licensing District Code
+licensing.district.description = Description
+licensing.district.area = Licensing Area
+licensing.district.area.domestic = Domestic
+licensing.district.area.export = Export
+
+price.listing = Price Listing
+pricelist.Version = PriceList Version
+pricelist.name = PriceList Name
+pricelist.listPrice = List Price
+
+error.required.currentBalance = Current Balance is required
+error.required.accountNo = Account Number is required
+error.required.accountType = Account Type is required
+error.required.partnerName = Business Partner Name is required
+error.required.supplierName = Vendor Name is required
+error.required.sizes = Please select some sizes or enter a custom size
+
+
+error.required.stdPurchasePrice = Purchase Price is required
+error.required.stdSalesPrice = Sales Price is required
+
+error.numberformatexception.currentBalance=Only numeric values are supported for Current Balance
+error.numberformatexception=Please Enter a Numeric Value
+error.numberformatexception.stdSalesPrice= Sales prices should be numeric
+error.numberformatexception.stdPurchasePrice=Purchase prices should be numeric
+error.numberformatexception.price=Please enter a numeric value for the prices
+error.modelgroup.notExist=Please specify a Model Group
+error.deactivatingattributeproductinstock = Unable to perform action. There are some products that use the attribute value.
+
+invoice.customer.print=Customer Invoice - Print
+invoice.customer=Customer Invoice
+invoice.no=Invoice No
+
+search.order = Search Order
+search.order.title = Query Order ID
+search.order.label = Order ID
+
+search.order.vin = Search Order For a VIN No.
+search.order.vin.title = Search Order For a VIN No.
+search.order.vin.label = Enter VIN No.
+swap.vin.success=The vehicle has been swapped successfully
+reprice.order.success=The Orders have been Repriced successfully
+
+error.orderId.not.found=Order Id not found
+material.movement.success=The products have been moved successfully.
+sequence.update.success= The sequences have been updated successfully
+data.integrity.success=The data intregriy has been checked and mails have been send for the failed tests
+naamsa.dealercode.create=Create NAAMSA Dealer Code
+naamsa.dealercode.title=NAAMSA Dealer Code
+naamsa.dealercode.edit.title=Edit NAAMSA Dealer Code
+naamsa.dealer=Dealer
+naamsa.dealercode=Dealer Code
+
+naamsa.modelcode=Model Code
+naamsa.modelcode.create=Create NAAMSA Model Code
+naamsa.modelcode.title=NAAMSA Model Code
+naamsa.modelcode.edit.title=Edit NAAMSA Model Code
+
+wholesaleorder.ftp.title=Upload FTP File
+wholesaleorder.csv.title=Create Wholesale Order
+wholesaleorder.information=Please go to the following site and select the ftp file which consist of the vehicles which you want to insert in the system.
+wholesaleorder.site=ftp://ftp.honda-eu.com
+wholesaleorder.upload.button=Upload File
+error.ftp.notvalid=The ftp file uploaded is not valid
+wholesaleorder.csv.invalid=CSV File is invalid
+wholesaleorder.csv.unknownerror=An Error has occurred, please contact your system administrator
+error.ftp.novehicle=The FTP does not contain vehicles for your Organisation Type
+wholesaleorder.csv.download=Download the CSV generated from the FTP file that you have input. Check whether all the records are good. Take appropriate action for those that have error descriptions.
+wholesaleorder.csv.download1=Download the CSV generated from the FTP file that you have input. Modify this file by inputing genuine information concerning the vehices.
+wholesaleorder.csv.information=Upload the CSV that you have modified in order to generate the wholesale order.
+wholesaleorder.csv.uploadFile=CSV File to upload\:
+
+error.natis.release=Your request to release this vehicle is in progress.\n The system will automatically complete this order and release the vehicle on NaTIS after some time.
+error.natis.release_old=Could not release vehicle on NaTIS. Please try again. \nIf the problem persists please contact the administrator.
+vin.number.not.found=VIN number not found
+error.vin.number.duplicate=Duplicate VIN number found.
+natis.info.not.found=Natis info not found
+natis.info.duplicate=Natis info duplicate
+released.by=Released by
+
+
+
+modelmatch.title=Model Matching
+modelmatch.natisModelDesc=Natis Model Desc
+modelmatch.modelDesc=Model Desc
+modelmatch.transmission=Transmission
+modelmatch.year=Year
+wesbank.status=Wesbank Status
+
+
+colourmatch.title=Colour Code Matching
+colourmatch.colourCode=Colour Code
+colourmatch.colourDesc=Colour Description
+
+wesbank.ping.title=Ping WesBank
+wesbank.response.action=Action
+wesbank.response.recordtype=Record Type
+wesbank.response.reason=Reason
+wesbank.response.reasonDescription=Reason Description
+wesbank.response.date=Date
+wesbank.response.time=Time
+wesbank.response.transId=Transaction Id
+wesbank.response.status=Status
+import.vehicleImported.title=Vehicle imported
+import.vehicleUnimported.title=Vehicle Not Imported
+import.vehicle.model=Model
+import.vehicle.vinNumber=Vin Number
+import.vehicle.engineNumber=Engine Number
+import.vehicle.natisModelNo=Natis Model No
+import.vehicle.colour=Colour
+import.vehicle.transmission=Transmission
+import.vehicle.year=Year
+import.vehicle.natisModelDesc=Natis Model Desc
+import.vehicle.modelMatchingDesc=Model Matching
+import.vehicle.colourCode=Colour Code
+import.vehicle.errorDesc=Error Description
+import.vehicle.selProcess=Process
+import.vehicle.selectAll=Select All
+import.vehicle.reperformMatching=Reperform Matching
+import.vehicle.importVehicle=Import Vehicles
+error.attachment.empty = Please select a file
+error.attachment.invalid.image = Please select an image
+error.required.cvv=CVV is required.
+error.creditCardExpMonth=Credit card expiry date cannot be prior to this month. Please enter a valid date.
+error.required.creditCardExpMonth=Credit card expiry month required.
+error.pos.shoppingcart.empty = Your shopping cart is empty.
+error.required.accountName=Credit Card Owner name required.
+error.required.paymentMethod=Please select the preferred payment method.
+error.minlength.creditCardNumber=Please enter a valid credit card number (Length from 13 to 16)
+error.minlength.cvv=Please enter a CVV number greater than 2 digits
+error.sending.email=Error sending email
+error.creditcard.number=Credit Card number is not valid
+error.creditcard.type=Credit Card type is not supported
+error.creditcard.expiry=Credit Card expiry is not valid
+error.creditcard.cvv=Credit Card VV is not valid
+error.required.startDate = Please select from date.
+error.required.endDate = Please select to date.
+error.pos.invoke.no.orderline=Cannot invoke order that has no orderlines.
+error.access.not.allowed=you do not have the role to access the window, please contact your administrator
+error.shipment.condition.required=Please specity whether the shipment should be generated along with the order and invoice
+
+
+document.status.drafted=Drafted
+document.status.inprogress=In Progress
+document.status.completed=Completed
+document.status.closed=Closed
+document.status.invalid=Invalid
+payment.rule.cash=Cash
+payment.rule.card=Card
+payment.rule.cheque=Cheque
+payment.rule.mixed=Mixed
+
+error.store.default=Default Application could not be set. Cause: {0}. If the problem persists please clear your browser cookies.
+
+########### CRM MESSAGES ###########
+
+## ERROR MESSAGES
+error.request.view=Cannot view the desired request
+error.request.assign=Could not assign request to the specified user
+error.request.create=Could not create request
+error.request.init.resolve=Could not initialise request for resolving
+error.request.resolve=Could not resolve request
+error.request.close=Could not close request
+error.request.view.summary=Could not retrieve your requests, please contact you administrator
+
+
+vendor.create=Create Vendor
+vendor.details = Vendor Details
+user.discount = %Discount Allowed
+
+
+error.file.save=Error occurred when saving file.
+error.source.file.notpresent=Source file not present.
+error.create.bank.account=Error occurred while creating bank account
+error.bank.not.found=Bank not found.
+error.edit.bank=Editing bank information failed
+error.get.partner.detail=Retrieval of partner details failed
+error.getall.partners=Retrieval of all partner details failed
+error.activate.customer=Could not activate customer
+error.deactivate.customer=Could not deactivate customer
+error.editing.user=Error occurred while editing user
+error.activate.vendor=Could not activate vendor
+error.deactivate.vendor=Could not deactivate vendor
+error.orderid.notpresent=OrderId not present
+error.creating.invoice=Could not create invoice
+error.only.pos.order.supported=Only POS Orders are Supported, Please check the number
+error.only.credit.order.supported=Only Credit Orders are Supported, Please check the number
+error.credit.order.not.completed=The Credit Order is not completed, cannot create Credit Memo
+error.pos.order.not.completed=The POS Order is not completed, cannot create Customer Return Order
+error.pos.invalid.customerID = The Customer ID entered is not valid!
+error.discountLimit.exceeded = Discount allowed limit has been exceeded!
+error.print.fidelity.card = Cannot print fidelity card! Please select some active customers.
+
+error.bpartner.nolocation = Business Partner does not have a location, you should set it first to be able to complete the current operation.
+error.userRegistration.failed = Registration failed. Problem with mail server. Please try later.
+error.round.off.cannot.be.negative = Round Off Factor cannot be negative.
+error.no.product.found.on.pricelist = No product found on price list.
+
+############Fidelity Card #####################
+fidelitycard.address= TAMAK GROUP,3 DRAPER AVE,Q.BORNES,MAURITIUS.EMAIL:tamak@tamak.com
+fidelitycard.telephone=Office Tel: (230)4549555 -Fax: (230)454 1542 -Shop Tel: (230)427 0276
+fidelitycard.note1=THIS TAMAK FIDELITY CARD IS THE PROPERTY OF TAMAK
+fidelitycard.note2=THIS CARD ENTITLES YOU TO SPECIAL DISCOUNTS OF 10%
+fidelitycard.note3=APPLICABLE IN TAMAK WORLD & TAMAK SHOP.
+fidelitycard.note4=NOT APPLICABLE ON DISCOUNTED ITEMS.
+fidelitycard.customer.name=Nom:
+
+################### Messages for Receipt ######################
+receipt.VATRegNo=VAT 20176097
+receipt.company.name1=Tamak World
+receipt.company.address=Rte St-Jean, Q.Bornes
+receipt.company.phone=Tel:427-0276
+receipt.company.name2=(Tamak Retail LTD)
+
+################### Messages for POS ######################
+pos.description=Description
+pos.qty=Qty
+pos.price=Price
+pos.VAT=VAT
+pos.totalprice=Total Price
+pos.discountpercentage=Discount %
+pos.actualprice=Actual price
+pos.tendertype=Tender Type
+pos.cashamt=Cash Amt
+pos.chequeamt=Cheque Amt
+pos.chequeno=Cheque No
+pos.cardamt=Card Amt
+pos.cardno=Card No
+pos.mixed=Mixed
+pos.cash=Cash
+pos.card=Card
+pos.cheque=Cheque
+pos.continue=Continue
+
+################### Messages for POS ######################
+message.product.saved = Product updated successfully
+
+################## User Registration ######################
+success.userRegistration.successful = Registration Successful
+success.product.prices.on.pricelist.deleted.successfully = Product prices on price list deleted successfully
+success.currency.updated.successfully = Currency updated successfully
+
+
+error.process=Fail to process your request. Cause : {0}
+error.precision=Precision entered is not valid. {0}
+error.import.uom.not.present={0}
+error.import.uom.precision.not.valid={0}
+error.role.org.access.edit=Error occurred while trying to update Role Organisation Access. Please contact the Administrator.
+error.no.edit.access=You do not have the right organisational access for editing
+error.import.file.data={0}
+error.import.uom.duplicate={0}
+error.no.materialmovement.exists=The Material Movement is already completed, Please make a new one
+error.terminal.locked=Terminal is locked
+error.no.cashjournal.present=There is no Cash Journal present in the system. Please check whether you have done a transaction yet
+current.terminal.updated=The current terminal has been updated. Log out and Log in to be able to create transactions on the terminal.
+current.terminal.reset=The current terminal has been reset. Log out and Log in to chose again the current terminal from the list of available terminals.
+error.operation=An error has occured while executing the operation you requested. Please make sure that all data are correctly entered and try again.
+error.terminal.cashbook=The cash book assigned on this terminal is already assigned to another terminal
+error.deactivate.cashbook=Cash book cannot be deactivated as it is being used on a terminal
+error.deactivate.terminal=Terminal cannot be deactivated as no active terminal will be available for login
diff --git a/posterita/posterita/src/main/ShipmentDispatchedEmailTemplate.properties b/posterita/posterita/src/main/ShipmentDispatchedEmailTemplate.properties
new file mode 100644
index 0000000000..f2fc39fcfc
--- /dev/null
+++ b/posterita/posterita/src/main/ShipmentDispatchedEmailTemplate.properties
@@ -0,0 +1,6 @@
+subject=Tamak Webstore - Shipment In Transit
+action=action
+content=, Your order has been shipped.
+signin.info=Order Information
+link=Your will receive the product(s) shortly.
+emailRegards=Regards, Tamak Webmaster
\ No newline at end of file
diff --git a/posterita/posterita/src/main/displaytag.properties b/posterita/posterita/src/main/displaytag.properties
new file mode 100644
index 0000000000..5b1eeee4b1
--- /dev/null
+++ b/posterita/posterita/src/main/displaytag.properties
@@ -0,0 +1,20 @@
+#sort.behavior=list
+#sort.amount=list
+#basic.empty.showtable=true
+#basic.msg.empty_list=No results matched your criteria.
+#paging.banner.placement=top
+#paging.banner.onepage=
+export.types=csv pdf rtf
+export.excel=false
+export.csv=true
+export.xml=false
+export.pdf=true
+export.rtf=true
+export.excel.class=org.displaytag.export.excel.ExcelView
+export.pdf.class=org.displaytag.export.PdfView
+export.rtf.class=org.displaytag.export.DefaultRtfExportView
+decorator.media.html=org.posterita.decorator.HistoryWrapper
+decorator.media.csv=org.posterita.decorator.HistoryCsvExportWrapper
+decorator.media.pdf=org.posterita.decorator.HistoryPdfExportWrapper
+decorator.media.rtf=org.posterita.decorator.HistoryRtfExportWrapper
+locale.provider=org.posterita.core.I18nAdapter
\ No newline at end of file
diff --git a/posterita/posterita/src/main/org/compiere/model/I_AD_OrgInfo.java b/posterita/posterita/src/main/org/compiere/model/I_AD_OrgInfo.java
new file mode 100644
index 0000000000..633eccd9cd
--- /dev/null
+++ b/posterita/posterita/src/main/org/compiere/model/I_AD_OrgInfo.java
@@ -0,0 +1,203 @@
+/**********************************************************************
+ * This file is part of Adempiere ERP Bazaar *
+ * http://www.adempiere.org *
+ * *
+ * Copyright (C) Trifon Trifonov. *
+ * Copyright (C) Contributors *
+ * *
+ * This program is free software;
+ you can redistribute it and/or *
+ * modify it under the terms of the GNU General Public License *
+ * as published by the Free Software Foundation;
+ either version 2 *
+ * of the License, or (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY;
+ without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program;
+ if not, write to the Free Software *
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
+ * MA 02110-1301, USA. *
+ * *
+ * Contributors: *
+ * - Trifon Trifonov (trifonnt@users.sourceforge.net) *
+ * *
+ * Sponsors: *
+ * - Company (http://www.site.com) *
+ **********************************************************************/
+package org.compiere.model;
+
+import java.math.BigDecimal;
+import org.compiere.util.KeyNamePair;
+
+/** Generated Interface for AD_OrgInfo
+ * @author Trifon Trifonov (generated)
+ * @version Release 3.4.0s
+ */
+public interface I_AD_OrgInfo
+{
+
+ /** TableName=AD_OrgInfo */
+ public static final String Table_Name = "AD_OrgInfo";
+
+ /** AD_Table_ID=228 */
+ public static final int Table_ID = MTable.getTable_ID(Table_Name);
+
+ KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
+
+ /** AccessLevel = 7 - System - Client - Org
+ */
+ BigDecimal accessLevel = BigDecimal.valueOf(7);
+
+ /** Load Meta Data */
+
+ /** Column name AD_OrgType_ID */
+ public static final String COLUMNNAME_AD_OrgType_ID = "AD_OrgType_ID";
+
+ /** Set Organization Type.
+ * Organization Type allows you to categorize your organizations
+ */
+ public void setAD_OrgType_ID (int AD_OrgType_ID);
+
+ /** Get Organization Type.
+ * Organization Type allows you to categorize your organizations
+ */
+ public int getAD_OrgType_ID();
+
+ public I_AD_OrgType getAD_OrgType() throws Exception;
+
+ /** Column name C_Location_ID */
+ public static final String COLUMNNAME_C_Location_ID = "C_Location_ID";
+
+ /** Set Address.
+ * Location or Address
+ */
+ public void setC_Location_ID (int C_Location_ID);
+
+ /** Get Address.
+ * Location or Address
+ */
+ public int getC_Location_ID();
+
+ /** Column name DUNS */
+ public static final String COLUMNNAME_DUNS = "DUNS";
+
+ /** Set D-U-N-S.
+ * Dun & Bradstreet Number
+ */
+ public void setDUNS (String DUNS);
+
+ /** Get D-U-N-S.
+ * Dun & Bradstreet Number
+ */
+ public String getDUNS();
+
+ /** Column name M_Warehouse_ID */
+ public static final String COLUMNNAME_M_Warehouse_ID = "M_Warehouse_ID";
+
+ /** Set Warehouse.
+ * Storage Warehouse and Service Point
+ */
+ public void setM_Warehouse_ID (int M_Warehouse_ID);
+
+ /** Get Warehouse.
+ * Storage Warehouse and Service Point
+ */
+ public int getM_Warehouse_ID();
+
+ public I_M_Warehouse getM_Warehouse() throws Exception;
+
+ /** Column name PA_Goal_ID */
+ public static final String COLUMNNAME_PA_Goal_ID = "PA_Goal_ID";
+
+ /** Set Goal.
+ * Performance Goal
+ */
+ public void setPA_Goal_ID (int PA_Goal_ID);
+
+ /** Get Goal.
+ * Performance Goal
+ */
+ public int getPA_Goal_ID();
+
+ public I_PA_Goal getPA_Goal() throws Exception;
+
+ /** Column name Parent_Org_ID */
+ public static final String COLUMNNAME_Parent_Org_ID = "Parent_Org_ID";
+
+ /** Set Parent Organization.
+ * Parent (superior) Organization
+ */
+ public void setParent_Org_ID (int Parent_Org_ID);
+
+ /** Get Parent Organization.
+ * Parent (superior) Organization
+ */
+ public int getParent_Org_ID();
+
+ /** Column name ReceiptFooterMsg */
+ public static final String COLUMNNAME_ReceiptFooterMsg = "ReceiptFooterMsg";
+
+ /** Set Receipt Footer Msg.
+ * This message will be displayed at the bottom of a receipt when doing a sales or purchase
+ */
+ public void setReceiptFooterMsg (String ReceiptFooterMsg);
+
+ /** Get Receipt Footer Msg.
+ * This message will be displayed at the bottom of a receipt when doing a sales or purchase
+ */
+ public String getReceiptFooterMsg();
+
+ /** Column name Supervisor_ID */
+ public static final String COLUMNNAME_Supervisor_ID = "Supervisor_ID";
+
+ /** Set Supervisor.
+ * Supervisor for this user/organization - used for escalation and approval
+ */
+ public void setSupervisor_ID (int Supervisor_ID);
+
+ /** Get Supervisor.
+ * Supervisor for this user/organization - used for escalation and approval
+ */
+ public int getSupervisor_ID();
+
+ /** Column name TaxID */
+ public static final String COLUMNNAME_TaxID = "TaxID";
+
+ /** Set Tax ID.
+ * Tax Identification
+ */
+ public void setTaxID (String TaxID);
+
+ /** Get Tax ID.
+ * Tax Identification
+ */
+ public String getTaxID();
+
+ /** Column name TransferBank_ID */
+ public static final String COLUMNNAME_TransferBank_ID = "TransferBank_ID";
+
+ /** Set Bank for transfers.
+ * Bank account depending on currency will be used from this bank for doing transfers
+ */
+ public void setTransferBank_ID (int TransferBank_ID);
+
+ /** Get Bank for transfers.
+ * Bank account depending on currency will be used from this bank for doing transfers
+ */
+ public int getTransferBank_ID();
+
+ /** Column name TransferCashBook_ID */
+ public static final String COLUMNNAME_TransferCashBook_ID = "TransferCashBook_ID";
+
+ /** Set CashBook for transfers */
+ public void setTransferCashBook_ID (int TransferCashBook_ID);
+
+ /** Get CashBook for transfers */
+ public int getTransferCashBook_ID();
+}
diff --git a/posterita/posterita/src/main/org/compiere/model/I_AD_Role.java b/posterita/posterita/src/main/org/compiere/model/I_AD_Role.java
new file mode 100644
index 0000000000..841342136f
--- /dev/null
+++ b/posterita/posterita/src/main/org/compiere/model/I_AD_Role.java
@@ -0,0 +1,498 @@
+/**********************************************************************
+ * This file is part of Adempiere ERP Bazaar *
+ * http://www.adempiere.org *
+ * *
+ * Copyright (C) Trifon Trifonov. *
+ * Copyright (C) Contributors *
+ * *
+ * This program is free software;
+ you can redistribute it and/or *
+ * modify it under the terms of the GNU General Public License *
+ * as published by the Free Software Foundation;
+ either version 2 *
+ * of the License, or (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY;
+ without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program;
+ if not, write to the Free Software *
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
+ * MA 02110-1301, USA. *
+ * *
+ * Contributors: *
+ * - Trifon Trifonov (trifonnt@users.sourceforge.net) *
+ * *
+ * Sponsors: *
+ * - Company (http://www.site.com) *
+ **********************************************************************/
+package org.compiere.model;
+
+import java.math.BigDecimal;
+import org.compiere.util.KeyNamePair;
+
+/** Generated Interface for AD_Role
+ * @author Trifon Trifonov (generated)
+ * @version Release 3.4.0s
+ */
+public interface I_AD_Role
+{
+
+ /** TableName=AD_Role */
+ public static final String Table_Name = "AD_Role";
+
+ /** AD_Table_ID=156 */
+ public static final int Table_ID = MTable.getTable_ID(Table_Name);
+
+ KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
+
+ /** AccessLevel = 6 - System - Client
+ */
+ BigDecimal accessLevel = BigDecimal.valueOf(6);
+
+ /** Load Meta Data */
+
+ /** Column name AD_Role_ID */
+ public static final String COLUMNNAME_AD_Role_ID = "AD_Role_ID";
+
+ /** Set Role.
+ * Responsibility Role
+ */
+ public void setAD_Role_ID (int AD_Role_ID);
+
+ /** Get Role.
+ * Responsibility Role
+ */
+ public int getAD_Role_ID();
+
+ /** Column name AD_Tree_Menu_ID */
+ public static final String COLUMNNAME_AD_Tree_Menu_ID = "AD_Tree_Menu_ID";
+
+ /** Set Menu Tree.
+ * Tree of the menu
+ */
+ public void setAD_Tree_Menu_ID (int AD_Tree_Menu_ID);
+
+ /** Get Menu Tree.
+ * Tree of the menu
+ */
+ public int getAD_Tree_Menu_ID();
+
+ /** Column name AD_Tree_Org_ID */
+ public static final String COLUMNNAME_AD_Tree_Org_ID = "AD_Tree_Org_ID";
+
+ /** Set Organization Tree.
+ * Tree to determine organizational hierarchy
+ */
+ public void setAD_Tree_Org_ID (int AD_Tree_Org_ID);
+
+ /** Get Organization Tree.
+ * Tree to determine organizational hierarchy
+ */
+ public int getAD_Tree_Org_ID();
+
+ /** Column name Allow_Info_Account */
+ public static final String COLUMNNAME_Allow_Info_Account = "Allow_Info_Account";
+
+ /** Set Allow Info Account */
+ public void setAllow_Info_Account (boolean Allow_Info_Account);
+
+ /** Get Allow Info Account */
+ public boolean isAllow_Info_Account();
+
+ /** Column name Allow_Info_Asset */
+ public static final String COLUMNNAME_Allow_Info_Asset = "Allow_Info_Asset";
+
+ /** Set Allow Info Asset */
+ public void setAllow_Info_Asset (boolean Allow_Info_Asset);
+
+ /** Get Allow Info Asset */
+ public boolean isAllow_Info_Asset();
+
+ /** Column name Allow_Info_BPartner */
+ public static final String COLUMNNAME_Allow_Info_BPartner = "Allow_Info_BPartner";
+
+ /** Set Allow Info BPartner */
+ public void setAllow_Info_BPartner (boolean Allow_Info_BPartner);
+
+ /** Get Allow Info BPartner */
+ public boolean isAllow_Info_BPartner();
+
+ /** Column name Allow_Info_CashJournal */
+ public static final String COLUMNNAME_Allow_Info_CashJournal = "Allow_Info_CashJournal";
+
+ /** Set Allow Info CashJournal */
+ public void setAllow_Info_CashJournal (boolean Allow_Info_CashJournal);
+
+ /** Get Allow Info CashJournal */
+ public boolean isAllow_Info_CashJournal();
+
+ /** Column name Allow_Info_InOut */
+ public static final String COLUMNNAME_Allow_Info_InOut = "Allow_Info_InOut";
+
+ /** Set Allow Info InOut */
+ public void setAllow_Info_InOut (boolean Allow_Info_InOut);
+
+ /** Get Allow Info InOut */
+ public boolean isAllow_Info_InOut();
+
+ /** Column name Allow_Info_Invoice */
+ public static final String COLUMNNAME_Allow_Info_Invoice = "Allow_Info_Invoice";
+
+ /** Set Allow Info Invoice */
+ public void setAllow_Info_Invoice (boolean Allow_Info_Invoice);
+
+ /** Get Allow Info Invoice */
+ public boolean isAllow_Info_Invoice();
+
+ /** Column name Allow_Info_Order */
+ public static final String COLUMNNAME_Allow_Info_Order = "Allow_Info_Order";
+
+ /** Set Allow Info Order */
+ public void setAllow_Info_Order (boolean Allow_Info_Order);
+
+ /** Get Allow Info Order */
+ public boolean isAllow_Info_Order();
+
+ /** Column name Allow_Info_Payment */
+ public static final String COLUMNNAME_Allow_Info_Payment = "Allow_Info_Payment";
+
+ /** Set Allow Info Payment */
+ public void setAllow_Info_Payment (boolean Allow_Info_Payment);
+
+ /** Get Allow Info Payment */
+ public boolean isAllow_Info_Payment();
+
+ /** Column name Allow_Info_Product */
+ public static final String COLUMNNAME_Allow_Info_Product = "Allow_Info_Product";
+
+ /** Set Allow Info Product */
+ public void setAllow_Info_Product (boolean Allow_Info_Product);
+
+ /** Get Allow Info Product */
+ public boolean isAllow_Info_Product();
+
+ /** Column name Allow_Info_Resource */
+ public static final String COLUMNNAME_Allow_Info_Resource = "Allow_Info_Resource";
+
+ /** Set Allow Info Resource */
+ public void setAllow_Info_Resource (boolean Allow_Info_Resource);
+
+ /** Get Allow Info Resource */
+ public boolean isAllow_Info_Resource();
+
+ /** Column name Allow_Info_Schedule */
+ public static final String COLUMNNAME_Allow_Info_Schedule = "Allow_Info_Schedule";
+
+ /** Set Allow Info Schedule */
+ public void setAllow_Info_Schedule (boolean Allow_Info_Schedule);
+
+ /** Get Allow Info Schedule */
+ public boolean isAllow_Info_Schedule();
+
+ /** Column name AmtApproval */
+ public static final String COLUMNNAME_AmtApproval = "AmtApproval";
+
+ /** Set Approval Amount.
+ * The approval amount limit for this role
+ */
+ public void setAmtApproval (BigDecimal AmtApproval);
+
+ /** Get Approval Amount.
+ * The approval amount limit for this role
+ */
+ public BigDecimal getAmtApproval();
+
+ /** Column name C_Currency_ID */
+ public static final String COLUMNNAME_C_Currency_ID = "C_Currency_ID";
+
+ /** Set Currency.
+ * The Currency for this record
+ */
+ public void setC_Currency_ID (int C_Currency_ID);
+
+ /** Get Currency.
+ * The Currency for this record
+ */
+ public int getC_Currency_ID();
+
+ public I_C_Currency getC_Currency() throws Exception;
+
+ /** Column name ConfirmQueryRecords */
+ public static final String COLUMNNAME_ConfirmQueryRecords = "ConfirmQueryRecords";
+
+ /** Set Confirm Query Records.
+ * Require Confirmation if more records will be returned by the query (If not defined 500)
+ */
+ public void setConfirmQueryRecords (int ConfirmQueryRecords);
+
+ /** Get Confirm Query Records.
+ * Require Confirmation if more records will be returned by the query (If not defined 500)
+ */
+ public int getConfirmQueryRecords();
+
+ /** Column name ConnectionProfile */
+ public static final String COLUMNNAME_ConnectionProfile = "ConnectionProfile";
+
+ /** Set Connection Profile.
+ * How a Java Client connects to the server(s)
+ */
+ public void setConnectionProfile (String ConnectionProfile);
+
+ /** Get Connection Profile.
+ * How a Java Client connects to the server(s)
+ */
+ public String getConnectionProfile();
+
+ /** Column name Description */
+ public static final String COLUMNNAME_Description = "Description";
+
+ /** Set Description.
+ * Optional short description of the record
+ */
+ public void setDescription (String Description);
+
+ /** Get Description.
+ * Optional short description of the record
+ */
+ public String getDescription();
+
+ /** Column name IsAccessAllOrgs */
+ public static final String COLUMNNAME_IsAccessAllOrgs = "IsAccessAllOrgs";
+
+ /** Set Access all Orgs.
+ * Access all Organizations (no org access control) of the client
+ */
+ public void setIsAccessAllOrgs (boolean IsAccessAllOrgs);
+
+ /** Get Access all Orgs.
+ * Access all Organizations (no org access control) of the client
+ */
+ public boolean isAccessAllOrgs();
+
+ /** Column name IsCanApproveOwnDoc */
+ public static final String COLUMNNAME_IsCanApproveOwnDoc = "IsCanApproveOwnDoc";
+
+ /** Set Approve own Documents.
+ * Users with this role can approve their own documents
+ */
+ public void setIsCanApproveOwnDoc (boolean IsCanApproveOwnDoc);
+
+ /** Get Approve own Documents.
+ * Users with this role can approve their own documents
+ */
+ public boolean isCanApproveOwnDoc();
+
+ /** Column name IsCanExport */
+ public static final String COLUMNNAME_IsCanExport = "IsCanExport";
+
+ /** Set Can Export.
+ * Users with this role can export data
+ */
+ public void setIsCanExport (boolean IsCanExport);
+
+ /** Get Can Export.
+ * Users with this role can export data
+ */
+ public boolean isCanExport();
+
+ /** Column name IsCanReport */
+ public static final String COLUMNNAME_IsCanReport = "IsCanReport";
+
+ /** Set Can Report.
+ * Users with this role can create reports
+ */
+ public void setIsCanReport (boolean IsCanReport);
+
+ /** Get Can Report.
+ * Users with this role can create reports
+ */
+ public boolean isCanReport();
+
+ /** Column name IsChangeLog */
+ public static final String COLUMNNAME_IsChangeLog = "IsChangeLog";
+
+ /** Set Maintain Change Log.
+ * Maintain a log of changes
+ */
+ public void setIsChangeLog (boolean IsChangeLog);
+
+ /** Get Maintain Change Log.
+ * Maintain a log of changes
+ */
+ public boolean isChangeLog();
+
+ /** Column name IsDiscountAllowedOnTotal */
+ public static final String COLUMNNAME_IsDiscountAllowedOnTotal = "IsDiscountAllowedOnTotal";
+
+ /** Set IsDiscountAllowedOnTotal */
+ public void setIsDiscountAllowedOnTotal (boolean IsDiscountAllowedOnTotal);
+
+ /** Get IsDiscountAllowedOnTotal */
+ public boolean isDiscountAllowedOnTotal();
+
+ /** Column name IsDiscountUptoLimitPrice */
+ public static final String COLUMNNAME_IsDiscountUptoLimitPrice = "IsDiscountUptoLimitPrice";
+
+ /** Set IsDiscountUptoLimitPrice */
+ public void setIsDiscountUptoLimitPrice (boolean IsDiscountUptoLimitPrice);
+
+ /** Get IsDiscountUptoLimitPrice */
+ public boolean isDiscountUptoLimitPrice();
+
+ /** Column name IsManual */
+ public static final String COLUMNNAME_IsManual = "IsManual";
+
+ /** Set Manual.
+ * This is a manual process
+ */
+ public void setIsManual (boolean IsManual);
+
+ /** Get Manual.
+ * This is a manual process
+ */
+ public boolean isManual();
+
+ /** Column name IsPersonalAccess */
+ public static final String COLUMNNAME_IsPersonalAccess = "IsPersonalAccess";
+
+ /** Set Personal Access.
+ * Allow access to all personal records
+ */
+ public void setIsPersonalAccess (boolean IsPersonalAccess);
+
+ /** Get Personal Access.
+ * Allow access to all personal records
+ */
+ public boolean isPersonalAccess();
+
+ /** Column name IsPersonalLock */
+ public static final String COLUMNNAME_IsPersonalLock = "IsPersonalLock";
+
+ /** Set Personal Lock.
+ * Allow users with role to lock access to personal records
+ */
+ public void setIsPersonalLock (boolean IsPersonalLock);
+
+ /** Get Personal Lock.
+ * Allow users with role to lock access to personal records
+ */
+ public boolean isPersonalLock();
+
+ /** Column name IsShowAcct */
+ public static final String COLUMNNAME_IsShowAcct = "IsShowAcct";
+
+ /** Set Show Accounting.
+ * Users with this role can see accounting information
+ */
+ public void setIsShowAcct (boolean IsShowAcct);
+
+ /** Get Show Accounting.
+ * Users with this role can see accounting information
+ */
+ public boolean isShowAcct();
+
+ /** Column name IsUseUserOrgAccess */
+ public static final String COLUMNNAME_IsUseUserOrgAccess = "IsUseUserOrgAccess";
+
+ /** Set Use User Org Access.
+ * Use Org Access defined by user instead of Role Org Access
+ */
+ public void setIsUseUserOrgAccess (boolean IsUseUserOrgAccess);
+
+ /** Get Use User Org Access.
+ * Use Org Access defined by user instead of Role Org Access
+ */
+ public boolean isUseUserOrgAccess();
+
+ /** Column name MaxQueryRecords */
+ public static final String COLUMNNAME_MaxQueryRecords = "MaxQueryRecords";
+
+ /** Set Max Query Records.
+ * If defined, you cannot query more records as defined - the query criteria needs to be changed to query less records
+ */
+ public void setMaxQueryRecords (int MaxQueryRecords);
+
+ /** Get Max Query Records.
+ * If defined, you cannot query more records as defined - the query criteria needs to be changed to query less records
+ */
+ public int getMaxQueryRecords();
+
+ /** Column name Name */
+ public static final String COLUMNNAME_Name = "Name";
+
+ /** Set Name.
+ * Alphanumeric identifier of the entity
+ */
+ public void setName (String Name);
+
+ /** Get Name.
+ * Alphanumeric identifier of the entity
+ */
+ public String getName();
+
+ /** Column name OverwritePriceLimit */
+ public static final String COLUMNNAME_OverwritePriceLimit = "OverwritePriceLimit";
+
+ /** Set Overwrite Price Limit.
+ * Overwrite Price Limit if the Price List enforces the Price Limit
+ */
+ public void setOverwritePriceLimit (boolean OverwritePriceLimit);
+
+ /** Get Overwrite Price Limit.
+ * Overwrite Price Limit if the Price List enforces the Price Limit
+ */
+ public boolean isOverwritePriceLimit();
+
+ /** Column name PreferenceType */
+ public static final String COLUMNNAME_PreferenceType = "PreferenceType";
+
+ /** Set Preference Level.
+ * Determines what preferences the user can set
+ */
+ public void setPreferenceType (String PreferenceType);
+
+ /** Get Preference Level.
+ * Determines what preferences the user can set
+ */
+ public String getPreferenceType();
+
+ /** Column name Supervisor_ID */
+ public static final String COLUMNNAME_Supervisor_ID = "Supervisor_ID";
+
+ /** Set Supervisor.
+ * Supervisor for this user/organization - used for escalation and approval
+ */
+ public void setSupervisor_ID (int Supervisor_ID);
+
+ /** Get Supervisor.
+ * Supervisor for this user/organization - used for escalation and approval
+ */
+ public int getSupervisor_ID();
+
+ /** Column name UserDiscount */
+ public static final String COLUMNNAME_UserDiscount = "UserDiscount";
+
+ /** Set UserDiscount */
+ public void setUserDiscount (BigDecimal UserDiscount);
+
+ /** Get UserDiscount */
+ public BigDecimal getUserDiscount();
+
+ /** Column name UserLevel */
+ public static final String COLUMNNAME_UserLevel = "UserLevel";
+
+ /** Set User Level.
+ * System Client Organization
+ */
+ public void setUserLevel (String UserLevel);
+
+ /** Get User Level.
+ * System Client Organization
+ */
+ public String getUserLevel();
+}
diff --git a/posterita/posterita/src/main/org/compiere/model/I_C_CashLine.java b/posterita/posterita/src/main/org/compiere/model/I_C_CashLine.java
new file mode 100644
index 0000000000..0a92c2e874
--- /dev/null
+++ b/posterita/posterita/src/main/org/compiere/model/I_C_CashLine.java
@@ -0,0 +1,265 @@
+/**********************************************************************
+ * This file is part of Adempiere ERP Bazaar *
+ * http://www.adempiere.org *
+ * *
+ * Copyright (C) Trifon Trifonov. *
+ * Copyright (C) Contributors *
+ * *
+ * This program is free software;
+ you can redistribute it and/or *
+ * modify it under the terms of the GNU General Public License *
+ * as published by the Free Software Foundation;
+ either version 2 *
+ * of the License, or (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY;
+ without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program;
+ if not, write to the Free Software *
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
+ * MA 02110-1301, USA. *
+ * *
+ * Contributors: *
+ * - Trifon Trifonov (trifonnt@users.sourceforge.net) *
+ * *
+ * Sponsors: *
+ * - Company (http://www.site.com) *
+ **********************************************************************/
+package org.compiere.model;
+
+import java.math.BigDecimal;
+import org.compiere.util.KeyNamePair;
+
+/** Generated Interface for C_CashLine
+ * @author Trifon Trifonov (generated)
+ * @version Release 3.4.0s
+ */
+public interface I_C_CashLine
+{
+
+ /** TableName=C_CashLine */
+ public static final String Table_Name = "C_CashLine";
+
+ /** AD_Table_ID=410 */
+ public static final int Table_ID = MTable.getTable_ID(Table_Name);
+
+ KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
+
+ /** AccessLevel = 3 - Client - Org
+ */
+ BigDecimal accessLevel = BigDecimal.valueOf(3);
+
+ /** Load Meta Data */
+
+ /** Column name Amount */
+ public static final String COLUMNNAME_Amount = "Amount";
+
+ /** Set Amount.
+ * Amount in a defined currency
+ */
+ public void setAmount (BigDecimal Amount);
+
+ /** Get Amount.
+ * Amount in a defined currency
+ */
+ public BigDecimal getAmount();
+
+ /** Column name CashType */
+ public static final String COLUMNNAME_CashType = "CashType";
+
+ /** Set Cash Type.
+ * Source of Cash
+ */
+ public void setCashType (String CashType);
+
+ /** Get Cash Type.
+ * Source of Cash
+ */
+ public String getCashType();
+
+ /** Column name C_BankAccount_ID */
+ public static final String COLUMNNAME_C_BankAccount_ID = "C_BankAccount_ID";
+
+ /** Set Bank Account.
+ * Account at the Bank
+ */
+ public void setC_BankAccount_ID (int C_BankAccount_ID);
+
+ /** Get Bank Account.
+ * Account at the Bank
+ */
+ public int getC_BankAccount_ID();
+
+ public I_C_BankAccount getC_BankAccount() throws Exception;
+
+ /** Column name C_Cash_ID */
+ public static final String COLUMNNAME_C_Cash_ID = "C_Cash_ID";
+
+ /** Set Cash Journal.
+ * Cash Journal
+ */
+ public void setC_Cash_ID (int C_Cash_ID);
+
+ /** Get Cash Journal.
+ * Cash Journal
+ */
+ public int getC_Cash_ID();
+
+ public I_C_Cash getC_Cash() throws Exception;
+
+ /** Column name C_CashLine_ID */
+ public static final String COLUMNNAME_C_CashLine_ID = "C_CashLine_ID";
+
+ /** Set Cash Journal Line.
+ * Cash Journal Line
+ */
+ public void setC_CashLine_ID (int C_CashLine_ID);
+
+ /** Get Cash Journal Line.
+ * Cash Journal Line
+ */
+ public int getC_CashLine_ID();
+
+ /** Column name C_Charge_ID */
+ public static final String COLUMNNAME_C_Charge_ID = "C_Charge_ID";
+
+ /** Set Charge.
+ * Additional document charges
+ */
+ public void setC_Charge_ID (int C_Charge_ID);
+
+ /** Get Charge.
+ * Additional document charges
+ */
+ public int getC_Charge_ID();
+
+ public I_C_Charge getC_Charge() throws Exception;
+
+ /** Column name C_Currency_ID */
+ public static final String COLUMNNAME_C_Currency_ID = "C_Currency_ID";
+
+ /** Set Currency.
+ * The Currency for this record
+ */
+ public void setC_Currency_ID (int C_Currency_ID);
+
+ /** Get Currency.
+ * The Currency for this record
+ */
+ public int getC_Currency_ID();
+
+ public I_C_Currency getC_Currency() throws Exception;
+
+ /** Column name C_Invoice_ID */
+ public static final String COLUMNNAME_C_Invoice_ID = "C_Invoice_ID";
+
+ /** Set Invoice.
+ * Invoice Identifier
+ */
+ public void setC_Invoice_ID (int C_Invoice_ID);
+
+ /** Get Invoice.
+ * Invoice Identifier
+ */
+ public int getC_Invoice_ID();
+
+ public I_C_Invoice getC_Invoice() throws Exception;
+
+ /** Column name C_Payment_ID */
+ public static final String COLUMNNAME_C_Payment_ID = "C_Payment_ID";
+
+ /** Set Payment.
+ * Payment identifier
+ */
+ public void setC_Payment_ID (int C_Payment_ID);
+
+ /** Get Payment.
+ * Payment identifier
+ */
+ public int getC_Payment_ID();
+
+ public I_C_Payment getC_Payment() throws Exception;
+
+ /** Column name Description */
+ public static final String COLUMNNAME_Description = "Description";
+
+ /** Set Description.
+ * Optional short description of the record
+ */
+ public void setDescription (String Description);
+
+ /** Get Description.
+ * Optional short description of the record
+ */
+ public String getDescription();
+
+ /** Column name DiscountAmt */
+ public static final String COLUMNNAME_DiscountAmt = "DiscountAmt";
+
+ /** Set Discount Amount.
+ * Calculated amount of discount
+ */
+ public void setDiscountAmt (BigDecimal DiscountAmt);
+
+ /** Get Discount Amount.
+ * Calculated amount of discount
+ */
+ public BigDecimal getDiscountAmt();
+
+ /** Column name IsGenerated */
+ public static final String COLUMNNAME_IsGenerated = "IsGenerated";
+
+ /** Set Generated.
+ * This Line is generated
+ */
+ public void setIsGenerated (boolean IsGenerated);
+
+ /** Get Generated.
+ * This Line is generated
+ */
+ public boolean isGenerated();
+
+ /** Column name Line */
+ public static final String COLUMNNAME_Line = "Line";
+
+ /** Set Line No.
+ * Unique line for this document
+ */
+ public void setLine (int Line);
+
+ /** Get Line No.
+ * Unique line for this document
+ */
+ public int getLine();
+
+ /** Column name Processed */
+ public static final String COLUMNNAME_Processed = "Processed";
+
+ /** Set Processed.
+ * The document has been processed
+ */
+ public void setProcessed (boolean Processed);
+
+ /** Get Processed.
+ * The document has been processed
+ */
+ public boolean isProcessed();
+
+ /** Column name WriteOffAmt */
+ public static final String COLUMNNAME_WriteOffAmt = "WriteOffAmt";
+
+ /** Set Write-off Amount.
+ * Amount to write-off
+ */
+ public void setWriteOffAmt (BigDecimal WriteOffAmt);
+
+ /** Get Write-off Amount.
+ * Amount to write-off
+ */
+ public BigDecimal getWriteOffAmt();
+}
diff --git a/posterita/posterita/src/main/org/compiere/model/I_C_Currency.java b/posterita/posterita/src/main/org/compiere/model/I_C_Currency.java
new file mode 100644
index 0000000000..aa605355cf
--- /dev/null
+++ b/posterita/posterita/src/main/org/compiere/model/I_C_Currency.java
@@ -0,0 +1,202 @@
+/**********************************************************************
+ * This file is part of Adempiere ERP Bazaar *
+ * http://www.adempiere.org *
+ * *
+ * Copyright (C) Trifon Trifonov. *
+ * Copyright (C) Contributors *
+ * *
+ * This program is free software;
+ you can redistribute it and/or *
+ * modify it under the terms of the GNU General Public License *
+ * as published by the Free Software Foundation;
+ either version 2 *
+ * of the License, or (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY;
+ without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program;
+ if not, write to the Free Software *
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
+ * MA 02110-1301, USA. *
+ * *
+ * Contributors: *
+ * - Trifon Trifonov (trifonnt@users.sourceforge.net) *
+ * *
+ * Sponsors: *
+ * - Company (http://www.site.com) *
+ **********************************************************************/
+package org.compiere.model;
+
+import java.math.BigDecimal;
+import java.sql.Timestamp;
+import org.compiere.util.KeyNamePair;
+
+/** Generated Interface for C_Currency
+ * @author Trifon Trifonov (generated)
+ * @version Release 3.4.0s
+ */
+public interface I_C_Currency
+{
+
+ /** TableName=C_Currency */
+ public static final String Table_Name = "C_Currency";
+
+ /** AD_Table_ID=141 */
+ public static final int Table_ID = MTable.getTable_ID(Table_Name);
+
+ KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
+
+ /** AccessLevel = 6 - System - Client
+ */
+ BigDecimal accessLevel = BigDecimal.valueOf(6);
+
+ /** Load Meta Data */
+
+ /** Column name C_Currency_ID */
+ public static final String COLUMNNAME_C_Currency_ID = "C_Currency_ID";
+
+ /** Set Currency.
+ * The Currency for this record
+ */
+ public void setC_Currency_ID (int C_Currency_ID);
+
+ /** Get Currency.
+ * The Currency for this record
+ */
+ public int getC_Currency_ID();
+
+ /** Column name CostingPrecision */
+ public static final String COLUMNNAME_CostingPrecision = "CostingPrecision";
+
+ /** Set Costing Precision.
+ * Rounding used costing calculations
+ */
+ public void setCostingPrecision (int CostingPrecision);
+
+ /** Get Costing Precision.
+ * Rounding used costing calculations
+ */
+ public int getCostingPrecision();
+
+ /** Column name CurSymbol */
+ public static final String COLUMNNAME_CurSymbol = "CurSymbol";
+
+ /** Set Symbol.
+ * Symbol of the currency (opt used for printing only)
+ */
+ public void setCurSymbol (String CurSymbol);
+
+ /** Get Symbol.
+ * Symbol of the currency (opt used for printing only)
+ */
+ public String getCurSymbol();
+
+ /** Column name Description */
+ public static final String COLUMNNAME_Description = "Description";
+
+ /** Set Description.
+ * Optional short description of the record
+ */
+ public void setDescription (String Description);
+
+ /** Get Description.
+ * Optional short description of the record
+ */
+ public String getDescription();
+
+ /** Column name EMUEntryDate */
+ public static final String COLUMNNAME_EMUEntryDate = "EMUEntryDate";
+
+ /** Set EMU Entry Date.
+ * Date when the currency joined / will join the EMU
+ */
+ public void setEMUEntryDate (Timestamp EMUEntryDate);
+
+ /** Get EMU Entry Date.
+ * Date when the currency joined / will join the EMU
+ */
+ public Timestamp getEMUEntryDate();
+
+ /** Column name EMURate */
+ public static final String COLUMNNAME_EMURate = "EMURate";
+
+ /** Set EMU Rate.
+ * Official rate to the Euro
+ */
+ public void setEMURate (BigDecimal EMURate);
+
+ /** Get EMU Rate.
+ * Official rate to the Euro
+ */
+ public BigDecimal getEMURate();
+
+ /** Column name IsEMUMember */
+ public static final String COLUMNNAME_IsEMUMember = "IsEMUMember";
+
+ /** Set EMU Member.
+ * This currency is member if the European Monetary Union
+ */
+ public void setIsEMUMember (boolean IsEMUMember);
+
+ /** Get EMU Member.
+ * This currency is member if the European Monetary Union
+ */
+ public boolean isEMUMember();
+
+ /** Column name IsEuro */
+ public static final String COLUMNNAME_IsEuro = "IsEuro";
+
+ /** Set The Euro Currency.
+ * This currency is the Euro
+ */
+ public void setIsEuro (boolean IsEuro);
+
+ /** Get The Euro Currency.
+ * This currency is the Euro
+ */
+ public boolean isEuro();
+
+ /** Column name ISO_Code */
+ public static final String COLUMNNAME_ISO_Code = "ISO_Code";
+
+ /** Set ISO Currency Code.
+ * Three letter ISO 4217 Code of the Currency
+ */
+ public void setISO_Code (String ISO_Code);
+
+ /** Get ISO Currency Code.
+ * Three letter ISO 4217 Code of the Currency
+ */
+ public String getISO_Code();
+
+ /** Column name RoundOffFactor */
+ public static final String COLUMNNAME_RoundOffFactor = "RoundOffFactor";
+
+ /** Set RoundOffFactor.
+ * Used to Round Off Payment Amount
+ */
+ public void setRoundOffFactor (BigDecimal RoundOffFactor);
+
+ /** Get RoundOffFactor.
+ * Used to Round Off Payment Amount
+ */
+ public BigDecimal getRoundOffFactor();
+
+ /** Column name StdPrecision */
+ public static final String COLUMNNAME_StdPrecision = "StdPrecision";
+
+ /** Set Standard Precision.
+ * Rule for rounding calculated amounts
+ */
+ public void setStdPrecision (int StdPrecision);
+
+ /** Get Standard Precision.
+ * Rule for rounding calculated amounts
+ */
+ public int getStdPrecision();
+}
diff --git a/posterita/posterita/src/main/org/compiere/model/I_C_Invoice.java b/posterita/posterita/src/main/org/compiere/model/I_C_Invoice.java
new file mode 100644
index 0000000000..4f5859dd59
--- /dev/null
+++ b/posterita/posterita/src/main/org/compiere/model/I_C_Invoice.java
@@ -0,0 +1,803 @@
+/**********************************************************************
+ * This file is part of Adempiere ERP Bazaar *
+ * http://www.adempiere.org *
+ * *
+ * Copyright (C) Trifon Trifonov. *
+ * Copyright (C) Contributors *
+ * *
+ * This program is free software;
+ you can redistribute it and/or *
+ * modify it under the terms of the GNU General Public License *
+ * as published by the Free Software Foundation;
+ either version 2 *
+ * of the License, or (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY;
+ without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program;
+ if not, write to the Free Software *
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
+ * MA 02110-1301, USA. *
+ * *
+ * Contributors: *
+ * - Trifon Trifonov (trifonnt@users.sourceforge.net) *
+ * *
+ * Sponsors: *
+ * - Company (http://www.site.com) *
+ **********************************************************************/
+package org.compiere.model;
+
+import java.math.BigDecimal;
+import java.sql.Timestamp;
+import org.compiere.util.KeyNamePair;
+
+/** Generated Interface for C_Invoice
+ * @author Trifon Trifonov (generated)
+ * @version Release 3.4.0s
+ */
+public interface I_C_Invoice
+{
+
+ /** TableName=C_Invoice */
+ public static final String Table_Name = "C_Invoice";
+
+ /** AD_Table_ID=318 */
+ public static final int Table_ID = MTable.getTable_ID(Table_Name);
+
+ KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
+
+ /** AccessLevel = 1 - Org
+ */
+ BigDecimal accessLevel = BigDecimal.valueOf(1);
+
+ /** Load Meta Data */
+
+ /** Column name AD_OrgTrx_ID */
+ public static final String COLUMNNAME_AD_OrgTrx_ID = "AD_OrgTrx_ID";
+
+ /** Set Trx Organization.
+ * Performing or initiating organization
+ */
+ public void setAD_OrgTrx_ID (int AD_OrgTrx_ID);
+
+ /** Get Trx Organization.
+ * Performing or initiating organization
+ */
+ public int getAD_OrgTrx_ID();
+
+ /** Column name AD_User_ID */
+ public static final String COLUMNNAME_AD_User_ID = "AD_User_ID";
+
+ /** Set User/Contact.
+ * User within the system - Internal or Business Partner Contact
+ */
+ public void setAD_User_ID (int AD_User_ID);
+
+ /** Get User/Contact.
+ * User within the system - Internal or Business Partner Contact
+ */
+ public int getAD_User_ID();
+
+ public I_AD_User getAD_User() throws Exception;
+
+ /** Column name C_Activity_ID */
+ public static final String COLUMNNAME_C_Activity_ID = "C_Activity_ID";
+
+ /** Set Activity.
+ * Business Activity
+ */
+ public void setC_Activity_ID (int C_Activity_ID);
+
+ /** Get Activity.
+ * Business Activity
+ */
+ public int getC_Activity_ID();
+
+ public I_C_Activity getC_Activity() throws Exception;
+
+ /** Column name C_BPartner_ID */
+ public static final String COLUMNNAME_C_BPartner_ID = "C_BPartner_ID";
+
+ /** Set Business Partner .
+ * Identifies a Business Partner
+ */
+ public void setC_BPartner_ID (int C_BPartner_ID);
+
+ /** Get Business Partner .
+ * Identifies a Business Partner
+ */
+ public int getC_BPartner_ID();
+
+ public I_C_BPartner getC_BPartner() throws Exception;
+
+ /** Column name C_BPartner_Location_ID */
+ public static final String COLUMNNAME_C_BPartner_Location_ID = "C_BPartner_Location_ID";
+
+ /** Set Partner Location.
+ * Identifies the (ship to) address for this Business Partner
+ */
+ public void setC_BPartner_Location_ID (int C_BPartner_Location_ID);
+
+ /** Get Partner Location.
+ * Identifies the (ship to) address for this Business Partner
+ */
+ public int getC_BPartner_Location_ID();
+
+ public I_C_BPartner_Location getC_BPartner_Location() throws Exception;
+
+ /** Column name C_Campaign_ID */
+ public static final String COLUMNNAME_C_Campaign_ID = "C_Campaign_ID";
+
+ /** Set Campaign.
+ * Marketing Campaign
+ */
+ public void setC_Campaign_ID (int C_Campaign_ID);
+
+ /** Get Campaign.
+ * Marketing Campaign
+ */
+ public int getC_Campaign_ID();
+
+ public I_C_Campaign getC_Campaign() throws Exception;
+
+ /** Column name C_CashLine_ID */
+ public static final String COLUMNNAME_C_CashLine_ID = "C_CashLine_ID";
+
+ /** Set Cash Journal Line.
+ * Cash Journal Line
+ */
+ public void setC_CashLine_ID (int C_CashLine_ID);
+
+ /** Get Cash Journal Line.
+ * Cash Journal Line
+ */
+ public int getC_CashLine_ID();
+
+ public I_C_CashLine getC_CashLine() throws Exception;
+
+ /** Column name C_Charge_ID */
+ public static final String COLUMNNAME_C_Charge_ID = "C_Charge_ID";
+
+ /** Set Charge.
+ * Additional document charges
+ */
+ public void setC_Charge_ID (int C_Charge_ID);
+
+ /** Get Charge.
+ * Additional document charges
+ */
+ public int getC_Charge_ID();
+
+ /** Column name C_ConversionType_ID */
+ public static final String COLUMNNAME_C_ConversionType_ID = "C_ConversionType_ID";
+
+ /** Set Currency Type.
+ * Currency Conversion Rate Type
+ */
+ public void setC_ConversionType_ID (int C_ConversionType_ID);
+
+ /** Get Currency Type.
+ * Currency Conversion Rate Type
+ */
+ public int getC_ConversionType_ID();
+
+ public I_C_ConversionType getC_ConversionType() throws Exception;
+
+ /** Column name C_Currency_ID */
+ public static final String COLUMNNAME_C_Currency_ID = "C_Currency_ID";
+
+ /** Set Currency.
+ * The Currency for this record
+ */
+ public void setC_Currency_ID (int C_Currency_ID);
+
+ /** Get Currency.
+ * The Currency for this record
+ */
+ public int getC_Currency_ID();
+
+ public I_C_Currency getC_Currency() throws Exception;
+
+ /** Column name C_DocType_ID */
+ public static final String COLUMNNAME_C_DocType_ID = "C_DocType_ID";
+
+ /** Set Document Type.
+ * Document type or rules
+ */
+ public void setC_DocType_ID (int C_DocType_ID);
+
+ /** Get Document Type.
+ * Document type or rules
+ */
+ public int getC_DocType_ID();
+
+ public I_C_DocType getC_DocType() throws Exception;
+
+ /** Column name C_DocTypeTarget_ID */
+ public static final String COLUMNNAME_C_DocTypeTarget_ID = "C_DocTypeTarget_ID";
+
+ /** Set Target Document Type.
+ * Target document type for conversing documents
+ */
+ public void setC_DocTypeTarget_ID (int C_DocTypeTarget_ID);
+
+ /** Get Target Document Type.
+ * Target document type for conversing documents
+ */
+ public int getC_DocTypeTarget_ID();
+
+ /** Column name C_DunningLevel_ID */
+ public static final String COLUMNNAME_C_DunningLevel_ID = "C_DunningLevel_ID";
+
+ /** Set Dunning Level */
+ public void setC_DunningLevel_ID (int C_DunningLevel_ID);
+
+ /** Get Dunning Level */
+ public int getC_DunningLevel_ID();
+
+ public I_C_DunningLevel getC_DunningLevel() throws Exception;
+
+ /** Column name ChargeAmt */
+ public static final String COLUMNNAME_ChargeAmt = "ChargeAmt";
+
+ /** Set Charge amount.
+ * Charge Amount
+ */
+ public void setChargeAmt (BigDecimal ChargeAmt);
+
+ /** Get Charge amount.
+ * Charge Amount
+ */
+ public BigDecimal getChargeAmt();
+
+ /** Column name C_Invoice_ID */
+ public static final String COLUMNNAME_C_Invoice_ID = "C_Invoice_ID";
+
+ /** Set Invoice.
+ * Invoice Identifier
+ */
+ public void setC_Invoice_ID (int C_Invoice_ID);
+
+ /** Get Invoice.
+ * Invoice Identifier
+ */
+ public int getC_Invoice_ID();
+
+ /** Column name CopyFrom */
+ public static final String COLUMNNAME_CopyFrom = "CopyFrom";
+
+ /** Set Copy From.
+ * Copy From Record
+ */
+ public void setCopyFrom (String CopyFrom);
+
+ /** Get Copy From.
+ * Copy From Record
+ */
+ public String getCopyFrom();
+
+ /** Column name C_Order_ID */
+ public static final String COLUMNNAME_C_Order_ID = "C_Order_ID";
+
+ /** Set Order.
+ * Order
+ */
+ public void setC_Order_ID (int C_Order_ID);
+
+ /** Get Order.
+ * Order
+ */
+ public int getC_Order_ID();
+
+ public I_C_Order getC_Order() throws Exception;
+
+ /** Column name C_Payment_ID */
+ public static final String COLUMNNAME_C_Payment_ID = "C_Payment_ID";
+
+ /** Set Payment.
+ * Payment identifier
+ */
+ public void setC_Payment_ID (int C_Payment_ID);
+
+ /** Get Payment.
+ * Payment identifier
+ */
+ public int getC_Payment_ID();
+
+ public I_C_Payment getC_Payment() throws Exception;
+
+ /** Column name C_PaymentTerm_ID */
+ public static final String COLUMNNAME_C_PaymentTerm_ID = "C_PaymentTerm_ID";
+
+ /** Set Payment Term.
+ * The terms of Payment (timing, discount)
+ */
+ public void setC_PaymentTerm_ID (int C_PaymentTerm_ID);
+
+ /** Get Payment Term.
+ * The terms of Payment (timing, discount)
+ */
+ public int getC_PaymentTerm_ID();
+
+ public I_C_PaymentTerm getC_PaymentTerm() throws Exception;
+
+ /** Column name C_Project_ID */
+ public static final String COLUMNNAME_C_Project_ID = "C_Project_ID";
+
+ /** Set Project.
+ * Financial Project
+ */
+ public void setC_Project_ID (int C_Project_ID);
+
+ /** Get Project.
+ * Financial Project
+ */
+ public int getC_Project_ID();
+
+ public I_C_Project getC_Project() throws Exception;
+
+ /** Column name CreateFrom */
+ public static final String COLUMNNAME_CreateFrom = "CreateFrom";
+
+ /** Set Create lines from.
+ * Process which will generate a new document lines based on an existing document
+ */
+ public void setCreateFrom (String CreateFrom);
+
+ /** Get Create lines from.
+ * Process which will generate a new document lines based on an existing document
+ */
+ public String getCreateFrom();
+
+ /** Column name DateAcct */
+ public static final String COLUMNNAME_DateAcct = "DateAcct";
+
+ /** Set Account Date.
+ * Accounting Date
+ */
+ public void setDateAcct (Timestamp DateAcct);
+
+ /** Get Account Date.
+ * Accounting Date
+ */
+ public Timestamp getDateAcct();
+
+ /** Column name DateInvoiced */
+ public static final String COLUMNNAME_DateInvoiced = "DateInvoiced";
+
+ /** Set Date Invoiced.
+ * Date printed on Invoice
+ */
+ public void setDateInvoiced (Timestamp DateInvoiced);
+
+ /** Get Date Invoiced.
+ * Date printed on Invoice
+ */
+ public Timestamp getDateInvoiced();
+
+ /** Column name DateOrdered */
+ public static final String COLUMNNAME_DateOrdered = "DateOrdered";
+
+ /** Set Date Ordered.
+ * Date of Order
+ */
+ public void setDateOrdered (Timestamp DateOrdered);
+
+ /** Get Date Ordered.
+ * Date of Order
+ */
+ public Timestamp getDateOrdered();
+
+ /** Column name DatePrinted */
+ public static final String COLUMNNAME_DatePrinted = "DatePrinted";
+
+ /** Set Date printed.
+ * Date the document was printed.
+ */
+ public void setDatePrinted (Timestamp DatePrinted);
+
+ /** Get Date printed.
+ * Date the document was printed.
+ */
+ public Timestamp getDatePrinted();
+
+ /** Column name Description */
+ public static final String COLUMNNAME_Description = "Description";
+
+ /** Set Description.
+ * Optional short description of the record
+ */
+ public void setDescription (String Description);
+
+ /** Get Description.
+ * Optional short description of the record
+ */
+ public String getDescription();
+
+ /** Column name DocAction */
+ public static final String COLUMNNAME_DocAction = "DocAction";
+
+ /** Set Document Action.
+ * The targeted status of the document
+ */
+ public void setDocAction (String DocAction);
+
+ /** Get Document Action.
+ * The targeted status of the document
+ */
+ public String getDocAction();
+
+ /** Column name DocStatus */
+ public static final String COLUMNNAME_DocStatus = "DocStatus";
+
+ /** Set Document Status.
+ * The current status of the document
+ */
+ public void setDocStatus (String DocStatus);
+
+ /** Get Document Status.
+ * The current status of the document
+ */
+ public String getDocStatus();
+
+ /** Column name DocumentNo */
+ public static final String COLUMNNAME_DocumentNo = "DocumentNo";
+
+ /** Set Document No.
+ * Document sequence number of the document
+ */
+ public void setDocumentNo (String DocumentNo);
+
+ /** Get Document No.
+ * Document sequence number of the document
+ */
+ public String getDocumentNo();
+
+ /** Column name DunningGrace */
+ public static final String COLUMNNAME_DunningGrace = "DunningGrace";
+
+ /** Set Dunning Grace */
+ public void setDunningGrace (Timestamp DunningGrace);
+
+ /** Get Dunning Grace */
+ public Timestamp getDunningGrace();
+
+ /** Column name GenerateTo */
+ public static final String COLUMNNAME_GenerateTo = "GenerateTo";
+
+ /** Set Generate To.
+ * Generate To
+ */
+ public void setGenerateTo (String GenerateTo);
+
+ /** Get Generate To.
+ * Generate To
+ */
+ public String getGenerateTo();
+
+ /** Column name GrandTotal */
+ public static final String COLUMNNAME_GrandTotal = "GrandTotal";
+
+ /** Set Grand Total.
+ * Total amount of document
+ */
+ public void setGrandTotal (BigDecimal GrandTotal);
+
+ /** Get Grand Total.
+ * Total amount of document
+ */
+ public BigDecimal getGrandTotal();
+
+ /** Column name InvoiceCollectionType */
+ public static final String COLUMNNAME_InvoiceCollectionType = "InvoiceCollectionType";
+
+ /** Set Collection Status.
+ * Invoice Collection Status
+ */
+ public void setInvoiceCollectionType (String InvoiceCollectionType);
+
+ /** Get Collection Status.
+ * Invoice Collection Status
+ */
+ public String getInvoiceCollectionType();
+
+ /** Column name IsApproved */
+ public static final String COLUMNNAME_IsApproved = "IsApproved";
+
+ /** Set Approved.
+ * Indicates if this document requires approval
+ */
+ public void setIsApproved (boolean IsApproved);
+
+ /** Get Approved.
+ * Indicates if this document requires approval
+ */
+ public boolean isApproved();
+
+ /** Column name IsDiscountPrinted */
+ public static final String COLUMNNAME_IsDiscountPrinted = "IsDiscountPrinted";
+
+ /** Set Discount Printed.
+ * Print Discount on Invoice and Order
+ */
+ public void setIsDiscountPrinted (boolean IsDiscountPrinted);
+
+ /** Get Discount Printed.
+ * Print Discount on Invoice and Order
+ */
+ public boolean isDiscountPrinted();
+
+ /** Column name IsInDispute */
+ public static final String COLUMNNAME_IsInDispute = "IsInDispute";
+
+ /** Set In Dispute.
+ * Document is in dispute
+ */
+ public void setIsInDispute (boolean IsInDispute);
+
+ /** Get In Dispute.
+ * Document is in dispute
+ */
+ public boolean isInDispute();
+
+ /** Column name IsPaid */
+ public static final String COLUMNNAME_IsPaid = "IsPaid";
+
+ /** Set Paid.
+ * The document is paid
+ */
+ public void setIsPaid (boolean IsPaid);
+
+ /** Get Paid.
+ * The document is paid
+ */
+ public boolean isPaid();
+
+ /** Column name IsPayScheduleValid */
+ public static final String COLUMNNAME_IsPayScheduleValid = "IsPayScheduleValid";
+
+ /** Set Pay Schedule valid.
+ * Is the Payment Schedule is valid
+ */
+ public void setIsPayScheduleValid (boolean IsPayScheduleValid);
+
+ /** Get Pay Schedule valid.
+ * Is the Payment Schedule is valid
+ */
+ public boolean isPayScheduleValid();
+
+ /** Column name IsPrinted */
+ public static final String COLUMNNAME_IsPrinted = "IsPrinted";
+
+ /** Set Printed.
+ * Indicates if this document / line is printed
+ */
+ public void setIsPrinted (boolean IsPrinted);
+
+ /** Get Printed.
+ * Indicates if this document / line is printed
+ */
+ public boolean isPrinted();
+
+ /** Column name IsSelfService */
+ public static final String COLUMNNAME_IsSelfService = "IsSelfService";
+
+ /** Set Self-Service.
+ * This is a Self-Service entry or this entry can be changed via Self-Service
+ */
+ public void setIsSelfService (boolean IsSelfService);
+
+ /** Get Self-Service.
+ * This is a Self-Service entry or this entry can be changed via Self-Service
+ */
+ public boolean isSelfService();
+
+ /** Column name IsSOTrx */
+ public static final String COLUMNNAME_IsSOTrx = "IsSOTrx";
+
+ /** Set Sales Transaction.
+ * This is a Sales Transaction
+ */
+ public void setIsSOTrx (boolean IsSOTrx);
+
+ /** Get Sales Transaction.
+ * This is a Sales Transaction
+ */
+ public boolean isSOTrx();
+
+ /** Column name IsTaxIncluded */
+ public static final String COLUMNNAME_IsTaxIncluded = "IsTaxIncluded";
+
+ /** Set Price includes Tax.
+ * Tax is included in the price
+ */
+ public void setIsTaxIncluded (boolean IsTaxIncluded);
+
+ /** Get Price includes Tax.
+ * Tax is included in the price
+ */
+ public boolean isTaxIncluded();
+
+ /** Column name IsTransferred */
+ public static final String COLUMNNAME_IsTransferred = "IsTransferred";
+
+ /** Set Transferred.
+ * Transferred to General Ledger (i.e. accounted)
+ */
+ public void setIsTransferred (boolean IsTransferred);
+
+ /** Get Transferred.
+ * Transferred to General Ledger (i.e. accounted)
+ */
+ public boolean isTransferred();
+
+ /** Column name M_PriceList_ID */
+ public static final String COLUMNNAME_M_PriceList_ID = "M_PriceList_ID";
+
+ /** Set Price List.
+ * Unique identifier of a Price List
+ */
+ public void setM_PriceList_ID (int M_PriceList_ID);
+
+ /** Get Price List.
+ * Unique identifier of a Price List
+ */
+ public int getM_PriceList_ID();
+
+ public I_M_PriceList getM_PriceList() throws Exception;
+
+ /** Column name M_RMA_ID */
+ public static final String COLUMNNAME_M_RMA_ID = "M_RMA_ID";
+
+ /** Set RMA.
+ * Return Material Authorization
+ */
+ public void setM_RMA_ID (int M_RMA_ID);
+
+ /** Get RMA.
+ * Return Material Authorization
+ */
+ public int getM_RMA_ID();
+
+ public I_M_RMA getM_RMA() throws Exception;
+
+ /** Column name PaymentRule */
+ public static final String COLUMNNAME_PaymentRule = "PaymentRule";
+
+ /** Set Payment Rule.
+ * How you pay the invoice
+ */
+ public void setPaymentRule (String PaymentRule);
+
+ /** Get Payment Rule.
+ * How you pay the invoice
+ */
+ public String getPaymentRule();
+
+ /** Column name POReference */
+ public static final String COLUMNNAME_POReference = "POReference";
+
+ /** Set Order Reference.
+ * Transaction Reference Number (Sales Order, Purchase Order) of your Business Partner
+ */
+ public void setPOReference (String POReference);
+
+ /** Get Order Reference.
+ * Transaction Reference Number (Sales Order, Purchase Order) of your Business Partner
+ */
+ public String getPOReference();
+
+ /** Column name Posted */
+ public static final String COLUMNNAME_Posted = "Posted";
+
+ /** Set Posted.
+ * Posting status
+ */
+ public void setPosted (boolean Posted);
+
+ /** Get Posted.
+ * Posting status
+ */
+ public boolean isPosted();
+
+ /** Column name Processed */
+ public static final String COLUMNNAME_Processed = "Processed";
+
+ /** Set Processed.
+ * The document has been processed
+ */
+ public void setProcessed (boolean Processed);
+
+ /** Get Processed.
+ * The document has been processed
+ */
+ public boolean isProcessed();
+
+ /** Column name Processing */
+ public static final String COLUMNNAME_Processing = "Processing";
+
+ /** Set Process Now */
+ public void setProcessing (boolean Processing);
+
+ /** Get Process Now */
+ public boolean isProcessing();
+
+ /** Column name Ref_Invoice_ID */
+ public static final String COLUMNNAME_Ref_Invoice_ID = "Ref_Invoice_ID";
+
+ /** Set Referenced Invoice */
+ public void setRef_Invoice_ID (int Ref_Invoice_ID);
+
+ /** Get Referenced Invoice */
+ public int getRef_Invoice_ID();
+
+ /** Column name SalesRep_ID */
+ public static final String COLUMNNAME_SalesRep_ID = "SalesRep_ID";
+
+ /** Set Sales Representative.
+ * Sales Representative or Company Agent
+ */
+ public void setSalesRep_ID (int SalesRep_ID);
+
+ /** Get Sales Representative.
+ * Sales Representative or Company Agent
+ */
+ public int getSalesRep_ID();
+
+ /** Column name SendEMail */
+ public static final String COLUMNNAME_SendEMail = "SendEMail";
+
+ /** Set Send EMail.
+ * Enable sending Document EMail
+ */
+ public void setSendEMail (boolean SendEMail);
+
+ /** Get Send EMail.
+ * Enable sending Document EMail
+ */
+ public boolean isSendEMail();
+
+ /** Column name TotalLines */
+ public static final String COLUMNNAME_TotalLines = "TotalLines";
+
+ /** Set Total Lines.
+ * Total of all document lines
+ */
+ public void setTotalLines (BigDecimal TotalLines);
+
+ /** Get Total Lines.
+ * Total of all document lines
+ */
+ public BigDecimal getTotalLines();
+
+ /** Column name User1_ID */
+ public static final String COLUMNNAME_User1_ID = "User1_ID";
+
+ /** Set User List 1.
+ * User defined list element #1
+ */
+ public void setUser1_ID (int User1_ID);
+
+ /** Get User List 1.
+ * User defined list element #1
+ */
+ public int getUser1_ID();
+
+ /** Column name User2_ID */
+ public static final String COLUMNNAME_User2_ID = "User2_ID";
+
+ /** Set User List 2.
+ * User defined list element #2
+ */
+ public void setUser2_ID (int User2_ID);
+
+ /** Get User List 2.
+ * User defined list element #2
+ */
+ public int getUser2_ID();
+}
diff --git a/posterita/posterita/src/main/org/compiere/model/I_C_Order.java b/posterita/posterita/src/main/org/compiere/model/I_C_Order.java
new file mode 100644
index 0000000000..35acc2e482
--- /dev/null
+++ b/posterita/posterita/src/main/org/compiere/model/I_C_Order.java
@@ -0,0 +1,977 @@
+/**********************************************************************
+ * This file is part of Adempiere ERP Bazaar *
+ * http://www.adempiere.org *
+ * *
+ * Copyright (C) Trifon Trifonov. *
+ * Copyright (C) Contributors *
+ * *
+ * This program is free software;
+ you can redistribute it and/or *
+ * modify it under the terms of the GNU General Public License *
+ * as published by the Free Software Foundation;
+ either version 2 *
+ * of the License, or (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY;
+ without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program;
+ if not, write to the Free Software *
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
+ * MA 02110-1301, USA. *
+ * *
+ * Contributors: *
+ * - Trifon Trifonov (trifonnt@users.sourceforge.net) *
+ * *
+ * Sponsors: *
+ * - Company (http://www.site.com) *
+ **********************************************************************/
+package org.compiere.model;
+
+import java.math.BigDecimal;
+import java.sql.Timestamp;
+import org.compiere.util.KeyNamePair;
+
+/** Generated Interface for C_Order
+ * @author Trifon Trifonov (generated)
+ * @version Release 3.4.0s
+ */
+public interface I_C_Order
+{
+
+ /** TableName=C_Order */
+ public static final String Table_Name = "C_Order";
+
+ /** AD_Table_ID=259 */
+ public static final int Table_ID = MTable.getTable_ID(Table_Name);
+
+ KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
+
+ /** AccessLevel = 1 - Org
+ */
+ BigDecimal accessLevel = BigDecimal.valueOf(1);
+
+ /** Load Meta Data */
+
+ /** Column name AD_OrgTrx_ID */
+ public static final String COLUMNNAME_AD_OrgTrx_ID = "AD_OrgTrx_ID";
+
+ /** Set Trx Organization.
+ * Performing or initiating organization
+ */
+ public void setAD_OrgTrx_ID (int AD_OrgTrx_ID);
+
+ /** Get Trx Organization.
+ * Performing or initiating organization
+ */
+ public int getAD_OrgTrx_ID();
+
+ /** Column name AD_User_ID */
+ public static final String COLUMNNAME_AD_User_ID = "AD_User_ID";
+
+ /** Set User/Contact.
+ * User within the system - Internal or Business Partner Contact
+ */
+ public void setAD_User_ID (int AD_User_ID);
+
+ /** Get User/Contact.
+ * User within the system - Internal or Business Partner Contact
+ */
+ public int getAD_User_ID();
+
+ public I_AD_User getAD_User() throws Exception;
+
+ /** Column name AmountRefunded */
+ public static final String COLUMNNAME_AmountRefunded = "AmountRefunded";
+
+ /** Set AmountRefunded */
+ public void setAmountRefunded (BigDecimal AmountRefunded);
+
+ /** Get AmountRefunded */
+ public BigDecimal getAmountRefunded();
+
+ /** Column name AmountTendered */
+ public static final String COLUMNNAME_AmountTendered = "AmountTendered";
+
+ /** Set AmountTendered */
+ public void setAmountTendered (BigDecimal AmountTendered);
+
+ /** Get AmountTendered */
+ public BigDecimal getAmountTendered();
+
+ /** Column name Bill_BPartner_ID */
+ public static final String COLUMNNAME_Bill_BPartner_ID = "Bill_BPartner_ID";
+
+ /** Set Invoice Partner.
+ * Business Partner to be invoiced
+ */
+ public void setBill_BPartner_ID (int Bill_BPartner_ID);
+
+ /** Get Invoice Partner.
+ * Business Partner to be invoiced
+ */
+ public int getBill_BPartner_ID();
+
+ /** Column name Bill_Location_ID */
+ public static final String COLUMNNAME_Bill_Location_ID = "Bill_Location_ID";
+
+ /** Set Invoice Location.
+ * Business Partner Location for invoicing
+ */
+ public void setBill_Location_ID (int Bill_Location_ID);
+
+ /** Get Invoice Location.
+ * Business Partner Location for invoicing
+ */
+ public int getBill_Location_ID();
+
+ /** Column name Bill_User_ID */
+ public static final String COLUMNNAME_Bill_User_ID = "Bill_User_ID";
+
+ /** Set Invoice Contact.
+ * Business Partner Contact for invoicing
+ */
+ public void setBill_User_ID (int Bill_User_ID);
+
+ /** Get Invoice Contact.
+ * Business Partner Contact for invoicing
+ */
+ public int getBill_User_ID();
+
+ /** Column name C_Activity_ID */
+ public static final String COLUMNNAME_C_Activity_ID = "C_Activity_ID";
+
+ /** Set Activity.
+ * Business Activity
+ */
+ public void setC_Activity_ID (int C_Activity_ID);
+
+ /** Get Activity.
+ * Business Activity
+ */
+ public int getC_Activity_ID();
+
+ public I_C_Activity getC_Activity() throws Exception;
+
+ /** Column name C_BPartner_ID */
+ public static final String COLUMNNAME_C_BPartner_ID = "C_BPartner_ID";
+
+ /** Set Business Partner .
+ * Identifies a Business Partner
+ */
+ public void setC_BPartner_ID (int C_BPartner_ID);
+
+ /** Get Business Partner .
+ * Identifies a Business Partner
+ */
+ public int getC_BPartner_ID();
+
+ public I_C_BPartner getC_BPartner() throws Exception;
+
+ /** Column name C_BPartner_Location_ID */
+ public static final String COLUMNNAME_C_BPartner_Location_ID = "C_BPartner_Location_ID";
+
+ /** Set Partner Location.
+ * Identifies the (ship to) address for this Business Partner
+ */
+ public void setC_BPartner_Location_ID (int C_BPartner_Location_ID);
+
+ /** Get Partner Location.
+ * Identifies the (ship to) address for this Business Partner
+ */
+ public int getC_BPartner_Location_ID();
+
+ public I_C_BPartner_Location getC_BPartner_Location() throws Exception;
+
+ /** Column name C_Campaign_ID */
+ public static final String COLUMNNAME_C_Campaign_ID = "C_Campaign_ID";
+
+ /** Set Campaign.
+ * Marketing Campaign
+ */
+ public void setC_Campaign_ID (int C_Campaign_ID);
+
+ /** Get Campaign.
+ * Marketing Campaign
+ */
+ public int getC_Campaign_ID();
+
+ public I_C_Campaign getC_Campaign() throws Exception;
+
+ /** Column name C_CashLine_ID */
+ public static final String COLUMNNAME_C_CashLine_ID = "C_CashLine_ID";
+
+ /** Set Cash Journal Line.
+ * Cash Journal Line
+ */
+ public void setC_CashLine_ID (int C_CashLine_ID);
+
+ /** Get Cash Journal Line.
+ * Cash Journal Line
+ */
+ public int getC_CashLine_ID();
+
+ public I_C_CashLine getC_CashLine() throws Exception;
+
+ /** Column name C_Charge_ID */
+ public static final String COLUMNNAME_C_Charge_ID = "C_Charge_ID";
+
+ /** Set Charge.
+ * Additional document charges
+ */
+ public void setC_Charge_ID (int C_Charge_ID);
+
+ /** Get Charge.
+ * Additional document charges
+ */
+ public int getC_Charge_ID();
+
+ /** Column name C_ConversionType_ID */
+ public static final String COLUMNNAME_C_ConversionType_ID = "C_ConversionType_ID";
+
+ /** Set Currency Type.
+ * Currency Conversion Rate Type
+ */
+ public void setC_ConversionType_ID (int C_ConversionType_ID);
+
+ /** Get Currency Type.
+ * Currency Conversion Rate Type
+ */
+ public int getC_ConversionType_ID();
+
+ public I_C_ConversionType getC_ConversionType() throws Exception;
+
+ /** Column name C_Currency_ID */
+ public static final String COLUMNNAME_C_Currency_ID = "C_Currency_ID";
+
+ /** Set Currency.
+ * The Currency for this record
+ */
+ public void setC_Currency_ID (int C_Currency_ID);
+
+ /** Get Currency.
+ * The Currency for this record
+ */
+ public int getC_Currency_ID();
+
+ public I_C_Currency getC_Currency() throws Exception;
+
+ /** Column name C_DocType_ID */
+ public static final String COLUMNNAME_C_DocType_ID = "C_DocType_ID";
+
+ /** Set Document Type.
+ * Document type or rules
+ */
+ public void setC_DocType_ID (int C_DocType_ID);
+
+ /** Get Document Type.
+ * Document type or rules
+ */
+ public int getC_DocType_ID();
+
+ public I_C_DocType getC_DocType() throws Exception;
+
+ /** Column name C_DocTypeTarget_ID */
+ public static final String COLUMNNAME_C_DocTypeTarget_ID = "C_DocTypeTarget_ID";
+
+ /** Set Target Document Type.
+ * Target document type for conversing documents
+ */
+ public void setC_DocTypeTarget_ID (int C_DocTypeTarget_ID);
+
+ /** Get Target Document Type.
+ * Target document type for conversing documents
+ */
+ public int getC_DocTypeTarget_ID();
+
+ /** Column name ChargeAmt */
+ public static final String COLUMNNAME_ChargeAmt = "ChargeAmt";
+
+ /** Set Charge amount.
+ * Charge Amount
+ */
+ public void setChargeAmt (BigDecimal ChargeAmt);
+
+ /** Get Charge amount.
+ * Charge Amount
+ */
+ public BigDecimal getChargeAmt();
+
+ /** Column name CopyFrom */
+ public static final String COLUMNNAME_CopyFrom = "CopyFrom";
+
+ /** Set Copy From.
+ * Copy From Record
+ */
+ public void setCopyFrom (String CopyFrom);
+
+ /** Get Copy From.
+ * Copy From Record
+ */
+ public String getCopyFrom();
+
+ /** Column name C_Order_ID */
+ public static final String COLUMNNAME_C_Order_ID = "C_Order_ID";
+
+ /** Set Order.
+ * Order
+ */
+ public void setC_Order_ID (int C_Order_ID);
+
+ /** Get Order.
+ * Order
+ */
+ public int getC_Order_ID();
+
+ /** Column name C_Payment_ID */
+ public static final String COLUMNNAME_C_Payment_ID = "C_Payment_ID";
+
+ /** Set Payment.
+ * Payment identifier
+ */
+ public void setC_Payment_ID (int C_Payment_ID);
+
+ /** Get Payment.
+ * Payment identifier
+ */
+ public int getC_Payment_ID();
+
+ public I_C_Payment getC_Payment() throws Exception;
+
+ /** Column name C_PaymentTerm_ID */
+ public static final String COLUMNNAME_C_PaymentTerm_ID = "C_PaymentTerm_ID";
+
+ /** Set Payment Term.
+ * The terms of Payment (timing, discount)
+ */
+ public void setC_PaymentTerm_ID (int C_PaymentTerm_ID);
+
+ /** Get Payment Term.
+ * The terms of Payment (timing, discount)
+ */
+ public int getC_PaymentTerm_ID();
+
+ public I_C_PaymentTerm getC_PaymentTerm() throws Exception;
+
+ /** Column name C_POS_ID */
+ public static final String COLUMNNAME_C_POS_ID = "C_POS_ID";
+
+ /** Set POS Terminal.
+ * Point of Sales Terminal
+ */
+ public void setC_POS_ID (int C_POS_ID);
+
+ /** Get POS Terminal.
+ * Point of Sales Terminal
+ */
+ public int getC_POS_ID();
+
+ public I_C_POS getC_POS() throws Exception;
+
+ /** Column name C_Project_ID */
+ public static final String COLUMNNAME_C_Project_ID = "C_Project_ID";
+
+ /** Set Project.
+ * Financial Project
+ */
+ public void setC_Project_ID (int C_Project_ID);
+
+ /** Get Project.
+ * Financial Project
+ */
+ public int getC_Project_ID();
+
+ public I_C_Project getC_Project() throws Exception;
+
+ /** Column name DateAcct */
+ public static final String COLUMNNAME_DateAcct = "DateAcct";
+
+ /** Set Account Date.
+ * Accounting Date
+ */
+ public void setDateAcct (Timestamp DateAcct);
+
+ /** Get Account Date.
+ * Accounting Date
+ */
+ public Timestamp getDateAcct();
+
+ /** Column name DateOrdered */
+ public static final String COLUMNNAME_DateOrdered = "DateOrdered";
+
+ /** Set Date Ordered.
+ * Date of Order
+ */
+ public void setDateOrdered (Timestamp DateOrdered);
+
+ /** Get Date Ordered.
+ * Date of Order
+ */
+ public Timestamp getDateOrdered();
+
+ /** Column name DatePrinted */
+ public static final String COLUMNNAME_DatePrinted = "DatePrinted";
+
+ /** Set Date printed.
+ * Date the document was printed.
+ */
+ public void setDatePrinted (Timestamp DatePrinted);
+
+ /** Get Date printed.
+ * Date the document was printed.
+ */
+ public Timestamp getDatePrinted();
+
+ /** Column name DatePromised */
+ public static final String COLUMNNAME_DatePromised = "DatePromised";
+
+ /** Set Date Promised.
+ * Date Order was promised
+ */
+ public void setDatePromised (Timestamp DatePromised);
+
+ /** Get Date Promised.
+ * Date Order was promised
+ */
+ public Timestamp getDatePromised();
+
+ /** Column name DeliveryRule */
+ public static final String COLUMNNAME_DeliveryRule = "DeliveryRule";
+
+ /** Set Delivery Rule.
+ * Defines the timing of Delivery
+ */
+ public void setDeliveryRule (String DeliveryRule);
+
+ /** Get Delivery Rule.
+ * Defines the timing of Delivery
+ */
+ public String getDeliveryRule();
+
+ /** Column name DeliveryViaRule */
+ public static final String COLUMNNAME_DeliveryViaRule = "DeliveryViaRule";
+
+ /** Set Delivery Via.
+ * How the order will be delivered
+ */
+ public void setDeliveryViaRule (String DeliveryViaRule);
+
+ /** Get Delivery Via.
+ * How the order will be delivered
+ */
+ public String getDeliveryViaRule();
+
+ /** Column name Description */
+ public static final String COLUMNNAME_Description = "Description";
+
+ /** Set Description.
+ * Optional short description of the record
+ */
+ public void setDescription (String Description);
+
+ /** Get Description.
+ * Optional short description of the record
+ */
+ public String getDescription();
+
+ /** Column name DocAction */
+ public static final String COLUMNNAME_DocAction = "DocAction";
+
+ /** Set Document Action.
+ * The targeted status of the document
+ */
+ public void setDocAction (String DocAction);
+
+ /** Get Document Action.
+ * The targeted status of the document
+ */
+ public String getDocAction();
+
+ /** Column name DocStatus */
+ public static final String COLUMNNAME_DocStatus = "DocStatus";
+
+ /** Set Document Status.
+ * The current status of the document
+ */
+ public void setDocStatus (String DocStatus);
+
+ /** Get Document Status.
+ * The current status of the document
+ */
+ public String getDocStatus();
+
+ /** Column name DocumentNo */
+ public static final String COLUMNNAME_DocumentNo = "DocumentNo";
+
+ /** Set Document No.
+ * Document sequence number of the document
+ */
+ public void setDocumentNo (String DocumentNo);
+
+ /** Get Document No.
+ * Document sequence number of the document
+ */
+ public String getDocumentNo();
+
+ /** Column name FreightAmt */
+ public static final String COLUMNNAME_FreightAmt = "FreightAmt";
+
+ /** Set Freight Amount.
+ * Freight Amount
+ */
+ public void setFreightAmt (BigDecimal FreightAmt);
+
+ /** Get Freight Amount.
+ * Freight Amount
+ */
+ public BigDecimal getFreightAmt();
+
+ /** Column name FreightCostRule */
+ public static final String COLUMNNAME_FreightCostRule = "FreightCostRule";
+
+ /** Set Freight Cost Rule.
+ * Method for charging Freight
+ */
+ public void setFreightCostRule (String FreightCostRule);
+
+ /** Get Freight Cost Rule.
+ * Method for charging Freight
+ */
+ public String getFreightCostRule();
+
+ /** Column name GrandTotal */
+ public static final String COLUMNNAME_GrandTotal = "GrandTotal";
+
+ /** Set Grand Total.
+ * Total amount of document
+ */
+ public void setGrandTotal (BigDecimal GrandTotal);
+
+ /** Get Grand Total.
+ * Total amount of document
+ */
+ public BigDecimal getGrandTotal();
+
+ /** Column name InvoiceRule */
+ public static final String COLUMNNAME_InvoiceRule = "InvoiceRule";
+
+ /** Set Invoice Rule.
+ * Frequency and method of invoicing
+ */
+ public void setInvoiceRule (String InvoiceRule);
+
+ /** Get Invoice Rule.
+ * Frequency and method of invoicing
+ */
+ public String getInvoiceRule();
+
+ /** Column name IsApproved */
+ public static final String COLUMNNAME_IsApproved = "IsApproved";
+
+ /** Set Approved.
+ * Indicates if this document requires approval
+ */
+ public void setIsApproved (boolean IsApproved);
+
+ /** Get Approved.
+ * Indicates if this document requires approval
+ */
+ public boolean isApproved();
+
+ /** Column name IsCreditApproved */
+ public static final String COLUMNNAME_IsCreditApproved = "IsCreditApproved";
+
+ /** Set Credit Approved.
+ * Credit has been approved
+ */
+ public void setIsCreditApproved (boolean IsCreditApproved);
+
+ /** Get Credit Approved.
+ * Credit has been approved
+ */
+ public boolean isCreditApproved();
+
+ /** Column name IsDelivered */
+ public static final String COLUMNNAME_IsDelivered = "IsDelivered";
+
+ /** Set Delivered */
+ public void setIsDelivered (boolean IsDelivered);
+
+ /** Get Delivered */
+ public boolean isDelivered();
+
+ /** Column name IsDiscountPrinted */
+ public static final String COLUMNNAME_IsDiscountPrinted = "IsDiscountPrinted";
+
+ /** Set Discount Printed.
+ * Print Discount on Invoice and Order
+ */
+ public void setIsDiscountPrinted (boolean IsDiscountPrinted);
+
+ /** Get Discount Printed.
+ * Print Discount on Invoice and Order
+ */
+ public boolean isDiscountPrinted();
+
+ /** Column name IsDropShip */
+ public static final String COLUMNNAME_IsDropShip = "IsDropShip";
+
+ /** Set Drop Shipment.
+ * Drop Shipments are sent from the Vendor directly to the Customer
+ */
+ public void setIsDropShip (boolean IsDropShip);
+
+ /** Get Drop Shipment.
+ * Drop Shipments are sent from the Vendor directly to the Customer
+ */
+ public boolean isDropShip();
+
+ /** Column name IsInvoiced */
+ public static final String COLUMNNAME_IsInvoiced = "IsInvoiced";
+
+ /** Set Invoiced.
+ * Is this invoiced?
+ */
+ public void setIsInvoiced (boolean IsInvoiced);
+
+ /** Get Invoiced.
+ * Is this invoiced?
+ */
+ public boolean isInvoiced();
+
+ /** Column name IsPrinted */
+ public static final String COLUMNNAME_IsPrinted = "IsPrinted";
+
+ /** Set Printed.
+ * Indicates if this document / line is printed
+ */
+ public void setIsPrinted (boolean IsPrinted);
+
+ /** Get Printed.
+ * Indicates if this document / line is printed
+ */
+ public boolean isPrinted();
+
+ /** Column name IsSelected */
+ public static final String COLUMNNAME_IsSelected = "IsSelected";
+
+ /** Set Selected */
+ public void setIsSelected (boolean IsSelected);
+
+ /** Get Selected */
+ public boolean isSelected();
+
+ /** Column name IsSelfService */
+ public static final String COLUMNNAME_IsSelfService = "IsSelfService";
+
+ /** Set Self-Service.
+ * This is a Self-Service entry or this entry can be changed via Self-Service
+ */
+ public void setIsSelfService (boolean IsSelfService);
+
+ /** Get Self-Service.
+ * This is a Self-Service entry or this entry can be changed via Self-Service
+ */
+ public boolean isSelfService();
+
+ /** Column name IsSOTrx */
+ public static final String COLUMNNAME_IsSOTrx = "IsSOTrx";
+
+ /** Set Sales Transaction.
+ * This is a Sales Transaction
+ */
+ public void setIsSOTrx (boolean IsSOTrx);
+
+ /** Get Sales Transaction.
+ * This is a Sales Transaction
+ */
+ public boolean isSOTrx();
+
+ /** Column name IsTaxIncluded */
+ public static final String COLUMNNAME_IsTaxIncluded = "IsTaxIncluded";
+
+ /** Set Price includes Tax.
+ * Tax is included in the price
+ */
+ public void setIsTaxIncluded (boolean IsTaxIncluded);
+
+ /** Get Price includes Tax.
+ * Tax is included in the price
+ */
+ public boolean isTaxIncluded();
+
+ /** Column name IsTransferred */
+ public static final String COLUMNNAME_IsTransferred = "IsTransferred";
+
+ /** Set Transferred.
+ * Transferred to General Ledger (i.e. accounted)
+ */
+ public void setIsTransferred (boolean IsTransferred);
+
+ /** Get Transferred.
+ * Transferred to General Ledger (i.e. accounted)
+ */
+ public boolean isTransferred();
+
+ /** Column name M_PriceList_ID */
+ public static final String COLUMNNAME_M_PriceList_ID = "M_PriceList_ID";
+
+ /** Set Price List.
+ * Unique identifier of a Price List
+ */
+ public void setM_PriceList_ID (int M_PriceList_ID);
+
+ /** Get Price List.
+ * Unique identifier of a Price List
+ */
+ public int getM_PriceList_ID();
+
+ public I_M_PriceList getM_PriceList() throws Exception;
+
+ /** Column name M_Shipper_ID */
+ public static final String COLUMNNAME_M_Shipper_ID = "M_Shipper_ID";
+
+ /** Set Shipper.
+ * Method or manner of product delivery
+ */
+ public void setM_Shipper_ID (int M_Shipper_ID);
+
+ /** Get Shipper.
+ * Method or manner of product delivery
+ */
+ public int getM_Shipper_ID();
+
+ public I_M_Shipper getM_Shipper() throws Exception;
+
+ /** Column name M_Warehouse_ID */
+ public static final String COLUMNNAME_M_Warehouse_ID = "M_Warehouse_ID";
+
+ /** Set Warehouse.
+ * Storage Warehouse and Service Point
+ */
+ public void setM_Warehouse_ID (int M_Warehouse_ID);
+
+ /** Get Warehouse.
+ * Storage Warehouse and Service Point
+ */
+ public int getM_Warehouse_ID();
+
+ public I_M_Warehouse getM_Warehouse() throws Exception;
+
+ /** Column name OrderType */
+ public static final String COLUMNNAME_OrderType = "OrderType";
+
+ /** Set OrderType */
+ public void setOrderType (String OrderType);
+
+ /** Get OrderType */
+ public String getOrderType();
+
+ /** Column name Pay_BPartner_ID */
+ public static final String COLUMNNAME_Pay_BPartner_ID = "Pay_BPartner_ID";
+
+ /** Set Payment BPartner.
+ * Business Partner responsible for the payment
+ */
+ public void setPay_BPartner_ID (int Pay_BPartner_ID);
+
+ /** Get Payment BPartner.
+ * Business Partner responsible for the payment
+ */
+ public int getPay_BPartner_ID();
+
+ /** Column name Pay_Location_ID */
+ public static final String COLUMNNAME_Pay_Location_ID = "Pay_Location_ID";
+
+ /** Set Payment Location.
+ * Location of the Business Partner responsible for the payment
+ */
+ public void setPay_Location_ID (int Pay_Location_ID);
+
+ /** Get Payment Location.
+ * Location of the Business Partner responsible for the payment
+ */
+ public int getPay_Location_ID();
+
+ /** Column name PaymentRule */
+ public static final String COLUMNNAME_PaymentRule = "PaymentRule";
+
+ /** Set Payment Rule.
+ * How you pay the invoice
+ */
+ public void setPaymentRule (String PaymentRule);
+
+ /** Get Payment Rule.
+ * How you pay the invoice
+ */
+ public String getPaymentRule();
+
+ /** Column name POReference */
+ public static final String COLUMNNAME_POReference = "POReference";
+
+ /** Set Order Reference.
+ * Transaction Reference Number (Sales Order, Purchase Order) of your Business Partner
+ */
+ public void setPOReference (String POReference);
+
+ /** Get Order Reference.
+ * Transaction Reference Number (Sales Order, Purchase Order) of your Business Partner
+ */
+ public String getPOReference();
+
+ /** Column name Posted */
+ public static final String COLUMNNAME_Posted = "Posted";
+
+ /** Set Posted.
+ * Posting status
+ */
+ public void setPosted (boolean Posted);
+
+ /** Get Posted.
+ * Posting status
+ */
+ public boolean isPosted();
+
+ /** Column name PriorityRule */
+ public static final String COLUMNNAME_PriorityRule = "PriorityRule";
+
+ /** Set Priority.
+ * Priority of a document
+ */
+ public void setPriorityRule (String PriorityRule);
+
+ /** Get Priority.
+ * Priority of a document
+ */
+ public String getPriorityRule();
+
+ /** Column name Processed */
+ public static final String COLUMNNAME_Processed = "Processed";
+
+ /** Set Processed.
+ * The document has been processed
+ */
+ public void setProcessed (boolean Processed);
+
+ /** Get Processed.
+ * The document has been processed
+ */
+ public boolean isProcessed();
+
+ /** Column name Processing */
+ public static final String COLUMNNAME_Processing = "Processing";
+
+ /** Set Process Now */
+ public void setProcessing (boolean Processing);
+
+ /** Get Process Now */
+ public boolean isProcessing();
+
+ /** Column name Ref_Order_ID */
+ public static final String COLUMNNAME_Ref_Order_ID = "Ref_Order_ID";
+
+ /** Set Referenced Order.
+ * Reference to corresponding Sales/Purchase Order
+ */
+ public void setRef_Order_ID (int Ref_Order_ID);
+
+ /** Get Referenced Order.
+ * Reference to corresponding Sales/Purchase Order
+ */
+ public int getRef_Order_ID();
+
+ /** Column name SalesRep_ID */
+ public static final String COLUMNNAME_SalesRep_ID = "SalesRep_ID";
+
+ /** Set Sales Representative.
+ * Sales Representative or Company Agent
+ */
+ public void setSalesRep_ID (int SalesRep_ID);
+
+ /** Get Sales Representative.
+ * Sales Representative or Company Agent
+ */
+ public int getSalesRep_ID();
+
+ /** Column name SendEMail */
+ public static final String COLUMNNAME_SendEMail = "SendEMail";
+
+ /** Set Send EMail.
+ * Enable sending Document EMail
+ */
+ public void setSendEMail (boolean SendEMail);
+
+ /** Get Send EMail.
+ * Enable sending Document EMail
+ */
+ public boolean isSendEMail();
+
+ /** Column name TotalLines */
+ public static final String COLUMNNAME_TotalLines = "TotalLines";
+
+ /** Set Total Lines.
+ * Total of all document lines
+ */
+ public void setTotalLines (BigDecimal TotalLines);
+
+ /** Get Total Lines.
+ * Total of all document lines
+ */
+ public BigDecimal getTotalLines();
+
+ /** Column name User1_ID */
+ public static final String COLUMNNAME_User1_ID = "User1_ID";
+
+ /** Set User List 1.
+ * User defined list element #1
+ */
+ public void setUser1_ID (int User1_ID);
+
+ /** Get User List 1.
+ * User defined list element #1
+ */
+ public int getUser1_ID();
+
+ /** Column name User2_ID */
+ public static final String COLUMNNAME_User2_ID = "User2_ID";
+
+ /** Set User List 2.
+ * User defined list element #2
+ */
+ public void setUser2_ID (int User2_ID);
+
+ /** Get User List 2.
+ * User defined list element #2
+ */
+ public int getUser2_ID();
+
+ /** Column name Volume */
+ public static final String COLUMNNAME_Volume = "Volume";
+
+ /** Set Volume.
+ * Volume of a product
+ */
+ public void setVolume (BigDecimal Volume);
+
+ /** Get Volume.
+ * Volume of a product
+ */
+ public BigDecimal getVolume();
+
+ /** Column name Weight */
+ public static final String COLUMNNAME_Weight = "Weight";
+
+ /** Set Weight.
+ * Weight of a product
+ */
+ public void setWeight (BigDecimal Weight);
+
+ /** Get Weight.
+ * Weight of a product
+ */
+ public BigDecimal getWeight();
+}
diff --git a/posterita/posterita/src/main/org/compiere/model/I_C_Payment.java b/posterita/posterita/src/main/org/compiere/model/I_C_Payment.java
new file mode 100644
index 0000000000..13b73bd96b
--- /dev/null
+++ b/posterita/posterita/src/main/org/compiere/model/I_C_Payment.java
@@ -0,0 +1,1093 @@
+/**********************************************************************
+ * This file is part of Adempiere ERP Bazaar *
+ * http://www.adempiere.org *
+ * *
+ * Copyright (C) Trifon Trifonov. *
+ * Copyright (C) Contributors *
+ * *
+ * This program is free software;
+ you can redistribute it and/or *
+ * modify it under the terms of the GNU General Public License *
+ * as published by the Free Software Foundation;
+ either version 2 *
+ * of the License, or (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY;
+ without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program;
+ if not, write to the Free Software *
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
+ * MA 02110-1301, USA. *
+ * *
+ * Contributors: *
+ * - Trifon Trifonov (trifonnt@users.sourceforge.net) *
+ * *
+ * Sponsors: *
+ * - Company (http://www.site.com) *
+ **********************************************************************/
+package org.compiere.model;
+
+import java.math.BigDecimal;
+import java.sql.Timestamp;
+import org.compiere.util.KeyNamePair;
+
+/** Generated Interface for C_Payment
+ * @author Trifon Trifonov (generated)
+ * @version Release 3.5.0
+ */
+public interface I_C_Payment
+{
+
+ /** TableName=C_Payment */
+ public static final String Table_Name = "C_Payment";
+
+ /** AD_Table_ID=335 */
+ public static final int Table_ID = MTable.getTable_ID(Table_Name);
+
+ KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
+
+ /** AccessLevel = 1 - Org
+ */
+ BigDecimal accessLevel = BigDecimal.valueOf(1);
+
+ /** Load Meta Data */
+
+ /** Column name AD_OrgTrx_ID */
+ public static final String COLUMNNAME_AD_OrgTrx_ID = "AD_OrgTrx_ID";
+
+ /** Set Trx Organization.
+ * Performing or initiating organization
+ */
+ public void setAD_OrgTrx_ID (int AD_OrgTrx_ID);
+
+ /** Get Trx Organization.
+ * Performing or initiating organization
+ */
+ public int getAD_OrgTrx_ID();
+
+ /** Column name A_City */
+ public static final String COLUMNNAME_A_City = "A_City";
+
+ /** Set Account City.
+ * City or the Credit Card or Account Holder
+ */
+ public void setA_City (String A_City);
+
+ /** Get Account City.
+ * City or the Credit Card or Account Holder
+ */
+ public String getA_City();
+
+ /** Column name A_Country */
+ public static final String COLUMNNAME_A_Country = "A_Country";
+
+ /** Set Account Country.
+ * Country
+ */
+ public void setA_Country (String A_Country);
+
+ /** Get Account Country.
+ * Country
+ */
+ public String getA_Country();
+
+ /** Column name A_EMail */
+ public static final String COLUMNNAME_A_EMail = "A_EMail";
+
+ /** Set Account EMail.
+ * Email Address
+ */
+ public void setA_EMail (String A_EMail);
+
+ /** Get Account EMail.
+ * Email Address
+ */
+ public String getA_EMail();
+
+ /** Column name A_Ident_DL */
+ public static final String COLUMNNAME_A_Ident_DL = "A_Ident_DL";
+
+ /** Set Driver License.
+ * Payment Identification - Driver License
+ */
+ public void setA_Ident_DL (String A_Ident_DL);
+
+ /** Get Driver License.
+ * Payment Identification - Driver License
+ */
+ public String getA_Ident_DL();
+
+ /** Column name A_Ident_SSN */
+ public static final String COLUMNNAME_A_Ident_SSN = "A_Ident_SSN";
+
+ /** Set Social Security No.
+ * Payment Identification - Social Security No
+ */
+ public void setA_Ident_SSN (String A_Ident_SSN);
+
+ /** Get Social Security No.
+ * Payment Identification - Social Security No
+ */
+ public String getA_Ident_SSN();
+
+ /** Column name A_Name */
+ public static final String COLUMNNAME_A_Name = "A_Name";
+
+ /** Set Account Name.
+ * Name on Credit Card or Account holder
+ */
+ public void setA_Name (String A_Name);
+
+ /** Get Account Name.
+ * Name on Credit Card or Account holder
+ */
+ public String getA_Name();
+
+ /** Column name A_State */
+ public static final String COLUMNNAME_A_State = "A_State";
+
+ /** Set Account State.
+ * State of the Credit Card or Account holder
+ */
+ public void setA_State (String A_State);
+
+ /** Get Account State.
+ * State of the Credit Card or Account holder
+ */
+ public String getA_State();
+
+ /** Column name A_Street */
+ public static final String COLUMNNAME_A_Street = "A_Street";
+
+ /** Set Account Street.
+ * Street address of the Credit Card or Account holder
+ */
+ public void setA_Street (String A_Street);
+
+ /** Get Account Street.
+ * Street address of the Credit Card or Account holder
+ */
+ public String getA_Street();
+
+ /** Column name A_Zip */
+ public static final String COLUMNNAME_A_Zip = "A_Zip";
+
+ /** Set Account Zip/Postal.
+ * Zip Code of the Credit Card or Account Holder
+ */
+ public void setA_Zip (String A_Zip);
+
+ /** Get Account Zip/Postal.
+ * Zip Code of the Credit Card or Account Holder
+ */
+ public String getA_Zip();
+
+ /** Column name AccountNo */
+ public static final String COLUMNNAME_AccountNo = "AccountNo";
+
+ /** Set Account No.
+ * Account Number
+ */
+ public void setAccountNo (String AccountNo);
+
+ /** Get Account No.
+ * Account Number
+ */
+ public String getAccountNo();
+
+ /** Column name C_Activity_ID */
+ public static final String COLUMNNAME_C_Activity_ID = "C_Activity_ID";
+
+ /** Set Activity.
+ * Business Activity
+ */
+ public void setC_Activity_ID (int C_Activity_ID);
+
+ /** Get Activity.
+ * Business Activity
+ */
+ public int getC_Activity_ID();
+
+ public I_C_Activity getC_Activity() throws Exception;
+
+ /** Column name C_BP_BankAccount_ID */
+ public static final String COLUMNNAME_C_BP_BankAccount_ID = "C_BP_BankAccount_ID";
+
+ /** Set Partner Bank Account.
+ * Bank Account of the Business Partner
+ */
+ public void setC_BP_BankAccount_ID (int C_BP_BankAccount_ID);
+
+ /** Get Partner Bank Account.
+ * Bank Account of the Business Partner
+ */
+ public int getC_BP_BankAccount_ID();
+
+ public I_C_BP_BankAccount getC_BP_BankAccount() throws Exception;
+
+ /** Column name C_BPartner_ID */
+ public static final String COLUMNNAME_C_BPartner_ID = "C_BPartner_ID";
+
+ /** Set Business Partner .
+ * Identifies a Business Partner
+ */
+ public void setC_BPartner_ID (int C_BPartner_ID);
+
+ /** Get Business Partner .
+ * Identifies a Business Partner
+ */
+ public int getC_BPartner_ID();
+
+ public I_C_BPartner getC_BPartner() throws Exception;
+
+ /** Column name C_BankAccount_ID */
+ public static final String COLUMNNAME_C_BankAccount_ID = "C_BankAccount_ID";
+
+ /** Set Bank Account.
+ * Account at the Bank
+ */
+ public void setC_BankAccount_ID (int C_BankAccount_ID);
+
+ /** Get Bank Account.
+ * Account at the Bank
+ */
+ public int getC_BankAccount_ID();
+
+ public I_C_BankAccount getC_BankAccount() throws Exception;
+
+ /** Column name C_Campaign_ID */
+ public static final String COLUMNNAME_C_Campaign_ID = "C_Campaign_ID";
+
+ /** Set Campaign.
+ * Marketing Campaign
+ */
+ public void setC_Campaign_ID (int C_Campaign_ID);
+
+ /** Get Campaign.
+ * Marketing Campaign
+ */
+ public int getC_Campaign_ID();
+
+ public I_C_Campaign getC_Campaign() throws Exception;
+
+ /** Column name C_CashBook_ID */
+ public static final String COLUMNNAME_C_CashBook_ID = "C_CashBook_ID";
+
+ /** Set Cash Book.
+ * Cash Book for recording petty cash transactions
+ */
+ public void setC_CashBook_ID (int C_CashBook_ID);
+
+ /** Get Cash Book.
+ * Cash Book for recording petty cash transactions
+ */
+ public int getC_CashBook_ID();
+
+ public I_C_CashBook getC_CashBook() throws Exception;
+
+ /** Column name C_Charge_ID */
+ public static final String COLUMNNAME_C_Charge_ID = "C_Charge_ID";
+
+ /** Set Charge.
+ * Additional document charges
+ */
+ public void setC_Charge_ID (int C_Charge_ID);
+
+ /** Get Charge.
+ * Additional document charges
+ */
+ public int getC_Charge_ID();
+
+ public I_C_Charge getC_Charge() throws Exception;
+
+ /** Column name C_ConversionType_ID */
+ public static final String COLUMNNAME_C_ConversionType_ID = "C_ConversionType_ID";
+
+ /** Set Currency Type.
+ * Currency Conversion Rate Type
+ */
+ public void setC_ConversionType_ID (int C_ConversionType_ID);
+
+ /** Get Currency Type.
+ * Currency Conversion Rate Type
+ */
+ public int getC_ConversionType_ID();
+
+ public I_C_ConversionType getC_ConversionType() throws Exception;
+
+ /** Column name C_Currency_ID */
+ public static final String COLUMNNAME_C_Currency_ID = "C_Currency_ID";
+
+ /** Set Currency.
+ * The Currency for this record
+ */
+ public void setC_Currency_ID (int C_Currency_ID);
+
+ /** Get Currency.
+ * The Currency for this record
+ */
+ public int getC_Currency_ID();
+
+ public I_C_Currency getC_Currency() throws Exception;
+
+ /** Column name C_DocType_ID */
+ public static final String COLUMNNAME_C_DocType_ID = "C_DocType_ID";
+
+ /** Set Document Type.
+ * Document type or rules
+ */
+ public void setC_DocType_ID (int C_DocType_ID);
+
+ /** Get Document Type.
+ * Document type or rules
+ */
+ public int getC_DocType_ID();
+
+ public I_C_DocType getC_DocType() throws Exception;
+
+ /** Column name C_Invoice_ID */
+ public static final String COLUMNNAME_C_Invoice_ID = "C_Invoice_ID";
+
+ /** Set Invoice.
+ * Invoice Identifier
+ */
+ public void setC_Invoice_ID (int C_Invoice_ID);
+
+ /** Get Invoice.
+ * Invoice Identifier
+ */
+ public int getC_Invoice_ID();
+
+ public I_C_Invoice getC_Invoice() throws Exception;
+
+ /** Column name C_Order_ID */
+ public static final String COLUMNNAME_C_Order_ID = "C_Order_ID";
+
+ /** Set Order.
+ * Order
+ */
+ public void setC_Order_ID (int C_Order_ID);
+
+ /** Get Order.
+ * Order
+ */
+ public int getC_Order_ID();
+
+ public I_C_Order getC_Order() throws Exception;
+
+ /** Column name C_PaymentBatch_ID */
+ public static final String COLUMNNAME_C_PaymentBatch_ID = "C_PaymentBatch_ID";
+
+ /** Set Payment Batch.
+ * Payment batch for EFT
+ */
+ public void setC_PaymentBatch_ID (int C_PaymentBatch_ID);
+
+ /** Get Payment Batch.
+ * Payment batch for EFT
+ */
+ public int getC_PaymentBatch_ID();
+
+ public I_C_PaymentBatch getC_PaymentBatch() throws Exception;
+
+ /** Column name C_Payment_ID */
+ public static final String COLUMNNAME_C_Payment_ID = "C_Payment_ID";
+
+ /** Set Payment.
+ * Payment identifier
+ */
+ public void setC_Payment_ID (int C_Payment_ID);
+
+ /** Get Payment.
+ * Payment identifier
+ */
+ public int getC_Payment_ID();
+
+ /** Column name C_Project_ID */
+ public static final String COLUMNNAME_C_Project_ID = "C_Project_ID";
+
+ /** Set Project.
+ * Financial Project
+ */
+ public void setC_Project_ID (int C_Project_ID);
+
+ /** Get Project.
+ * Financial Project
+ */
+ public int getC_Project_ID();
+
+ public I_C_Project getC_Project() throws Exception;
+
+ /** Column name ChargeAmt */
+ public static final String COLUMNNAME_ChargeAmt = "ChargeAmt";
+
+ /** Set Charge amount.
+ * Charge Amount
+ */
+ public void setChargeAmt (BigDecimal ChargeAmt);
+
+ /** Get Charge amount.
+ * Charge Amount
+ */
+ public BigDecimal getChargeAmt();
+
+ /** Column name CheckNo */
+ public static final String COLUMNNAME_CheckNo = "CheckNo";
+
+ /** Set Check No.
+ * Check Number
+ */
+ public void setCheckNo (String CheckNo);
+
+ /** Get Check No.
+ * Check Number
+ */
+ public String getCheckNo();
+
+ /** Column name CreditCardExpMM */
+ public static final String COLUMNNAME_CreditCardExpMM = "CreditCardExpMM";
+
+ /** Set Exp. Month.
+ * Expiry Month
+ */
+ public void setCreditCardExpMM (int CreditCardExpMM);
+
+ /** Get Exp. Month.
+ * Expiry Month
+ */
+ public int getCreditCardExpMM();
+
+ /** Column name CreditCardExpYY */
+ public static final String COLUMNNAME_CreditCardExpYY = "CreditCardExpYY";
+
+ /** Set Exp. Year.
+ * Expiry Year
+ */
+ public void setCreditCardExpYY (int CreditCardExpYY);
+
+ /** Get Exp. Year.
+ * Expiry Year
+ */
+ public int getCreditCardExpYY();
+
+ /** Column name CreditCardNumber */
+ public static final String COLUMNNAME_CreditCardNumber = "CreditCardNumber";
+
+ /** Set Number.
+ * Credit Card Number
+ */
+ public void setCreditCardNumber (String CreditCardNumber);
+
+ /** Get Number.
+ * Credit Card Number
+ */
+ public String getCreditCardNumber();
+
+ /** Column name CreditCardType */
+ public static final String COLUMNNAME_CreditCardType = "CreditCardType";
+
+ /** Set Credit Card.
+ * Credit Card (Visa, MC, AmEx)
+ */
+ public void setCreditCardType (String CreditCardType);
+
+ /** Get Credit Card.
+ * Credit Card (Visa, MC, AmEx)
+ */
+ public String getCreditCardType();
+
+ /** Column name CreditCardVV */
+ public static final String COLUMNNAME_CreditCardVV = "CreditCardVV";
+
+ /** Set Verification Code.
+ * Credit Card Verification code on credit card
+ */
+ public void setCreditCardVV (String CreditCardVV);
+
+ /** Get Verification Code.
+ * Credit Card Verification code on credit card
+ */
+ public String getCreditCardVV();
+
+ /** Column name DateAcct */
+ public static final String COLUMNNAME_DateAcct = "DateAcct";
+
+ /** Set Account Date.
+ * Accounting Date
+ */
+ public void setDateAcct (Timestamp DateAcct);
+
+ /** Get Account Date.
+ * Accounting Date
+ */
+ public Timestamp getDateAcct();
+
+ /** Column name DateTrx */
+ public static final String COLUMNNAME_DateTrx = "DateTrx";
+
+ /** Set Transaction Date.
+ * Transaction Date
+ */
+ public void setDateTrx (Timestamp DateTrx);
+
+ /** Get Transaction Date.
+ * Transaction Date
+ */
+ public Timestamp getDateTrx();
+
+ /** Column name Description */
+ public static final String COLUMNNAME_Description = "Description";
+
+ /** Set Description.
+ * Optional short description of the record
+ */
+ public void setDescription (String Description);
+
+ /** Get Description.
+ * Optional short description of the record
+ */
+ public String getDescription();
+
+ /** Column name DiscountAmt */
+ public static final String COLUMNNAME_DiscountAmt = "DiscountAmt";
+
+ /** Set Discount Amount.
+ * Calculated amount of discount
+ */
+ public void setDiscountAmt (BigDecimal DiscountAmt);
+
+ /** Get Discount Amount.
+ * Calculated amount of discount
+ */
+ public BigDecimal getDiscountAmt();
+
+ /** Column name DocAction */
+ public static final String COLUMNNAME_DocAction = "DocAction";
+
+ /** Set Document Action.
+ * The targeted status of the document
+ */
+ public void setDocAction (String DocAction);
+
+ /** Get Document Action.
+ * The targeted status of the document
+ */
+ public String getDocAction();
+
+ /** Column name DocStatus */
+ public static final String COLUMNNAME_DocStatus = "DocStatus";
+
+ /** Set Document Status.
+ * The current status of the document
+ */
+ public void setDocStatus (String DocStatus);
+
+ /** Get Document Status.
+ * The current status of the document
+ */
+ public String getDocStatus();
+
+ /** Column name DocumentNo */
+ public static final String COLUMNNAME_DocumentNo = "DocumentNo";
+
+ /** Set Document No.
+ * Document sequence number of the document
+ */
+ public void setDocumentNo (String DocumentNo);
+
+ /** Get Document No.
+ * Document sequence number of the document
+ */
+ public String getDocumentNo();
+
+ /** Column name IsAllocated */
+ public static final String COLUMNNAME_IsAllocated = "IsAllocated";
+
+ /** Set Allocated.
+ * Indicates if the payment has been allocated
+ */
+ public void setIsAllocated (boolean IsAllocated);
+
+ /** Get Allocated.
+ * Indicates if the payment has been allocated
+ */
+ public boolean isAllocated();
+
+ /** Column name IsApproved */
+ public static final String COLUMNNAME_IsApproved = "IsApproved";
+
+ /** Set Approved.
+ * Indicates if this document requires approval
+ */
+ public void setIsApproved (boolean IsApproved);
+
+ /** Get Approved.
+ * Indicates if this document requires approval
+ */
+ public boolean isApproved();
+
+ /** Column name IsDelayedCapture */
+ public static final String COLUMNNAME_IsDelayedCapture = "IsDelayedCapture";
+
+ /** Set Delayed Capture.
+ * Charge after Shipment
+ */
+ public void setIsDelayedCapture (boolean IsDelayedCapture);
+
+ /** Get Delayed Capture.
+ * Charge after Shipment
+ */
+ public boolean isDelayedCapture();
+
+ /** Column name IsOnline */
+ public static final String COLUMNNAME_IsOnline = "IsOnline";
+
+ /** Set Online Access.
+ * Can be accessed online
+ */
+ public void setIsOnline (boolean IsOnline);
+
+ /** Get Online Access.
+ * Can be accessed online
+ */
+ public boolean isOnline();
+
+ /** Column name IsOverUnderPayment */
+ public static final String COLUMNNAME_IsOverUnderPayment = "IsOverUnderPayment";
+
+ /** Set Over/Under Payment.
+ * Over-Payment (unallocated) or Under-Payment (partial payment)
+ */
+ public void setIsOverUnderPayment (boolean IsOverUnderPayment);
+
+ /** Get Over/Under Payment.
+ * Over-Payment (unallocated) or Under-Payment (partial payment)
+ */
+ public boolean isOverUnderPayment();
+
+ /** Column name IsPrepayment */
+ public static final String COLUMNNAME_IsPrepayment = "IsPrepayment";
+
+ /** Set Prepayment.
+ * The Payment/Receipt is a Prepayment
+ */
+ public void setIsPrepayment (boolean IsPrepayment);
+
+ /** Get Prepayment.
+ * The Payment/Receipt is a Prepayment
+ */
+ public boolean isPrepayment();
+
+ /** Column name IsReceipt */
+ public static final String COLUMNNAME_IsReceipt = "IsReceipt";
+
+ /** Set Receipt.
+ * This is a sales transaction (receipt)
+ */
+ public void setIsReceipt (boolean IsReceipt);
+
+ /** Get Receipt.
+ * This is a sales transaction (receipt)
+ */
+ public boolean isReceipt();
+
+ /** Column name IsReconciled */
+ public static final String COLUMNNAME_IsReconciled = "IsReconciled";
+
+ /** Set Reconciled.
+ * Payment is reconciled with bank statement
+ */
+ public void setIsReconciled (boolean IsReconciled);
+
+ /** Get Reconciled.
+ * Payment is reconciled with bank statement
+ */
+ public boolean isReconciled();
+
+ /** Column name IsSelfService */
+ public static final String COLUMNNAME_IsSelfService = "IsSelfService";
+
+ /** Set Self-Service.
+ * This is a Self-Service entry or this entry can be changed via Self-Service
+ */
+ public void setIsSelfService (boolean IsSelfService);
+
+ /** Get Self-Service.
+ * This is a Self-Service entry or this entry can be changed via Self-Service
+ */
+ public boolean isSelfService();
+
+ /** Column name Micr */
+ public static final String COLUMNNAME_Micr = "Micr";
+
+ /** Set Micr.
+ * Combination of routing no, account and check no
+ */
+ public void setMicr (String Micr);
+
+ /** Get Micr.
+ * Combination of routing no, account and check no
+ */
+ public String getMicr();
+
+ /** Column name OProcessing */
+ public static final String COLUMNNAME_OProcessing = "OProcessing";
+
+ /** Set Online Processing.
+ * This payment can be processed online
+ */
+ public void setOProcessing (String OProcessing);
+
+ /** Get Online Processing.
+ * This payment can be processed online
+ */
+ public String getOProcessing();
+
+ /** Column name Orig_TrxID */
+ public static final String COLUMNNAME_Orig_TrxID = "Orig_TrxID";
+
+ /** Set Original Transaction ID.
+ * Original Transaction ID
+ */
+ public void setOrig_TrxID (String Orig_TrxID);
+
+ /** Get Original Transaction ID.
+ * Original Transaction ID
+ */
+ public String getOrig_TrxID();
+
+ /** Column name OverUnderAmt */
+ public static final String COLUMNNAME_OverUnderAmt = "OverUnderAmt";
+
+ /** Set Over/Under Payment.
+ * Over-Payment (unallocated) or Under-Payment (partial payment) Amount
+ */
+ public void setOverUnderAmt (BigDecimal OverUnderAmt);
+
+ /** Get Over/Under Payment.
+ * Over-Payment (unallocated) or Under-Payment (partial payment) Amount
+ */
+ public BigDecimal getOverUnderAmt();
+
+ /** Column name PONum */
+ public static final String COLUMNNAME_PONum = "PONum";
+
+ /** Set PO Number.
+ * Purchase Order Number
+ */
+ public void setPONum (String PONum);
+
+ /** Get PO Number.
+ * Purchase Order Number
+ */
+ public String getPONum();
+
+ /** Column name PayAmt */
+ public static final String COLUMNNAME_PayAmt = "PayAmt";
+
+ /** Set Payment amount.
+ * Amount being paid
+ */
+ public void setPayAmt (BigDecimal PayAmt);
+
+ /** Get Payment amount.
+ * Amount being paid
+ */
+ public BigDecimal getPayAmt();
+
+ /** Column name Posted */
+ public static final String COLUMNNAME_Posted = "Posted";
+
+ /** Set Posted.
+ * Posting status
+ */
+ public void setPosted (boolean Posted);
+
+ /** Get Posted.
+ * Posting status
+ */
+ public boolean isPosted();
+
+ /** Column name Processed */
+ public static final String COLUMNNAME_Processed = "Processed";
+
+ /** Set Processed.
+ * The document has been processed
+ */
+ public void setProcessed (boolean Processed);
+
+ /** Get Processed.
+ * The document has been processed
+ */
+ public boolean isProcessed();
+
+ /** Column name Processing */
+ public static final String COLUMNNAME_Processing = "Processing";
+
+ /** Set Process Now */
+ public void setProcessing (boolean Processing);
+
+ /** Get Process Now */
+ public boolean isProcessing();
+
+ /** Column name R_AuthCode */
+ public static final String COLUMNNAME_R_AuthCode = "R_AuthCode";
+
+ /** Set Authorization Code.
+ * Authorization Code returned
+ */
+ public void setR_AuthCode (String R_AuthCode);
+
+ /** Get Authorization Code.
+ * Authorization Code returned
+ */
+ public String getR_AuthCode();
+
+ /** Column name R_AuthCode_DC */
+ public static final String COLUMNNAME_R_AuthCode_DC = "R_AuthCode_DC";
+
+ /** Set Authorization Code (DC).
+ * Authorization Code Delayed Capture returned
+ */
+ public void setR_AuthCode_DC (String R_AuthCode_DC);
+
+ /** Get Authorization Code (DC).
+ * Authorization Code Delayed Capture returned
+ */
+ public String getR_AuthCode_DC();
+
+ /** Column name R_AvsAddr */
+ public static final String COLUMNNAME_R_AvsAddr = "R_AvsAddr";
+
+ /** Set Address verified.
+ * This address has been verified
+ */
+ public void setR_AvsAddr (String R_AvsAddr);
+
+ /** Get Address verified.
+ * This address has been verified
+ */
+ public String getR_AvsAddr();
+
+ /** Column name R_AvsZip */
+ public static final String COLUMNNAME_R_AvsZip = "R_AvsZip";
+
+ /** Set Zip verified.
+ * The Zip Code has been verified
+ */
+ public void setR_AvsZip (String R_AvsZip);
+
+ /** Get Zip verified.
+ * The Zip Code has been verified
+ */
+ public String getR_AvsZip();
+
+ /** Column name R_CVV2Match */
+ public static final String COLUMNNAME_R_CVV2Match = "R_CVV2Match";
+
+ /** Set CVV Match.
+ * Credit Card Verification Code Match
+ */
+ public void setR_CVV2Match (boolean R_CVV2Match);
+
+ /** Get CVV Match.
+ * Credit Card Verification Code Match
+ */
+ public boolean isR_CVV2Match();
+
+ /** Column name R_Info */
+ public static final String COLUMNNAME_R_Info = "R_Info";
+
+ /** Set Info.
+ * Response info
+ */
+ public void setR_Info (String R_Info);
+
+ /** Get Info.
+ * Response info
+ */
+ public String getR_Info();
+
+ /** Column name R_PnRef */
+ public static final String COLUMNNAME_R_PnRef = "R_PnRef";
+
+ /** Set Reference.
+ * Payment reference
+ */
+ public void setR_PnRef (String R_PnRef);
+
+ /** Get Reference.
+ * Payment reference
+ */
+ public String getR_PnRef();
+
+ /** Column name R_PnRef_DC */
+ public static final String COLUMNNAME_R_PnRef_DC = "R_PnRef_DC";
+
+ /** Set Reference (DC).
+ * Payment Reference Delayed Capture
+ */
+ public void setR_PnRef_DC (String R_PnRef_DC);
+
+ /** Get Reference (DC).
+ * Payment Reference Delayed Capture
+ */
+ public String getR_PnRef_DC();
+
+ /** Column name R_RespMsg */
+ public static final String COLUMNNAME_R_RespMsg = "R_RespMsg";
+
+ /** Set Response Message.
+ * Response message
+ */
+ public void setR_RespMsg (String R_RespMsg);
+
+ /** Get Response Message.
+ * Response message
+ */
+ public String getR_RespMsg();
+
+ /** Column name R_Result */
+ public static final String COLUMNNAME_R_Result = "R_Result";
+
+ /** Set Result.
+ * Result of transmission
+ */
+ public void setR_Result (String R_Result);
+
+ /** Get Result.
+ * Result of transmission
+ */
+ public String getR_Result();
+
+ /** Column name Ref_Payment_ID */
+ public static final String COLUMNNAME_Ref_Payment_ID = "Ref_Payment_ID";
+
+ /** Set Referenced Payment */
+ public void setRef_Payment_ID (int Ref_Payment_ID);
+
+ /** Get Referenced Payment */
+ public int getRef_Payment_ID();
+
+ /** Column name RoutingNo */
+ public static final String COLUMNNAME_RoutingNo = "RoutingNo";
+
+ /** Set Routing No.
+ * Bank Routing Number
+ */
+ public void setRoutingNo (String RoutingNo);
+
+ /** Get Routing No.
+ * Bank Routing Number
+ */
+ public String getRoutingNo();
+
+ /** Column name Swipe */
+ public static final String COLUMNNAME_Swipe = "Swipe";
+
+ /** Set Swipe.
+ * Track 1 and 2 of the Credit Card
+ */
+ public void setSwipe (String Swipe);
+
+ /** Get Swipe.
+ * Track 1 and 2 of the Credit Card
+ */
+ public String getSwipe();
+
+ /** Column name TaxAmt */
+ public static final String COLUMNNAME_TaxAmt = "TaxAmt";
+
+ /** Set Tax Amount.
+ * Tax Amount for a document
+ */
+ public void setTaxAmt (BigDecimal TaxAmt);
+
+ /** Get Tax Amount.
+ * Tax Amount for a document
+ */
+ public BigDecimal getTaxAmt();
+
+ /** Column name TenderType */
+ public static final String COLUMNNAME_TenderType = "TenderType";
+
+ /** Set Tender type.
+ * Method of Payment
+ */
+ public void setTenderType (String TenderType);
+
+ /** Get Tender type.
+ * Method of Payment
+ */
+ public String getTenderType();
+
+ /** Column name TrxType */
+ public static final String COLUMNNAME_TrxType = "TrxType";
+
+ /** Set Transaction Type.
+ * Type of credit card transaction
+ */
+ public void setTrxType (String TrxType);
+
+ /** Get Transaction Type.
+ * Type of credit card transaction
+ */
+ public String getTrxType();
+
+ /** Column name User1_ID */
+ public static final String COLUMNNAME_User1_ID = "User1_ID";
+
+ /** Set User List 1.
+ * User defined list element #1
+ */
+ public void setUser1_ID (int User1_ID);
+
+ /** Get User List 1.
+ * User defined list element #1
+ */
+ public int getUser1_ID();
+
+ /** Column name User2_ID */
+ public static final String COLUMNNAME_User2_ID = "User2_ID";
+
+ /** Set User List 2.
+ * User defined list element #2
+ */
+ public void setUser2_ID (int User2_ID);
+
+ /** Get User List 2.
+ * User defined list element #2
+ */
+ public int getUser2_ID();
+
+ /** Column name VoiceAuthCode */
+ public static final String COLUMNNAME_VoiceAuthCode = "VoiceAuthCode";
+
+ /** Set Voice authorization code.
+ * Voice Authorization Code from credit card company
+ */
+ public void setVoiceAuthCode (String VoiceAuthCode);
+
+ /** Get Voice authorization code.
+ * Voice Authorization Code from credit card company
+ */
+ public String getVoiceAuthCode();
+
+ /** Column name WriteOffAmt */
+ public static final String COLUMNNAME_WriteOffAmt = "WriteOffAmt";
+
+ /** Set Write-off Amount.
+ * Amount to write-off
+ */
+ public void setWriteOffAmt (BigDecimal WriteOffAmt);
+
+ /** Get Write-off Amount.
+ * Amount to write-off
+ */
+ public BigDecimal getWriteOffAmt();
+}
diff --git a/posterita/posterita/src/main/org/compiere/model/I_M_InventoryLine.java b/posterita/posterita/src/main/org/compiere/model/I_M_InventoryLine.java
new file mode 100644
index 0000000000..660238fb1a
--- /dev/null
+++ b/posterita/posterita/src/main/org/compiere/model/I_M_InventoryLine.java
@@ -0,0 +1,266 @@
+/**********************************************************************
+ * This file is part of Adempiere ERP Bazaar *
+ * http://www.adempiere.org *
+ * *
+ * Copyright (C) Trifon Trifonov. *
+ * Copyright (C) Contributors *
+ * *
+ * This program is free software;
+ you can redistribute it and/or *
+ * modify it under the terms of the GNU General Public License *
+ * as published by the Free Software Foundation;
+ either version 2 *
+ * of the License, or (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY;
+ without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program;
+ if not, write to the Free Software *
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
+ * MA 02110-1301, USA. *
+ * *
+ * Contributors: *
+ * - Trifon Trifonov (trifonnt@users.sourceforge.net) *
+ * *
+ * Sponsors: *
+ * - Company (http://www.site.com) *
+ **********************************************************************/
+package org.compiere.model;
+
+import java.math.BigDecimal;
+import org.compiere.util.KeyNamePair;
+
+/** Generated Interface for M_InventoryLine
+ * @author Trifon Trifonov (generated)
+ * @version Release 3.4.0s
+ */
+public interface I_M_InventoryLine
+{
+
+ /** TableName=M_InventoryLine */
+ public static final String Table_Name = "M_InventoryLine";
+
+ /** AD_Table_ID=322 */
+ public static final int Table_ID = MTable.getTable_ID(Table_Name);
+
+ KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
+
+ /** AccessLevel = 1 - Org
+ */
+ BigDecimal accessLevel = BigDecimal.valueOf(1);
+
+ /** Load Meta Data */
+
+ /** Column name C_Charge_ID */
+ public static final String COLUMNNAME_C_Charge_ID = "C_Charge_ID";
+
+ /** Set Charge.
+ * Additional document charges
+ */
+ public void setC_Charge_ID (int C_Charge_ID);
+
+ /** Get Charge.
+ * Additional document charges
+ */
+ public int getC_Charge_ID();
+
+ public I_C_Charge getC_Charge() throws Exception;
+
+ /** Column name Description */
+ public static final String COLUMNNAME_Description = "Description";
+
+ /** Set Description.
+ * Optional short description of the record
+ */
+ public void setDescription (String Description);
+
+ /** Get Description.
+ * Optional short description of the record
+ */
+ public String getDescription();
+
+ /** Column name InventoryType */
+ public static final String COLUMNNAME_InventoryType = "InventoryType";
+
+ /** Set Inventory Type.
+ * Type of inventory difference
+ */
+ public void setInventoryType (String InventoryType);
+
+ /** Get Inventory Type.
+ * Type of inventory difference
+ */
+ public String getInventoryType();
+
+ /** Column name Line */
+ public static final String COLUMNNAME_Line = "Line";
+
+ /** Set Line No.
+ * Unique line for this document
+ */
+ public void setLine (int Line);
+
+ /** Get Line No.
+ * Unique line for this document
+ */
+ public int getLine();
+
+ /** Column name M_AttributeSetInstance_ID */
+ public static final String COLUMNNAME_M_AttributeSetInstance_ID = "M_AttributeSetInstance_ID";
+
+ /** Set Attribute Set Instance.
+ * Product Attribute Set Instance
+ */
+ public void setM_AttributeSetInstance_ID (int M_AttributeSetInstance_ID);
+
+ /** Get Attribute Set Instance.
+ * Product Attribute Set Instance
+ */
+ public int getM_AttributeSetInstance_ID();
+
+ /** Column name M_Inventory_ID */
+ public static final String COLUMNNAME_M_Inventory_ID = "M_Inventory_ID";
+
+ /** Set Phys.Inventory.
+ * Parameters for a Physical Inventory
+ */
+ public void setM_Inventory_ID (int M_Inventory_ID);
+
+ /** Get Phys.Inventory.
+ * Parameters for a Physical Inventory
+ */
+ public int getM_Inventory_ID();
+
+ public I_M_Inventory getM_Inventory() throws Exception;
+
+ /** Column name M_InventoryLine_ID */
+ public static final String COLUMNNAME_M_InventoryLine_ID = "M_InventoryLine_ID";
+
+ /** Set Phys.Inventory Line.
+ * Unique line in an Inventory document
+ */
+ public void setM_InventoryLine_ID (int M_InventoryLine_ID);
+
+ /** Get Phys.Inventory Line.
+ * Unique line in an Inventory document
+ */
+ public int getM_InventoryLine_ID();
+
+ /** Column name M_Locator_ID */
+ public static final String COLUMNNAME_M_Locator_ID = "M_Locator_ID";
+
+ /** Set Locator.
+ * Warehouse Locator
+ */
+ public void setM_Locator_ID (int M_Locator_ID);
+
+ /** Get Locator.
+ * Warehouse Locator
+ */
+ public int getM_Locator_ID();
+
+ /** Column name M_Product_ID */
+ public static final String COLUMNNAME_M_Product_ID = "M_Product_ID";
+
+ /** Set Product.
+ * Product, Service, Item
+ */
+ public void setM_Product_ID (int M_Product_ID);
+
+ /** Get Product.
+ * Product, Service, Item
+ */
+ public int getM_Product_ID();
+
+ /** Column name Processed */
+ public static final String COLUMNNAME_Processed = "Processed";
+
+ /** Set Processed.
+ * The document has been processed
+ */
+ public void setProcessed (boolean Processed);
+
+ /** Get Processed.
+ * The document has been processed
+ */
+ public boolean isProcessed();
+
+ /** Column name QtyBook */
+ public static final String COLUMNNAME_QtyBook = "QtyBook";
+
+ /** Set Quantity book.
+ * Book Quantity
+ */
+ public void setQtyBook (BigDecimal QtyBook);
+
+ /** Get Quantity book.
+ * Book Quantity
+ */
+ public BigDecimal getQtyBook();
+
+ /** Column name QtyCount */
+ public static final String COLUMNNAME_QtyCount = "QtyCount";
+
+ /** Set Quantity count.
+ * Counted Quantity
+ */
+ public void setQtyCount (BigDecimal QtyCount);
+
+ /** Get Quantity count.
+ * Counted Quantity
+ */
+ public BigDecimal getQtyCount();
+
+ /** Column name qtycsv */
+ public static final String COLUMNNAME_QtyCsv = "QtyCsv";
+
+ /** Set qtycsv */
+ public void setQtyCsv (BigDecimal QtyCsv);
+
+ /** Get qtycsv */
+ public BigDecimal getQtyCsv();
+
+ /** Column name QtyInternalUse */
+ public static final String COLUMNNAME_QtyInternalUse = "QtyInternalUse";
+
+ /** Set Internal Use Qty.
+ * Internal Use Quantity removed from Inventory
+ */
+ public void setQtyInternalUse (BigDecimal QtyInternalUse);
+
+ /** Get Internal Use Qty.
+ * Internal Use Quantity removed from Inventory
+ */
+ public BigDecimal getQtyInternalUse();
+
+ /** Column name UPC */
+ public static final String COLUMNNAME_UPC = "UPC";
+
+ /** Set UPC/EAN.
+ * Bar Code (Universal Product Code or its superset European Article Number)
+ */
+ public void setUPC (String UPC);
+
+ /** Get UPC/EAN.
+ * Bar Code (Universal Product Code or its superset European Article Number)
+ */
+ public String getUPC();
+
+ /** Column name Value */
+ public static final String COLUMNNAME_Value = "Value";
+
+ /** Set Search Key.
+ * Search key for the record in the format required - must be unique
+ */
+ public void setValue (String Value);
+
+ /** Get Search Key.
+ * Search key for the record in the format required - must be unique
+ */
+ public String getValue();
+}
diff --git a/posterita/posterita/src/main/org/compiere/model/I_M_PriceList.java b/posterita/posterita/src/main/org/compiere/model/I_M_PriceList.java
new file mode 100644
index 0000000000..e020d4dda6
--- /dev/null
+++ b/posterita/posterita/src/main/org/compiere/model/I_M_PriceList.java
@@ -0,0 +1,212 @@
+/**********************************************************************
+ * This file is part of Adempiere ERP Bazaar *
+ * http://www.adempiere.org *
+ * *
+ * Copyright (C) Trifon Trifonov. *
+ * Copyright (C) Contributors *
+ * *
+ * This program is free software;
+ you can redistribute it and/or *
+ * modify it under the terms of the GNU General Public License *
+ * as published by the Free Software Foundation;
+ either version 2 *
+ * of the License, or (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY;
+ without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program;
+ if not, write to the Free Software *
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
+ * MA 02110-1301, USA. *
+ * *
+ * Contributors: *
+ * - Trifon Trifonov (trifonnt@users.sourceforge.net) *
+ * *
+ * Sponsors: *
+ * - Company (http://www.site.com) *
+ **********************************************************************/
+package org.compiere.model;
+
+import java.math.BigDecimal;
+import org.compiere.util.KeyNamePair;
+
+/** Generated Interface for M_PriceList
+ * @author Trifon Trifonov (generated)
+ * @version Release 3.3.1b
+ */
+public interface I_M_PriceList
+{
+
+ /** TableName=M_PriceList */
+ public static final String Table_Name = "M_PriceList";
+
+ /** AD_Table_ID=255 */
+ public static final int Table_ID = MTable.getTable_ID(Table_Name);
+
+ KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
+
+ /** AccessLevel = 3 - Client - Org
+ */
+ BigDecimal accessLevel = BigDecimal.valueOf(3);
+
+ /** Load Meta Data */
+
+ /** Column name BasePriceList_ID */
+ public static final String COLUMNNAME_BasePriceList_ID = "BasePriceList_ID";
+
+ /** Set Base Pricelist.
+ * Pricelist to be used, if product not found on this pricelist
+ */
+ public void setBasePriceList_ID (int BasePriceList_ID);
+
+ /** Get Base Pricelist.
+ * Pricelist to be used, if product not found on this pricelist
+ */
+ public int getBasePriceList_ID();
+
+ /** Column name C_Currency_ID */
+ public static final String COLUMNNAME_C_Currency_ID = "C_Currency_ID";
+
+ /** Set Currency.
+ * The Currency for this record
+ */
+ public void setC_Currency_ID (int C_Currency_ID);
+
+ /** Get Currency.
+ * The Currency for this record
+ */
+ public int getC_Currency_ID();
+
+ public I_C_Currency getC_Currency() throws Exception;
+
+ /** Column name Description */
+ public static final String COLUMNNAME_Description = "Description";
+
+ /** Set Description.
+ * Optional short description of the record
+ */
+ public void setDescription (String Description);
+
+ /** Get Description.
+ * Optional short description of the record
+ */
+ public String getDescription();
+
+ /** Column name EnforcePriceLimit */
+ public static final String COLUMNNAME_EnforcePriceLimit = "EnforcePriceLimit";
+
+ /** Set Enforce price limit.
+ * Do not allow prices below the limit price
+ */
+ public void setEnforcePriceLimit (boolean EnforcePriceLimit);
+
+ /** Get Enforce price limit.
+ * Do not allow prices below the limit price
+ */
+ public boolean isEnforcePriceLimit();
+
+ /** Column name IsDefault */
+ public static final String COLUMNNAME_IsDefault = "IsDefault";
+
+ /** Set Default.
+ * Default value
+ */
+ public void setIsDefault (boolean IsDefault);
+
+ /** Get Default.
+ * Default value
+ */
+ public boolean isDefault();
+
+ /** Column name IsMandatory */
+ public static final String COLUMNNAME_IsMandatory = "IsMandatory";
+
+ /** Set Mandatory.
+ * Data entry is required in this column
+ */
+ public void setIsMandatory (boolean IsMandatory);
+
+ /** Get Mandatory.
+ * Data entry is required in this column
+ */
+ public boolean isMandatory();
+
+ /** Column name isPresentForProduct */
+ public static final String COLUMNNAME_isPresentForProduct = "isPresentForProduct";
+
+ /** Set isPresentForProduct */
+ public void setisPresentForProduct (boolean isPresentForProduct);
+
+ /** Get isPresentForProduct */
+ public boolean isPresentForProduct();
+
+ /** Column name IsSOPriceList */
+ public static final String COLUMNNAME_IsSOPriceList = "IsSOPriceList";
+
+ /** Set Sales Price list.
+ * This is a Sales Price List
+ */
+ public void setIsSOPriceList (boolean IsSOPriceList);
+
+ /** Get Sales Price list.
+ * This is a Sales Price List
+ */
+ public boolean isSOPriceList();
+
+ /** Column name IsTaxIncluded */
+ public static final String COLUMNNAME_IsTaxIncluded = "IsTaxIncluded";
+
+ /** Set Price includes Tax.
+ * Tax is included in the price
+ */
+ public void setIsTaxIncluded (boolean IsTaxIncluded);
+
+ /** Get Price includes Tax.
+ * Tax is included in the price
+ */
+ public boolean isTaxIncluded();
+
+ /** Column name M_PriceList_ID */
+ public static final String COLUMNNAME_M_PriceList_ID = "M_PriceList_ID";
+
+ /** Set Price List.
+ * Unique identifier of a Price List
+ */
+ public void setM_PriceList_ID (int M_PriceList_ID);
+
+ /** Get Price List.
+ * Unique identifier of a Price List
+ */
+ public int getM_PriceList_ID();
+
+ /** Column name Name */
+ public static final String COLUMNNAME_Name = "Name";
+
+ /** Set Name.
+ * Alphanumeric identifier of the entity
+ */
+ public void setName (String Name);
+
+ /** Get Name.
+ * Alphanumeric identifier of the entity
+ */
+ public String getName();
+
+ /** Column name PricePrecision */
+ public static final String COLUMNNAME_PricePrecision = "PricePrecision";
+
+ /** Set Price Precision.
+ * Precision (number of decimals) for the Price
+ */
+ public void setPricePrecision (BigDecimal PricePrecision);
+
+ /** Get Price Precision.
+ * Precision (number of decimals) for the Price
+ */
+ public BigDecimal getPricePrecision();
+}
diff --git a/posterita/posterita/src/main/org/compiere/model/I_M_Product.java b/posterita/posterita/src/main/org/compiere/model/I_M_Product.java
new file mode 100644
index 0000000000..1e00a2998c
--- /dev/null
+++ b/posterita/posterita/src/main/org/compiere/model/I_M_Product.java
@@ -0,0 +1,741 @@
+/**********************************************************************
+ * This file is part of Adempiere ERP Bazaar *
+ * http://www.adempiere.org *
+ * *
+ * Copyright (C) Trifon Trifonov. *
+ * Copyright (C) Contributors *
+ * *
+ * This program is free software;
+ you can redistribute it and/or *
+ * modify it under the terms of the GNU General Public License *
+ * as published by the Free Software Foundation;
+ either version 2 *
+ * of the License, or (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY;
+ without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program;
+ if not, write to the Free Software *
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
+ * MA 02110-1301, USA. *
+ * *
+ * Contributors: *
+ * - Trifon Trifonov (trifonnt@users.sourceforge.net) *
+ * *
+ * Sponsors: *
+ * - Company (http://www.site.com) *
+ **********************************************************************/
+package org.compiere.model;
+
+import java.math.BigDecimal;
+import java.sql.Timestamp;
+import org.compiere.util.KeyNamePair;
+
+/** Generated Interface for M_Product
+ * @author Trifon Trifonov (generated)
+ * @version Release 3.4.0s
+ */
+public interface I_M_Product
+{
+
+ /** TableName=M_Product */
+ public static final String Table_Name = "M_Product";
+
+ /** AD_Table_ID=208 */
+ public static final int Table_ID = MTable.getTable_ID(Table_Name);
+
+ KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
+
+ /** AccessLevel = 3 - Client - Org
+ */
+ BigDecimal accessLevel = BigDecimal.valueOf(3);
+
+ /** Load Meta Data */
+
+ /** Column name Classification */
+ public static final String COLUMNNAME_Classification = "Classification";
+
+ /** Set Classification.
+ * Classification for grouping
+ */
+ public void setClassification (String Classification);
+
+ /** Get Classification.
+ * Classification for grouping
+ */
+ public String getClassification();
+
+ /** Column name C_RevenueRecognition_ID */
+ public static final String COLUMNNAME_C_RevenueRecognition_ID = "C_RevenueRecognition_ID";
+
+ /** Set Revenue Recognition.
+ * Method for recording revenue
+ */
+ public void setC_RevenueRecognition_ID (int C_RevenueRecognition_ID);
+
+ /** Get Revenue Recognition.
+ * Method for recording revenue
+ */
+ public int getC_RevenueRecognition_ID();
+
+ public I_C_RevenueRecognition getC_RevenueRecognition() throws Exception;
+
+ /** Column name C_SubscriptionType_ID */
+ public static final String COLUMNNAME_C_SubscriptionType_ID = "C_SubscriptionType_ID";
+
+ /** Set Subscription Type.
+ * Type of subscription
+ */
+ public void setC_SubscriptionType_ID (int C_SubscriptionType_ID);
+
+ /** Get Subscription Type.
+ * Type of subscription
+ */
+ public int getC_SubscriptionType_ID();
+
+ /** Column name C_TaxCategory_ID */
+ public static final String COLUMNNAME_C_TaxCategory_ID = "C_TaxCategory_ID";
+
+ /** Set Tax Category.
+ * Tax Category
+ */
+ public void setC_TaxCategory_ID (int C_TaxCategory_ID);
+
+ /** Get Tax Category.
+ * Tax Category
+ */
+ public int getC_TaxCategory_ID();
+
+ public I_C_TaxCategory getC_TaxCategory() throws Exception;
+
+ /** Column name C_UOM_ID */
+ public static final String COLUMNNAME_C_UOM_ID = "C_UOM_ID";
+
+ /** Set UOM.
+ * Unit of Measure
+ */
+ public void setC_UOM_ID (int C_UOM_ID);
+
+ /** Get UOM.
+ * Unit of Measure
+ */
+ public int getC_UOM_ID();
+
+ public I_C_UOM getC_UOM() throws Exception;
+
+ /** Column name Description */
+ public static final String COLUMNNAME_Description = "Description";
+
+ /** Set Description.
+ * Optional short description of the record
+ */
+ public void setDescription (String Description);
+
+ /** Get Description.
+ * Optional short description of the record
+ */
+ public String getDescription();
+
+ /** Column name DescriptionURL */
+ public static final String COLUMNNAME_DescriptionURL = "DescriptionURL";
+
+ /** Set Description URL.
+ * URL for the description
+ */
+ public void setDescriptionURL (String DescriptionURL);
+
+ /** Get Description URL.
+ * URL for the description
+ */
+ public String getDescriptionURL();
+
+ /** Column name Discontinued */
+ public static final String COLUMNNAME_Discontinued = "Discontinued";
+
+ /** Set Discontinued.
+ * This product is no longer available
+ */
+ public void setDiscontinued (boolean Discontinued);
+
+ /** Get Discontinued.
+ * This product is no longer available
+ */
+ public boolean isDiscontinued();
+
+ /** Column name DiscontinuedBy */
+ public static final String COLUMNNAME_DiscontinuedBy = "DiscontinuedBy";
+
+ /** Set Discontinued by.
+ * Discontinued By
+ */
+ public void setDiscontinuedBy (Timestamp DiscontinuedBy);
+
+ /** Get Discontinued by.
+ * Discontinued By
+ */
+ public Timestamp getDiscontinuedBy();
+
+ /** Column name DocumentNote */
+ public static final String COLUMNNAME_DocumentNote = "DocumentNote";
+
+ /** Set Document Note.
+ * Additional information for a Document
+ */
+ public void setDocumentNote (String DocumentNote);
+
+ /** Get Document Note.
+ * Additional information for a Document
+ */
+ public String getDocumentNote();
+
+ /** Column name Group1 */
+ public static final String COLUMNNAME_Group1 = "Group1";
+
+ /** Set Group1 */
+ public void setGroup1 (String Group1);
+
+ /** Get Group1 */
+ public String getGroup1();
+
+ /** Column name Group2 */
+ public static final String COLUMNNAME_Group2 = "Group2";
+
+ /** Set Group2 */
+ public void setGroup2 (String Group2);
+
+ /** Get Group2 */
+ public String getGroup2();
+
+ /** Column name GuaranteeDays */
+ public static final String COLUMNNAME_GuaranteeDays = "GuaranteeDays";
+
+ /** Set Guarantee Days.
+ * Number of days the product is guaranteed or available
+ */
+ public void setGuaranteeDays (int GuaranteeDays);
+
+ /** Get Guarantee Days.
+ * Number of days the product is guaranteed or available
+ */
+ public int getGuaranteeDays();
+
+ /** Column name GuaranteeDaysMin */
+ public static final String COLUMNNAME_GuaranteeDaysMin = "GuaranteeDaysMin";
+
+ /** Set Min Guarantee Days.
+ * Minumum number of guarantee days
+ */
+ public void setGuaranteeDaysMin (int GuaranteeDaysMin);
+
+ /** Get Min Guarantee Days.
+ * Minumum number of guarantee days
+ */
+ public int getGuaranteeDaysMin();
+
+ /** Column name Help */
+ public static final String COLUMNNAME_Help = "Help";
+
+ /** Set Comment/Help.
+ * Comment or Hint
+ */
+ public void setHelp (String Help);
+
+ /** Get Comment/Help.
+ * Comment or Hint
+ */
+ public String getHelp();
+
+ /** Column name ImageURL */
+ public static final String COLUMNNAME_ImageURL = "ImageURL";
+
+ /** Set Image URL.
+ * URL of image
+ */
+ public void setImageURL (String ImageURL);
+
+ /** Get Image URL.
+ * URL of image
+ */
+ public String getImageURL();
+
+ /** Column name IsBOM */
+ public static final String COLUMNNAME_IsBOM = "IsBOM";
+
+ /** Set Bill of Materials.
+ * Bill of Materials
+ */
+ public void setIsBOM (boolean IsBOM);
+
+ /** Get Bill of Materials.
+ * Bill of Materials
+ */
+ public boolean isBOM();
+
+ /** Column name IsDropShip */
+ public static final String COLUMNNAME_IsDropShip = "IsDropShip";
+
+ /** Set Drop Shipment.
+ * Drop Shipments are sent from the Vendor directly to the Customer
+ */
+ public void setIsDropShip (boolean IsDropShip);
+
+ /** Get Drop Shipment.
+ * Drop Shipments are sent from the Vendor directly to the Customer
+ */
+ public boolean isDropShip();
+
+ /** Column name IsExcludeAutoDelivery */
+ public static final String COLUMNNAME_IsExcludeAutoDelivery = "IsExcludeAutoDelivery";
+
+ /** Set Exclude Auto Delivery.
+ * Exclude from automatic Delivery
+ */
+ public void setIsExcludeAutoDelivery (boolean IsExcludeAutoDelivery);
+
+ /** Get Exclude Auto Delivery.
+ * Exclude from automatic Delivery
+ */
+ public boolean isExcludeAutoDelivery();
+
+ /** Column name IsInvoicePrintDetails */
+ public static final String COLUMNNAME_IsInvoicePrintDetails = "IsInvoicePrintDetails";
+
+ /** Set Print detail records on invoice .
+ * Print detail BOM elements on the invoice
+ */
+ public void setIsInvoicePrintDetails (boolean IsInvoicePrintDetails);
+
+ /** Get Print detail records on invoice .
+ * Print detail BOM elements on the invoice
+ */
+ public boolean isInvoicePrintDetails();
+
+ /** Column name IsPickListPrintDetails */
+ public static final String COLUMNNAME_IsPickListPrintDetails = "IsPickListPrintDetails";
+
+ /** Set Print detail records on pick list.
+ * Print detail BOM elements on the pick list
+ */
+ public void setIsPickListPrintDetails (boolean IsPickListPrintDetails);
+
+ /** Get Print detail records on pick list.
+ * Print detail BOM elements on the pick list
+ */
+ public boolean isPickListPrintDetails();
+
+ /** Column name IsPurchased */
+ public static final String COLUMNNAME_IsPurchased = "IsPurchased";
+
+ /** Set Purchased.
+ * Organization purchases this product
+ */
+ public void setIsPurchased (boolean IsPurchased);
+
+ /** Get Purchased.
+ * Organization purchases this product
+ */
+ public boolean isPurchased();
+
+ /** Column name IsSelfService */
+ public static final String COLUMNNAME_IsSelfService = "IsSelfService";
+
+ /** Set Self-Service.
+ * This is a Self-Service entry or this entry can be changed via Self-Service
+ */
+ public void setIsSelfService (boolean IsSelfService);
+
+ /** Get Self-Service.
+ * This is a Self-Service entry or this entry can be changed via Self-Service
+ */
+ public boolean isSelfService();
+
+ /** Column name IsSold */
+ public static final String COLUMNNAME_IsSold = "IsSold";
+
+ /** Set Sold.
+ * Organization sells this product
+ */
+ public void setIsSold (boolean IsSold);
+
+ /** Get Sold.
+ * Organization sells this product
+ */
+ public boolean isSold();
+
+ /** Column name IsStocked */
+ public static final String COLUMNNAME_IsStocked = "IsStocked";
+
+ /** Set Stocked.
+ * Organization stocks this product
+ */
+ public void setIsStocked (boolean IsStocked);
+
+ /** Get Stocked.
+ * Organization stocks this product
+ */
+ public boolean isStocked();
+
+ /** Column name IsSummary */
+ public static final String COLUMNNAME_IsSummary = "IsSummary";
+
+ /** Set Summary Level.
+ * This is a summary entity
+ */
+ public void setIsSummary (boolean IsSummary);
+
+ /** Get Summary Level.
+ * This is a summary entity
+ */
+ public boolean isSummary();
+
+ /** Column name IsVerified */
+ public static final String COLUMNNAME_IsVerified = "IsVerified";
+
+ /** Set Verified.
+ * The BOM configuration has been verified
+ */
+ public void setIsVerified (boolean IsVerified);
+
+ /** Get Verified.
+ * The BOM configuration has been verified
+ */
+ public boolean isVerified();
+
+ /** Column name IsWebStoreFeatured */
+ public static final String COLUMNNAME_IsWebStoreFeatured = "IsWebStoreFeatured";
+
+ /** Set Featured in Web Store.
+ * If selected, the product is displayed in the inital or any empy search
+ */
+ public void setIsWebStoreFeatured (boolean IsWebStoreFeatured);
+
+ /** Get Featured in Web Store.
+ * If selected, the product is displayed in the inital or any empy search
+ */
+ public boolean isWebStoreFeatured();
+
+ /** Column name M_AttributeSet_ID */
+ public static final String COLUMNNAME_M_AttributeSet_ID = "M_AttributeSet_ID";
+
+ /** Set Attribute Set.
+ * Product Attribute Set
+ */
+ public void setM_AttributeSet_ID (int M_AttributeSet_ID);
+
+ /** Get Attribute Set.
+ * Product Attribute Set
+ */
+ public int getM_AttributeSet_ID();
+
+ public I_M_AttributeSet getM_AttributeSet() throws Exception;
+
+ /** Column name M_AttributeSetInstance_ID */
+ public static final String COLUMNNAME_M_AttributeSetInstance_ID = "M_AttributeSetInstance_ID";
+
+ /** Set Attribute Set Instance.
+ * Product Attribute Set Instance
+ */
+ public void setM_AttributeSetInstance_ID (int M_AttributeSetInstance_ID);
+
+ /** Get Attribute Set Instance.
+ * Product Attribute Set Instance
+ */
+ public int getM_AttributeSetInstance_ID();
+
+ /** Column name M_FreightCategory_ID */
+ public static final String COLUMNNAME_M_FreightCategory_ID = "M_FreightCategory_ID";
+
+ /** Set Freight Category.
+ * Category of the Freight
+ */
+ public void setM_FreightCategory_ID (int M_FreightCategory_ID);
+
+ /** Get Freight Category.
+ * Category of the Freight
+ */
+ public int getM_FreightCategory_ID();
+
+ public I_M_FreightCategory getM_FreightCategory() throws Exception;
+
+ /** Column name M_Locator_ID */
+ public static final String COLUMNNAME_M_Locator_ID = "M_Locator_ID";
+
+ /** Set Locator.
+ * Warehouse Locator
+ */
+ public void setM_Locator_ID (int M_Locator_ID);
+
+ /** Get Locator.
+ * Warehouse Locator
+ */
+ public int getM_Locator_ID();
+
+ /** Column name M_Product_Category_ID */
+ public static final String COLUMNNAME_M_Product_Category_ID = "M_Product_Category_ID";
+
+ /** Set Product Category.
+ * Category of a Product
+ */
+ public void setM_Product_Category_ID (int M_Product_Category_ID);
+
+ /** Get Product Category.
+ * Category of a Product
+ */
+ public int getM_Product_Category_ID();
+
+ public I_M_Product_Category getM_Product_Category() throws Exception;
+
+ /** Column name M_Product_ID */
+ public static final String COLUMNNAME_M_Product_ID = "M_Product_ID";
+
+ /** Set Product.
+ * Product, Service, Item
+ */
+ public void setM_Product_ID (int M_Product_ID);
+
+ /** Get Product.
+ * Product, Service, Item
+ */
+ public int getM_Product_ID();
+
+ /** Column name Name */
+ public static final String COLUMNNAME_Name = "Name";
+
+ /** Set Name.
+ * Alphanumeric identifier of the entity
+ */
+ public void setName (String Name);
+
+ /** Get Name.
+ * Alphanumeric identifier of the entity
+ */
+ public String getName();
+
+ /** Column name Processing */
+ public static final String COLUMNNAME_Processing = "Processing";
+
+ /** Set Process Now */
+ public void setProcessing (boolean Processing);
+
+ /** Get Process Now */
+ public boolean isProcessing();
+
+ /** Column name ProductType */
+ public static final String COLUMNNAME_ProductType = "ProductType";
+
+ /** Set Product Type.
+ * Type of product
+ */
+ public void setProductType (String ProductType);
+
+ /** Get Product Type.
+ * Type of product
+ */
+ public String getProductType();
+
+ /** Column name R_MailText_ID */
+ public static final String COLUMNNAME_R_MailText_ID = "R_MailText_ID";
+
+ /** Set Mail Template.
+ * Text templates for mailings
+ */
+ public void setR_MailText_ID (int R_MailText_ID);
+
+ /** Get Mail Template.
+ * Text templates for mailings
+ */
+ public int getR_MailText_ID();
+
+ public I_R_MailText getR_MailText() throws Exception;
+
+ /** Column name SalesRep_ID */
+ public static final String COLUMNNAME_SalesRep_ID = "SalesRep_ID";
+
+ /** Set Sales Representative.
+ * Sales Representative or Company Agent
+ */
+ public void setSalesRep_ID (int SalesRep_ID);
+
+ /** Get Sales Representative.
+ * Sales Representative or Company Agent
+ */
+ public int getSalesRep_ID();
+
+ /** Column name S_ExpenseType_ID */
+ public static final String COLUMNNAME_S_ExpenseType_ID = "S_ExpenseType_ID";
+
+ /** Set Expense Type.
+ * Expense report type
+ */
+ public void setS_ExpenseType_ID (int S_ExpenseType_ID);
+
+ /** Get Expense Type.
+ * Expense report type
+ */
+ public int getS_ExpenseType_ID();
+
+ public I_S_ExpenseType getS_ExpenseType() throws Exception;
+
+ /** Column name ShelfDepth */
+ public static final String COLUMNNAME_ShelfDepth = "ShelfDepth";
+
+ /** Set Shelf Depth.
+ * Shelf depth required
+ */
+ public void setShelfDepth (int ShelfDepth);
+
+ /** Get Shelf Depth.
+ * Shelf depth required
+ */
+ public int getShelfDepth();
+
+ /** Column name ShelfHeight */
+ public static final String COLUMNNAME_ShelfHeight = "ShelfHeight";
+
+ /** Set Shelf Height.
+ * Shelf height required
+ */
+ public void setShelfHeight (int ShelfHeight);
+
+ /** Get Shelf Height.
+ * Shelf height required
+ */
+ public int getShelfHeight();
+
+ /** Column name ShelfWidth */
+ public static final String COLUMNNAME_ShelfWidth = "ShelfWidth";
+
+ /** Set Shelf Width.
+ * Shelf width required
+ */
+ public void setShelfWidth (int ShelfWidth);
+
+ /** Get Shelf Width.
+ * Shelf width required
+ */
+ public int getShelfWidth();
+
+ /** Column name SKU */
+ public static final String COLUMNNAME_SKU = "SKU";
+
+ /** Set SKU.
+ * Stock Keeping Unit
+ */
+ public void setSKU (String SKU);
+
+ /** Get SKU.
+ * Stock Keeping Unit
+ */
+ public String getSKU();
+
+ /** Column name S_Resource_ID */
+ public static final String COLUMNNAME_S_Resource_ID = "S_Resource_ID";
+
+ /** Set Resource.
+ * Resource
+ */
+ public void setS_Resource_ID (int S_Resource_ID);
+
+ /** Get Resource.
+ * Resource
+ */
+ public int getS_Resource_ID();
+
+ public I_S_Resource getS_Resource() throws Exception;
+
+ /** Column name UnitsPerPack */
+ public static final String COLUMNNAME_UnitsPerPack = "UnitsPerPack";
+
+ /** Set UnitsPerPack.
+ * The Units Per Pack indicates the no of units of a product packed together.
+ */
+ public void setUnitsPerPack (int UnitsPerPack);
+
+ /** Get UnitsPerPack.
+ * The Units Per Pack indicates the no of units of a product packed together.
+ */
+ public int getUnitsPerPack();
+
+ /** Column name UnitsPerPallet */
+ public static final String COLUMNNAME_UnitsPerPallet = "UnitsPerPallet";
+
+ /** Set Units Per Pallet.
+ * Units Per Pallet
+ */
+ public void setUnitsPerPallet (int UnitsPerPallet);
+
+ /** Get Units Per Pallet.
+ * Units Per Pallet
+ */
+ public int getUnitsPerPallet();
+
+ /** Column name UPC */
+ public static final String COLUMNNAME_UPC = "UPC";
+
+ /** Set UPC/EAN.
+ * Bar Code (Universal Product Code or its superset European Article Number)
+ */
+ public void setUPC (String UPC);
+
+ /** Get UPC/EAN.
+ * Bar Code (Universal Product Code or its superset European Article Number)
+ */
+ public String getUPC();
+
+ /** Column name Value */
+ public static final String COLUMNNAME_Value = "Value";
+
+ /** Set Search Key.
+ * Search key for the record in the format required - must be unique
+ */
+ public void setValue (String Value);
+
+ /** Get Search Key.
+ * Search key for the record in the format required - must be unique
+ */
+ public String getValue();
+
+ /** Column name VersionNo */
+ public static final String COLUMNNAME_VersionNo = "VersionNo";
+
+ /** Set Version No.
+ * Version Number
+ */
+ public void setVersionNo (String VersionNo);
+
+ /** Get Version No.
+ * Version Number
+ */
+ public String getVersionNo();
+
+ /** Column name Volume */
+ public static final String COLUMNNAME_Volume = "Volume";
+
+ /** Set Volume.
+ * Volume of a product
+ */
+ public void setVolume (BigDecimal Volume);
+
+ /** Get Volume.
+ * Volume of a product
+ */
+ public BigDecimal getVolume();
+
+ /** Column name Weight */
+ public static final String COLUMNNAME_Weight = "Weight";
+
+ /** Set Weight.
+ * Weight of a product
+ */
+ public void setWeight (BigDecimal Weight);
+
+ /** Get Weight.
+ * Weight of a product
+ */
+ public BigDecimal getWeight();
+}
diff --git a/posterita/posterita/src/main/org/compiere/model/I_U_POSTerminal.java b/posterita/posterita/src/main/org/compiere/model/I_U_POSTerminal.java
new file mode 100644
index 0000000000..1e3fb600b1
--- /dev/null
+++ b/posterita/posterita/src/main/org/compiere/model/I_U_POSTerminal.java
@@ -0,0 +1,411 @@
+/**********************************************************************
+ * This file is part of Adempiere ERP Bazaar *
+ * http://www.adempiere.org *
+ * *
+ * Copyright (C) Trifon Trifonov. *
+ * Copyright (C) Contributors *
+ * *
+ * This program is free software;
+ you can redistribute it and/or *
+ * modify it under the terms of the GNU General Public License *
+ * as published by the Free Software Foundation;
+ either version 2 *
+ * of the License, or (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY;
+ without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program;
+ if not, write to the Free Software *
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
+ * MA 02110-1301, USA. *
+ * *
+ * Contributors: *
+ * - Trifon Trifonov (trifonnt@users.sourceforge.net) *
+ * *
+ * Sponsors: *
+ * - Company (http://www.site.com) *
+ **********************************************************************/
+package org.compiere.model;
+
+import java.math.BigDecimal;
+import java.sql.Timestamp;
+import org.compiere.util.KeyNamePair;
+
+/** Generated Interface for U_POSTerminal
+ * @author Trifon Trifonov (generated)
+ * @version Release 3.4.0s
+ */
+public interface I_U_POSTerminal
+{
+
+ /** TableName=U_POSTerminal */
+ public static final String Table_Name = "U_POSTerminal";
+
+ /** AD_Table_ID=52004 */
+ public static final int Table_ID = MTable.getTable_ID(Table_Name);
+
+ KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
+
+ /** AccessLevel = 1 - Org
+ */
+ BigDecimal accessLevel = BigDecimal.valueOf(1);
+
+ /** Load Meta Data */
+
+ /** Column name AutoLock */
+ public static final String COLUMNNAME_AutoLock = "AutoLock";
+
+ /** Set Auto Lock.
+ * Whether to automatically lock the terminal when till is closed
+ */
+ public void setAutoLock (boolean AutoLock);
+
+ /** Get Auto Lock.
+ * Whether to automatically lock the terminal when till is closed
+ */
+ public boolean isAutoLock();
+
+ /** Column name Card_BankAccount_ID */
+ public static final String COLUMNNAME_Card_BankAccount_ID = "Card_BankAccount_ID";
+
+ /** Set Card Bank Account.
+ * Bank Account on which card transactions will be processed
+ */
+ public void setCard_BankAccount_ID (int Card_BankAccount_ID);
+
+ /** Get Card Bank Account.
+ * Bank Account on which card transactions will be processed
+ */
+ public int getCard_BankAccount_ID();
+
+ /** Column name CardTransferBankAccount_ID */
+ public static final String COLUMNNAME_CardTransferBankAccount_ID = "CardTransferBankAccount_ID";
+
+ /** Set Transfer Card trx to.
+ * Bank account on which to transfer Card transactions
+ */
+ public void setCardTransferBankAccount_ID (int CardTransferBankAccount_ID);
+
+ /** Get Transfer Card trx to.
+ * Bank account on which to transfer Card transactions
+ */
+ public int getCardTransferBankAccount_ID();
+
+ /** Column name CardTransferCashBook_ID */
+ public static final String COLUMNNAME_CardTransferCashBook_ID = "CardTransferCashBook_ID";
+
+ /** Set Transfer Card trx to.
+ * Cash Book on which to transfer all Card transactions
+ */
+ public void setCardTransferCashBook_ID (int CardTransferCashBook_ID);
+
+ /** Get Transfer Card trx to.
+ * Cash Book on which to transfer all Card transactions
+ */
+ public int getCardTransferCashBook_ID();
+
+ /** Column name CardTransferType */
+ public static final String COLUMNNAME_CardTransferType = "CardTransferType";
+
+ /** Set Card Transfer Type */
+ public void setCardTransferType (String CardTransferType);
+
+ /** Get Card Transfer Type */
+ public String getCardTransferType();
+
+ /** Column name CashBookTransferType */
+ public static final String COLUMNNAME_CashBookTransferType = "CashBookTransferType";
+
+ /** Set Cash Book Transfer Type.
+ * Where the money in the cash book should be transfered to. Either a Bank Account or another Cash Book
+ */
+ public void setCashBookTransferType (String CashBookTransferType);
+
+ /** Get Cash Book Transfer Type.
+ * Where the money in the cash book should be transfered to. Either a Bank Account or another Cash Book
+ */
+ public String getCashBookTransferType();
+
+ /** Column name CashTransferBankAccount_ID */
+ public static final String COLUMNNAME_CashTransferBankAccount_ID = "CashTransferBankAccount_ID";
+
+ /** Set Transfer Cash trx to.
+ * Bank Account on which to transfer all Cash transactions
+ */
+ public void setCashTransferBankAccount_ID (int CashTransferBankAccount_ID);
+
+ /** Get Transfer Cash trx to.
+ * Bank Account on which to transfer all Cash transactions
+ */
+ public int getCashTransferBankAccount_ID();
+
+ /** Column name CashTransferCashBook_ID */
+ public static final String COLUMNNAME_CashTransferCashBook_ID = "CashTransferCashBook_ID";
+
+ /** Set Transfer Cash trx to.
+ * Cash Book on which to transfer all Cash transactions
+ */
+ public void setCashTransferCashBook_ID (int CashTransferCashBook_ID);
+
+ /** Get Transfer Cash trx to.
+ * Cash Book on which to transfer all Cash transactions
+ */
+ public int getCashTransferCashBook_ID();
+
+ /** Column name C_CashBook_ID */
+ public static final String COLUMNNAME_C_CashBook_ID = "C_CashBook_ID";
+
+ /** Set Cash Book.
+ * Cash Book for recording petty cash transactions
+ */
+ public void setC_CashBook_ID (int C_CashBook_ID);
+
+ /** Get Cash Book.
+ * Cash Book for recording petty cash transactions
+ */
+ public int getC_CashBook_ID();
+
+ public I_C_CashBook getC_CashBook() throws Exception;
+
+ /** Column name C_CashBPartner_ID */
+ public static final String COLUMNNAME_C_CashBPartner_ID = "C_CashBPartner_ID";
+
+ /** Set Cash BPartner.
+ * BPartner to be used for Cash transactions
+ */
+ public void setC_CashBPartner_ID (int C_CashBPartner_ID);
+
+ /** Get Cash BPartner.
+ * BPartner to be used for Cash transactions
+ */
+ public int getC_CashBPartner_ID();
+
+ /** Column name Check_BankAccount_ID */
+ public static final String COLUMNNAME_Check_BankAccount_ID = "Check_BankAccount_ID";
+
+ /** Set Check Bank Account.
+ * Bank Account to be used for processing Check transactions
+ */
+ public void setCheck_BankAccount_ID (int Check_BankAccount_ID);
+
+ /** Get Check Bank Account.
+ * Bank Account to be used for processing Check transactions
+ */
+ public int getCheck_BankAccount_ID();
+
+ /** Column name CheckTransferBankAccount_ID */
+ public static final String COLUMNNAME_CheckTransferBankAccount_ID = "CheckTransferBankAccount_ID";
+
+ /** Set Tranfer Check trx to.
+ * Bank account on which to transfer Check transactions
+ */
+ public void setCheckTransferBankAccount_ID (int CheckTransferBankAccount_ID);
+
+ /** Get Tranfer Check trx to.
+ * Bank account on which to transfer Check transactions
+ */
+ public int getCheckTransferBankAccount_ID();
+
+ /** Column name CheckTransferCashBook_ID */
+ public static final String COLUMNNAME_CheckTransferCashBook_ID = "CheckTransferCashBook_ID";
+
+ /** Set Transfer Check trx to.
+ * Cash Book on which to transfer all Check transactions
+ */
+ public void setCheckTransferCashBook_ID (int CheckTransferCashBook_ID);
+
+ /** Get Transfer Check trx to.
+ * Cash Book on which to transfer all Check transactions
+ */
+ public int getCheckTransferCashBook_ID();
+
+ /** Column name CheckTransferType */
+ public static final String COLUMNNAME_CheckTransferType = "CheckTransferType";
+
+ /** Set Check Transfer Type */
+ public void setCheckTransferType (String CheckTransferType);
+
+ /** Get Check Transfer Type */
+ public String getCheckTransferType();
+
+ /** Column name C_TemplateBPartner_ID */
+ public static final String COLUMNNAME_C_TemplateBPartner_ID = "C_TemplateBPartner_ID";
+
+ /** Set Template BPartner.
+ * BPartner that is to be used as template when new customers are created
+ */
+ public void setC_TemplateBPartner_ID (int C_TemplateBPartner_ID);
+
+ /** Get Template BPartner.
+ * BPartner that is to be used as template when new customers are created
+ */
+ public int getC_TemplateBPartner_ID();
+
+ /** Column name Description */
+ public static final String COLUMNNAME_Description = "Description";
+
+ /** Set Description.
+ * Optional short description of the record
+ */
+ public void setDescription (String Description);
+
+ /** Get Description.
+ * Optional short description of the record
+ */
+ public String getDescription();
+
+ /** Column name Help */
+ public static final String COLUMNNAME_Help = "Help";
+
+ /** Set Comment/Help.
+ * Comment or Hint
+ */
+ public void setHelp (String Help);
+
+ /** Get Comment/Help.
+ * Comment or Hint
+ */
+ public String getHelp();
+
+ /** Column name LastLockTime */
+ public static final String COLUMNNAME_LastLockTime = "LastLockTime";
+
+ /** Set Last Lock Time.
+ * Last time at which the terminal was locked
+ */
+ public void setLastLockTime (Timestamp LastLockTime);
+
+ /** Get Last Lock Time.
+ * Last time at which the terminal was locked
+ */
+ public Timestamp getLastLockTime();
+
+ /** Column name Locked */
+ public static final String COLUMNNAME_Locked = "Locked";
+
+ /** Set Locked.
+ * Whether the terminal is locked
+ */
+ public void setLocked (boolean Locked);
+
+ /** Get Locked.
+ * Whether the terminal is locked
+ */
+ public boolean isLocked();
+
+ /** Column name LockTime */
+ public static final String COLUMNNAME_LockTime = "LockTime";
+
+ /** Set Lock Time.
+ * Time in minutes the terminal should be kept in a locked state.
+ */
+ public void setLockTime (int LockTime);
+
+ /** Get Lock Time.
+ * Time in minutes the terminal should be kept in a locked state.
+ */
+ public int getLockTime();
+
+ /** Column name M_Warehouse_ID */
+ public static final String COLUMNNAME_M_Warehouse_ID = "M_Warehouse_ID";
+
+ /** Set Warehouse.
+ * Storage Warehouse and Service Point
+ */
+ public void setM_Warehouse_ID (int M_Warehouse_ID);
+
+ /** Get Warehouse.
+ * Storage Warehouse and Service Point
+ */
+ public int getM_Warehouse_ID();
+
+ public I_M_Warehouse getM_Warehouse() throws Exception;
+
+ /** Column name Name */
+ public static final String COLUMNNAME_Name = "Name";
+
+ /** Set Name.
+ * Alphanumeric identifier of the entity
+ */
+ public void setName (String Name);
+
+ /** Get Name.
+ * Alphanumeric identifier of the entity
+ */
+ public String getName();
+
+ /** Column name PO_PriceList_ID */
+ public static final String COLUMNNAME_PO_PriceList_ID = "PO_PriceList_ID";
+
+ /** Set Purchase Pricelist.
+ * Price List used by this Business Partner
+ */
+ public void setPO_PriceList_ID (int PO_PriceList_ID);
+
+ /** Get Purchase Pricelist.
+ * Price List used by this Business Partner
+ */
+ public int getPO_PriceList_ID();
+
+ /** Column name PrinterName */
+ public static final String COLUMNNAME_PrinterName = "PrinterName";
+
+ /** Set Printer Name.
+ * Name of the Printer
+ */
+ public void setPrinterName (String PrinterName);
+
+ /** Get Printer Name.
+ * Name of the Printer
+ */
+ public String getPrinterName();
+
+ /** Column name SalesRep_ID */
+ public static final String COLUMNNAME_SalesRep_ID = "SalesRep_ID";
+
+ /** Set Sales Representative.
+ * Sales Representative or Company Agent
+ */
+ public void setSalesRep_ID (int SalesRep_ID);
+
+ /** Get Sales Representative.
+ * Sales Representative or Company Agent
+ */
+ public int getSalesRep_ID();
+
+ /** Column name SO_PriceList_ID */
+ public static final String COLUMNNAME_SO_PriceList_ID = "SO_PriceList_ID";
+
+ /** Set Sales Pricelist */
+ public void setSO_PriceList_ID (int SO_PriceList_ID);
+
+ /** Get Sales Pricelist */
+ public int getSO_PriceList_ID();
+
+ /** Column name UnlockingTime */
+ public static final String COLUMNNAME_UnlockingTime = "UnlockingTime";
+
+ /** Set UnlockingTime.
+ * Time at which the terminal should be unlocked
+ */
+ public void setUnlockingTime (Timestamp UnlockingTime);
+
+ /** Get UnlockingTime.
+ * Time at which the terminal should be unlocked
+ */
+ public Timestamp getUnlockingTime();
+
+ /** Column name U_POSTerminal_ID */
+ public static final String COLUMNNAME_U_POSTerminal_ID = "U_POSTerminal_ID";
+
+ /** Set POS Terminal */
+ public void setU_POSTerminal_ID (int U_POSTerminal_ID);
+
+ /** Get POS Terminal */
+ public int getU_POSTerminal_ID();
+}
diff --git a/posterita/posterita/src/main/org/compiere/model/MCash.java b/posterita/posterita/src/main/org/compiere/model/MCash.java
new file mode 100644
index 0000000000..3ac5cc18dd
--- /dev/null
+++ b/posterita/posterita/src/main/org/compiere/model/MCash.java
@@ -0,0 +1,780 @@
+/******************************************************************************
+ * Product: Adempiere ERP & CRM Smart Business Solution *
+ * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
+ * This program is free software; you can redistribute it and/or modify it *
+ * under the terms version 2 of the GNU General Public License as published *
+ * by the Free Software Foundation. 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, write to the Free Software Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
+ * For the text or an alternative of this public license, you may reach us *
+ * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
+ * or via info@compiere.org or http://www.compiere.org/license.html *
+ *****************************************************************************/
+package org.compiere.model;
+
+import java.io.File;
+import java.math.BigDecimal;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.Properties;
+import java.util.logging.Level;
+
+import org.compiere.process.DocAction;
+import org.compiere.process.DocumentEngine;
+import org.compiere.util.CLogger;
+import org.compiere.util.DB;
+import org.compiere.util.DisplayType;
+import org.compiere.util.Env;
+import org.compiere.util.Msg;
+import org.compiere.util.TimeUtil;
+
+/**
+ * Cash Journal Model
+ *
+ * @author Jorg Janke
+ * @version $Id: MCash.java,v 1.3 2006/07/30 00:51:03 jjanke Exp $
+ *
+ * @author Teo Sarca, SC ARHIPAC SERVICE SRL
+ * BF [ 1831997 ] Cash journal allocation reversed
+ * BF [ 1894524 ] Pay an reversed invoice
+ */
+public class MCash extends X_C_Cash implements DocAction
+{
+ /**
+ * Get Cash Journal for currency, org and date
+ * @param ctx context
+ * @param C_Currency_ID currency
+ * @param AD_Org_ID org
+ * @param dateAcct date
+ * @param trxName transaction
+ * @return cash
+ */
+ public static MCash get (Properties ctx, int AD_Org_ID,
+ Timestamp dateAcct, int C_Currency_ID, String trxName)
+ {
+ MCash retValue = null;
+ // Existing Journal
+ String sql;
+ sql = "SELECT * FROM C_Cash c "
+ + "WHERE c.AD_Org_ID=?" // #1
+ + " AND TRUNC(c.StatementDate)=?" // #2
+ + " AND c.Processed='N'"
+ + " AND EXISTS (SELECT * FROM C_CashBook cb "
+ + "WHERE c.C_CashBook_ID=cb.C_CashBook_ID AND cb.AD_Org_ID=c.AD_Org_ID"
+ + " AND cb.C_Currency_ID=?)"; // #3
+
+ PreparedStatement pstmt = null;
+ ResultSet rs = null;
+ try
+ {
+ pstmt = DB.prepareStatement (sql, trxName);
+ pstmt.setInt (1, AD_Org_ID);
+ pstmt.setTimestamp (2, TimeUtil.getDay(dateAcct));
+ pstmt.setInt (3, C_Currency_ID);
+ rs = pstmt.executeQuery ();
+ if (rs.next ())
+ retValue = new MCash (ctx, rs, trxName);
+ }
+ catch (Exception e)
+ {
+ s_log.log(Level.SEVERE, sql, e);
+ }
+ finally
+ {
+ DB.close(rs, pstmt);
+ rs = null; pstmt = null;
+ }
+ if (retValue != null)
+ return retValue;
+
+ // Get CashBook
+ MCashBook cb = MCashBook.get (ctx, AD_Org_ID, C_Currency_ID);
+ if (cb == null)
+ {
+ s_log.warning("No CashBook for AD_Org_ID=" + AD_Org_ID + ", C_Currency_ID=" + C_Currency_ID);
+ return null;
+ }
+
+ // Create New Journal
+ retValue = new MCash (cb, dateAcct);
+ retValue.save(trxName);
+ return retValue;
+ } // get
+
+ /**
+ * Get Cash Journal for CashBook and date
+ * @param ctx context
+ * @param C_CashBook_ID cashbook
+ * @param dateAcct date
+ * @param trxName transaction
+ * @return cash
+ */
+ public static MCash get (Properties ctx, int C_CashBook_ID,
+ Timestamp dateAcct, String trxName)
+ {
+ MCash retValue = null;
+ // Existing Journal
+ String sql = "SELECT * FROM C_Cash c "
+ + "WHERE c.C_CashBook_ID=?" // #1
+ + " AND TRUNC(c.StatementDate)=?" // #2
+ + " AND c.Processed='N'";
+ PreparedStatement pstmt = null;
+ ResultSet rs = null;
+ try
+ {
+ pstmt = DB.prepareStatement (sql, trxName);
+ pstmt.setInt (1, C_CashBook_ID);
+ pstmt.setTimestamp (2, TimeUtil.getDay(dateAcct));
+ rs = pstmt.executeQuery ();
+ if (rs.next ())
+ retValue = new MCash (ctx, rs, trxName);
+ }
+ catch (Exception e)
+ {
+ s_log.log(Level.SEVERE, sql, e);
+ }
+ finally
+ {
+ DB.close(rs, pstmt);
+ rs = null; pstmt = null;
+ }
+ if (retValue != null)
+ return retValue;
+
+ // Get CashBook
+ MCashBook cb = new MCashBook (ctx, C_CashBook_ID, trxName);
+ if (cb.get_ID() ==0)
+ {
+ s_log.warning("Not found C_CashBook_ID=" + C_CashBook_ID);
+ return null;
+ }
+
+ // Create New Journal
+ retValue = new MCash (cb, dateAcct);
+ retValue.save(trxName);
+ return retValue;
+ } // get
+
+ /** Static Logger */
+ private static CLogger s_log = CLogger.getCLogger (MCash.class);
+
+
+ /**************************************************************************
+ * Standard Constructor
+ * @param ctx context
+ * @param C_Cash_ID id
+ * @param trxName transaction
+ */
+ public MCash (Properties ctx, int C_Cash_ID, String trxName)
+ {
+ super (ctx, C_Cash_ID, trxName);
+ if (C_Cash_ID == 0)
+ {
+ // setC_CashBook_ID (0); // FK
+ setBeginningBalance (Env.ZERO);
+ setEndingBalance (Env.ZERO);
+ setStatementDifference(Env.ZERO);
+ setDocAction(DOCACTION_Complete);
+ setDocStatus(DOCSTATUS_Drafted);
+ //
+ Timestamp today = TimeUtil.getDay(System.currentTimeMillis());
+ setStatementDate (today); // @#Date@
+ setDateAcct (today); // @#Date@
+ String name = DisplayType.getDateFormat(DisplayType.Date).format(today)
+ + " " + MOrg.get(ctx, getAD_Org_ID()).getValue();
+ setName (name);
+ setIsApproved(false);
+ setPosted (false); // N
+ setProcessed (false);
+ }
+ } // MCash
+
+ /**
+ * Load Constructor
+ * @param ctx context
+ * @param rs result set
+ * @param trxName transaction
+ */
+ public MCash (Properties ctx, ResultSet rs, String trxName)
+ {
+ super(ctx, rs, trxName);
+ } // MCash
+
+ /**
+ * Parent Constructor
+ * @param cb cash book
+ * @param today date - if null today
+ */
+ public MCash (MCashBook cb, Timestamp today)
+ {
+ this (cb.getCtx(), 0, cb.get_TrxName());
+ setClientOrg(cb);
+ setC_CashBook_ID(cb.getC_CashBook_ID());
+ if (today != null)
+ {
+ setStatementDate (today);
+ setDateAcct (today);
+ String name = DisplayType.getDateFormat(DisplayType.Date).format(today)
+ + " " + cb.getName();
+ setName (name);
+ }
+ m_book = cb;
+ } // MCash
+
+ /** Lines */
+ private MCashLine[] m_lines = null;
+ /** CashBook */
+ private MCashBook m_book = null;
+
+ /**
+ * Get Lines
+ * @param requery requery
+ * @return lines
+ */
+ public MCashLine[] getLines (boolean requery)
+ {
+ if (m_lines != null && !requery) {
+ set_TrxName(m_lines, get_TrxName());
+ return m_lines;
+ }
+ ArrayList list = new ArrayList();
+ String sql = "SELECT * FROM C_CashLine WHERE C_Cash_ID=? ORDER BY Line";
+ PreparedStatement pstmt = null;
+ ResultSet rs = null;
+ try
+ {
+ pstmt = DB.prepareStatement (sql, get_TrxName());
+ pstmt.setInt (1, getC_Cash_ID());
+ rs = pstmt.executeQuery ();
+ while (rs.next ())
+ list.add (new MCashLine (getCtx(), rs, get_TrxName()));
+ }
+ catch (Exception e)
+ {
+ log.log(Level.SEVERE, sql, e);
+ }
+ finally
+ {
+ DB.close(rs, pstmt);
+ rs = null; pstmt = null;
+ }
+
+ m_lines = new MCashLine[list.size ()];
+ list.toArray (m_lines);
+ return m_lines;
+ } // getLines
+
+ /**
+ * Get Cash Book
+ * @return cash book
+ */
+ public MCashBook getCashBook()
+ {
+ if (m_book == null)
+ m_book = MCashBook.get(getCtx(), getC_CashBook_ID());
+ return m_book;
+ } // getCashBook
+
+ /**
+ * Get Document No
+ * @return name
+ */
+ public String getDocumentNo()
+ {
+ return getName();
+ } // getDocumentNo
+
+ /**
+ * Get Document Info
+ * @return document info (untranslated)
+ */
+ public String getDocumentInfo()
+ {
+ return Msg.getElement(getCtx(), "C_Cash_ID") + " " + getDocumentNo();
+ } // getDocumentInfo
+
+ /**
+ * Create PDF
+ * @return File or null
+ */
+ public File createPDF ()
+ {
+ try
+ {
+ File temp = File.createTempFile(get_TableName()+get_ID()+"_", ".pdf");
+ return createPDF (temp);
+ }
+ catch (Exception e)
+ {
+ log.severe("Could not create PDF - " + e.getMessage());
+ }
+ return null;
+ } // getPDF
+
+ /**
+ * Create PDF file
+ * @param file output file
+ * @return file if success
+ */
+ public File createPDF (File file)
+ {
+ // ReportEngine re = ReportEngine.get (getCtx(), ReportEngine.INVOICE, getC_Invoice_ID());
+ // if (re == null)
+ return null;
+ // return re.getPDF(file);
+ } // createPDF
+
+ /**
+ * Before Save
+ * @param newRecord
+ * @return true
+ */
+ protected boolean beforeSave (boolean newRecord)
+ {
+ setAD_Org_ID(getCashBook().getAD_Org_ID());
+ if (getAD_Org_ID() == 0)
+ {
+ log.saveError("Error", Msg.parseTranslation(getCtx(), "@AD_Org_ID@"));
+ return false;
+ }
+ // Calculate End Balance
+ setEndingBalance(getBeginningBalance().add(getStatementDifference()));
+ return true;
+ } // beforeSave
+
+
+ /**************************************************************************
+ * Process document
+ * @param processAction document action
+ * @return true if performed
+ */
+ public boolean processIt (String processAction)
+ {
+ m_processMsg = null;
+ DocumentEngine engine = new DocumentEngine (this, getDocStatus());
+ return engine.processIt (processAction, getDocAction());
+ } // process
+
+ /** Process Message */
+ private String m_processMsg = null;
+ /** Just Prepared Flag */
+ private boolean m_justPrepared = false;
+
+ /**
+ * Unlock Document.
+ * @return true if success
+ */
+ public boolean unlockIt()
+ {
+ log.info(toString());
+ setProcessing(false);
+ return true;
+ } // unlockIt
+
+ /**
+ * Invalidate Document
+ * @return true if success
+ */
+ public boolean invalidateIt()
+ {
+ log.info(toString());
+ setDocAction(DOCACTION_Prepare);
+ return true;
+ } // invalidateIt
+
+ /**
+ * Prepare Document
+ * @return new status (In Progress or Invalid)
+ */
+ public String prepareIt()
+ {
+ log.info(toString());
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_PREPARE);
+ if (m_processMsg != null)
+ return DocAction.STATUS_Invalid;
+
+ // Std Period open?
+ if (!MPeriod.isOpen(getCtx(), getDateAcct(), MDocType.DOCBASETYPE_CashJournal))
+ {
+ m_processMsg = "@PeriodClosed@";
+ return DocAction.STATUS_Invalid;
+ }
+ MCashLine[] lines = getLines(false);
+ if (lines.length == 0)
+ {
+ m_processMsg = "@NoLines@";
+ return DocAction.STATUS_Invalid;
+ }
+ // Add up Amounts
+ BigDecimal difference = Env.ZERO;
+ int C_Currency_ID = getC_Currency_ID();
+ for (int i = 0; i < lines.length; i++)
+ {
+ MCashLine line = lines[i];
+ if (!line.isActive())
+ continue;
+ if (C_Currency_ID == line.getC_Currency_ID())
+ difference = difference.add(line.getAmount());
+ else
+ {
+ BigDecimal amt = MConversionRate.convert(getCtx(), line.getAmount(),
+ line.getC_Currency_ID(), C_Currency_ID, getDateAcct(), 0,
+ getAD_Client_ID(), getAD_Org_ID());
+ if (amt == null)
+ {
+ m_processMsg = "No Conversion Rate found - @C_CashLine_ID@= " + line.getLine();
+ return DocAction.STATUS_Invalid;
+ }
+ difference = difference.add(amt);
+ }
+ }
+ setStatementDifference(difference);
+ // setEndingBalance(getBeginningBalance().add(getStatementDifference()));
+
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_PREPARE);
+ if (m_processMsg != null)
+ return DocAction.STATUS_Invalid;
+
+ m_justPrepared = true;
+ if (!DOCACTION_Complete.equals(getDocAction()))
+ setDocAction(DOCACTION_Complete);
+ return DocAction.STATUS_InProgress;
+ } // prepareIt
+
+ /**
+ * Approve Document
+ * @return true if success
+ */
+ public boolean approveIt()
+ {
+ log.info(toString());
+ setIsApproved(true);
+ return true;
+ } // approveIt
+
+ /**
+ * Reject Approval
+ * @return true if success
+ */
+ public boolean rejectIt()
+ {
+ log.info(toString());
+ setIsApproved(false);
+ return true;
+ } // rejectIt
+
+ /**
+ * Complete Document
+ * @return new status (Complete, In Progress, Invalid, Waiting ..)
+ */
+ public String completeIt()
+ {
+ // Re-Check
+ if (!m_justPrepared)
+ {
+ String status = prepareIt();
+ if (!DocAction.STATUS_InProgress.equals(status))
+ return status;
+ }
+
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE);
+ if (m_processMsg != null)
+ return DocAction.STATUS_Invalid;
+
+
+ // Implicit Approval
+ if (!isApproved())
+ approveIt();
+ //
+ log.info(toString());
+
+ MCashLine[] lines = getLines(false);
+ for (int i = 0; i < lines.length; i++)
+ {
+ MCashLine line = lines[i];
+ if (MCashLine.CASHTYPE_Invoice.equals(line.getCashType()))
+ {
+ // Check if the invoice is completed - teo_sarca BF [ 1894524 ]
+ MInvoice invoice = line.getInvoice();
+ if (!MInvoice.DOCSTATUS_Completed.equals(invoice.getDocStatus())
+ && !MInvoice.DOCSTATUS_Closed.equals(invoice.getDocStatus()))
+ {
+ m_processMsg = "@Line@ "+line.getLine()+": @InvoiceCreateDocNotCompleted@";
+ return DocAction.STATUS_Invalid;
+ }
+ //
+ String name = Msg.translate(getCtx(), "C_Cash_ID") + ": " + getName()
+ + " - " + Msg.translate(getCtx(), "Line") + " " + line.getLine();
+ MAllocationHdr hdr = new MAllocationHdr(getCtx(), false,
+ getDateAcct(), line.getC_Currency_ID(),
+ name, get_TrxName());
+ hdr.setAD_Org_ID(getAD_Org_ID());
+ if (!hdr.save())
+ {
+ m_processMsg = CLogger.retrieveErrorString("Could not create Allocation Hdr");
+ return DocAction.STATUS_Invalid;
+ }
+ // Allocation Line
+ MAllocationLine aLine = new MAllocationLine (hdr, line.getAmount(),
+ line.getDiscountAmt(), line.getWriteOffAmt(), Env.ZERO);
+ aLine.setC_Invoice_ID(line.getC_Invoice_ID());
+ aLine.setC_CashLine_ID(line.getC_CashLine_ID());
+ if (!aLine.save())
+ {
+ m_processMsg = CLogger.retrieveErrorString("Could not create Allocation Line");
+ return DocAction.STATUS_Invalid;
+ }
+ // Should start WF
+ if(!hdr.processIt(DocAction.ACTION_Complete)) {
+ m_processMsg = CLogger.retrieveErrorString("Could not process Allocation");
+ return DocAction.STATUS_Invalid;
+ }
+ if (!hdr.save()) {
+ m_processMsg = CLogger.retrieveErrorString("Could not save Allocation");
+ return DocAction.STATUS_Invalid;
+ }
+ }
+ else if (MCashLine.CASHTYPE_BankAccountTransfer.equals(line.getCashType()))
+ {
+ // Payment just as intermediate info
+ MPayment pay = new MPayment (getCtx(), 0, get_TrxName());
+ pay.setAD_Org_ID(getAD_Org_ID());
+ String documentNo = getName();
+ pay.setDocumentNo(documentNo);
+ pay.setR_PnRef(documentNo);
+ pay.set_Value("TrxType", "X"); // Transfer
+ pay.set_Value("TenderType", "X");
+ //
+ //Modification for cash payment
+ pay.setC_CashBook_ID(getC_CashBook_ID());
+ //End of modification
+
+ pay.setC_BankAccount_ID(line.getC_BankAccount_ID());
+ pay.setC_DocType_ID(true); // Receipt
+ pay.setDateTrx(getStatementDate());
+ pay.setDateAcct(getDateAcct());
+ pay.setAmount(line.getC_Currency_ID(), line.getAmount().negate()); // Transfer
+ pay.setDescription(line.getDescription());
+ pay.setDocStatus(MPayment.DOCSTATUS_Closed);
+ pay.setDocAction(MPayment.DOCACTION_None);
+ pay.setPosted(true);
+ pay.setIsAllocated(true); // Has No Allocation!
+ pay.setProcessed(true);
+ if (!pay.save())
+ {
+ m_processMsg = CLogger.retrieveErrorString("Could not create Payment");
+ return DocAction.STATUS_Invalid;
+ }
+ }
+ }
+
+ // User Validation
+ String valid = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_COMPLETE);
+ if (valid != null)
+ {
+ m_processMsg = valid;
+ return DocAction.STATUS_Invalid;
+ }
+ //
+ setProcessed(true);
+ setDocAction(DOCACTION_Close);
+ return DocAction.STATUS_Completed;
+ } // completeIt
+
+ /**
+ * Void Document.
+ * Same as Close.
+ * @return true if success
+ */
+ public boolean voidIt()
+ {
+ log.info(toString());
+ // Before Void
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_VOID);
+ if (m_processMsg != null)
+ return false;
+ // After Void
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_VOID);
+ if (m_processMsg != null)
+ return false;
+ setDocAction(DOCACTION_None);
+ return false;
+ } // voidIt
+
+ /**
+ * Close Document.
+ * Cancel not delivered Qunatities
+ * @return true if success
+ */
+ public boolean closeIt()
+ {
+ log.info(toString());
+ // Before Close
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_CLOSE);
+ if (m_processMsg != null)
+ return false;
+ // After Close
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_CLOSE);
+ if (m_processMsg != null)
+ return false;
+
+ setDocAction(DOCACTION_None);
+ return true;
+ } // closeIt
+
+ /**
+ * Reverse Correction
+ * @return true if success
+ */
+ public boolean reverseCorrectIt()
+ {
+ log.info(toString());
+ // Before reverseCorrect
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSECORRECT);
+ if (m_processMsg != null)
+ return false;
+
+ // After reverseCorrect
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSECORRECT);
+ if (m_processMsg != null)
+ return false;
+
+ return false;
+ } // reverseCorrectionIt
+
+ /**
+ * Reverse Accrual - none
+ * @return true if success
+ */
+ public boolean reverseAccrualIt()
+ {
+ log.info(toString());
+ // Before reverseAccrual
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSEACCRUAL);
+ if (m_processMsg != null)
+ return false;
+
+ // After reverseAccrual
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSEACCRUAL);
+ if (m_processMsg != null)
+ return false;
+
+ return false;
+ } // reverseAccrualIt
+
+ /**
+ * Re-activate
+ * @return true if success
+ */
+ public boolean reActivateIt()
+ {
+ log.info(toString());
+ // Before reActivate
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REACTIVATE);
+ if (m_processMsg != null)
+ return false;
+
+ setProcessed(false);
+ if (reverseCorrectIt())
+ return true;
+
+ // After reActivate
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REACTIVATE);
+ if (m_processMsg != null)
+ return false;
+ return false;
+ } // reActivateIt
+
+ /**
+ * Set Processed
+ * @param processed processed
+ */
+ public void setProcessed (boolean processed)
+ {
+ super.setProcessed (processed);
+ String sql = "UPDATE C_CashLine SET Processed='"
+ + (processed ? "Y" : "N")
+ + "' WHERE C_Cash_ID=" + getC_Cash_ID();
+ int noLine = DB.executeUpdate (sql, get_TrxName());
+ m_lines = null;
+ log.fine(processed + " - Lines=" + noLine);
+ } // setProcessed
+
+ /**
+ * String Representation
+ * @return info
+ */
+ public String toString ()
+ {
+ StringBuffer sb = new StringBuffer ("MCash[");
+ sb.append (get_ID ())
+ .append ("-").append (getName())
+ .append(", Balance=").append(getBeginningBalance())
+ .append("->").append(getEndingBalance())
+ .append ("]");
+ return sb.toString ();
+ } // toString
+
+ /*************************************************************************
+ * Get Summary
+ * @return Summary of Document
+ */
+ public String getSummary()
+ {
+ StringBuffer sb = new StringBuffer();
+ sb.append(getName());
+ // : Total Lines = 123.00 (#1)
+ sb.append(": ")
+ .append(Msg.translate(getCtx(),"BeginningBalance")).append("=").append(getBeginningBalance())
+ .append(",")
+ .append(Msg.translate(getCtx(),"EndingBalance")).append("=").append(getEndingBalance())
+ .append(" (#").append(getLines(false).length).append(")");
+ // - Description
+ if (getDescription() != null && getDescription().length() > 0)
+ sb.append(" - ").append(getDescription());
+ return sb.toString();
+ } // getSummary
+
+ /**
+ * Get Process Message
+ * @return clear text error message
+ */
+ public String getProcessMsg()
+ {
+ return m_processMsg;
+ } // getProcessMsg
+
+ /**
+ * Get Document Owner (Responsible)
+ * @return AD_User_ID
+ */
+ public int getDoc_User_ID()
+ {
+ return getCreatedBy();
+ } // getDoc_User_ID
+
+ /**
+ * Get Document Approval Amount
+ * @return amount difference
+ */
+ public BigDecimal getApprovalAmt()
+ {
+ return getStatementDifference();
+ } // getApprovalAmt
+
+ /**
+ * Get Currency
+ * @return Currency
+ */
+ public int getC_Currency_ID ()
+ {
+ return getCashBook().getC_Currency_ID();
+ } // getC_Currency_ID
+
+} // MCash
diff --git a/posterita/posterita/src/main/org/compiere/model/MCashBook.java b/posterita/posterita/src/main/org/compiere/model/MCashBook.java
new file mode 100644
index 0000000000..f563eba26b
--- /dev/null
+++ b/posterita/posterita/src/main/org/compiere/model/MCashBook.java
@@ -0,0 +1,170 @@
+/******************************************************************************
+ * Product: Adempiere ERP & CRM Smart Business Solution *
+ * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
+ * This program is free software; you can redistribute it and/or modify it *
+ * under the terms version 2 of the GNU General Public License as published *
+ * by the Free Software Foundation. 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, write to the Free Software Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
+ * For the text or an alternative of this public license, you may reach us *
+ * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
+ * or via info@compiere.org or http://www.compiere.org/license.html *
+ *****************************************************************************/
+package org.compiere.model;
+
+import java.sql.*;
+import java.util.*;
+import java.util.logging.*;
+import org.compiere.util.*;
+
+/**
+ * Cash Book Model
+ *
+ * @author Jorg Janke
+ * @version $Id: MCashBook.java,v 1.3 2006/07/30 00:51:02 jjanke Exp $
+ */
+public class MCashBook extends X_C_CashBook
+{
+ /**
+ * Get MCashBook from Cache
+ * @param ctx context
+ * @param C_CashBook_ID id
+ * @return MCashBook
+ */
+ public static MCashBook get (Properties ctx, int C_CashBook_ID)
+ {
+ return get(ctx, C_CashBook_ID, null);
+ } // get
+
+ /**
+ * Gets MCashBook from Cache under transaction scope
+ * @param ctx context
+ * @param C_CashBook_ID id of cashbook to load
+ * @param trxName transaction name
+ * @return Cashbook
+ */
+ public static MCashBook get(Properties ctx, int C_CashBook_ID, String trxName)
+ {
+ Integer key = new Integer (C_CashBook_ID);
+ MCashBook retValue = (MCashBook) s_cache.get (key);
+ if (retValue != null)
+ return retValue;
+ retValue = new MCashBook (ctx, C_CashBook_ID, trxName);
+ if (retValue.get_ID () != 0)
+ s_cache.put (key, retValue);
+ return retValue;
+ }
+ /**
+ * Get CashBook for Org and Currency
+ * @param ctx context
+ * @param AD_Org_ID org
+ * @param C_Currency_ID currency
+ * @return cash book or null
+ */
+ public static MCashBook get (Properties ctx, int AD_Org_ID, int C_Currency_ID)
+ {
+ // Try from cache
+ Iterator it = s_cache.values().iterator();
+ while (it.hasNext())
+ {
+ MCashBook cb = (MCashBook)it.next();
+ if (cb.getAD_Org_ID() == AD_Org_ID && cb.getC_Currency_ID() == C_Currency_ID)
+ return cb;
+ }
+
+ // Get from DB
+ MCashBook retValue = null;
+ String sql = "SELECT * FROM C_CashBook "
+ + "WHERE AD_Org_ID=? AND C_Currency_ID=? "
+ + "ORDER BY IsDefault DESC";
+ PreparedStatement pstmt = null;
+ try
+ {
+ pstmt = DB.prepareStatement (sql, null);
+ pstmt.setInt (1, AD_Org_ID);
+ pstmt.setInt (2, C_Currency_ID);
+ ResultSet rs = pstmt.executeQuery ();
+ if (rs.next ())
+ {
+ retValue = new MCashBook (ctx, rs, null);
+ Integer key = new Integer (retValue.getC_CashBook_ID());
+ s_cache.put (key, retValue);
+ }
+ rs.close ();
+ pstmt.close ();
+ pstmt = null;
+ }
+ catch (Exception e)
+ {
+ s_log.log(Level.SEVERE, "get", e);
+ }
+ try
+ {
+ if (pstmt != null)
+ pstmt.close ();
+ pstmt = null;
+ }
+ catch (Exception e)
+ {
+ pstmt = null;
+ }
+ return retValue;
+ } // get
+
+
+ /** Cache */
+ private static CCache s_cache
+ = new CCache("", 20);
+ /** Static Logger */
+ private static CLogger s_log = CLogger.getCLogger (MCashBook.class);
+
+ /**************************************************************************
+ * Standard Constructor
+ * @param ctx context
+ * @param C_CashBook_ID id
+ * @param trxName transaction
+ */
+ public MCashBook (Properties ctx, int C_CashBook_ID, String trxName)
+ {
+ super (ctx, C_CashBook_ID, trxName);
+ } // MCashBook
+
+ /**
+ * Load Constructor
+ * @param ctx context
+ * @param rs result set
+ * @param trxName transaction
+ */
+ public MCashBook (Properties ctx, ResultSet rs, String trxName)
+ {
+ super(ctx, rs, trxName);
+ } // MCashBook
+
+ /**
+ * After Save
+ * @param newRecord new
+ * @param success success
+ * @return success
+ */
+ protected boolean afterSave (boolean newRecord, boolean success)
+ {
+ if (newRecord && success)
+ insert_Accounting("C_CashBook_Acct", "C_AcctSchema_Default", null);
+
+ return success;
+ } // afterSave
+
+ /**
+ * Before Delete
+ * @return true
+ */
+ protected boolean beforeDelete ()
+ {
+ return delete_Accounting("C_Cashbook_Acct");
+ } // beforeDelete
+
+} // MCashBook
diff --git a/posterita/posterita/src/main/org/compiere/model/MElementValue.java b/posterita/posterita/src/main/org/compiere/model/MElementValue.java
new file mode 100644
index 0000000000..49b270b991
--- /dev/null
+++ b/posterita/posterita/src/main/org/compiere/model/MElementValue.java
@@ -0,0 +1,262 @@
+/******************************************************************************
+ * Product: Adempiere ERP & CRM Smart Business Solution *
+ * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
+ * This program is free software; you can redistribute it and/or modify it *
+ * under the terms version 2 of the GNU General Public License as published *
+ * by the Free Software Foundation. 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, write to the Free Software Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
+ * For the text or an alternative of this public license, you may reach us *
+ * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
+ * or via info@compiere.org or http://www.compiere.org/license.html *
+ *****************************************************************************/
+package org.compiere.model;
+
+import java.sql.*;
+import java.util.*;
+import org.compiere.util.*;
+
+/**
+ * Natural Account
+ *
+ * @author Jorg Janke
+ * @version $Id: MElementValue.java,v 1.3 2006/07/30 00:58:37 jjanke Exp $
+ */
+public class MElementValue extends X_C_ElementValue
+{
+ /**
+ * Standard Constructor
+ * @param ctx context
+ * @param C_ElementValue_ID ID or 0 for new
+ * @param trxName transaction
+ */
+ public MElementValue(Properties ctx, int C_ElementValue_ID, String trxName)
+ {
+ super(ctx, C_ElementValue_ID, trxName);
+ if (C_ElementValue_ID == 0)
+ {
+ // setC_Element_ID (0); // Parent
+ // setName (null);
+ // setValue (null);
+ setIsSummary (false);
+ setAccountSign (ACCOUNTSIGN_Natural);
+ setAccountType (ACCOUNTTYPE_Expense);
+ setIsDocControlled(false);
+ setIsForeignCurrency(false);
+ setIsBankAccount(false);
+ //
+ setPostActual (true);
+ setPostBudget (true);
+ setPostEncumbrance (true);
+ setPostStatistical (true);
+ }
+ } // MElementValue
+
+ /**
+ * Load Constructor
+ * @param ctx context
+ * @param rs result set
+ * @param trxName transaction
+ */
+ public MElementValue(Properties ctx, ResultSet rs, String trxName)
+ {
+ super(ctx, rs, trxName);
+ } // MElementValue
+
+ /**
+ * Full Constructor
+ * @param ctx context
+ * @param Value value
+ * @param Name name
+ * @param Description description
+ * @param AccountType account type
+ * @param AccountSign account sign
+ * @param IsDocControlled doc controlled
+ * @param IsSummary summary
+ * @param trxName transaction
+ */
+ public MElementValue (Properties ctx, String Value, String Name, String Description,
+ String AccountType, String AccountSign,
+ boolean IsDocControlled, boolean IsSummary, String trxName)
+ {
+ this (ctx, 0, trxName);
+ setValue(Value);
+ setName(Name);
+ setDescription(Description);
+ setAccountType(AccountType);
+ setAccountSign(AccountSign);
+ setIsDocControlled(IsDocControlled);
+ setIsSummary(IsSummary);
+ } // MElementValue
+
+ /**
+ * Import Constructor
+ * @param imp import
+ */
+ public MElementValue (X_I_ElementValue imp)
+ {
+ this (imp.getCtx(), 0, imp.get_TrxName());
+ setClientOrg(imp);
+ set(imp);
+ } // MElementValue
+
+ /**
+ * Set/Update Settings from import
+ * @param imp import
+ */
+ public void set (X_I_ElementValue imp)
+ {
+ setValue(imp.getValue());
+ setName(imp.getName());
+ setDescription(imp.getDescription());
+ setAccountType(imp.getAccountType());
+ setAccountSign(imp.getAccountSign());
+ setIsSummary(imp.isSummary());
+ setIsDocControlled(imp.isDocControlled());
+ setC_Element_ID(imp.getC_Element_ID());
+ //
+ setPostActual(imp.isPostActual());
+ setPostBudget(imp.isPostBudget());
+ setPostEncumbrance(imp.isPostEncumbrance());
+ setPostStatistical(imp.isPostStatistical());
+ //
+ // setC_BankAccount_ID(imp.getC_BankAccount_ID());
+ // setIsForeignCurrency(imp.isForeignCurrency());
+ // setC_Currency_ID(imp.getC_Currency_ID());
+ // setIsBankAccount(imp.isIsBankAccount());
+ // setValidFrom(null);
+ // setValidTo(null);
+ } // set
+
+
+
+ /**
+ * Is this a Balance Sheet Account
+ * @return boolean
+ */
+ public boolean isBalanceSheet()
+ {
+ String accountType = getAccountType();
+ return (ACCOUNTTYPE_Asset.equals(accountType)
+ || ACCOUNTTYPE_Liability.equals(accountType)
+ || ACCOUNTTYPE_OwnerSEquity.equals(accountType));
+ } // isBalanceSheet
+
+ /**
+ * Is this an Activa Account
+ * @return boolean
+ */
+ public boolean isActiva()
+ {
+ return ACCOUNTTYPE_Asset.equals(getAccountType());
+ } // isActive
+
+ /**
+ * Is this a Passiva Account
+ * @return boolean
+ */
+ public boolean isPassiva()
+ {
+ String accountType = getAccountType();
+ return (ACCOUNTTYPE_Liability.equals(accountType)
+ || ACCOUNTTYPE_OwnerSEquity.equals(accountType));
+ } // isPassiva
+
+ /**
+ * User String Representation
+ * @return info value - name
+ */
+ public String toString ()
+ {
+ StringBuffer sb = new StringBuffer ();
+ sb.append(getValue()).append(" - ").append(getName());
+ return sb.toString ();
+ } // toString
+
+ /**
+ * Extended String Representation
+ * @return info
+ */
+ public String toStringX ()
+ {
+ StringBuffer sb = new StringBuffer ("MElementValue[");
+ sb.append(get_ID()).append(",").append(getValue()).append(" - ").append(getName())
+ .append ("]");
+ return sb.toString ();
+ } // toStringX
+
+
+
+ /**
+ * Before Save
+ * @param newRecord
+ * @return true if ir can be saved
+ */
+ protected boolean beforeSave (boolean newRecord)
+ {
+ if (getAD_Org_ID() != 0)
+ setAD_Org_ID(0);
+ //
+ if (!newRecord && isSummary()
+ && is_ValueChanged("IsSummary"))
+ {
+ String sql = "SELECT COUNT(*) FROM Fact_Acct WHERE Account_ID=?";
+ int no = DB.getSQLValue(get_TrxName(), sql, getC_ElementValue_ID());
+ if (no != 0)
+ {
+ log.saveError("Error", "Already posted to");
+ return false;
+ }
+ }
+ return true;
+ } // beforeSave
+
+ /**
+ * After Save
+ * @param newRecord new
+ * @param success success
+ * @return success
+ */
+ protected boolean afterSave (boolean newRecord, boolean success)
+ {
+ if (newRecord)
+ {
+ // afalcone [Bugs #1837219]
+ // sendy (transaction scope included)
+ int ad_Tree_ID= (new MElement(getCtx(), getC_Element_ID(), get_TrxName())).getAD_Tree_ID();
+ String treeType= (new MTree(getCtx(),ad_Tree_ID, get_TrxName())).getTreeType();
+ insert_Tree(treeType, getC_Element_ID());
+ // insert_Tree(MTree_Base.TREETYPE_ElementValue, getC_Element_ID()); Old
+
+ }
+
+ // Value/Name change
+ if (!newRecord && (is_ValueChanged("Value") || is_ValueChanged("Name")))
+ {
+ MAccount.updateValueDescription(getCtx(), "Account_ID=" + getC_ElementValue_ID(),get_TrxName());
+ if ("Y".equals(Env.getContext(getCtx(), "$Element_U1")))
+ MAccount.updateValueDescription(getCtx(), "User1_ID=" + getC_ElementValue_ID(),get_TrxName());
+ if ("Y".equals(Env.getContext(getCtx(), "$Element_U2")))
+ MAccount.updateValueDescription(getCtx(), "User2_ID=" + getC_ElementValue_ID(),get_TrxName());
+ }
+
+ return success;
+ } // afterSave
+
+ /**
+ * After Delete
+ * @param success
+ * @return deleted
+ */
+ protected boolean afterDelete (boolean success)
+ {
+ if (success)
+ delete_Tree(MTree_Base.TREETYPE_ElementValue);
+ return success;
+ } // afterDelete
+
+} // MElementValue
diff --git a/posterita/posterita/src/main/org/compiere/model/MInvoice.java b/posterita/posterita/src/main/org/compiere/model/MInvoice.java
new file mode 100644
index 0000000000..b91a7270a0
--- /dev/null
+++ b/posterita/posterita/src/main/org/compiere/model/MInvoice.java
@@ -0,0 +1,2370 @@
+/******************************************************************************
+ * Product: Adempiere ERP & CRM Smart Business Solution *
+ * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
+ * This program is free software; you can redistribute it and/or modify it *
+ * under the terms version 2 of the GNU General Public License as published *
+ * by the Free Software Foundation. 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, write to the Free Software Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
+ * For the text or an alternative of this public license, you may reach us *
+ * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
+ * or via info@compiere.org or http://www.compiere.org/license.html *
+ *****************************************************************************/
+package org.compiere.model;
+
+import java.io.*;
+import java.math.*;
+import java.sql.*;
+import java.util.*;
+import java.util.logging.*;
+import org.compiere.print.*;
+import org.compiere.process.*;
+import org.compiere.util.*;
+
+
+/**
+ * Invoice Model.
+ * Please do not set DocStatus and C_DocType_ID directly.
+ * They are set in the process() method.
+ * Use DocAction and C_DocTypeTarget_ID instead.
+ *
+ * @author Jorg Janke
+ * @version $Id: MInvoice.java,v 1.2 2006/07/30 00:51:02 jjanke Exp $
+ *
+ * Modifications: Added RMA functionality (Ashley Ramdass)
+ */
+public class MInvoice extends X_C_Invoice implements DocAction
+{
+ /**
+ * Get Payments Of BPartner
+ * @param ctx context
+ * @param C_BPartner_ID id
+ * @param trxName transaction
+ * @return array
+ */
+ public static MInvoice[] getOfBPartner (Properties ctx, int C_BPartner_ID, String trxName)
+ {
+ ArrayList list = new ArrayList();
+ String sql = "SELECT * FROM C_Invoice WHERE C_BPartner_ID=?";
+ PreparedStatement pstmt = null;
+ try
+ {
+ pstmt = DB.prepareStatement(sql, trxName);
+ pstmt.setInt(1, C_BPartner_ID);
+ ResultSet rs = pstmt.executeQuery();
+ while (rs.next())
+ list.add(new MInvoice(ctx,rs, trxName));
+ rs.close();
+ pstmt.close();
+ pstmt = null;
+ }
+ catch (Exception e)
+ {
+ s_log.log(Level.SEVERE, sql, e);
+ }
+ try
+ {
+ if (pstmt != null)
+ pstmt.close();
+ pstmt = null;
+ }
+ catch (Exception e)
+ {
+ pstmt = null;
+ }
+
+ //
+ MInvoice[] retValue = new MInvoice[list.size()];
+ list.toArray(retValue);
+ return retValue;
+ } // getOfBPartner
+
+ /**
+ * Create new Invoice by copying
+ * @param from invoice
+ * @param dateDoc date of the document date
+ * @param C_DocTypeTarget_ID target doc type
+ * @param isSOTrx sales order
+ * @param counter create counter links
+ * @param trxName trx
+ * @param setOrder set Order links
+ * @return Invoice
+ */
+ public static MInvoice copyFrom (MInvoice from, Timestamp dateDoc,
+ int C_DocTypeTarget_ID, boolean isSOTrx, boolean counter,
+ String trxName, boolean setOrder)
+ {
+ MInvoice to = new MInvoice (from.getCtx(), 0, null);
+ to.set_TrxName(trxName);
+ PO.copyValues (from, to, from.getAD_Client_ID(), from.getAD_Org_ID());
+ to.set_ValueNoCheck ("C_Invoice_ID", I_ZERO);
+ to.set_ValueNoCheck ("DocumentNo", null);
+ //
+ to.setDocStatus (DOCSTATUS_Drafted); // Draft
+ to.setDocAction(DOCACTION_Complete);
+ //
+ to.setC_DocType_ID(0);
+ to.setC_DocTypeTarget_ID (C_DocTypeTarget_ID);
+ to.setIsSOTrx(isSOTrx);
+ //
+ to.setDateInvoiced (dateDoc);
+ to.setDateAcct (dateDoc);
+ to.setDatePrinted(null);
+ to.setIsPrinted (false);
+ //
+ to.setIsApproved (false);
+ to.setC_Payment_ID(0);
+ to.setC_CashLine_ID(0);
+ to.setIsPaid (false);
+ to.setIsInDispute(false);
+ //
+ // Amounts are updated by trigger when adding lines
+ to.setGrandTotal(Env.ZERO);
+ to.setTotalLines(Env.ZERO);
+ //
+ to.setIsTransferred (false);
+ to.setPosted (false);
+ to.setProcessed (false);
+ //[ 1633721 ] Reverse Documents- Processing=Y
+ to.setProcessing(false);
+ // delete references
+ to.setIsSelfService(false);
+ if (!setOrder)
+ to.setC_Order_ID(0);
+ if (counter)
+ {
+ to.setRef_Invoice_ID(from.getC_Invoice_ID());
+ // Try to find Order link
+ if (from.getC_Order_ID() != 0)
+ {
+ MOrder peer = new MOrder (from.getCtx(), from.getC_Order_ID(), from.get_TrxName());
+ if (peer.getRef_Order_ID() != 0)
+ to.setC_Order_ID(peer.getRef_Order_ID());
+ }
+ }
+ else
+ to.setRef_Invoice_ID(0);
+
+ if (!to.save(trxName))
+ throw new IllegalStateException("Could not create Invoice");
+ if (counter)
+ from.setRef_Invoice_ID(to.getC_Invoice_ID());
+
+ // Lines
+ if (to.copyLinesFrom(from, counter, setOrder) == 0)
+ throw new IllegalStateException("Could not create Invoice Lines");
+
+ return to;
+ } // copyFrom
+
+ /**
+ * Get PDF File Name
+ * @param documentDir directory
+ * @param C_Invoice_ID invoice
+ * @return file name
+ */
+ public static String getPDFFileName (String documentDir, int C_Invoice_ID)
+ {
+ StringBuffer sb = new StringBuffer (documentDir);
+ if (sb.length() == 0)
+ sb.append(".");
+ if (!sb.toString().endsWith(File.separator))
+ sb.append(File.separator);
+ sb.append("C_Invoice_ID_")
+ .append(C_Invoice_ID)
+ .append(".pdf");
+ return sb.toString();
+ } // getPDFFileName
+
+
+ /**
+ * Get MInvoice from Cache
+ * @param ctx context
+ * @param C_Invoice_ID id
+ * @return MInvoice
+ */
+ public static MInvoice get (Properties ctx, int C_Invoice_ID)
+ {
+ Integer key = new Integer (C_Invoice_ID);
+ MInvoice retValue = (MInvoice) s_cache.get (key);
+ if (retValue != null)
+ return retValue;
+ retValue = new MInvoice (ctx, C_Invoice_ID, null);
+ if (retValue.get_ID () != 0)
+ s_cache.put (key, retValue);
+ return retValue;
+ } // get
+
+ /** Cache */
+ private static CCache s_cache = new CCache("C_Invoice", 20, 2); // 2 minutes
+
+
+ /**************************************************************************
+ * Invoice Constructor
+ * @param ctx context
+ * @param C_Invoice_ID invoice or 0 for new
+ * @param trxName trx name
+ */
+ public MInvoice (Properties ctx, int C_Invoice_ID, String trxName)
+ {
+ super (ctx, C_Invoice_ID, trxName);
+ if (C_Invoice_ID == 0)
+ {
+ setDocStatus (DOCSTATUS_Drafted); // Draft
+ setDocAction (DOCACTION_Complete);
+ //
+ setPaymentRule(PAYMENTRULE_OnCredit); // Payment Terms
+
+ setDateInvoiced (new Timestamp (System.currentTimeMillis ()));
+ setDateAcct (new Timestamp (System.currentTimeMillis ()));
+ //
+ setChargeAmt (Env.ZERO);
+ setTotalLines (Env.ZERO);
+ setGrandTotal (Env.ZERO);
+ //
+ setIsSOTrx (true);
+ setIsTaxIncluded (false);
+ setIsApproved (false);
+ setIsDiscountPrinted (false);
+ setIsPaid (false);
+ setSendEMail (false);
+ setIsPrinted (false);
+ setIsTransferred (false);
+ setIsSelfService(false);
+ setIsPayScheduleValid(false);
+ setIsInDispute(false);
+ setPosted(false);
+ super.setProcessed (false);
+ setProcessing(false);
+ }
+ } // MInvoice
+
+ /**
+ * Load Constructor
+ * @param ctx context
+ * @param rs result set record
+ * @param trxName transaction
+ */
+ public MInvoice (Properties ctx, ResultSet rs, String trxName)
+ {
+ super(ctx, rs, trxName);
+ } // MInvoice
+
+ /**
+ * Create Invoice from Order
+ * @param order order
+ * @param C_DocTypeTarget_ID target document type
+ * @param invoiceDate date or null
+ */
+ public MInvoice (MOrder order, int C_DocTypeTarget_ID, Timestamp invoiceDate)
+ {
+ this (order.getCtx(), 0, order.get_TrxName());
+ setClientOrg(order);
+ setOrder(order); // set base settings
+ //
+ if (C_DocTypeTarget_ID == 0)
+ C_DocTypeTarget_ID = DB.getSQLValue(null,
+ "SELECT C_DocTypeInvoice_ID FROM C_DocType WHERE C_DocType_ID=?",
+ order.getC_DocType_ID());
+ setC_DocTypeTarget_ID(C_DocTypeTarget_ID);
+ if (invoiceDate != null)
+ setDateInvoiced(invoiceDate);
+ setDateAcct(getDateInvoiced());
+ //
+ setSalesRep_ID(order.getSalesRep_ID());
+ //
+ setC_BPartner_ID(order.getBill_BPartner_ID());
+ setC_BPartner_Location_ID(order.getBill_Location_ID());
+ setAD_User_ID(order.getBill_User_ID());
+ } // MInvoice
+
+ /**
+ * Create Invoice from Shipment
+ * @param ship shipment
+ * @param invoiceDate date or null
+ */
+ public MInvoice (MInOut ship, Timestamp invoiceDate)
+ {
+ this (ship.getCtx(), 0, ship.get_TrxName());
+ setClientOrg(ship);
+ setShipment(ship); // set base settings
+ //
+ setC_DocTypeTarget_ID();
+ if (invoiceDate != null)
+ setDateInvoiced(invoiceDate);
+ setDateAcct(getDateInvoiced());
+ //
+ setSalesRep_ID(ship.getSalesRep_ID());
+ setAD_User_ID(ship.getAD_User_ID());
+ } // MInvoice
+
+ /**
+ * Create Invoice from Batch Line
+ * @param batch batch
+ * @param line batch line
+ */
+ public MInvoice (MInvoiceBatch batch, MInvoiceBatchLine line)
+ {
+ this (line.getCtx(), 0, line.get_TrxName());
+ setClientOrg(line);
+ setDocumentNo(line.getDocumentNo());
+ //
+ setIsSOTrx(batch.isSOTrx());
+ MBPartner bp = new MBPartner (line.getCtx(), line.getC_BPartner_ID(), line.get_TrxName());
+ setBPartner(bp); // defaults
+ //
+ setIsTaxIncluded(line.isTaxIncluded());
+ // May conflict with default price list
+ setC_Currency_ID(batch.getC_Currency_ID());
+ setC_ConversionType_ID(batch.getC_ConversionType_ID());
+ //
+ // setPaymentRule(order.getPaymentRule());
+ // setC_PaymentTerm_ID(order.getC_PaymentTerm_ID());
+ // setPOReference("");
+ setDescription(batch.getDescription());
+ // setDateOrdered(order.getDateOrdered());
+ //
+ setAD_OrgTrx_ID(line.getAD_OrgTrx_ID());
+ setC_Project_ID(line.getC_Project_ID());
+ // setC_Campaign_ID(line.getC_Campaign_ID());
+ setC_Activity_ID(line.getC_Activity_ID());
+ setUser1_ID(line.getUser1_ID());
+ setUser2_ID(line.getUser2_ID());
+ //
+ setC_DocTypeTarget_ID(line.getC_DocType_ID());
+ setDateInvoiced(line.getDateInvoiced());
+ setDateAcct(line.getDateAcct());
+ //
+ setSalesRep_ID(batch.getSalesRep_ID());
+ //
+ setC_BPartner_ID(line.getC_BPartner_ID());
+ setC_BPartner_Location_ID(line.getC_BPartner_Location_ID());
+ setAD_User_ID(line.getAD_User_ID());
+ } // MInvoice
+
+ /** Open Amount */
+ private BigDecimal m_openAmt = null;
+
+ /** Invoice Lines */
+ private MInvoiceLine[] m_lines;
+ /** Invoice Taxes */
+ private MInvoiceTax[] m_taxes;
+ /** Logger */
+ private static CLogger s_log = CLogger.getCLogger(MInvoice.class);
+
+ /**
+ * Overwrite Client/Org if required
+ * @param AD_Client_ID client
+ * @param AD_Org_ID org
+ */
+ public void setClientOrg (int AD_Client_ID, int AD_Org_ID)
+ {
+ super.setClientOrg(AD_Client_ID, AD_Org_ID);
+ } // setClientOrg
+
+ /**
+ * Set Business Partner Defaults & Details
+ * @param bp business partner
+ */
+ public void setBPartner (MBPartner bp)
+ {
+ if (bp == null)
+ return;
+
+ setC_BPartner_ID(bp.getC_BPartner_ID());
+ // Set Defaults
+ int ii = 0;
+ if (isSOTrx())
+ ii = bp.getC_PaymentTerm_ID();
+ else
+ ii = bp.getPO_PaymentTerm_ID();
+ if (ii != 0)
+ setC_PaymentTerm_ID(ii);
+ //
+ if (isSOTrx())
+ ii = bp.getM_PriceList_ID();
+ else
+ ii = bp.getPO_PriceList_ID();
+ if (ii != 0)
+ setM_PriceList_ID(ii);
+ //
+ String ss = bp.getPaymentRule();
+ if (ss != null)
+ setPaymentRule(ss);
+
+
+ // Set Locations
+ MBPartnerLocation[] locs = bp.getLocations(false);
+ if (locs != null)
+ {
+ for (int i = 0; i < locs.length; i++)
+ {
+ if ((locs[i].isBillTo() && isSOTrx())
+ || (locs[i].isPayFrom() && !isSOTrx()))
+ setC_BPartner_Location_ID(locs[i].getC_BPartner_Location_ID());
+ }
+ // set to first
+ if (getC_BPartner_Location_ID() == 0 && locs.length > 0)
+ setC_BPartner_Location_ID(locs[0].getC_BPartner_Location_ID());
+ }
+ if (getC_BPartner_Location_ID() == 0)
+ log.log(Level.SEVERE, "Has no To Address: " + bp);
+
+ // Set Contact
+ MUser[] contacts = bp.getContacts(false);
+ if (contacts != null && contacts.length > 0) // get first User
+ setAD_User_ID(contacts[0].getAD_User_ID());
+ } // setBPartner
+
+ /**
+ * Set Order References
+ * @param order order
+ */
+ public void setOrder (MOrder order)
+ {
+ if (order == null)
+ return;
+
+ setC_Order_ID(order.getC_Order_ID());
+ setIsSOTrx(order.isSOTrx());
+ setIsDiscountPrinted(order.isDiscountPrinted());
+ setIsSelfService(order.isSelfService());
+ setSendEMail(order.isSendEMail());
+ //
+ setM_PriceList_ID(order.getM_PriceList_ID());
+ setIsTaxIncluded(order.isTaxIncluded());
+ setC_Currency_ID(order.getC_Currency_ID());
+ setC_ConversionType_ID(order.getC_ConversionType_ID());
+ //
+ setPaymentRule(order.getPaymentRule());
+ setC_PaymentTerm_ID(order.getC_PaymentTerm_ID());
+ setPOReference(order.getPOReference());
+ setDescription(order.getDescription());
+ setDateOrdered(order.getDateOrdered());
+ //
+ setAD_OrgTrx_ID(order.getAD_OrgTrx_ID());
+ setC_Project_ID(order.getC_Project_ID());
+ setC_Campaign_ID(order.getC_Campaign_ID());
+ setC_Activity_ID(order.getC_Activity_ID());
+ setUser1_ID(order.getUser1_ID());
+ setUser2_ID(order.getUser2_ID());
+ } // setOrder
+
+ /**
+ * Set Shipment References
+ * @param ship shipment
+ */
+ public void setShipment (MInOut ship)
+ {
+ if (ship == null)
+ return;
+
+ setIsSOTrx(ship.isSOTrx());
+ //
+ MBPartner bp = new MBPartner (getCtx(), ship.getC_BPartner_ID(), null);
+ setBPartner (bp);
+ //
+ setSendEMail(ship.isSendEMail());
+ //
+ setPOReference(ship.getPOReference());
+ setDescription(ship.getDescription());
+ setDateOrdered(ship.getDateOrdered());
+ //
+ setAD_OrgTrx_ID(ship.getAD_OrgTrx_ID());
+ setC_Project_ID(ship.getC_Project_ID());
+ setC_Campaign_ID(ship.getC_Campaign_ID());
+ setC_Activity_ID(ship.getC_Activity_ID());
+ setUser1_ID(ship.getUser1_ID());
+ setUser2_ID(ship.getUser2_ID());
+ //
+ if (ship.getC_Order_ID() != 0)
+ {
+ setC_Order_ID(ship.getC_Order_ID());
+ MOrder order = new MOrder (getCtx(), ship.getC_Order_ID(), get_TrxName());
+ setIsDiscountPrinted(order.isDiscountPrinted());
+ setM_PriceList_ID(order.getM_PriceList_ID());
+ setIsTaxIncluded(order.isTaxIncluded());
+ setC_Currency_ID(order.getC_Currency_ID());
+ setC_ConversionType_ID(order.getC_ConversionType_ID());
+ setPaymentRule(order.getPaymentRule());
+ setC_PaymentTerm_ID(order.getC_PaymentTerm_ID());
+ //
+ MDocType dt = MDocType.get(getCtx(), order.getC_DocType_ID());
+ if (dt.getC_DocTypeInvoice_ID() != 0)
+ setC_DocTypeTarget_ID(dt.getC_DocTypeInvoice_ID());
+ // Overwrite Invoice Address
+ setC_BPartner_Location_ID(order.getBill_Location_ID());
+ }
+ // Check if Shipment/Receipt is based on RMA
+ if (ship.getM_RMA_ID() != 0)
+ {
+ MRMA rma = new MRMA(getCtx(), ship.getM_RMA_ID(), get_TrxName());
+ MOrder rmaOrder = rma.getOriginalOrder();
+ setM_RMA_ID(ship.getM_RMA_ID());
+ setIsSOTrx(rma.isSOTrx());
+ setM_PriceList_ID(rmaOrder.getM_PriceList_ID());
+ setIsTaxIncluded(rmaOrder.isTaxIncluded());
+ setC_Currency_ID(rmaOrder.getC_Currency_ID());
+ setC_ConversionType_ID(rmaOrder.getC_ConversionType_ID());
+ setPaymentRule(rmaOrder.getPaymentRule());
+ setC_PaymentTerm_ID(rmaOrder.getC_PaymentTerm_ID());
+
+ // Retrieves the invoice DocType
+ MDocType dt = MDocType.get(getCtx(), rma.getC_DocType_ID());
+ if (dt.getC_DocTypeInvoice_ID() != 0)
+ {
+ setC_DocTypeTarget_ID(dt.getC_DocTypeInvoice_ID());
+ }
+ setC_BPartner_Location_ID(rmaOrder.getBill_Location_ID());
+ }
+
+ } // setShipment
+
+ /**
+ * Set Target Document Type
+ * @param DocBaseType doc type MDocType.DOCBASETYPE_
+ */
+ public void setC_DocTypeTarget_ID (String DocBaseType)
+ {
+ String sql = "SELECT C_DocType_ID FROM C_DocType "
+ + "WHERE AD_Client_ID=? AND DocBaseType=?"
+ + " AND IsActive='Y' "
+ + "ORDER BY IsDefault DESC";
+ int C_DocType_ID = DB.getSQLValue(null, sql, getAD_Client_ID(), DocBaseType);
+ if (C_DocType_ID <= 0)
+ log.log(Level.SEVERE, "Not found for AC_Client_ID="
+ + getAD_Client_ID() + " - " + DocBaseType);
+ else
+ {
+ log.fine(DocBaseType);
+ setC_DocTypeTarget_ID (C_DocType_ID);
+ boolean isSOTrx = MDocType.DOCBASETYPE_ARInvoice.equals(DocBaseType)
+ || MDocType.DOCBASETYPE_ARCreditMemo.equals(DocBaseType);
+ setIsSOTrx (isSOTrx);
+ }
+ } // setC_DocTypeTarget_ID
+
+ /**
+ * Set Target Document Type.
+ * Based on SO flag AP/AP Invoice
+ */
+ public void setC_DocTypeTarget_ID ()
+ {
+ if (getC_DocTypeTarget_ID() > 0)
+ return;
+ if (isSOTrx())
+ setC_DocTypeTarget_ID(MDocType.DOCBASETYPE_ARInvoice);
+ else
+ setC_DocTypeTarget_ID(MDocType.DOCBASETYPE_APInvoice);
+ } // setC_DocTypeTarget_ID
+
+
+ /**
+ * Get Grand Total
+ * @param creditMemoAdjusted adjusted for CM (negative)
+ * @return grand total
+ */
+ public BigDecimal getGrandTotal (boolean creditMemoAdjusted)
+ {
+ if (!creditMemoAdjusted)
+ return super.getGrandTotal();
+ //
+ BigDecimal amt = getGrandTotal();
+ if (isCreditMemo())
+ return amt.negate();
+ return amt;
+ } // getGrandTotal
+
+
+ /**
+ * Get Invoice Lines of Invoice
+ * @param whereClause starting with AND
+ * @return lines
+ */
+ private MInvoiceLine[] getLines (String whereClause)
+ {
+ ArrayList list = new ArrayList();
+ String sql = "SELECT * FROM C_InvoiceLine WHERE C_Invoice_ID=? ";
+ if (whereClause != null)
+ sql += whereClause;
+ sql += " ORDER BY Line";
+ PreparedStatement pstmt = null;
+ try
+ {
+ pstmt = DB.prepareStatement(sql, get_TrxName());
+ pstmt.setInt(1, getC_Invoice_ID());
+ ResultSet rs = pstmt.executeQuery();
+ while (rs.next())
+ {
+ MInvoiceLine il = new MInvoiceLine(getCtx(), rs, get_TrxName());
+ il.setInvoice(this);
+ list.add(il);
+ }
+ rs.close();
+ pstmt.close();
+ pstmt = null;
+ }
+ catch (Exception e)
+ {
+ log.log(Level.SEVERE, "getLines", e);
+ }
+ finally
+ {
+ try
+ {
+ if (pstmt != null)
+ pstmt.close ();
+ }
+ catch (Exception e)
+ {}
+ pstmt = null;
+ }
+
+ //
+ MInvoiceLine[] lines = new MInvoiceLine[list.size()];
+ list.toArray(lines);
+ return lines;
+ } // getLines
+
+ /**
+ * Get Invoice Lines
+ * @param requery
+ * @return lines
+ */
+ public MInvoiceLine[] getLines (boolean requery)
+ {
+ if (m_lines == null || m_lines.length == 0 || requery)
+ m_lines = getLines(null);
+ set_TrxName(m_lines, get_TrxName());
+ return m_lines;
+ } // getLines
+
+ /**
+ * Get Lines of Invoice
+ * @return lines
+ */
+ public MInvoiceLine[] getLines()
+ {
+ return getLines(false);
+ } // getLines
+
+
+ /**
+ * Renumber Lines
+ * @param step start and step
+ */
+ public void renumberLines (int step)
+ {
+ int number = step;
+ MInvoiceLine[] lines = getLines(false);
+ for (int i = 0; i < lines.length; i++)
+ {
+ MInvoiceLine line = lines[i];
+ line.setLine(number);
+ line.save();
+ number += step;
+ }
+ m_lines = null;
+ } // renumberLines
+
+ /**
+ * Copy Lines From other Invoice.
+ * @param otherInvoice invoice
+ * @param counter create counter links
+ * @param setOrder set order links
+ * @return number of lines copied
+ */
+ public int copyLinesFrom (MInvoice otherInvoice, boolean counter, boolean setOrder)
+ {
+ if (isProcessed() || isPosted() || otherInvoice == null)
+ return 0;
+ MInvoiceLine[] fromLines = otherInvoice.getLines(false);
+ int count = 0;
+ for (int i = 0; i < fromLines.length; i++)
+ {
+ MInvoiceLine line = new MInvoiceLine (getCtx(), 0, get_TrxName());
+ MInvoiceLine fromLine = fromLines[i];
+ if (counter) // header
+ PO.copyValues (fromLine, line, getAD_Client_ID(), getAD_Org_ID());
+ else
+ PO.copyValues (fromLine, line, fromLine.getAD_Client_ID(), fromLine.getAD_Org_ID());
+ line.setC_Invoice_ID(getC_Invoice_ID());
+ line.setInvoice(this);
+ line.set_ValueNoCheck ("C_InvoiceLine_ID", I_ZERO); // new
+ // Reset
+ if (!setOrder)
+ line.setC_OrderLine_ID(0);
+ line.setRef_InvoiceLine_ID(0);
+ line.setM_InOutLine_ID(0);
+ line.setA_Asset_ID(0);
+ line.setM_AttributeSetInstance_ID(0);
+ line.setS_ResourceAssignment_ID(0);
+ // New Tax
+ if (getC_BPartner_ID() != otherInvoice.getC_BPartner_ID())
+ line.setTax(); // recalculate
+ //
+ if (counter)
+ {
+ line.setRef_InvoiceLine_ID(fromLine.getC_InvoiceLine_ID());
+ if (fromLine.getC_OrderLine_ID() != 0)
+ {
+ MOrderLine peer = new MOrderLine (getCtx(), fromLine.getC_OrderLine_ID(), get_TrxName());
+ if (peer.getRef_OrderLine_ID() != 0)
+ line.setC_OrderLine_ID(peer.getRef_OrderLine_ID());
+ }
+ line.setM_InOutLine_ID(0);
+ if (fromLine.getM_InOutLine_ID() != 0)
+ {
+ MInOutLine peer = new MInOutLine (getCtx(), fromLine.getM_InOutLine_ID(), get_TrxName());
+ if (peer.getRef_InOutLine_ID() != 0)
+ line.setM_InOutLine_ID(peer.getRef_InOutLine_ID());
+ }
+ }
+ //
+ line.setProcessed(false);
+ if (line.save(get_TrxName()))
+ count++;
+ // Cross Link
+ if (counter)
+ {
+ fromLine.setRef_InvoiceLine_ID(line.getC_InvoiceLine_ID());
+ fromLine.save(get_TrxName());
+ }
+
+ // MZ Goodwill
+ // copy the landed cost
+ line.copyLandedCostFrom(fromLine);
+ line.allocateLandedCosts();
+ // end MZ
+ }
+ if (fromLines.length != count)
+ log.log(Level.SEVERE, "Line difference - From=" + fromLines.length + " <> Saved=" + count);
+ return count;
+ } // copyLinesFrom
+
+ /** Reversal Flag */
+ private boolean m_reversal = false;
+
+ /**
+ * Set Reversal
+ * @param reversal reversal
+ */
+ private void setReversal(boolean reversal)
+ {
+ m_reversal = reversal;
+ } // setReversal
+ /**
+ * Is Reversal
+ * @return reversal
+ */
+ private boolean isReversal()
+ {
+ return m_reversal;
+ } // isReversal
+
+ /**
+ * Get Taxes
+ * @param requery requery
+ * @return array of taxes
+ */
+ public MInvoiceTax[] getTaxes (boolean requery)
+ {
+ if (m_taxes != null && !requery)
+ return m_taxes;
+ String sql = "SELECT * FROM C_InvoiceTax WHERE C_Invoice_ID=?";
+ ArrayList list = new ArrayList();
+ PreparedStatement pstmt = null;
+ try
+ {
+ pstmt = DB.prepareStatement (sql, get_TrxName());
+ pstmt.setInt (1, getC_Invoice_ID());
+ ResultSet rs = pstmt.executeQuery ();
+ while (rs.next ())
+ list.add(new MInvoiceTax(getCtx(), rs, get_TrxName()));
+ rs.close ();
+ pstmt.close ();
+ pstmt = null;
+ }
+ catch (Exception e)
+ {
+ log.log(Level.SEVERE, "getTaxes", e);
+ }
+ try
+ {
+ if (pstmt != null)
+ pstmt.close ();
+ pstmt = null;
+ }
+ catch (Exception e)
+ {
+ pstmt = null;
+ }
+
+ m_taxes = new MInvoiceTax[list.size ()];
+ list.toArray (m_taxes);
+ return m_taxes;
+ } // getTaxes
+
+ /**
+ * Add to Description
+ * @param description text
+ */
+ public void addDescription (String description)
+ {
+ String desc = getDescription();
+ if (desc == null)
+ setDescription(description);
+ else
+ setDescription(desc + " | " + description);
+ } // addDescription
+
+ /**
+ * Is it a Credit Memo?
+ * @return true if CM
+ */
+ public boolean isCreditMemo()
+ {
+ MDocType dt = MDocType.get(getCtx(),
+ getC_DocType_ID()==0 ? getC_DocTypeTarget_ID() : getC_DocType_ID());
+ return MDocType.DOCBASETYPE_APCreditMemo.equals(dt.getDocBaseType())
+ || MDocType.DOCBASETYPE_ARCreditMemo.equals(dt.getDocBaseType());
+ } // isCreditMemo
+
+ /**
+ * Set Processed.
+ * Propergate to Lines/Taxes
+ * @param processed processed
+ */
+ public void setProcessed (boolean processed)
+ {
+ super.setProcessed (processed);
+ if (get_ID() == 0)
+ return;
+ String set = "SET Processed='"
+ + (processed ? "Y" : "N")
+ + "' WHERE C_Invoice_ID=" + getC_Invoice_ID();
+ int noLine = DB.executeUpdate("UPDATE C_InvoiceLine " + set, get_TrxName());
+ int noTax = DB.executeUpdate("UPDATE C_InvoiceTax " + set, get_TrxName());
+ m_lines = null;
+ m_taxes = null;
+ log.fine(processed + " - Lines=" + noLine + ", Tax=" + noTax);
+ } // setProcessed
+
+ /**
+ * Validate Invoice Pay Schedule
+ * @return pay schedule is valid
+ */
+ public boolean validatePaySchedule()
+ {
+ MInvoicePaySchedule[] schedule = MInvoicePaySchedule.getInvoicePaySchedule
+ (getCtx(), getC_Invoice_ID(), 0, get_TrxName());
+ log.fine("#" + schedule.length);
+ if (schedule.length == 0)
+ {
+ setIsPayScheduleValid(false);
+ return false;
+ }
+ // Add up due amounts
+ BigDecimal total = Env.ZERO;
+ for (int i = 0; i < schedule.length; i++)
+ {
+ schedule[i].setParent(this);
+ BigDecimal due = schedule[i].getDueAmt();
+ if (due != null)
+ total = total.add(due);
+ }
+ boolean valid = getGrandTotal().compareTo(total) == 0;
+ setIsPayScheduleValid(valid);
+
+ // Update Schedule Lines
+ for (int i = 0; i < schedule.length; i++)
+ {
+ if (schedule[i].isValid() != valid)
+ {
+ schedule[i].setIsValid(valid);
+ schedule[i].save(get_TrxName());
+ }
+ }
+ return valid;
+ } // validatePaySchedule
+
+
+ /**************************************************************************
+ * Before Save
+ * @param newRecord new
+ * @return true
+ */
+ protected boolean beforeSave (boolean newRecord)
+ {
+ log.fine("");
+ // No Partner Info - set Template
+ if (getC_BPartner_ID() == 0)
+ setBPartner(MBPartner.getTemplate(getCtx(), getAD_Client_ID()));
+ if (getC_BPartner_Location_ID() == 0)
+ setBPartner(new MBPartner(getCtx(), getC_BPartner_ID(), null));
+
+ // Price List
+ if (getM_PriceList_ID() == 0)
+ {
+ int ii = Env.getContextAsInt(getCtx(), "#M_PriceList_ID");
+ if (ii != 0)
+ setM_PriceList_ID(ii);
+ else
+ {
+ String sql = "SELECT M_PriceList_ID FROM M_PriceList WHERE AD_Client_ID=? AND IsDefault='Y'";
+ ii = DB.getSQLValue (null, sql, getAD_Client_ID());
+ if (ii != 0)
+ setM_PriceList_ID (ii);
+ }
+ }
+
+ // Currency
+ if (getC_Currency_ID() == 0)
+ {
+ String sql = "SELECT C_Currency_ID FROM M_PriceList WHERE M_PriceList_ID=?";
+ int ii = DB.getSQLValue (null, sql, getM_PriceList_ID());
+ if (ii != 0)
+ setC_Currency_ID (ii);
+ else
+ setC_Currency_ID(Env.getContextAsInt(getCtx(), "#C_Currency_ID"));
+ }
+
+ // Sales Rep
+ if (getSalesRep_ID() == 0)
+ {
+ int ii = Env.getContextAsInt(getCtx(), "#SalesRep_ID");
+ if (ii != 0)
+ setSalesRep_ID (ii);
+ }
+
+ // Document Type
+ if (getC_DocType_ID() == 0)
+ setC_DocType_ID (0); // make sure it's set to 0
+ if (getC_DocTypeTarget_ID() == 0)
+ setC_DocTypeTarget_ID(isSOTrx() ? MDocType.DOCBASETYPE_ARInvoice : MDocType.DOCBASETYPE_APInvoice);
+
+ // Payment Term
+ if (getC_PaymentTerm_ID() == 0)
+ {
+ int ii = Env.getContextAsInt(getCtx(), "#C_PaymentTerm_ID");
+ if (ii != 0)
+ setC_PaymentTerm_ID (ii);
+ else
+ {
+ String sql = "SELECT C_PaymentTerm_ID FROM C_PaymentTerm WHERE AD_Client_ID=? AND IsDefault='Y'";
+ ii = DB.getSQLValue(null, sql, getAD_Client_ID());
+ if (ii != 0)
+ setC_PaymentTerm_ID (ii);
+ }
+ }
+ return true;
+ } // beforeSave
+
+ /**
+ * Before Delete
+ * @return true if it can be deleted
+ */
+ protected boolean beforeDelete ()
+ {
+ if (getC_Order_ID() != 0)
+ {
+ log.saveError("Error", Msg.getMsg(getCtx(), "CannotDelete"));
+ return false;
+ }
+ return true;
+ } // beforeDelete
+
+ /**
+ * String Representation
+ * @return info
+ */
+ public String toString ()
+ {
+ StringBuffer sb = new StringBuffer ("MInvoice[")
+ .append(get_ID()).append("-").append(getDocumentNo())
+ .append(",GrandTotal=").append(getGrandTotal());
+ if (m_lines != null)
+ sb.append(" (#").append(m_lines.length).append(")");
+ sb.append ("]");
+ return sb.toString ();
+ } // toString
+
+ /**
+ * Get Document Info
+ * @return document info (untranslated)
+ */
+ public String getDocumentInfo()
+ {
+ MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
+ return dt.getName() + " " + getDocumentNo();
+ } // getDocumentInfo
+
+
+ /**
+ * After Save
+ * @param newRecord new
+ * @param success success
+ * @return success
+ */
+ protected boolean afterSave (boolean newRecord, boolean success)
+ {
+ if (!success || newRecord)
+ return success;
+
+ if (is_ValueChanged("AD_Org_ID"))
+ {
+ String sql = "UPDATE C_InvoiceLine ol"
+ + " SET AD_Org_ID ="
+ + "(SELECT AD_Org_ID"
+ + " FROM C_Invoice o WHERE ol.C_Invoice_ID=o.C_Invoice_ID) "
+ + "WHERE C_Invoice_ID=" + getC_Invoice_ID();
+ int no = DB.executeUpdate(sql, get_TrxName());
+ log.fine("Lines -> #" + no);
+ }
+ return true;
+ } // afterSave
+
+
+ /**
+ * Set Price List (and Currency) when valid
+ * @param M_PriceList_ID price list
+ */
+ public void setM_PriceList_ID (int M_PriceList_ID)
+ {
+ String sql = "SELECT M_PriceList_ID, C_Currency_ID "
+ + "FROM M_PriceList WHERE M_PriceList_ID=?";
+ PreparedStatement pstmt = null;
+ try
+ {
+ pstmt = DB.prepareStatement(sql, null);
+ pstmt.setInt(1, M_PriceList_ID);
+ ResultSet rs = pstmt.executeQuery();
+ if (rs.next())
+ {
+ super.setM_PriceList_ID (rs.getInt(1));
+ setC_Currency_ID (rs.getInt(2));
+ }
+ rs.close();
+ pstmt.close();
+ pstmt = null;
+ }
+ catch (Exception e)
+ {
+ log.log(Level.SEVERE, "setM_PriceList_ID", e);
+ }
+ finally
+ {
+ try
+ {
+ if (pstmt != null)
+ pstmt.close ();
+ }
+ catch (Exception e)
+ {}
+ pstmt = null;
+ }
+ } // setM_PriceList_ID
+
+
+ /**
+ * Get Allocated Amt in Invoice Currency
+ * @return pos/neg amount or null
+ */
+ public BigDecimal getAllocatedAmt ()
+ {
+ BigDecimal retValue = null;
+ String sql = "SELECT SUM(currencyConvert(al.Amount+al.DiscountAmt+al.WriteOffAmt,"
+ + "ah.C_Currency_ID, i.C_Currency_ID,ah.DateTrx,COALESCE(i.C_ConversionType_ID,0), al.AD_Client_ID,al.AD_Org_ID)) "
+ + "FROM C_AllocationLine al"
+ + " INNER JOIN C_AllocationHdr ah ON (al.C_AllocationHdr_ID=ah.C_AllocationHdr_ID)"
+ + " INNER JOIN C_Invoice i ON (al.C_Invoice_ID=i.C_Invoice_ID) "
+ + "WHERE al.C_Invoice_ID=?"
+ + " AND ah.IsActive='Y' AND al.IsActive='Y'";
+ PreparedStatement pstmt = null;
+ try
+ {
+ pstmt = DB.prepareStatement(sql, get_TrxName());
+ pstmt.setInt(1, getC_Invoice_ID());
+ ResultSet rs = pstmt.executeQuery();
+ if (rs.next())
+ retValue = rs.getBigDecimal(1);
+ rs.close();
+ pstmt.close();
+ pstmt = null;
+ }
+ catch (Exception e)
+ {
+ log.log(Level.SEVERE, sql, e);
+ }
+ try
+ {
+ if (pstmt != null)
+ pstmt.close();
+ pstmt = null;
+ }
+ catch (Exception e)
+ {
+ pstmt = null;
+ }
+ // log.fine("getAllocatedAmt - " + retValue);
+ // ? ROUND(NVL(v_AllocatedAmt,0), 2);
+ return retValue;
+ } // getAllocatedAmt
+
+ /**
+ * Test Allocation (and set paid flag)
+ * @return true if updated
+ */
+ public boolean testAllocation()
+ {
+ boolean change = false;
+
+ if ( isProcessed() ) {
+ BigDecimal alloc = getAllocatedAmt(); // absolute
+ if (alloc == null)
+ alloc = Env.ZERO;
+ BigDecimal total = getGrandTotal();
+ if (!isSOTrx())
+ total = total.negate();
+ if (isCreditMemo())
+ total = total.negate();
+ boolean test = total.compareTo(alloc) == 0;
+ change = test != isPaid();
+ if (change)
+ setIsPaid(test);
+ log.fine("Paid=" + test
+ + " (" + alloc + "=" + total + ")");
+ }
+
+ return change;
+ } // testAllocation
+
+ /**
+ * Set Paid Flag for invoices
+ * @param ctx context
+ * @param C_BPartner_ID if 0 all
+ * @param trxName transaction
+ */
+ public static void setIsPaid (Properties ctx, int C_BPartner_ID, String trxName)
+ {
+ int counter = 0;
+ String sql = "SELECT * FROM C_Invoice "
+ + "WHERE IsPaid='N' AND DocStatus IN ('CO','CL')";
+ if (C_BPartner_ID > 1)
+ sql += " AND C_BPartner_ID=?";
+ else
+ sql += " AND AD_Client_ID=" + Env.getAD_Client_ID(ctx);
+ PreparedStatement pstmt = null;
+ try
+ {
+ pstmt = DB.prepareStatement (sql, trxName);
+ if (C_BPartner_ID > 1)
+ pstmt.setInt (1, C_BPartner_ID);
+ ResultSet rs = pstmt.executeQuery ();
+ while (rs.next ())
+ {
+ MInvoice invoice = new MInvoice(ctx, rs, trxName);
+ if (invoice.testAllocation())
+ if (invoice.save())
+ counter++;
+ }
+ rs.close ();
+ pstmt.close ();
+ pstmt = null;
+ }
+ catch (Exception e)
+ {
+ s_log.log(Level.SEVERE, sql, e);
+ }
+ try
+ {
+ if (pstmt != null)
+ pstmt.close ();
+ pstmt = null;
+ }
+ catch (Exception e)
+ {
+ pstmt = null;
+ }
+ s_log.config("#" + counter);
+ /**/
+ } // setIsPaid
+
+ /**
+ * Get Open Amount.
+ * Used by web interface
+ * @return Open Amt
+ */
+ public BigDecimal getOpenAmt ()
+ {
+ return getOpenAmt (true, null);
+ } // getOpenAmt
+
+ /**
+ * Get Open Amount
+ * @param creditMemoAdjusted adjusted for CM (negative)
+ * @param paymentDate ignored Payment Date
+ * @return Open Amt
+ */
+ public BigDecimal getOpenAmt (boolean creditMemoAdjusted, Timestamp paymentDate)
+ {
+ if (isPaid())
+ return Env.ZERO;
+ //
+ if (m_openAmt == null)
+ {
+ m_openAmt = getGrandTotal();
+ if (paymentDate != null)
+ {
+ // Payment Discount
+ // Payment Schedule
+ }
+ BigDecimal allocated = getAllocatedAmt();
+ if (allocated != null)
+ {
+ allocated = allocated.abs(); // is absolute
+ m_openAmt = m_openAmt.subtract(allocated);
+ }
+ }
+ //
+ if (!creditMemoAdjusted)
+ return m_openAmt;
+ if (isCreditMemo())
+ return m_openAmt.negate();
+ return m_openAmt;
+ } // getOpenAmt
+
+
+ /**
+ * Get Document Status
+ * @return Document Status Clear Text
+ */
+ public String getDocStatusName()
+ {
+ return MRefList.getListName(getCtx(), 131, getDocStatus());
+ } // getDocStatusName
+
+
+ /**************************************************************************
+ * Create PDF
+ * @return File or null
+ */
+ public File createPDF ()
+ {
+ try
+ {
+ File temp = File.createTempFile(get_TableName()+get_ID()+"_", ".pdf");
+ return createPDF (temp);
+ }
+ catch (Exception e)
+ {
+ log.severe("Could not create PDF - " + e.getMessage());
+ }
+ return null;
+ } // getPDF
+
+ /**
+ * Create PDF file
+ * @param file output file
+ * @return file if success
+ */
+ public File createPDF (File file)
+ {
+ ReportEngine re = ReportEngine.get (getCtx(), ReportEngine.INVOICE, getC_Invoice_ID());
+ if (re == null)
+ return null;
+ return re.getPDF(file);
+ } // createPDF
+
+ /**
+ * Get PDF File Name
+ * @param documentDir directory
+ * @return file name
+ */
+ public String getPDFFileName (String documentDir)
+ {
+ return getPDFFileName (documentDir, getC_Invoice_ID());
+ } // getPDFFileName
+
+ /**
+ * Get ISO Code of Currency
+ * @return Currency ISO
+ */
+ public String getCurrencyISO()
+ {
+ return MCurrency.getISO_Code (getCtx(), getC_Currency_ID());
+ } // getCurrencyISO
+
+ /**
+ * Get Currency Precision
+ * @return precision
+ */
+ public int getPrecision()
+ {
+ return MCurrency.getStdPrecision(getCtx(), getC_Currency_ID());
+ } // getPrecision
+
+
+ /**************************************************************************
+ * Process document
+ * @param processAction document action
+ * @return true if performed
+ */
+ public boolean processIt (String processAction)
+ {
+ m_processMsg = null;
+ DocumentEngine engine = new DocumentEngine (this, getDocStatus());
+ return engine.processIt (processAction, getDocAction());
+ } // process
+
+ /** Process Message */
+ private String m_processMsg = null;
+ /** Just Prepared Flag */
+ private boolean m_justPrepared = false;
+
+ /**
+ * Unlock Document.
+ * @return true if success
+ */
+ public boolean unlockIt()
+ {
+ log.info("unlockIt - " + toString());
+ setProcessing(false);
+ return true;
+ } // unlockIt
+
+ /**
+ * Invalidate Document
+ * @return true if success
+ */
+ public boolean invalidateIt()
+ {
+ log.info("invalidateIt - " + toString());
+ setDocAction(DOCACTION_Prepare);
+ return true;
+ } // invalidateIt
+
+ /**
+ * Prepare Document
+ * @return new status (In Progress or Invalid)
+ */
+ public String prepareIt()
+ {
+ log.info(toString());
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_PREPARE);
+ if (m_processMsg != null)
+ return DocAction.STATUS_Invalid;
+ MDocType dt = MDocType.get(getCtx(), getC_DocTypeTarget_ID());
+
+ // Std Period open?
+ if (!MPeriod.isOpen(getCtx(), getDateAcct(), dt.getDocBaseType()))
+ {
+ m_processMsg = "@PeriodClosed@";
+ return DocAction.STATUS_Invalid;
+ }
+ // Lines
+ MInvoiceLine[] lines = getLines(true);
+ if (lines.length == 0)
+ {
+ m_processMsg = "@NoLines@";
+ return DocAction.STATUS_Invalid;
+ }
+ // No Cash Book
+ if (PAYMENTRULE_Cash.equals(getPaymentRule())
+ && MCashBook.get(getCtx(), getAD_Org_ID(), getC_Currency_ID()) == null)
+ {
+ m_processMsg = "@NoCashBook@";
+ return DocAction.STATUS_Invalid;
+ }
+
+ // Convert/Check DocType
+ if (getC_DocType_ID() != getC_DocTypeTarget_ID() )
+ setC_DocType_ID(getC_DocTypeTarget_ID());
+ if (getC_DocType_ID() == 0)
+ {
+ m_processMsg = "No Document Type";
+ return DocAction.STATUS_Invalid;
+ }
+
+ explodeBOM();
+ if (!calculateTaxTotal()) // setTotals
+ {
+ m_processMsg = "Error calculating Tax";
+ return DocAction.STATUS_Invalid;
+ }
+
+ createPaySchedule();
+
+ // Credit Status
+ if (isSOTrx() && !isReversal())
+ {
+ MBPartner bp = new MBPartner (getCtx(), getC_BPartner_ID(), null);
+ if (MBPartner.SOCREDITSTATUS_CreditStop.equals(bp.getSOCreditStatus()))
+ {
+ m_processMsg = "@BPartnerCreditStop@ - @TotalOpenBalance@="
+ + bp.getTotalOpenBalance()
+ + ", @SO_CreditLimit@=" + bp.getSO_CreditLimit();
+ return DocAction.STATUS_Invalid;
+ }
+ }
+
+ // Landed Costs
+ if (!isSOTrx())
+ {
+ for (int i = 0; i < lines.length; i++)
+ {
+ MInvoiceLine line = lines[i];
+ String error = line.allocateLandedCosts();
+ if (error != null && error.length() > 0)
+ {
+ m_processMsg = error;
+ return DocAction.STATUS_Invalid;
+ }
+ }
+ }
+
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_PREPARE);
+ if (m_processMsg != null)
+ return DocAction.STATUS_Invalid;
+
+ // Add up Amounts
+ m_justPrepared = true;
+ if (!DOCACTION_Complete.equals(getDocAction()))
+ setDocAction(DOCACTION_Complete);
+ return DocAction.STATUS_InProgress;
+ } // prepareIt
+
+ /**
+ * Explode non stocked BOM.
+ */
+ private void explodeBOM ()
+ {
+ String where = "AND IsActive='Y' AND EXISTS "
+ + "(SELECT * FROM M_Product p WHERE C_InvoiceLine.M_Product_ID=p.M_Product_ID"
+ + " AND p.IsBOM='Y' AND p.IsVerified='Y' AND p.IsStocked='N')";
+ //
+ String sql = "SELECT COUNT(*) FROM C_InvoiceLine "
+ + "WHERE C_Invoice_ID=? " + where;
+ int count = DB.getSQLValue(get_TrxName(), sql, getC_Invoice_ID());
+ while (count != 0)
+ {
+ renumberLines (100);
+
+ // Order Lines with non-stocked BOMs
+ MInvoiceLine[] lines = getLines (where);
+ for (int i = 0; i < lines.length; i++)
+ {
+ MInvoiceLine line = lines[i];
+ MProduct product = MProduct.get (getCtx(), line.getM_Product_ID());
+ log.fine(product.getName());
+ // New Lines
+ int lineNo = line.getLine ();
+ MProductBOM[] boms = MProductBOM.getBOMLines (product);
+ for (int j = 0; j < boms.length; j++)
+ {
+ MProductBOM bom = boms[j];
+ MInvoiceLine newLine = new MInvoiceLine (this);
+ newLine.setLine (++lineNo);
+ newLine.setM_Product_ID (bom.getProduct().getM_Product_ID(),
+ bom.getProduct().getC_UOM_ID());
+ newLine.setQty (line.getQtyInvoiced().multiply(
+ bom.getBOMQty ())); // Invoiced/Entered
+ if (bom.getDescription () != null)
+ newLine.setDescription (bom.getDescription ());
+ //
+ newLine.setPrice ();
+ newLine.save (get_TrxName());
+ }
+ // Convert into Comment Line
+ line.setM_Product_ID (0);
+ line.setM_AttributeSetInstance_ID (0);
+ line.setPriceEntered (Env.ZERO);
+ line.setPriceActual (Env.ZERO);
+ line.setPriceLimit (Env.ZERO);
+ line.setPriceList (Env.ZERO);
+ line.setLineNetAmt (Env.ZERO);
+ //
+ String description = product.getName ();
+ if (product.getDescription () != null)
+ description += " " + product.getDescription ();
+ if (line.getDescription () != null)
+ description += " " + line.getDescription ();
+ line.setDescription (description);
+ line.save (get_TrxName());
+ } // for all lines with BOM
+
+ m_lines = null;
+ count = DB.getSQLValue (get_TrxName(), sql, getC_Invoice_ID ());
+ renumberLines (10);
+ } // while count != 0
+ } // explodeBOM
+
+ /**
+ * Calculate Tax and Total
+ * @return true if calculated
+ */
+ private boolean calculateTaxTotal()
+ {
+ log.fine("");
+ // Delete Taxes
+ DB.executeUpdate("DELETE C_InvoiceTax WHERE C_Invoice_ID=" + getC_Invoice_ID(), get_TrxName());
+ m_taxes = null;
+
+ // Lines
+ BigDecimal totalLines = Env.ZERO;
+ ArrayList taxList = new ArrayList();
+ MInvoiceLine[] lines = getLines(false);
+ for (int i = 0; i < lines.length; i++)
+ {
+ MInvoiceLine line = lines[i];
+ /** Sync ownership for SO
+ if (isSOTrx() && line.getAD_Org_ID() != getAD_Org_ID())
+ {
+ line.setAD_Org_ID(getAD_Org_ID());
+ line.save();
+ } **/
+ Integer taxID = new Integer(line.getC_Tax_ID());
+ if (!taxList.contains(taxID))
+ {
+ MInvoiceTax iTax = MInvoiceTax.get (line, getPrecision(),
+ false, get_TrxName()); // current Tax
+ if (iTax != null)
+ {
+ iTax.setIsTaxIncluded(isTaxIncluded());
+ if (!iTax.calculateTaxFromLines())
+ return false;
+ if (!iTax.save())
+ return false;
+ taxList.add(taxID);
+ }
+ }
+ totalLines = totalLines.add(line.getLineNetAmt());
+ }
+
+ // Taxes
+ BigDecimal grandTotal = totalLines;
+ MInvoiceTax[] taxes = getTaxes(true);
+ for (int i = 0; i < taxes.length; i++)
+ {
+ MInvoiceTax iTax = taxes[i];
+ MTax tax = iTax.getTax();
+ if (tax.isSummary())
+ {
+ MTax[] cTaxes = tax.getChildTaxes(false); // Multiple taxes
+ for (int j = 0; j < cTaxes.length; j++)
+ {
+ MTax cTax = cTaxes[j];
+ BigDecimal taxAmt = cTax.calculateTax(iTax.getTaxBaseAmt(), isTaxIncluded(), getPrecision());
+ //
+ MInvoiceTax newITax = new MInvoiceTax(getCtx(), 0, get_TrxName());
+ newITax.setClientOrg(this);
+ newITax.setC_Invoice_ID(getC_Invoice_ID());
+ newITax.setC_Tax_ID(cTax.getC_Tax_ID());
+ newITax.setPrecision(getPrecision());
+ newITax.setIsTaxIncluded(isTaxIncluded());
+ newITax.setTaxBaseAmt(iTax.getTaxBaseAmt());
+ newITax.setTaxAmt(taxAmt);
+ if (!newITax.save(get_TrxName()))
+ return false;
+ //
+ if (!isTaxIncluded())
+ grandTotal = grandTotal.add(taxAmt);
+ }
+ if (!iTax.delete(true, get_TrxName()))
+ return false;
+ }
+ else
+ {
+ if (!isTaxIncluded())
+ grandTotal = grandTotal.add(iTax.getTaxAmt());
+ }
+ }
+ //
+ setTotalLines(totalLines);
+ setGrandTotal(grandTotal);
+ return true;
+ } // calculateTaxTotal
+
+
+ /**
+ * (Re) Create Pay Schedule
+ * @return true if valid schedule
+ */
+ private boolean createPaySchedule()
+ {
+ if (getC_PaymentTerm_ID() == 0)
+ return false;
+ MPaymentTerm pt = new MPaymentTerm(getCtx(), getC_PaymentTerm_ID(), null);
+ log.fine(pt.toString());
+ return pt.apply(this); // calls validate pay schedule
+ } // createPaySchedule
+
+
+ /**
+ * Approve Document
+ * @return true if success
+ */
+ public boolean approveIt()
+ {
+ log.info(toString());
+ setIsApproved(true);
+ return true;
+ } // approveIt
+
+ /**
+ * Reject Approval
+ * @return true if success
+ */
+ public boolean rejectIt()
+ {
+ log.info(toString());
+ setIsApproved(false);
+ return true;
+ } // rejectIt
+
+ /**
+ * Complete Document
+ * @return new status (Complete, In Progress, Invalid, Waiting ..)
+ */
+ public String completeIt()
+ {
+ // Re-Check
+ if (!m_justPrepared)
+ {
+ String status = prepareIt();
+ if (!DocAction.STATUS_InProgress.equals(status))
+ return status;
+ }
+
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE);
+ if (m_processMsg != null)
+ return DocAction.STATUS_Invalid;
+
+ // Implicit Approval
+ if (!isApproved())
+ approveIt();
+ log.info(toString());
+ StringBuffer info = new StringBuffer();
+
+ //Modifications for cash payment
+ /*
+ // Create Cash
+ if (PAYMENTRULE_Cash.equals(getPaymentRule()))
+ {
+ // Modifications for POSterita
+ //
+ // MCash cash = MCash.get (getCtx(), getAD_Org_ID(),
+ // getDateInvoiced(), getC_Currency_ID(), get_TrxName());
+
+ MCash cash;
+
+ int posId = Env.getContextAsInt(getCtx(),Env.POS_ID);
+
+ if (posId != 0)
+ {
+ MPOSTerminal terminal = new MPOSTerminal(getCtx(), posId, get_TrxName()); // Posterita Terminal changes
+ int cashBookId = terminal.getC_CashBook_ID();
+ cash = MCash.get(getCtx(), cashBookId, getDateInvoiced(), get_TrxName());
+ }
+ else
+ {
+ cash = MCash.get (getCtx(), getAD_Org_ID(),
+ getDateInvoiced(), getC_Currency_ID(), get_TrxName());
+ }
+
+ // End Posterita Modifications
+
+ if (cash == null || cash.get_ID() == 0)
+ {
+ m_processMsg = "@NoCashBook@";
+ return DocAction.STATUS_Invalid;
+ }
+ MCashLine cl = new MCashLine (cash);
+ cl.setInvoice(this);
+ if (!cl.save(get_TrxName()))
+ {
+ m_processMsg = "Could not save Cash Journal Line";
+ return DocAction.STATUS_Invalid;
+ }
+ info.append("@C_Cash_ID@: " + cash.getName() + " #" + cl.getLine());
+ setC_CashLine_ID(cl.getC_CashLine_ID());
+ } // CashBook
+ */
+
+ // Update Order & Match
+ int matchInv = 0;
+ int matchPO = 0;
+ MInvoiceLine[] lines = getLines(false);
+ for (int i = 0; i < lines.length; i++)
+ {
+ MInvoiceLine line = lines[i];
+
+ // Update Order Line
+ MOrderLine ol = null;
+ if (line.getC_OrderLine_ID() != 0)
+ {
+ if (isSOTrx()
+ || line.getM_Product_ID() == 0)
+ {
+ ol = new MOrderLine (getCtx(), line.getC_OrderLine_ID(), get_TrxName());
+ if (line.getQtyInvoiced() != null)
+ ol.setQtyInvoiced(ol.getQtyInvoiced().add(line.getQtyInvoiced()));
+ if (!ol.save(get_TrxName()))
+ {
+ m_processMsg = "Could not update Order Line";
+ return DocAction.STATUS_Invalid;
+ }
+ }
+ // Order Invoiced Qty updated via Matching Inv-PO
+ else if (!isSOTrx()
+ && line.getM_Product_ID() != 0
+ && !isReversal())
+ {
+ // MatchPO is created also from MInOut when Invoice exists before Shipment
+ BigDecimal matchQty = line.getQtyInvoiced();
+ MMatchPO po = MMatchPO.create (line, null,
+ getDateInvoiced(), matchQty);
+ if (!po.save(get_TrxName()))
+ {
+ m_processMsg = "Could not create PO Matching";
+ return DocAction.STATUS_Invalid;
+ }
+ else
+ matchPO++;
+ }
+ }
+
+ // Matching - Inv-Shipment
+ if (!isSOTrx()
+ && line.getM_InOutLine_ID() != 0
+ && line.getM_Product_ID() != 0
+ && !isReversal())
+ {
+ MInOutLine receiptLine = new MInOutLine (getCtx(),line.getM_InOutLine_ID(), get_TrxName());
+ BigDecimal matchQty = line.getQtyInvoiced();
+
+ if (receiptLine.getMovementQty().compareTo(matchQty) < 0)
+ matchQty = receiptLine.getMovementQty();
+
+ MMatchInv inv = new MMatchInv(line, getDateInvoiced(), matchQty);
+ if (!inv.save(get_TrxName()))
+ {
+ m_processMsg = "Could not create Invoice Matching";
+ return DocAction.STATUS_Invalid;
+ }
+ else
+ matchInv++;
+ }
+ } // for all lines
+ if (matchInv > 0)
+ info.append(" @M_MatchInv_ID@#").append(matchInv).append(" ");
+ if (matchPO > 0)
+ info.append(" @M_MatchPO_ID@#").append(matchPO).append(" ");
+
+
+
+ // Update BP Statistics
+ MBPartner bp = new MBPartner (getCtx(), getC_BPartner_ID(), get_TrxName());
+ // Update total revenue and balance / credit limit (reversed on AllocationLine.processIt)
+ BigDecimal invAmt = MConversionRate.convertBase(getCtx(), getGrandTotal(true), // CM adjusted
+ getC_Currency_ID(), getDateAcct(), 0, getAD_Client_ID(), getAD_Org_ID());
+ if (invAmt == null)
+ {
+ m_processMsg = "Could not convert C_Currency_ID=" + getC_Currency_ID()
+ + " to base C_Currency_ID=" + MClient.get(Env.getCtx()).getC_Currency_ID();
+ return DocAction.STATUS_Invalid;
+ }
+ // Total Balance
+ BigDecimal newBalance = bp.getTotalOpenBalance(false);
+ if (newBalance == null)
+ newBalance = Env.ZERO;
+ if (isSOTrx())
+ {
+ newBalance = newBalance.add(invAmt);
+ //
+ if (bp.getFirstSale() == null)
+ bp.setFirstSale(getDateInvoiced());
+ BigDecimal newLifeAmt = bp.getActualLifeTimeValue();
+ if (newLifeAmt == null)
+ newLifeAmt = invAmt;
+ else
+ newLifeAmt = newLifeAmt.add(invAmt);
+ BigDecimal newCreditAmt = bp.getSO_CreditUsed();
+ if (newCreditAmt == null)
+ newCreditAmt = invAmt;
+ else
+ newCreditAmt = newCreditAmt.add(invAmt);
+ //
+ log.fine("GrandTotal=" + getGrandTotal(true) + "(" + invAmt
+ + ") BP Life=" + bp.getActualLifeTimeValue() + "->" + newLifeAmt
+ + ", Credit=" + bp.getSO_CreditUsed() + "->" + newCreditAmt
+ + ", Balance=" + bp.getTotalOpenBalance(false) + " -> " + newBalance);
+ bp.setActualLifeTimeValue(newLifeAmt);
+ bp.setSO_CreditUsed(newCreditAmt);
+ } // SO
+ else
+ {
+ newBalance = newBalance.subtract(invAmt);
+ log.fine("GrandTotal=" + getGrandTotal(true) + "(" + invAmt
+ + ") Balance=" + bp.getTotalOpenBalance(false) + " -> " + newBalance);
+ }
+ bp.setTotalOpenBalance(newBalance);
+ bp.setSOCreditStatus();
+ if (!bp.save(get_TrxName()))
+ {
+ m_processMsg = "Could not update Business Partner";
+ return DocAction.STATUS_Invalid;
+ }
+
+ // User - Last Result/Contact
+ if (getAD_User_ID() != 0)
+ {
+ MUser user = new MUser (getCtx(), getAD_User_ID(), get_TrxName());
+ user.setLastContact(new Timestamp(System.currentTimeMillis()));
+ user.setLastResult(Msg.translate(getCtx(), "C_Invoice_ID") + ": " + getDocumentNo());
+ if (!user.save(get_TrxName()))
+ {
+ m_processMsg = "Could not update Business Partner User";
+ return DocAction.STATUS_Invalid;
+ }
+ } // user
+
+ // Update Project
+ if (isSOTrx() && getC_Project_ID() != 0)
+ {
+ MProject project = new MProject (getCtx(), getC_Project_ID(), get_TrxName());
+ BigDecimal amt = getGrandTotal(true);
+ int C_CurrencyTo_ID = project.getC_Currency_ID();
+ if (C_CurrencyTo_ID != getC_Currency_ID())
+ amt = MConversionRate.convert(getCtx(), amt, getC_Currency_ID(), C_CurrencyTo_ID,
+ getDateAcct(), 0, getAD_Client_ID(), getAD_Org_ID());
+ if (amt == null)
+ {
+ m_processMsg = "Could not convert C_Currency_ID=" + getC_Currency_ID()
+ + " to Project C_Currency_ID=" + C_CurrencyTo_ID;
+ return DocAction.STATUS_Invalid;
+ }
+ BigDecimal newAmt = project.getInvoicedAmt();
+ if (newAmt == null)
+ newAmt = amt;
+ else
+ newAmt = newAmt.add(amt);
+ log.fine("GrandTotal=" + getGrandTotal(true) + "(" + amt
+ + ") Project " + project.getName()
+ + " - Invoiced=" + project.getInvoicedAmt() + "->" + newAmt);
+ project.setInvoicedAmt(newAmt);
+ if (!project.save(get_TrxName()))
+ {
+ m_processMsg = "Could not update Project";
+ return DocAction.STATUS_Invalid;
+ }
+ } // project
+
+ // User Validation
+ String valid = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_COMPLETE);
+ if (valid != null)
+ {
+ m_processMsg = valid;
+ return DocAction.STATUS_Invalid;
+ }
+
+ // Set the definite document number after completed (if needed)
+ setDefiniteDocumentNo();
+
+ // Counter Documents
+ MInvoice counter = createCounterDoc();
+ if (counter != null)
+ info.append(" - @CounterDoc@: @C_Invoice_ID@=").append(counter.getDocumentNo());
+
+ m_processMsg = info.toString().trim();
+ setProcessed(true);
+ setDocAction(DOCACTION_Close);
+ return DocAction.STATUS_Completed;
+ } // completeIt
+
+ /**
+ * Set the definite document number after completed
+ */
+ private void setDefiniteDocumentNo() {
+ MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
+ if (dt.isOverwriteDateOnComplete()) {
+ setDateInvoiced(new Timestamp (System.currentTimeMillis()));
+ }
+ if (dt.isOverwriteSeqOnComplete()) {
+ String value = DB.getDocumentNo(getC_DocType_ID(), get_TrxName(), true, this);
+ if (value != null)
+ setDocumentNo(value);
+ }
+ }
+
+ /**
+ * Create Counter Document
+ * @return counter invoice
+ */
+ private MInvoice createCounterDoc()
+ {
+ // Is this a counter doc ?
+ if (getRef_Invoice_ID() != 0)
+ return null;
+
+ // Org Must be linked to BPartner
+ MOrg org = MOrg.get(getCtx(), getAD_Org_ID());
+ int counterC_BPartner_ID = org.getLinkedC_BPartner_ID(get_TrxName());
+ if (counterC_BPartner_ID == 0)
+ return null;
+ // Business Partner needs to be linked to Org
+ MBPartner bp = new MBPartner (getCtx(), getC_BPartner_ID(), null);
+ int counterAD_Org_ID = bp.getAD_OrgBP_ID_Int();
+ if (counterAD_Org_ID == 0)
+ return null;
+
+ MBPartner counterBP = new MBPartner (getCtx(), counterC_BPartner_ID, null);
+ MOrgInfo counterOrgInfo = MOrgInfo.get(getCtx(), counterAD_Org_ID);
+ log.info("Counter BP=" + counterBP.getName());
+
+ // Document Type
+ int C_DocTypeTarget_ID = 0;
+ MDocTypeCounter counterDT = MDocTypeCounter.getCounterDocType(getCtx(), getC_DocType_ID());
+ if (counterDT != null)
+ {
+ log.fine(counterDT.toString());
+ if (!counterDT.isCreateCounter() || !counterDT.isValid())
+ return null;
+ C_DocTypeTarget_ID = counterDT.getCounter_C_DocType_ID();
+ }
+ else // indirect
+ {
+ C_DocTypeTarget_ID = MDocTypeCounter.getCounterDocType_ID(getCtx(), getC_DocType_ID());
+ log.fine("Indirect C_DocTypeTarget_ID=" + C_DocTypeTarget_ID);
+ if (C_DocTypeTarget_ID <= 0)
+ return null;
+ }
+
+ // Deep Copy
+ MInvoice counter = copyFrom(this, getDateInvoiced(),
+ C_DocTypeTarget_ID, !isSOTrx(), true, get_TrxName(), true);
+ //
+ counter.setAD_Org_ID(counterAD_Org_ID);
+ // counter.setM_Warehouse_ID(counterOrgInfo.getM_Warehouse_ID());
+ //
+ counter.setBPartner(counterBP);
+ // Refernces (Should not be required
+ counter.setSalesRep_ID(getSalesRep_ID());
+ counter.save(get_TrxName());
+
+ // Update copied lines
+ MInvoiceLine[] counterLines = counter.getLines(true);
+ for (int i = 0; i < counterLines.length; i++)
+ {
+ MInvoiceLine counterLine = counterLines[i];
+ counterLine.setClientOrg(counter);
+ counterLine.setInvoice(counter); // copies header values (BP, etc.)
+ counterLine.setPrice();
+ counterLine.setTax();
+ //
+ counterLine.save(get_TrxName());
+ }
+
+ log.fine(counter.toString());
+
+ // Document Action
+ if (counterDT != null)
+ {
+ if (counterDT.getDocAction() != null)
+ {
+ counter.setDocAction(counterDT.getDocAction());
+ counter.processIt(counterDT.getDocAction());
+ counter.save(get_TrxName());
+ }
+ }
+ return counter;
+ } // createCounterDoc
+
+ /**
+ * Void Document.
+ * @return true if success
+ */
+ public boolean voidIt()
+ {
+ log.info(toString());
+ // Before Void
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_VOID);
+ if (m_processMsg != null)
+ return false;
+
+ if (DOCSTATUS_Closed.equals(getDocStatus())
+ || DOCSTATUS_Reversed.equals(getDocStatus())
+ || DOCSTATUS_Voided.equals(getDocStatus()))
+ {
+ m_processMsg = "Document Closed: " + getDocStatus();
+ setDocAction(DOCACTION_None);
+ return false;
+ }
+
+ // Not Processed
+ if (DOCSTATUS_Drafted.equals(getDocStatus())
+ || DOCSTATUS_Invalid.equals(getDocStatus())
+ || DOCSTATUS_InProgress.equals(getDocStatus())
+ || DOCSTATUS_Approved.equals(getDocStatus())
+ || DOCSTATUS_NotApproved.equals(getDocStatus()) )
+ {
+ // Set lines to 0
+ MInvoiceLine[] lines = getLines(false);
+ for (int i = 0; i < lines.length; i++)
+ {
+ MInvoiceLine line = lines[i];
+ BigDecimal old = line.getQtyInvoiced();
+ if (old.compareTo(Env.ZERO) != 0)
+ {
+ line.setQty(Env.ZERO);
+ line.setTaxAmt(Env.ZERO);
+ line.setLineNetAmt(Env.ZERO);
+ line.setLineTotalAmt(Env.ZERO);
+ line.addDescription(Msg.getMsg(getCtx(), "Voided") + " (" + old + ")");
+ // Unlink Shipment
+ if (line.getM_InOutLine_ID() != 0)
+ {
+ MInOutLine ioLine = new MInOutLine(getCtx(), line.getM_InOutLine_ID(), get_TrxName());
+ ioLine.setIsInvoiced(false);
+ ioLine.save(get_TrxName());
+ line.setM_InOutLine_ID(0);
+ }
+ line.save(get_TrxName());
+ }
+ }
+ addDescription(Msg.getMsg(getCtx(), "Voided"));
+ setIsPaid(true);
+ setC_Payment_ID(0);
+ }
+ else
+ {
+ return reverseCorrectIt();
+ }
+
+ // After Void
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_VOID);
+ if (m_processMsg != null)
+ return false;
+
+ setProcessed(true);
+ setDocAction(DOCACTION_None);
+ return true;
+ } // voidIt
+
+ /**
+ * Close Document.
+ * @return true if success
+ */
+ public boolean closeIt()
+ {
+ log.info(toString());
+ // Before Close
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_CLOSE);
+ if (m_processMsg != null)
+ return false;
+
+ // After Close
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_CLOSE);
+ if (m_processMsg != null)
+ return false;
+
+ setProcessed(true);
+ setDocAction(DOCACTION_None);
+ return true;
+ } // closeIt
+
+ /**
+ * Reverse Correction - same date
+ * @return true if success
+ */
+ public boolean reverseCorrectIt()
+ {
+ log.info(toString());
+ // Before reverseCorrect
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSECORRECT);
+ if (m_processMsg != null)
+ return false;
+
+ MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
+ if (!MPeriod.isOpen(getCtx(), getDateAcct(), dt.getDocBaseType()))
+ {
+ m_processMsg = "@PeriodClosed@";
+ return false;
+ }
+ //
+ MAllocationHdr[] allocations = MAllocationHdr.getOfInvoice(getCtx(),
+ getC_Invoice_ID(), get_TrxName());
+ for (int i = 0; i < allocations.length; i++)
+ {
+ allocations[i].setDocAction(DocAction.ACTION_Reverse_Correct);
+ allocations[i].reverseCorrectIt();
+ allocations[i].save(get_TrxName());
+ }
+ // Reverse/Delete Matching
+ if (!isSOTrx())
+ {
+ MMatchInv[] mInv = MMatchInv.getInvoice(getCtx(), getC_Invoice_ID(), get_TrxName());
+ for (int i = 0; i < mInv.length; i++)
+ mInv[i].delete(true);
+ MMatchPO[] mPO = MMatchPO.getInvoice(getCtx(), getC_Invoice_ID(), get_TrxName());
+ for (int i = 0; i < mPO.length; i++)
+ {
+ if (mPO[i].getM_InOutLine_ID() == 0)
+ mPO[i].delete(true);
+ else
+ {
+ mPO[i].setC_InvoiceLine_ID(null);
+ mPO[i].save(get_TrxName());
+ }
+ }
+ }
+ //
+ load(get_TrxName()); // reload allocation reversal info
+
+ // Deep Copy
+ MInvoice reversal = copyFrom (this, getDateInvoiced(),
+ getC_DocType_ID(), isSOTrx(), false, get_TrxName(), true);
+ if (reversal == null)
+ {
+ m_processMsg = "Could not create Invoice Reversal";
+ return false;
+ }
+ reversal.setReversal(true);
+
+ // Reverse Line Qty
+ MInvoiceLine[] rLines = reversal.getLines(false);
+ for (int i = 0; i < rLines.length; i++)
+ {
+ MInvoiceLine rLine = rLines[i];
+ rLine.setQtyEntered(rLine.getQtyEntered().negate());
+ rLine.setQtyInvoiced(rLine.getQtyInvoiced().negate());
+ rLine.setLineNetAmt(rLine.getLineNetAmt().negate());
+ if (rLine.getTaxAmt() != null && rLine.getTaxAmt().compareTo(Env.ZERO) != 0)
+ rLine.setTaxAmt(rLine.getTaxAmt().negate());
+ if (rLine.getLineTotalAmt() != null && rLine.getLineTotalAmt().compareTo(Env.ZERO) != 0)
+ rLine.setLineTotalAmt(rLine.getLineTotalAmt().negate());
+ if (!rLine.save(get_TrxName()))
+ {
+ m_processMsg = "Could not correct Invoice Reversal Line";
+ return false;
+ }
+ }
+ reversal.setC_Order_ID(getC_Order_ID());
+ reversal.addDescription("{->" + getDocumentNo() + ")");
+ //
+ if (!reversal.processIt(DocAction.ACTION_Complete))
+ {
+ m_processMsg = "Reversal ERROR: " + reversal.getProcessMsg();
+ return false;
+ }
+ reversal.setC_Payment_ID(0);
+ reversal.setIsPaid(true);
+ reversal.closeIt();
+ reversal.setProcessing (false);
+ reversal.setDocStatus(DOCSTATUS_Reversed);
+ reversal.setDocAction(DOCACTION_None);
+ reversal.save(get_TrxName());
+ m_processMsg = reversal.getDocumentNo();
+ //
+ addDescription("(" + reversal.getDocumentNo() + "<-)");
+
+ // Clean up Reversed (this)
+ MInvoiceLine[] iLines = getLines(false);
+ for (int i = 0; i < iLines.length; i++)
+ {
+ MInvoiceLine iLine = iLines[i];
+ if (iLine.getM_InOutLine_ID() != 0)
+ {
+ MInOutLine ioLine = new MInOutLine(getCtx(), iLine.getM_InOutLine_ID(), get_TrxName());
+ ioLine.setIsInvoiced(false);
+ ioLine.save(get_TrxName());
+ // Reconsiliation
+ iLine.setM_InOutLine_ID(0);
+ iLine.save(get_TrxName());
+ }
+ }
+ setProcessed(true);
+ setDocStatus(DOCSTATUS_Reversed); // may come from void
+ setDocAction(DOCACTION_None);
+ setC_Payment_ID(0);
+ setIsPaid(true);
+
+ // Create Allocation
+ MAllocationHdr alloc = new MAllocationHdr(getCtx(), false, getDateAcct(),
+ getC_Currency_ID(),
+ Msg.translate(getCtx(), "C_Invoice_ID") + ": " + getDocumentNo() + "/" + reversal.getDocumentNo(),
+ get_TrxName());
+ alloc.setAD_Org_ID(getAD_Org_ID());
+ if (alloc.save())
+ {
+ // Amount
+ BigDecimal gt = getGrandTotal(true);
+ if (!isSOTrx())
+ gt = gt.negate();
+ // Orig Line
+ MAllocationLine aLine = new MAllocationLine (alloc, gt,
+ Env.ZERO, Env.ZERO, Env.ZERO);
+ aLine.setC_Invoice_ID(getC_Invoice_ID());
+ aLine.save();
+ // Reversal Line
+ MAllocationLine rLine = new MAllocationLine (alloc, gt.negate(),
+ Env.ZERO, Env.ZERO, Env.ZERO);
+ rLine.setC_Invoice_ID(reversal.getC_Invoice_ID());
+ rLine.save();
+ // Process It
+ if (alloc.processIt(DocAction.ACTION_Complete))
+ alloc.save();
+ }
+
+ //MZ Goodwill
+ if (!isSOTrx())
+ {
+ // delete Matched Invoice Cost Detail
+ MInvoiceLine[] lines = getLines();
+ for (int i = 0; i < lines.length; i++)
+ {
+ MCostDetail cd = MCostDetail.get (getCtx(), "C_InvoiceLine_ID=? AND M_AttributeSetInstance_ID=?",
+ lines[i].getC_InvoiceLine_ID(), lines[i].getM_AttributeSetInstance_ID(), get_TrxName());
+ if (cd != null)
+ {
+ cd.setProcessed(false);
+ cd.delete(true);
+ }
+ }
+ }
+ //End MZ
+ // After reverseCorrect
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSECORRECT);
+ if (m_processMsg != null)
+ return false;
+
+ return true;
+ } // reverseCorrectIt
+
+ /**
+ * Reverse Accrual - none
+ * @return false
+ */
+ public boolean reverseAccrualIt()
+ {
+ log.info(toString());
+ // Before reverseAccrual
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSEACCRUAL);
+ if (m_processMsg != null)
+ return false;
+
+ // After reverseAccrual
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSEACCRUAL);
+ if (m_processMsg != null)
+ return false;
+
+ return false;
+ } // reverseAccrualIt
+
+ /**
+ * Re-activate
+ * @return false
+ */
+ public boolean reActivateIt()
+ {
+ log.info(toString());
+ // Before reActivate
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REACTIVATE);
+ if (m_processMsg != null)
+ return false;
+
+ // After reActivate
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REACTIVATE);
+ if (m_processMsg != null)
+ return false;
+
+
+ return false;
+ } // reActivateIt
+
+
+ /*************************************************************************
+ * Get Summary
+ * @return Summary of Document
+ */
+ public String getSummary()
+ {
+ StringBuffer sb = new StringBuffer();
+ sb.append(getDocumentNo());
+ // : Grand Total = 123.00 (#1)
+ sb.append(": ").
+ append(Msg.translate(getCtx(),"GrandTotal")).append("=").append(getGrandTotal())
+ .append(" (#").append(getLines(false).length).append(")");
+ // - Description
+ if (getDescription() != null && getDescription().length() > 0)
+ sb.append(" - ").append(getDescription());
+ return sb.toString();
+ } // getSummary
+
+ /**
+ * Get Process Message
+ * @return clear text error message
+ */
+ public String getProcessMsg()
+ {
+ return m_processMsg;
+ } // getProcessMsg
+
+ /**
+ * Get Document Owner (Responsible)
+ * @return AD_User_ID
+ */
+ public int getDoc_User_ID()
+ {
+ return getSalesRep_ID();
+ } // getDoc_User_ID
+
+ /**
+ * Get Document Approval Amount
+ * @return amount
+ */
+ public BigDecimal getApprovalAmt()
+ {
+ return getGrandTotal();
+ } // getApprovalAmt
+
+ /**
+ *
+ * @param rma
+ */
+ public void setRMA(MRMA rma)
+ {
+ setM_RMA_ID(rma.getM_RMA_ID());
+ setAD_Org_ID(rma.getAD_Org_ID());
+ setDescription(rma.getDescription());
+ setC_BPartner_ID(rma.getC_BPartner_ID());
+ setSalesRep_ID(rma.getSalesRep_ID());
+
+ setGrandTotal(rma.getAmt());
+ setIsSOTrx(rma.isSOTrx());
+ setTotalLines(rma.getAmt());
+
+ MInvoice originalInvoice = rma.getOriginalInvoice();
+
+ if (originalInvoice == null)
+ {
+ throw new IllegalStateException("Not invoiced - RMA: " + rma.getDocumentNo());
+ }
+
+ setC_BPartner_Location_ID(originalInvoice.getC_BPartner_Location_ID());
+ setAD_User_ID(originalInvoice.getAD_User_ID());
+ setC_Currency_ID(originalInvoice.getC_Currency_ID());
+ setIsTaxIncluded(originalInvoice.isTaxIncluded());
+ setM_PriceList_ID(originalInvoice.getM_PriceList_ID());
+ setC_Project_ID(originalInvoice.getC_Project_ID());
+ setC_Activity_ID(originalInvoice.getC_Activity_ID());
+ setC_Campaign_ID(originalInvoice.getC_Campaign_ID());
+ setUser1_ID(originalInvoice.getUser1_ID());
+ setUser2_ID(originalInvoice.getUser2_ID());
+ }
+
+} // MInvoice
diff --git a/posterita/posterita/src/main/org/compiere/model/MOrder.java b/posterita/posterita/src/main/org/compiere/model/MOrder.java
new file mode 100644
index 0000000000..a92f1f3adb
--- /dev/null
+++ b/posterita/posterita/src/main/org/compiere/model/MOrder.java
@@ -0,0 +1,2330 @@
+/******************************************************************************
+ * Product: Adempiere ERP & CRM Smart Business Solution *
+ * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
+ * This program is free software; you can redistribute it and/or modify it *
+ * under the terms version 2 of the GNU General Public License as published *
+ * by the Free Software Foundation. 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, write to the Free Software Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
+ * For the text or an alternative of this public license, you may reach us *
+ * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
+ * or via info@compiere.org or http://www.compiere.org/license.html *
+ *****************************************************************************/
+package org.compiere.model;
+
+import java.io.File;
+import java.math.BigDecimal;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.Properties;
+import java.util.logging.Level;
+
+import org.compiere.print.ReportEngine;
+import org.compiere.process.DocAction;
+import org.compiere.process.DocumentEngine;
+import org.compiere.util.DB;
+import org.compiere.util.Env;
+import org.compiere.util.Msg;
+
+/**
+ * Order Model.
+ * Please do not set DocStatus and C_DocType_ID directly.
+ * They are set in the process() method.
+ * Use DocAction and C_DocTypeTarget_ID instead.
+ *
+ * @author Jorg Janke
+ * @version $Id: MOrder.java,v 1.5 2006/10/06 00:42:24 jjanke Exp $
+ */
+public class MOrder extends X_C_Order implements DocAction
+{
+ /**
+ * Create new Order by copying
+ * @param from order
+ * @param dateDoc date of the document date
+ * @param C_DocTypeTarget_ID target document type
+ * @param isSOTrx sales order
+ * @param counter create counter links
+ * @param copyASI copy line attributes Attribute Set Instance, Resaouce Assignment
+ * @param trxName trx
+ * @return Order
+ */
+ public static MOrder copyFrom (MOrder from, Timestamp dateDoc,
+ int C_DocTypeTarget_ID, boolean isSOTrx, boolean counter, boolean copyASI,
+ String trxName)
+ {
+ MOrder to = new MOrder (from.getCtx(), 0, trxName);
+ to.set_TrxName(trxName);
+ PO.copyValues(from, to, from.getAD_Client_ID(), from.getAD_Org_ID());
+ to.set_ValueNoCheck ("C_Order_ID", I_ZERO);
+ to.set_ValueNoCheck ("DocumentNo", null);
+ //
+ to.setDocStatus (DOCSTATUS_Drafted); // Draft
+ to.setDocAction(DOCACTION_Complete);
+ //
+ to.setC_DocType_ID(0);
+ to.setC_DocTypeTarget_ID (C_DocTypeTarget_ID);
+ to.setIsSOTrx(isSOTrx);
+ //
+ to.setIsSelected (false);
+ to.setDateOrdered (dateDoc);
+ to.setDateAcct (dateDoc);
+ to.setDatePromised (dateDoc); // assumption
+ to.setDatePrinted(null);
+ to.setIsPrinted (false);
+ //
+ to.setIsApproved (false);
+ to.setIsCreditApproved(false);
+ to.setC_Payment_ID(0);
+ to.setC_CashLine_ID(0);
+ // Amounts are updated when adding lines
+ to.setGrandTotal(Env.ZERO);
+ to.setTotalLines(Env.ZERO);
+ //
+ to.setIsDelivered(false);
+ to.setIsInvoiced(false);
+ to.setIsSelfService(false);
+ to.setIsTransferred (false);
+ to.setPosted (false);
+ to.setProcessed (false);
+ if (counter)
+ to.setRef_Order_ID(from.getC_Order_ID());
+ else
+ to.setRef_Order_ID(0);
+ //
+ if (!to.save(trxName))
+ throw new IllegalStateException("Could not create Order");
+ if (counter)
+ from.setRef_Order_ID(to.getC_Order_ID());
+
+ if (to.copyLinesFrom(from, counter, copyASI) == 0)
+ throw new IllegalStateException("Could not create Order Lines");
+
+ return to;
+ } // copyFrom
+
+
+ /**************************************************************************
+ * Default Constructor
+ * @param ctx context
+ * @param C_Order_ID order to load, (0 create new order)
+ * @param trxName trx name
+ */
+ public MOrder(Properties ctx, int C_Order_ID, String trxName)
+ {
+ super (ctx, C_Order_ID, trxName);
+ // New
+ if (C_Order_ID == 0)
+ {
+ setDocStatus(DOCSTATUS_Drafted);
+ setDocAction (DOCACTION_Prepare);
+ //
+ setDeliveryRule (DELIVERYRULE_Availability);
+ setFreightCostRule (FREIGHTCOSTRULE_FreightIncluded);
+ setInvoiceRule (INVOICERULE_Immediate);
+ setPaymentRule(PAYMENTRULE_OnCredit);
+ setPriorityRule (PRIORITYRULE_Medium);
+ setDeliveryViaRule (DELIVERYVIARULE_Pickup);
+ //
+ setIsDiscountPrinted (false);
+ setIsSelected (false);
+ setIsTaxIncluded (false);
+ setIsSOTrx (true);
+ setIsDropShip(false);
+ setSendEMail (false);
+ //
+ setIsApproved(false);
+ setIsPrinted(false);
+ setIsCreditApproved(false);
+ setIsDelivered(false);
+ setIsInvoiced(false);
+ setIsTransferred(false);
+ setIsSelfService(false);
+ //
+ super.setProcessed(false);
+ setProcessing(false);
+ setPosted(false);
+
+ setDateAcct (new Timestamp(System.currentTimeMillis()));
+ setDatePromised (new Timestamp(System.currentTimeMillis()));
+ setDateOrdered (new Timestamp(System.currentTimeMillis()));
+
+ setFreightAmt (Env.ZERO);
+ setChargeAmt (Env.ZERO);
+ setTotalLines (Env.ZERO);
+ setGrandTotal (Env.ZERO);
+ }
+ } // MOrder
+
+ /**************************************************************************
+ * Project Constructor
+ * @param project Project to create Order from
+ * @param IsSOTrx sales order
+ * @param DocSubTypeSO if SO DocType Target (default DocSubTypeSO_OnCredit)
+ */
+ public MOrder (MProject project, boolean IsSOTrx, String DocSubTypeSO)
+ {
+ this (project.getCtx(), 0, project.get_TrxName());
+ setAD_Client_ID(project.getAD_Client_ID());
+ setAD_Org_ID(project.getAD_Org_ID());
+ setC_Campaign_ID(project.getC_Campaign_ID());
+ setSalesRep_ID(project.getSalesRep_ID());
+ //
+ setC_Project_ID(project.getC_Project_ID());
+ setDescription(project.getName());
+ Timestamp ts = project.getDateContract();
+ if (ts != null)
+ setDateOrdered (ts);
+ ts = project.getDateFinish();
+ if (ts != null)
+ setDatePromised (ts);
+ //
+ setC_BPartner_ID(project.getC_BPartner_ID());
+ setC_BPartner_Location_ID(project.getC_BPartner_Location_ID());
+ setAD_User_ID(project.getAD_User_ID());
+ //
+ setM_Warehouse_ID(project.getM_Warehouse_ID());
+ setM_PriceList_ID(project.getM_PriceList_ID());
+ setC_PaymentTerm_ID(project.getC_PaymentTerm_ID());
+ //
+ setIsSOTrx(IsSOTrx);
+ if (IsSOTrx)
+ {
+ if (DocSubTypeSO == null || DocSubTypeSO.length() == 0)
+ setC_DocTypeTarget_ID(DocSubTypeSO_OnCredit);
+ else
+ setC_DocTypeTarget_ID(DocSubTypeSO);
+ }
+ else
+ setC_DocTypeTarget_ID();
+ } // MOrder
+
+ /**
+ * Load Constructor
+ * @param ctx context
+ * @param rs result set record
+ * @param trxName transaction
+ */
+ public MOrder (Properties ctx, ResultSet rs, String trxName)
+ {
+ super(ctx, rs, trxName);
+ } // MOrder
+
+ /** Order Lines */
+ private MOrderLine[] m_lines = null;
+ /** Tax Lines */
+ private MOrderTax[] m_taxes = null;
+ /** Force Creation of order */
+ private boolean m_forceCreation = false;
+
+ /**
+ * Overwrite Client/Org if required
+ * @param AD_Client_ID client
+ * @param AD_Org_ID org
+ */
+ public void setClientOrg (int AD_Client_ID, int AD_Org_ID)
+ {
+ super.setClientOrg(AD_Client_ID, AD_Org_ID);
+ } // setClientOrg
+
+
+ /**
+ * Add to Description
+ * @param description text
+ */
+ public void addDescription (String description)
+ {
+ String desc = getDescription();
+ if (desc == null)
+ setDescription(description);
+ else
+ setDescription(desc + " | " + description);
+ } // addDescription
+
+ /**
+ * Set Business Partner (Ship+Bill)
+ * @param C_BPartner_ID bpartner
+ */
+ public void setC_BPartner_ID (int C_BPartner_ID)
+ {
+ super.setC_BPartner_ID (C_BPartner_ID);
+ super.setBill_BPartner_ID (C_BPartner_ID);
+ } // setC_BPartner_ID
+
+ /**
+ * Set Business Partner Location (Ship+Bill)
+ * @param C_BPartner_Location_ID bp location
+ */
+ public void setC_BPartner_Location_ID (int C_BPartner_Location_ID)
+ {
+ super.setC_BPartner_Location_ID (C_BPartner_Location_ID);
+ super.setBill_Location_ID(C_BPartner_Location_ID);
+ } // setC_BPartner_Location_ID
+
+ /**
+ * Set Business Partner Contact (Ship+Bill)
+ * @param AD_User_ID user
+ */
+ public void setAD_User_ID (int AD_User_ID)
+ {
+ super.setAD_User_ID (AD_User_ID);
+ super.setBill_User_ID (AD_User_ID);
+ } // setAD_User_ID
+
+ /**
+ * Set Ship Business Partner
+ * @param C_BPartner_ID bpartner
+ */
+ public void setShip_BPartner_ID (int C_BPartner_ID)
+ {
+ super.setC_BPartner_ID (C_BPartner_ID);
+ } // setShip_BPartner_ID
+
+ /**
+ * Set Ship Business Partner Location
+ * @param C_BPartner_Location_ID bp location
+ */
+ public void setShip_Location_ID (int C_BPartner_Location_ID)
+ {
+ super.setC_BPartner_Location_ID (C_BPartner_Location_ID);
+ } // setShip_Location_ID
+
+ /**
+ * Set Ship Business Partner Contact
+ * @param AD_User_ID user
+ */
+ public void setShip_User_ID (int AD_User_ID)
+ {
+ super.setAD_User_ID (AD_User_ID);
+ } // setShip_User_ID
+
+
+ /**
+ * Set Warehouse
+ * @param M_Warehouse_ID warehouse
+ */
+ public void setM_Warehouse_ID (int M_Warehouse_ID)
+ {
+ super.setM_Warehouse_ID (M_Warehouse_ID);
+ } // setM_Warehouse_ID
+
+ /**
+ * Set Drop Ship
+ * @param IsDropShip drop ship
+ */
+ public void setIsDropShip (boolean IsDropShip)
+ {
+ super.setIsDropShip (IsDropShip);
+ } // setIsDropShip
+
+ /*************************************************************************/
+
+ /** Sales Order Sub Type - SO */
+ public static final String DocSubTypeSO_Standard = "SO";
+ /** Sales Order Sub Type - OB */
+ public static final String DocSubTypeSO_Quotation = "OB";
+ /** Sales Order Sub Type - ON */
+ public static final String DocSubTypeSO_Proposal = "ON";
+ /** Sales Order Sub Type - PR */
+ public static final String DocSubTypeSO_Prepay = "PR";
+ /** Sales Order Sub Type - WR */
+ public static final String DocSubTypeSO_POS = "WR";
+ /** Sales Order Sub Type - WP */
+ public static final String DocSubTypeSO_Warehouse = "WP";
+ /** Sales Order Sub Type - WI */
+ public static final String DocSubTypeSO_OnCredit = "WI";
+ /** Sales Order Sub Type - RM */
+ public static final String DocSubTypeSO_RMA = "RM";
+
+ /**
+ * Set Target Sales Document Type
+ * @param DocSubTypeSO_x SO sub type - see DocSubTypeSO_*
+ */
+ public void setC_DocTypeTarget_ID (String DocSubTypeSO_x)
+ {
+ String sql = "SELECT C_DocType_ID FROM C_DocType "
+ + "WHERE AD_Client_ID=? AND AD_Org_ID IN (0," + getAD_Org_ID()
+ + ") AND DocSubTypeSO=? "
+ + "ORDER BY AD_Org_ID DESC, IsDefault DESC";
+ int C_DocType_ID = DB.getSQLValue(null, sql, getAD_Client_ID(), DocSubTypeSO_x);
+ if (C_DocType_ID <= 0)
+ log.severe ("Not found for AD_Client_ID=" + getAD_Client_ID () + ", SubType=" + DocSubTypeSO_x);
+ else
+ {
+ log.fine("(SO) - " + DocSubTypeSO_x);
+ setC_DocTypeTarget_ID (C_DocType_ID);
+ setIsSOTrx(true);
+ }
+ } // setC_DocTypeTarget_ID
+
+ /**
+ * Set Target Document Type.
+ * Standard Order or PO
+ */
+ public void setC_DocTypeTarget_ID ()
+ {
+ if (isSOTrx()) // SO = Std Order
+ {
+ setC_DocTypeTarget_ID(DocSubTypeSO_Standard);
+ return;
+ }
+ // PO
+ String sql = "SELECT C_DocType_ID FROM C_DocType "
+ + "WHERE AD_Client_ID=? AND AD_Org_ID IN (0," + getAD_Org_ID()
+ + ") AND DocBaseType='POO' "
+ + "ORDER BY AD_Org_ID DESC, IsDefault DESC";
+ int C_DocType_ID = DB.getSQLValue(null, sql, getAD_Client_ID());
+ if (C_DocType_ID <= 0)
+ log.severe ("No POO found for AD_Client_ID=" + getAD_Client_ID ());
+ else
+ {
+ log.fine("(PO) - " + C_DocType_ID);
+ setC_DocTypeTarget_ID (C_DocType_ID);
+ }
+ } // setC_DocTypeTarget_ID
+
+
+ /**
+ * Set Business Partner Defaults & Details.
+ * SOTrx should be set.
+ * @param bp business partner
+ */
+ public void setBPartner (MBPartner bp)
+ {
+ if (bp == null)
+ return;
+
+ setC_BPartner_ID(bp.getC_BPartner_ID());
+ // Defaults Payment Term
+ int ii = 0;
+ if (isSOTrx())
+ ii = bp.getC_PaymentTerm_ID();
+ else
+ ii = bp.getPO_PaymentTerm_ID();
+ if (ii != 0)
+ setC_PaymentTerm_ID(ii);
+ // Default Price List
+ if (isSOTrx())
+ ii = bp.getM_PriceList_ID();
+ else
+ ii = bp.getPO_PriceList_ID();
+ if (ii != 0)
+ setM_PriceList_ID(ii);
+ // Default Delivery/Via Rule
+ String ss = bp.getDeliveryRule();
+ if (ss != null)
+ setDeliveryRule(ss);
+ ss = bp.getDeliveryViaRule();
+ if (ss != null)
+ setDeliveryViaRule(ss);
+ // Default Invoice/Payment Rule
+ ss = bp.getInvoiceRule();
+ if (ss != null)
+ setInvoiceRule(ss);
+ ss = bp.getPaymentRule();
+ if (ss != null)
+ setPaymentRule(ss);
+ // Sales Rep
+ ii = bp.getSalesRep_ID();
+ if (ii != 0)
+ setSalesRep_ID(ii);
+
+
+ // Set Locations
+ MBPartnerLocation[] locs = bp.getLocations(false);
+ if (locs != null)
+ {
+ for (int i = 0; i < locs.length; i++)
+ {
+ if (locs[i].isShipTo())
+ super.setC_BPartner_Location_ID(locs[i].getC_BPartner_Location_ID());
+ if (locs[i].isBillTo())
+ setBill_Location_ID(locs[i].getC_BPartner_Location_ID());
+ }
+ // set to first
+ if (getC_BPartner_Location_ID() == 0 && locs.length > 0)
+ super.setC_BPartner_Location_ID(locs[0].getC_BPartner_Location_ID());
+ if (getBill_Location_ID() == 0 && locs.length > 0)
+ setBill_Location_ID(locs[0].getC_BPartner_Location_ID());
+ }
+ if (getC_BPartner_Location_ID() == 0)
+ log.log(Level.SEVERE, "MOrder.setBPartner - Has no Ship To Address: " + bp);
+ if (getBill_Location_ID() == 0)
+ log.log(Level.SEVERE, "MOrder.setBPartner - Has no Bill To Address: " + bp);
+
+ // Set Contact
+ MUser[] contacts = bp.getContacts(false);
+ if (contacts != null && contacts.length == 1)
+ setAD_User_ID(contacts[0].getAD_User_ID());
+ } // setBPartner
+
+
+ /**
+ * Copy Lines From other Order
+ * @param otherOrder order
+ * @param counter set counter info
+ * @param copyASI copy line attributes Attribute Set Instance, Resaouce Assignment
+ * @return number of lines copied
+ */
+ public int copyLinesFrom (MOrder otherOrder, boolean counter, boolean copyASI)
+ {
+ if (isProcessed() || isPosted() || otherOrder == null)
+ return 0;
+ MOrderLine[] fromLines = otherOrder.getLines(false, null);
+ int count = 0;
+ for (int i = 0; i < fromLines.length; i++)
+ {
+ MOrderLine line = new MOrderLine (this);
+ PO.copyValues(fromLines[i], line, getAD_Client_ID(), getAD_Org_ID());
+ line.setC_Order_ID(getC_Order_ID());
+ line.setOrder(this);
+ line.set_ValueNoCheck ("C_OrderLine_ID", I_ZERO); // new
+ // References
+ if (!copyASI)
+ {
+ line.setM_AttributeSetInstance_ID(0);
+ line.setS_ResourceAssignment_ID(0);
+ }
+ if (counter)
+ line.setRef_OrderLine_ID(fromLines[i].getC_OrderLine_ID());
+ else
+ line.setRef_OrderLine_ID(0);
+ //
+ line.setQtyDelivered(Env.ZERO);
+ line.setQtyInvoiced(Env.ZERO);
+ line.setQtyReserved(Env.ZERO);
+ line.setDateDelivered(null);
+ line.setDateInvoiced(null);
+ // Tax
+ if (getC_BPartner_ID() != otherOrder.getC_BPartner_ID())
+ line.setTax(); // recalculate
+ //
+ //
+ line.setProcessed(false);
+ if (line.save(get_TrxName()))
+ count++;
+ // Cross Link
+ if (counter)
+ {
+ fromLines[i].setRef_OrderLine_ID(line.getC_OrderLine_ID());
+ fromLines[i].save(get_TrxName());
+ }
+ }
+ if (fromLines.length != count)
+ log.log(Level.SEVERE, "Line difference - From=" + fromLines.length + " <> Saved=" + count);
+ return count;
+ } // copyLinesFrom
+
+
+ /**************************************************************************
+ * String Representation
+ * @return info
+ */
+ public String toString ()
+ {
+ StringBuffer sb = new StringBuffer ("MOrder[")
+ .append(get_ID()).append("-").append(getDocumentNo())
+ .append(",IsSOTrx=").append(isSOTrx())
+ .append(",C_DocType_ID=").append(getC_DocType_ID())
+ .append(", GrandTotal=").append(getGrandTotal())
+ .append ("]");
+ return sb.toString ();
+ } // toString
+
+ /**
+ * Get Document Info
+ * @return document info (untranslated)
+ */
+ public String getDocumentInfo()
+ {
+ MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
+ return dt.getName() + " " + getDocumentNo();
+ } // getDocumentInfo
+
+ /**
+ * Create PDF
+ * @return File or null
+ */
+ public File createPDF ()
+ {
+ try
+ {
+ File temp = File.createTempFile(get_TableName()+get_ID()+"_", ".pdf");
+ return createPDF (temp);
+ }
+ catch (Exception e)
+ {
+ log.severe("Could not create PDF - " + e.getMessage());
+ }
+ return null;
+ } // getPDF
+
+ /**
+ * Create PDF file
+ * @param file output file
+ * @return file if success
+ */
+ public File createPDF (File file)
+ {
+ ReportEngine re = ReportEngine.get (getCtx(), ReportEngine.ORDER, getC_Order_ID());
+ if (re == null)
+ return null;
+ return re.getPDF(file);
+ } // createPDF
+
+ /**
+ * Set Price List (and Currency, TaxIncluded) when valid
+ * @param M_PriceList_ID price list
+ */
+ public void setM_PriceList_ID (int M_PriceList_ID)
+ {
+ MPriceList pl = MPriceList.get(getCtx(), M_PriceList_ID, null);
+ if (pl.get_ID() == M_PriceList_ID)
+ {
+ super.setM_PriceList_ID(M_PriceList_ID);
+ setC_Currency_ID(pl.getC_Currency_ID());
+ setIsTaxIncluded(pl.isTaxIncluded());
+ }
+ } // setM_PriceList_ID
+
+
+ /**************************************************************************
+ * Get Lines of Order
+ * @param whereClause where clause or null (starting with AND)
+ * @param orderClause order clause
+ * @return lines
+ */
+ public MOrderLine[] getLines (String whereClause, String orderClause)
+ {
+ ArrayList list = new ArrayList ();
+ StringBuffer sql = new StringBuffer("SELECT * FROM C_OrderLine WHERE C_Order_ID=? ");
+ if (whereClause != null)
+ sql.append(whereClause);
+ if (orderClause != null)
+ sql.append(" ").append(orderClause);
+ PreparedStatement pstmt = null;
+ ResultSet rs = null;
+ try
+ {
+ pstmt = DB.prepareStatement(sql.toString(), get_TrxName());
+ pstmt.setInt(1, getC_Order_ID());
+ rs = pstmt.executeQuery();
+ while (rs.next())
+ {
+ MOrderLine ol = new MOrderLine(getCtx(), rs, get_TrxName());
+ ol.setHeaderInfo (this);
+ list.add(ol);
+ }
+ }
+ catch (Exception e)
+ {
+ log.log(Level.SEVERE, sql.toString(), e);
+ }
+ finally
+ {
+ DB.close(rs, pstmt);
+ rs = null; pstmt = null;
+ }
+ //
+ MOrderLine[] lines = new MOrderLine[list.size ()];
+ list.toArray (lines);
+ return lines;
+ } // getLines
+
+ /**
+ * Get Lines of Order
+ * @param requery requery
+ * @param orderBy optional order by column
+ * @return lines
+ */
+ public MOrderLine[] getLines (boolean requery, String orderBy)
+ {
+ if (m_lines != null && !requery) {
+ set_TrxName(m_lines, get_TrxName());
+ return m_lines;
+ }
+ //
+ String orderClause = "ORDER BY ";
+ if (orderBy != null && orderBy.length() > 0)
+ orderClause += orderBy;
+ else
+ orderClause += "Line";
+ m_lines = getLines(null, orderClause);
+ return m_lines;
+ } // getLines
+
+ /**
+ * Get Lines of Order.
+ * (useb by web store)
+ * @return lines
+ */
+ public MOrderLine[] getLines()
+ {
+ return getLines(false, null);
+ } // getLines
+
+ /**
+ * Renumber Lines
+ * @param step start and step
+ */
+ public void renumberLines (int step)
+ {
+ int number = step;
+ MOrderLine[] lines = getLines(true, null); // Line is default
+ for (int i = 0; i < lines.length; i++)
+ {
+ MOrderLine line = lines[i];
+ line.setLine(number);
+ line.save(get_TrxName());
+ number += step;
+ }
+ m_lines = null;
+ } // renumberLines
+
+ /**
+ * Does the Order Line belong to this Order
+ * @param C_OrderLine_ID line
+ * @return true if part of the order
+ */
+ public boolean isOrderLine(int C_OrderLine_ID)
+ {
+ if (m_lines == null)
+ getLines();
+ for (int i = 0; i < m_lines.length; i++)
+ if (m_lines[i].getC_OrderLine_ID() == C_OrderLine_ID)
+ return true;
+ return false;
+ } // isOrderLine
+
+ /**
+ * Get Taxes of Order
+ * @param requery requery
+ * @return array of taxes
+ */
+ public MOrderTax[] getTaxes(boolean requery)
+ {
+ if (m_taxes != null && !requery)
+ return m_taxes;
+ //
+ ArrayList list = new ArrayList();
+ String sql = "SELECT * FROM C_OrderTax WHERE C_Order_ID=?";
+ PreparedStatement pstmt = null;
+ try
+ {
+ pstmt = DB.prepareStatement(sql, get_TrxName());
+ pstmt.setInt(1, getC_Order_ID());
+ ResultSet rs = pstmt.executeQuery();
+ while (rs.next())
+ list.add(new MOrderTax(getCtx(), rs, get_TrxName()));
+ rs.close();
+ pstmt.close();
+ pstmt = null;
+ }
+ catch (Exception e)
+ {
+ log.log(Level.SEVERE, "getTaxes", e);
+ }
+ finally
+ {
+ try
+ {
+ if (pstmt != null)
+ pstmt.close ();
+ }
+ catch (Exception e)
+ {}
+ pstmt = null;
+ }
+ //
+ m_taxes = new MOrderTax[list.size ()];
+ list.toArray (m_taxes);
+ return m_taxes;
+ } // getTaxes
+
+
+ /**
+ * Get Invoices of Order
+ * @return invoices
+ */
+ public MInvoice[] getInvoices()
+ {
+ ArrayList list = new ArrayList();
+ String sql = " SELECT DISTINCT i.* FROM C_InvoiceLine il " +
+ "INNER JOIN C_OrderLine ol ON (ol.C_OrderLine_ID = il.C_OrderLine_ID) " +
+ "INNER JOIN C_Order o ON (o.C_Order_ID = ol.C_Order_ID) " +
+ "INNER JOIN C_Invoice i ON (i.C_Invoice_ID = il.C_Invoice_ID) " +
+ "WHERE o.C_Order_ID=? " +
+ "ORDER BY i.Created DESC";
+ PreparedStatement pstmt = null;
+ ResultSet rs = null;
+ try
+ {
+ pstmt = DB.prepareStatement(sql, get_TrxName());
+ pstmt.setInt(1, getC_Order_ID());
+ rs = pstmt.executeQuery();
+ while (rs.next())
+ list.add(new MInvoice(getCtx(), rs, get_TrxName()));
+ }
+ catch (Exception e)
+ {
+ log.log(Level.SEVERE, sql, e);
+ }
+ finally
+ {
+ DB.close(rs, pstmt);
+ rs = null; pstmt = null;
+ }
+ //
+ MInvoice[] retValue = new MInvoice[list.size()];
+ list.toArray(retValue);
+ return retValue;
+ } // getInvoices
+
+ /**
+ * Get latest Invoice of Order
+ * @return invoice id or 0
+ */
+ public int getC_Invoice_ID()
+ {
+ int C_Invoice_ID = 0;
+ String sql = "SELECT C_Invoice_ID FROM C_Invoice "
+ + "WHERE C_Order_ID=? AND DocStatus IN ('CO','CL') "
+ + "ORDER BY Created DESC";
+ PreparedStatement pstmt = null;
+ ResultSet rs = null;
+ try
+ {
+ pstmt = DB.prepareStatement(sql, get_TrxName());
+ pstmt.setInt(1, getC_Order_ID());
+ rs = pstmt.executeQuery();
+ if (rs.next())
+ C_Invoice_ID = rs.getInt(1);
+ }
+ catch (Exception e)
+ {
+ log.log(Level.SEVERE, "getC_Invoice_ID", e);
+ }
+ finally
+ {
+ DB.close(rs, pstmt);
+ rs = null; pstmt = null;
+ }
+ return C_Invoice_ID;
+ } // getC_Invoice_ID
+
+
+ /**
+ * Get Shipments of Order
+ * @return shipments
+ */
+ public MInOut[] getShipments()
+ {
+ ArrayList list = new ArrayList();
+ String sql = "SELECT DISTINCT io.* FROM M_InOutLine iol " +
+ "INNER JOIN M_InOut io ON (io.M_InOut_ID = iol.M_InOut_ID) " +
+ "INNER JOIN C_ORDERLINE ol ON (ol.C_ORDERLINE_ID=iol.C_ORDERLINE_ID) " +
+ "INNER JOIN C_ORDER o ON (o.C_ORDER_ID=ol.C_ORDER_ID) " +
+ "WHERE o.C_ORDER_ID=? " +
+ "ORDER BY io.Created DESC";
+
+ PreparedStatement pstmt = null;
+ ResultSet rs = null;
+ try
+ {
+ pstmt = DB.prepareStatement(sql, get_TrxName());
+ pstmt.setInt(1, getC_Order_ID());
+ rs = pstmt.executeQuery();
+ while (rs.next())
+ list.add(new MInOut(getCtx(), rs, get_TrxName()));
+ }
+ catch (Exception e)
+ {
+ log.log(Level.SEVERE, sql, e);
+ }
+ finally
+ {
+ DB.close(rs, pstmt);
+ rs = null; pstmt = null;
+ }
+ //
+ MInOut[] retValue = new MInOut[list.size()];
+ list.toArray(retValue);
+ return retValue;
+ } // getShipments
+
+ /**
+ * Get ISO Code of Currency
+ * @return Currency ISO
+ */
+ public String getCurrencyISO()
+ {
+ return MCurrency.getISO_Code (getCtx(), getC_Currency_ID());
+ } // getCurrencyISO
+
+ /**
+ * Get Currency Precision
+ * @return precision
+ */
+ public int getPrecision()
+ {
+ return MCurrency.getStdPrecision(getCtx(), getC_Currency_ID());
+ } // getPrecision
+
+ /**
+ * Get Document Status
+ * @return Document Status Clear Text
+ */
+ public String getDocStatusName()
+ {
+ return MRefList.getListName(getCtx(), 131, getDocStatus());
+ } // getDocStatusName
+
+ /**
+ * Set DocAction
+ * @param DocAction doc action
+ */
+ public void setDocAction (String DocAction)
+ {
+ setDocAction (DocAction, false);
+ } // setDocAction
+
+ /**
+ * Set DocAction
+ * @param DocAction doc oction
+ * @param forceCreation force creation
+ */
+ public void setDocAction (String DocAction, boolean forceCreation)
+ {
+ super.setDocAction (DocAction);
+ m_forceCreation = forceCreation;
+ } // setDocAction
+
+ /**
+ * Set Processed.
+ * Propergate to Lines/Taxes
+ * @param processed processed
+ */
+ public void setProcessed (boolean processed)
+ {
+ super.setProcessed (processed);
+ if (get_ID() == 0)
+ return;
+ String set = "SET Processed='"
+ + (processed ? "Y" : "N")
+ + "' WHERE C_Order_ID=" + getC_Order_ID();
+ int noLine = DB.executeUpdate("UPDATE C_OrderLine " + set, get_TrxName());
+ int noTax = DB.executeUpdate("UPDATE C_OrderTax " + set, get_TrxName());
+ m_lines = null;
+ m_taxes = null;
+ log.fine("setProcessed - " + processed + " - Lines=" + noLine + ", Tax=" + noTax);
+ } // setProcessed
+
+
+
+ /**************************************************************************
+ * Before Save
+ * @param newRecord new
+ * @return save
+ */
+ protected boolean beforeSave (boolean newRecord)
+ {
+ // Client/Org Check
+ if (getAD_Org_ID() == 0)
+ {
+ int context_AD_Org_ID = Env.getAD_Org_ID(getCtx());
+ if (context_AD_Org_ID != 0)
+ {
+ setAD_Org_ID(context_AD_Org_ID);
+ log.warning("Changed Org to Context=" + context_AD_Org_ID);
+ }
+ }
+ if (getAD_Client_ID() == 0)
+ {
+ m_processMsg = "AD_Client_ID = 0";
+ return false;
+ }
+
+ // New Record Doc Type - make sure DocType set to 0
+ if (newRecord && getC_DocType_ID() == 0)
+ setC_DocType_ID (0);
+
+ // Default Warehouse
+ if (getM_Warehouse_ID() == 0)
+ {
+ int ii = Env.getContextAsInt(getCtx(), "#M_Warehouse_ID");
+ if (ii != 0)
+ setM_Warehouse_ID(ii);
+ else
+ {
+ log.saveError("FillMandatory", Msg.getElement(getCtx(), "M_Warehouse_ID"));
+ return false;
+ }
+ }
+ // Warehouse Org
+ if (newRecord
+ || is_ValueChanged("AD_Org_ID") || is_ValueChanged("M_Warehouse_ID"))
+ {
+ MWarehouse wh = MWarehouse.get(getCtx(), getM_Warehouse_ID());
+ if (wh.getAD_Org_ID() != getAD_Org_ID())
+ log.saveWarning("WarehouseOrgConflict", "");
+ }
+ // Reservations in Warehouse
+ if (!newRecord && is_ValueChanged("M_Warehouse_ID"))
+ {
+ MOrderLine[] lines = getLines(false,null);
+ for (int i = 0; i < lines.length; i++)
+ {
+ if (!lines[i].canChangeWarehouse())
+ return false;
+ }
+ }
+
+ // No Partner Info - set Template
+ if (getC_BPartner_ID() == 0)
+ setBPartner(MBPartner.getTemplate(getCtx(), getAD_Client_ID()));
+ if (getC_BPartner_Location_ID() == 0)
+ setBPartner(new MBPartner(getCtx(), getC_BPartner_ID(), null));
+ // No Bill - get from Ship
+ if (getBill_BPartner_ID() == 0)
+ {
+ setBill_BPartner_ID(getC_BPartner_ID());
+ setBill_Location_ID(getC_BPartner_Location_ID());
+ }
+ if (getBill_Location_ID() == 0)
+ setBill_Location_ID(getC_BPartner_Location_ID());
+
+ // Default Price List
+ if (getM_PriceList_ID() == 0)
+ {
+ int ii = DB.getSQLValue(null,
+ "SELECT M_PriceList_ID FROM M_PriceList "
+ + "WHERE AD_Client_ID=? AND IsSOPriceList=? "
+ + "ORDER BY IsDefault DESC", getAD_Client_ID(), isSOTrx() ? "Y" : "N");
+ if (ii != 0)
+ setM_PriceList_ID (ii);
+ }
+ // Default Currency
+ if (getC_Currency_ID() == 0)
+ {
+ String sql = "SELECT C_Currency_ID FROM M_PriceList WHERE M_PriceList_ID=?";
+ int ii = DB.getSQLValue (null, sql, getM_PriceList_ID());
+ if (ii != 0)
+ setC_Currency_ID (ii);
+ else
+ setC_Currency_ID(Env.getContextAsInt(getCtx(), "#C_Currency_ID"));
+ }
+
+ // Default Sales Rep
+ if (getSalesRep_ID() == 0)
+ {
+ int ii = Env.getContextAsInt(getCtx(), "#SalesRep_ID");
+ if (ii != 0)
+ setSalesRep_ID (ii);
+ }
+
+ // Default Document Type
+ if (getC_DocTypeTarget_ID() == 0)
+ setC_DocTypeTarget_ID(DocSubTypeSO_Standard);
+
+ // Default Payment Term
+ if (getC_PaymentTerm_ID() == 0)
+ {
+ int ii = Env.getContextAsInt(getCtx(), "#C_PaymentTerm_ID");
+ if (ii != 0)
+ setC_PaymentTerm_ID(ii);
+ else
+ {
+ String sql = "SELECT C_PaymentTerm_ID FROM C_PaymentTerm WHERE AD_Client_ID=? AND IsDefault='Y'";
+ ii = DB.getSQLValue(null, sql, getAD_Client_ID());
+ if (ii != 0)
+ setC_PaymentTerm_ID (ii);
+ }
+ }
+
+ return true;
+ } // beforeSave
+
+
+ /**
+ * After Save
+ * @param newRecord new
+ * @param success success
+ * @return true if can be saved
+ */
+ protected boolean afterSave (boolean newRecord, boolean success)
+ {
+ if (!success || newRecord)
+ return success;
+
+ // Propagate Description changes
+ if (is_ValueChanged("Description") || is_ValueChanged("POReference"))
+ {
+ String sql = "UPDATE C_Invoice i"
+ + " SET (Description,POReference)="
+ + "(SELECT Description,POReference "
+ + "FROM C_Order o WHERE i.C_Order_ID=o.C_Order_ID) "
+ + "WHERE DocStatus NOT IN ('RE','CL') AND C_Order_ID=" + getC_Order_ID();
+ int no = DB.executeUpdate(sql, get_TrxName());
+ log.fine("Description -> #" + no);
+ }
+
+ // Propagate Changes of Payment Info to existing (not reversed/closed) invoices
+ if (is_ValueChanged("PaymentRule") || is_ValueChanged("C_PaymentTerm_ID")
+ || is_ValueChanged("DateAcct") || is_ValueChanged("C_Payment_ID")
+ || is_ValueChanged("C_CashLine_ID"))
+ {
+ String sql = "UPDATE C_Invoice i "
+ + "SET (PaymentRule,C_PaymentTerm_ID,DateAcct,C_Payment_ID,C_CashLine_ID)="
+ + "(SELECT PaymentRule,C_PaymentTerm_ID,DateAcct,C_Payment_ID,C_CashLine_ID "
+ + "FROM C_Order o WHERE i.C_Order_ID=o.C_Order_ID)"
+ + "WHERE DocStatus NOT IN ('RE','CL') AND C_Order_ID=" + getC_Order_ID();
+ // Don't touch Closed/Reversed entries
+ int no = DB.executeUpdate(sql, get_TrxName());
+ log.fine("Payment -> #" + no);
+ }
+
+ // Sync Lines
+ afterSaveSync("AD_Org_ID");
+ afterSaveSync("C_BPartner_ID");
+ afterSaveSync("C_BPartner_Location_ID");
+ afterSaveSync("DateOrdered");
+ afterSaveSync("DatePromised");
+ afterSaveSync("M_Warehouse_ID");
+ afterSaveSync("M_Shipper_ID");
+ afterSaveSync("C_Currency_ID");
+ //
+ return true;
+ } // afterSave
+
+ private void afterSaveSync (String columnName)
+ {
+ if (is_ValueChanged(columnName))
+ {
+ String sql = "UPDATE C_OrderLine ol"
+ + " SET " + columnName + " ="
+ + "(SELECT " + columnName
+ + " FROM C_Order o WHERE ol.C_Order_ID=o.C_Order_ID) "
+ + "WHERE C_Order_ID=" + getC_Order_ID();
+ int no = DB.executeUpdate(sql, get_TrxName());
+ log.fine(columnName + " Lines -> #" + no);
+ }
+ } // afterSaveSync
+
+ /**
+ * Before Delete
+ * @return true of it can be deleted
+ */
+ protected boolean beforeDelete ()
+ {
+ if (isProcessed())
+ return false;
+
+ getLines();
+ for (int i = 0; i < m_lines.length; i++)
+ {
+ if (!m_lines[i].beforeDelete())
+ return false;
+ }
+ return true;
+ } // beforeDelete
+
+ /**************************************************************************
+ * Process document
+ * @param processAction document action
+ * @return true if performed
+ */
+ public boolean processIt (String processAction)
+ {
+ m_processMsg = null;
+ DocumentEngine engine = new DocumentEngine (this, getDocStatus());
+ return engine.processIt (processAction, getDocAction());
+ } // processIt
+
+ /** Process Message */
+ private String m_processMsg = null;
+ /** Just Prepared Flag */
+ private boolean m_justPrepared = false;
+
+ /**
+ * Unlock Document.
+ * @return true if success
+ */
+ public boolean unlockIt()
+ {
+ log.info("unlockIt - " + toString());
+ setProcessing(false);
+ return true;
+ } // unlockIt
+
+ /**
+ * Invalidate Document
+ * @return true if success
+ */
+ public boolean invalidateIt()
+ {
+ log.info(toString());
+ setDocAction(DOCACTION_Prepare);
+ return true;
+ } // invalidateIt
+
+
+ /**************************************************************************
+ * Prepare Document
+ * @return new status (In Progress or Invalid)
+ */
+ public String prepareIt()
+ {
+ log.info(toString());
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_PREPARE);
+ if (m_processMsg != null)
+ return DocAction.STATUS_Invalid;
+ MDocType dt = MDocType.get(getCtx(), getC_DocTypeTarget_ID());
+
+ // Std Period open?
+ if (!MPeriod.isOpen(getCtx(), getDateAcct(), dt.getDocBaseType()))
+ {
+ m_processMsg = "@PeriodClosed@";
+ return DocAction.STATUS_Invalid;
+ }
+
+ // Lines
+ MOrderLine[] lines = getLines(true, "M_Product_ID");
+ if (lines.length == 0)
+ {
+ m_processMsg = "@NoLines@";
+ return DocAction.STATUS_Invalid;
+ }
+
+ // Bug 1564431
+ if (getDeliveryRule() != null && getDeliveryRule().equals(MOrder.DELIVERYRULE_CompleteOrder))
+ {
+ for (int i = 0; i < lines.length; i++)
+ {
+ MOrderLine line = lines[i];
+ MProduct product = line.getProduct();
+ if (product != null && product.isExcludeAutoDelivery())
+ {
+ m_processMsg = "@M_Product_ID@ "+product.getValue()+" @IsExcludeAutoDelivery@";
+ return DocAction.STATUS_Invalid;
+ }
+ }
+ }
+
+ // Convert DocType to Target
+ if (getC_DocType_ID() != getC_DocTypeTarget_ID() )
+ {
+ // Cannot change Std to anything else if different warehouses
+ if (getC_DocType_ID() != 0)
+ {
+ MDocType dtOld = MDocType.get(getCtx(), getC_DocType_ID());
+ if (MDocType.DOCSUBTYPESO_StandardOrder.equals(dtOld.getDocSubTypeSO()) // From SO
+ && !MDocType.DOCSUBTYPESO_StandardOrder.equals(dt.getDocSubTypeSO())) // To !SO
+ {
+ for (int i = 0; i < lines.length; i++)
+ {
+ if (lines[i].getM_Warehouse_ID() != getM_Warehouse_ID())
+ {
+ log.warning("different Warehouse " + lines[i]);
+ m_processMsg = "@CannotChangeDocType@";
+ return DocAction.STATUS_Invalid;
+ }
+ }
+ }
+ }
+
+ // New or in Progress/Invalid
+ if (DOCSTATUS_Drafted.equals(getDocStatus())
+ || DOCSTATUS_InProgress.equals(getDocStatus())
+ || DOCSTATUS_Invalid.equals(getDocStatus())
+ || getC_DocType_ID() == 0)
+ {
+ setC_DocType_ID(getC_DocTypeTarget_ID());
+ }
+ else // convert only if offer
+ {
+ if (dt.isOffer())
+ setC_DocType_ID(getC_DocTypeTarget_ID());
+ else
+ {
+ m_processMsg = "@CannotChangeDocType@";
+ return DocAction.STATUS_Invalid;
+ }
+ }
+ } // convert DocType
+
+ // Mandatory Product Attribute Set Instance
+ String mandatoryType = "='Y'"; // IN ('Y','S')
+ String sql = "SELECT COUNT(*) "
+ + "FROM C_OrderLine ol"
+ + " INNER JOIN M_Product p ON (ol.M_Product_ID=p.M_Product_ID)"
+ + " INNER JOIN M_AttributeSet pas ON (p.M_AttributeSet_ID=pas.M_AttributeSet_ID) "
+ + "WHERE pas.MandatoryType" + mandatoryType
+ + " AND ol.M_AttributeSetInstance_ID IS NULL"
+ + " AND ol.C_Order_ID=?";
+ int no = DB.getSQLValue(get_TrxName(), sql, getC_Order_ID());
+ if (no != 0)
+ {
+ m_processMsg = "@LinesWithoutProductAttribute@ (" + no + ")";
+ return DocAction.STATUS_Invalid;
+ }
+
+ // Lines
+ if (explodeBOM())
+ lines = getLines(true, "M_Product_ID");
+ if (!reserveStock(dt, lines))
+ {
+ m_processMsg = "Cannot reserve Stock";
+ return DocAction.STATUS_Invalid;
+ }
+ if (!calculateTaxTotal())
+ {
+ m_processMsg = "Error calculating tax";
+ return DocAction.STATUS_Invalid;
+ }
+
+ // Credit Check
+ if (isSOTrx())
+ {
+ MBPartner bp = new MBPartner (getCtx(), getC_BPartner_ID(), get_TrxName());
+ if (MBPartner.SOCREDITSTATUS_CreditStop.equals(bp.getSOCreditStatus()))
+ {
+ m_processMsg = "@BPartnerCreditStop@ - @TotalOpenBalance@="
+ + bp.getTotalOpenBalance()
+ + ", @SO_CreditLimit@=" + bp.getSO_CreditLimit();
+ return DocAction.STATUS_Invalid;
+ }
+ if (MBPartner.SOCREDITSTATUS_CreditHold.equals(bp.getSOCreditStatus()))
+ {
+ m_processMsg = "@BPartnerCreditHold@ - @TotalOpenBalance@="
+ + bp.getTotalOpenBalance()
+ + ", @SO_CreditLimit@=" + bp.getSO_CreditLimit();
+ return DocAction.STATUS_Invalid;
+ }
+ BigDecimal grandTotal = MConversionRate.convertBase(getCtx(),
+ getGrandTotal(), getC_Currency_ID(), getDateOrdered(),
+ getC_ConversionType_ID(), getAD_Client_ID(), getAD_Org_ID());
+ if (MBPartner.SOCREDITSTATUS_CreditHold.equals(bp.getSOCreditStatus(grandTotal)))
+ {
+ m_processMsg = "@BPartnerOverOCreditHold@ - @TotalOpenBalance@="
+ + bp.getTotalOpenBalance() + ", @GrandTotal@=" + grandTotal
+ + ", @SO_CreditLimit@=" + bp.getSO_CreditLimit();
+ return DocAction.STATUS_Invalid;
+ }
+ }
+
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_PREPARE);
+ if (m_processMsg != null)
+ return DocAction.STATUS_Invalid;
+
+ m_justPrepared = true;
+ // if (!DOCACTION_Complete.equals(getDocAction())) don't set for just prepare
+ // setDocAction(DOCACTION_Complete);
+ return DocAction.STATUS_InProgress;
+ } // prepareIt
+
+ /**
+ * Explode non stocked BOM.
+ * @return true if bom exploded
+ */
+ private boolean explodeBOM()
+ {
+ boolean retValue = false;
+ String where = "AND IsActive='Y' AND EXISTS "
+ + "(SELECT * FROM M_Product p WHERE C_OrderLine.M_Product_ID=p.M_Product_ID"
+ + " AND p.IsBOM='Y' AND p.IsVerified='Y' AND p.IsStocked='N')";
+ //
+ String sql = "SELECT COUNT(*) FROM C_OrderLine "
+ + "WHERE C_Order_ID=? " + where;
+ int count = DB.getSQLValue(get_TrxName(), sql, getC_Order_ID());
+ while (count != 0)
+ {
+ retValue = true;
+ renumberLines (1000); // max 999 bom items
+
+ // Order Lines with non-stocked BOMs
+ MOrderLine[] lines = getLines (where, "ORDER BY Line");
+ for (int i = 0; i < lines.length; i++)
+ {
+ MOrderLine line = lines[i];
+ MProduct product = MProduct.get (getCtx(), line.getM_Product_ID());
+ log.fine(product.getName());
+ // New Lines
+ int lineNo = line.getLine ();
+ MProductBOM[] boms = MProductBOM.getBOMLines (product);
+ for (int j = 0; j < boms.length; j++)
+ {
+ MProductBOM bom = boms[j];
+ MOrderLine newLine = new MOrderLine (this);
+ newLine.setLine (++lineNo);
+ newLine.setM_Product_ID (bom.getProduct ()
+ .getM_Product_ID ());
+ newLine.setC_UOM_ID (bom.getProduct ().getC_UOM_ID ());
+ newLine.setQty (line.getQtyOrdered ().multiply (
+ bom.getBOMQty ()));
+ if (bom.getDescription () != null)
+ newLine.setDescription (bom.getDescription ());
+ //
+ newLine.setPrice ();
+ newLine.save (get_TrxName());
+ }
+ // Convert into Comment Line
+ line.setM_Product_ID (0);
+ line.setM_AttributeSetInstance_ID (0);
+ line.setPrice (Env.ZERO);
+ line.setPriceLimit (Env.ZERO);
+ line.setPriceList (Env.ZERO);
+ line.setLineNetAmt (Env.ZERO);
+ line.setFreightAmt (Env.ZERO);
+ //
+ String description = product.getName ();
+ if (product.getDescription () != null)
+ description += " " + product.getDescription ();
+ if (line.getDescription () != null)
+ description += " " + line.getDescription ();
+ line.setDescription (description);
+ line.save (get_TrxName());
+ } // for all lines with BOM
+
+ m_lines = null; // force requery
+ count = DB.getSQLValue (get_TrxName(), sql, getC_Invoice_ID ());
+ renumberLines (10);
+ } // while count != 0
+ return retValue;
+ } // explodeBOM
+
+
+ /**
+ * Reserve Inventory.
+ * Counterpart: MInOut.completeIt()
+ * @param dt document type or null
+ * @param lines order lines (ordered by M_Product_ID for deadlock prevention)
+ * @return true if (un) reserved
+ */
+ private boolean reserveStock (MDocType dt, MOrderLine[] lines)
+ {
+ if (dt == null)
+ dt = MDocType.get(getCtx(), getC_DocType_ID());
+
+ // Binding
+ boolean binding = !dt.isProposal();
+ // Not binding - i.e. Target=0
+ if (DOCACTION_Void.equals(getDocAction())
+ // Closing Binding Quotation
+ || (MDocType.DOCSUBTYPESO_Quotation.equals(dt.getDocSubTypeSO())
+ && DOCACTION_Close.equals(getDocAction()))
+ || isDropShip() )
+ binding = false;
+ boolean isSOTrx = isSOTrx();
+ log.fine("Binding=" + binding + " - IsSOTrx=" + isSOTrx);
+ // Force same WH for all but SO/PO
+ int header_M_Warehouse_ID = getM_Warehouse_ID();
+ if (MDocType.DOCSUBTYPESO_StandardOrder.equals(dt.getDocSubTypeSO())
+ || MDocType.DOCBASETYPE_PurchaseOrder.equals(dt.getDocBaseType()))
+ header_M_Warehouse_ID = 0; // don't enforce
+
+ BigDecimal Volume = Env.ZERO;
+ BigDecimal Weight = Env.ZERO;
+
+ // Always check and (un) Reserve Inventory
+ for (int i = 0; i < lines.length; i++)
+ {
+ MOrderLine line = lines[i];
+ // Check/set WH/Org
+ if (header_M_Warehouse_ID != 0) // enforce WH
+ {
+ if (header_M_Warehouse_ID != line.getM_Warehouse_ID())
+ line.setM_Warehouse_ID(header_M_Warehouse_ID);
+ if (getAD_Org_ID() != line.getAD_Org_ID())
+ line.setAD_Org_ID(getAD_Org_ID());
+ }
+ // Binding
+ BigDecimal target = binding ? line.getQtyOrdered() : Env.ZERO;
+ BigDecimal difference = target
+ .subtract(line.getQtyReserved())
+ .subtract(line.getQtyDelivered());
+ if (difference.signum() == 0)
+ {
+ MProduct product = line.getProduct();
+ if (product != null)
+ {
+ Volume = Volume.add(product.getVolume().multiply(line.getQtyOrdered()));
+ Weight = Weight.add(product.getWeight().multiply(line.getQtyOrdered()));
+ }
+ continue;
+ }
+
+ log.fine("Line=" + line.getLine()
+ + " - Target=" + target + ",Difference=" + difference
+ + " - Ordered=" + line.getQtyOrdered()
+ + ",Reserved=" + line.getQtyReserved() + ",Delivered=" + line.getQtyDelivered());
+
+ // Check Product - Stocked and Item
+ MProduct product = line.getProduct();
+ if (product != null)
+ {
+ if (product.isStocked())
+ {
+ BigDecimal ordered = isSOTrx ? Env.ZERO : difference;
+ BigDecimal reserved = isSOTrx ? difference : Env.ZERO;
+ int M_Locator_ID = 0;
+ // Get Locator to reserve
+ if (line.getM_AttributeSetInstance_ID() != 0) // Get existing Location
+ M_Locator_ID = MStorage.getM_Locator_ID (line.getM_Warehouse_ID(),
+ line.getM_Product_ID(), line.getM_AttributeSetInstance_ID(),
+ ordered, get_TrxName());
+ // Get default Location
+ if (M_Locator_ID == 0)
+ {
+ // try to take default locator for product first
+ // if it is from the selected warehouse
+ MWarehouse wh = MWarehouse.get(getCtx(), line.getM_Warehouse_ID());
+ M_Locator_ID = product.getM_Locator_ID();
+ if (M_Locator_ID!=0) {
+ MLocator locator = new MLocator(getCtx(), product.getM_Locator_ID(), get_TrxName());
+ //product has default locator defined but is not from the order warehouse
+ if(locator.getM_Warehouse_ID()!=wh.get_ID()) {
+ M_Locator_ID = wh.getDefaultLocator().getM_Locator_ID();
+ }
+ } else {
+ M_Locator_ID = wh.getDefaultLocator().getM_Locator_ID();
+ }
+ }
+ // Update Storage
+ if (!MStorage.add(getCtx(), line.getM_Warehouse_ID(), M_Locator_ID,
+ line.getM_Product_ID(),
+ line.getM_AttributeSetInstance_ID(), line.getM_AttributeSetInstance_ID(),
+ Env.ZERO, reserved, ordered, get_TrxName()))
+ return false;
+ } // stockec
+ // update line
+ line.setQtyReserved(line.getQtyReserved().add(difference));
+ if (!line.save(get_TrxName()))
+ return false;
+ //
+ Volume = Volume.add(product.getVolume().multiply(line.getQtyOrdered()));
+ Weight = Weight.add(product.getWeight().multiply(line.getQtyOrdered()));
+ } // product
+ } // reverse inventory
+
+ setVolume(Volume);
+ setWeight(Weight);
+ return true;
+ } // reserveStock
+
+ /**
+ * Calculate Tax and Total
+ * @return true if tax total calculated
+ */
+ private boolean calculateTaxTotal()
+ {
+ log.fine("");
+ // Delete Taxes
+ DB.executeUpdate("DELETE C_OrderTax WHERE C_Order_ID=" + getC_Order_ID(), get_TrxName());
+ m_taxes = null;
+
+ // Lines
+ BigDecimal totalLines = Env.ZERO;
+ ArrayList taxList = new ArrayList();
+ MOrderLine[] lines = getLines();
+ for (int i = 0; i < lines.length; i++)
+ {
+ MOrderLine line = lines[i];
+ Integer taxID = new Integer(line.getC_Tax_ID());
+ if (!taxList.contains(taxID))
+ {
+ MOrderTax oTax = MOrderTax.get (line, getPrecision(),
+ false, get_TrxName()); // current Tax
+ oTax.setIsTaxIncluded(isTaxIncluded());
+ if (!oTax.calculateTaxFromLines())
+ return false;
+ if (!oTax.save(get_TrxName()))
+ return false;
+ taxList.add(taxID);
+ }
+ totalLines = totalLines.add(line.getLineNetAmt());
+ }
+
+ // Taxes
+ BigDecimal grandTotal = totalLines;
+ MOrderTax[] taxes = getTaxes(true);
+ for (int i = 0; i < taxes.length; i++)
+ {
+ MOrderTax oTax = taxes[i];
+ MTax tax = oTax.getTax();
+ if (tax.isSummary())
+ {
+ MTax[] cTaxes = tax.getChildTaxes(false);
+ for (int j = 0; j < cTaxes.length; j++)
+ {
+ MTax cTax = cTaxes[j];
+ BigDecimal taxAmt = cTax.calculateTax(oTax.getTaxBaseAmt(), isTaxIncluded(), getPrecision());
+ //
+ MOrderTax newOTax = new MOrderTax(getCtx(), 0, get_TrxName());
+ newOTax.setClientOrg(this);
+ newOTax.setC_Order_ID(getC_Order_ID());
+ newOTax.setC_Tax_ID(cTax.getC_Tax_ID());
+ newOTax.setPrecision(getPrecision());
+ newOTax.setIsTaxIncluded(isTaxIncluded());
+ newOTax.setTaxBaseAmt(oTax.getTaxBaseAmt());
+ newOTax.setTaxAmt(taxAmt);
+ if (!newOTax.save(get_TrxName()))
+ return false;
+ //
+ if (!isTaxIncluded())
+ grandTotal = grandTotal.add(taxAmt);
+ }
+ if (!oTax.delete(true, get_TrxName()))
+ return false;
+ if (!oTax.save(get_TrxName()))
+ return false;
+ }
+ else
+ {
+ if (!isTaxIncluded())
+ grandTotal = grandTotal.add(oTax.getTaxAmt());
+ }
+ }
+ //
+ setTotalLines(totalLines);
+ setGrandTotal(grandTotal);
+ return true;
+ } // calculateTaxTotal
+
+
+ /**
+ * Approve Document
+ * @return true if success
+ */
+ public boolean approveIt()
+ {
+ log.info("approveIt - " + toString());
+ setIsApproved(true);
+ return true;
+ } // approveIt
+
+ /**
+ * Reject Approval
+ * @return true if success
+ */
+ public boolean rejectIt()
+ {
+ log.info("rejectIt - " + toString());
+ setIsApproved(false);
+ return true;
+ } // rejectIt
+
+
+ /**************************************************************************
+ * Complete Document
+ * @return new status (Complete, In Progress, Invalid, Waiting ..)
+ */
+ public String completeIt()
+ {
+ MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
+ String DocSubTypeSO = dt.getDocSubTypeSO();
+
+ // Just prepare
+ if (DOCACTION_Prepare.equals(getDocAction()))
+ {
+ setProcessed(false);
+ return DocAction.STATUS_InProgress;
+ }
+ // Offers
+ if (MDocType.DOCSUBTYPESO_Proposal.equals(DocSubTypeSO)
+ || MDocType.DOCSUBTYPESO_Quotation.equals(DocSubTypeSO))
+ {
+ // Binding
+ if (MDocType.DOCSUBTYPESO_Quotation.equals(DocSubTypeSO))
+ reserveStock(dt, getLines(true, "M_Product_ID"));
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE);
+ if (m_processMsg != null)
+ return DocAction.STATUS_Invalid;
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_COMPLETE);
+ if (m_processMsg != null)
+ return DocAction.STATUS_Invalid;
+ // Set the definite document number after completed (if needed)
+ setDefiniteDocumentNo();
+ setProcessed(true);
+ return DocAction.STATUS_Completed;
+ }
+ // Waiting Payment - until we have a payment
+ if (!m_forceCreation
+ && MDocType.DOCSUBTYPESO_PrepayOrder.equals(DocSubTypeSO)
+ && getC_Payment_ID() == 0 && getC_CashLine_ID() == 0)
+ {
+ setProcessed(true);
+ return DocAction.STATUS_WaitingPayment;
+ }
+
+ // Re-Check
+ if (!m_justPrepared)
+ {
+ String status = prepareIt();
+ if (!DocAction.STATUS_InProgress.equals(status))
+ return status;
+ }
+
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE);
+ if (m_processMsg != null)
+ return DocAction.STATUS_Invalid;
+
+ // Implicit Approval
+ if (!isApproved())
+ approveIt();
+ getLines(true,null);
+ log.info(toString());
+ StringBuffer info = new StringBuffer();
+
+ boolean realTimePOS = false;
+
+ // Create SO Shipment - Force Shipment
+ MInOut shipment = null;
+ if (MDocType.DOCSUBTYPESO_OnCreditOrder.equals(DocSubTypeSO) // (W)illCall(I)nvoice
+ || MDocType.DOCSUBTYPESO_WarehouseOrder.equals(DocSubTypeSO) // (W)illCall(P)ickup
+ || MDocType.DOCSUBTYPESO_POSOrder.equals(DocSubTypeSO) // (W)alkIn(R)eceipt
+ || MDocType.DOCSUBTYPESO_PrepayOrder.equals(DocSubTypeSO))
+ {
+ if (!DELIVERYRULE_Force.equals(getDeliveryRule()))
+ setDeliveryRule(DELIVERYRULE_Force);
+ //
+ shipment = createShipment (dt, realTimePOS ? null : getDateOrdered());
+ if (shipment == null)
+ return DocAction.STATUS_Invalid;
+ info.append("@M_InOut_ID@: ").append(shipment.getDocumentNo());
+ String msg = shipment.getProcessMsg();
+ if (msg != null && msg.length() > 0)
+ info.append(" (").append(msg).append(")");
+ } // Shipment
+
+
+ // Create SO Invoice - Always invoice complete Order
+ if ( MDocType.DOCSUBTYPESO_POSOrder.equals(DocSubTypeSO)
+ || MDocType.DOCSUBTYPESO_OnCreditOrder.equals(DocSubTypeSO)
+ || MDocType.DOCSUBTYPESO_PrepayOrder.equals(DocSubTypeSO))
+ {
+ MInvoice invoice = createInvoice (dt, shipment, realTimePOS ? null : getDateOrdered());
+ if (invoice == null)
+ return DocAction.STATUS_Invalid;
+ info.append(" - @C_Invoice_ID@: ").append(invoice.getDocumentNo());
+ String msg = invoice.getProcessMsg();
+ if (msg != null && msg.length() > 0)
+ info.append(" (").append(msg).append(")");
+ } // Invoice
+
+ // Counter Documents
+ MOrder counter = createCounterDoc();
+ if (counter != null)
+ info.append(" - @CounterDoc@: @Order@=").append(counter.getDocumentNo());
+ // User Validation
+ String valid = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_COMPLETE);
+ if (valid != null)
+ {
+ if (info.length() > 0)
+ info.append(" - ");
+ info.append(valid);
+ m_processMsg = info.toString();
+ return DocAction.STATUS_Invalid;
+ }
+
+ // Set the definite document number after completed (if needed)
+ setDefiniteDocumentNo();
+
+ setProcessed(true);
+ m_processMsg = info.toString();
+ //
+ setDocAction(DOCACTION_Close);
+ return DocAction.STATUS_Completed;
+ } // completeIt
+
+ /**
+ * Set the definite document number after completed
+ */
+ private void setDefiniteDocumentNo() {
+ MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
+ if (dt.isOverwriteDateOnComplete()) {
+ setDateOrdered(new Timestamp (System.currentTimeMillis()));
+ }
+ if (dt.isOverwriteSeqOnComplete()) {
+ String value = DB.getDocumentNo(getC_DocType_ID(), get_TrxName(), true, this);
+ if (value != null)
+ setDocumentNo(value);
+ }
+ }
+
+ /**
+ * Create Shipment
+ * @param dt order document type
+ * @param movementDate optional movement date (default today)
+ * @return shipment or null
+ */
+ private MInOut createShipment(MDocType dt, Timestamp movementDate)
+ {
+ log.info("For " + dt);
+ MInOut shipment = new MInOut (this, dt.getC_DocTypeShipment_ID(), movementDate);
+ // shipment.setDateAcct(getDateAcct());
+ if (!shipment.save(get_TrxName()))
+ {
+ m_processMsg = "Could not create Shipment";
+ return null;
+ }
+ //
+ MOrderLine[] oLines = getLines(true, null);
+ for (int i = 0; i < oLines.length; i++)
+ {
+ MOrderLine oLine = oLines[i];
+ //
+ MInOutLine ioLine = new MInOutLine(shipment);
+ // Qty = Ordered - Delivered
+ BigDecimal MovementQty = oLine.getQtyOrdered().subtract(oLine.getQtyDelivered());
+ // Location
+ int M_Locator_ID = MStorage.getM_Locator_ID (oLine.getM_Warehouse_ID(),
+ oLine.getM_Product_ID(), oLine.getM_AttributeSetInstance_ID(),
+ MovementQty, get_TrxName());
+ if (M_Locator_ID == 0) // Get default Location
+ {
+ MWarehouse wh = MWarehouse.get(getCtx(), oLine.getM_Warehouse_ID());
+ M_Locator_ID = wh.getDefaultLocator().getM_Locator_ID();
+ }
+ //
+ ioLine.setOrderLine(oLine, M_Locator_ID, MovementQty);
+ ioLine.setQty(MovementQty);
+ if (oLine.getQtyEntered().compareTo(oLine.getQtyOrdered()) != 0)
+ ioLine.setQtyEntered(MovementQty
+ .multiply(oLine.getQtyEntered())
+ .divide(oLine.getQtyOrdered(), 6, BigDecimal.ROUND_HALF_UP));
+ if (!ioLine.save(get_TrxName()))
+ {
+ m_processMsg = "Could not create Shipment Line";
+ return null;
+ }
+ }
+ // Manually Process Shipment
+ String status = shipment.completeIt();
+ shipment.setDocStatus(status);
+ shipment.save(get_TrxName());
+ if (!DOCSTATUS_Completed.equals(status))
+ {
+ m_processMsg = "@M_InOut_ID@: " + shipment.getProcessMsg();
+ return null;
+ }
+ return shipment;
+ } // createShipment
+
+ /**
+ * Create Invoice
+ * @param dt order document type
+ * @param shipment optional shipment
+ * @param invoiceDate invoice date
+ * @return invoice or null
+ */
+ private MInvoice createInvoice (MDocType dt, MInOut shipment, Timestamp invoiceDate)
+ {
+ log.info(dt.toString());
+ MInvoice invoice = new MInvoice (this, dt.getC_DocTypeInvoice_ID(), invoiceDate);
+ if (!invoice.save(get_TrxName()))
+ {
+ m_processMsg = "Could not create Invoice";
+ return null;
+ }
+
+ // If we have a Shipment - use that as a base
+ if (shipment != null)
+ {
+ if (!INVOICERULE_AfterDelivery.equals(getInvoiceRule()))
+ setInvoiceRule(INVOICERULE_AfterDelivery);
+ //
+ MInOutLine[] sLines = shipment.getLines(false);
+ for (int i = 0; i < sLines.length; i++)
+ {
+ MInOutLine sLine = sLines[i];
+ //
+ MInvoiceLine iLine = new MInvoiceLine(invoice);
+ iLine.setShipLine(sLine);
+ // Qty = Delivered
+ iLine.setQtyEntered(sLine.getQtyEntered());
+ iLine.setQtyInvoiced(sLine.getMovementQty());
+ if (!iLine.save(get_TrxName()))
+ {
+ m_processMsg = "Could not create Invoice Line from Shipment Line";
+ return null;
+ }
+ //
+ sLine.setIsInvoiced(true);
+ if (!sLine.save(get_TrxName()))
+ {
+ log.warning("Could not update Shipment line: " + sLine);
+ }
+ }
+ }
+ else // Create Invoice from Order
+ {
+ if (!INVOICERULE_Immediate.equals(getInvoiceRule()))
+ setInvoiceRule(INVOICERULE_Immediate);
+ //
+ MOrderLine[] oLines = getLines();
+ for (int i = 0; i < oLines.length; i++)
+ {
+ MOrderLine oLine = oLines[i];
+ //
+ MInvoiceLine iLine = new MInvoiceLine(invoice);
+ iLine.setOrderLine(oLine);
+ // Qty = Ordered - Invoiced
+ iLine.setQtyInvoiced(oLine.getQtyOrdered().subtract(oLine.getQtyInvoiced()));
+ if (oLine.getQtyOrdered().compareTo(oLine.getQtyEntered()) == 0)
+ iLine.setQtyEntered(iLine.getQtyInvoiced());
+ else
+ iLine.setQtyEntered(iLine.getQtyInvoiced().multiply(oLine.getQtyEntered())
+ .divide(oLine.getQtyOrdered(), 12, BigDecimal.ROUND_HALF_UP));
+ if (!iLine.save(get_TrxName()))
+ {
+ m_processMsg = "Could not create Invoice Line from Order Line";
+ return null;
+ }
+ }
+ }
+ // Manually Process Invoice
+ String status = invoice.completeIt();
+ invoice.setDocStatus(status);
+ invoice.save(get_TrxName());
+ setC_CashLine_ID(invoice.getC_CashLine_ID());
+ if (!DOCSTATUS_Completed.equals(status))
+ {
+ m_processMsg = "@C_Invoice_ID@: " + invoice.getProcessMsg();
+ return null;
+ }
+ return invoice;
+ } // createInvoice
+
+ /**
+ * Create Counter Document
+ * @return counter order
+ */
+ private MOrder createCounterDoc()
+ {
+ // Is this itself a counter doc ?
+ if (getRef_Order_ID() != 0)
+ return null;
+
+ // Org Must be linked to BPartner
+ MOrg org = MOrg.get(getCtx(), getAD_Org_ID());
+ int counterC_BPartner_ID = org.getLinkedC_BPartner_ID(get_TrxName());
+ if (counterC_BPartner_ID == 0)
+ return null;
+ // Business Partner needs to be linked to Org
+ MBPartner bp = new MBPartner (getCtx(), getC_BPartner_ID(), get_TrxName());
+ int counterAD_Org_ID = bp.getAD_OrgBP_ID_Int();
+ if (counterAD_Org_ID == 0)
+ return null;
+
+ MBPartner counterBP = new MBPartner (getCtx(), counterC_BPartner_ID, null);
+ MOrgInfo counterOrgInfo = MOrgInfo.get(getCtx(), counterAD_Org_ID);
+ log.info("Counter BP=" + counterBP.getName());
+
+ // Document Type
+ int C_DocTypeTarget_ID = 0;
+ MDocTypeCounter counterDT = MDocTypeCounter.getCounterDocType(getCtx(), getC_DocType_ID());
+ if (counterDT != null)
+ {
+ log.fine(counterDT.toString());
+ if (!counterDT.isCreateCounter() || !counterDT.isValid())
+ return null;
+ C_DocTypeTarget_ID = counterDT.getCounter_C_DocType_ID();
+ }
+ else // indirect
+ {
+ C_DocTypeTarget_ID = MDocTypeCounter.getCounterDocType_ID(getCtx(), getC_DocType_ID());
+ log.fine("Indirect C_DocTypeTarget_ID=" + C_DocTypeTarget_ID);
+ if (C_DocTypeTarget_ID <= 0)
+ return null;
+ }
+ // Deep Copy
+ MOrder counter = copyFrom (this, getDateOrdered(),
+ C_DocTypeTarget_ID, !isSOTrx(), true, false, get_TrxName());
+ //
+ counter.setAD_Org_ID(counterAD_Org_ID);
+ counter.setM_Warehouse_ID(counterOrgInfo.getM_Warehouse_ID());
+ //
+ counter.setBPartner(counterBP);
+ counter.setDatePromised(getDatePromised()); // default is date ordered
+ // Refernces (Should not be required
+ counter.setSalesRep_ID(getSalesRep_ID());
+ counter.save(get_TrxName());
+
+ // Update copied lines
+ MOrderLine[] counterLines = counter.getLines(true, null);
+ for (int i = 0; i < counterLines.length; i++)
+ {
+ MOrderLine counterLine = counterLines[i];
+ counterLine.setOrder(counter); // copies header values (BP, etc.)
+ counterLine.setPrice();
+ counterLine.setTax();
+ counterLine.save(get_TrxName());
+ }
+ log.fine(counter.toString());
+
+ // Document Action
+ if (counterDT != null)
+ {
+ if (counterDT.getDocAction() != null)
+ {
+ counter.setDocAction(counterDT.getDocAction());
+ counter.processIt(counterDT.getDocAction());
+ counter.save(get_TrxName());
+ }
+ }
+ return counter;
+ } // createCounterDoc
+
+ /**
+ * Void Document.
+ * Set Qtys to 0 - Sales: reverse all documents
+ * @return true if success
+ */
+ public boolean voidIt()
+ {
+ log.info(toString());
+ // Before Void
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_VOID);
+ if (m_processMsg != null)
+ return false;
+
+ MOrderLine[] lines = getLines(true, "M_Product_ID");
+ for (int i = 0; i < lines.length; i++)
+ {
+ MOrderLine line = lines[i];
+ BigDecimal old = line.getQtyOrdered();
+ if (old.signum() != 0)
+ {
+ line.addDescription(Msg.getMsg(getCtx(), "Voided") + " (" + old + ")");
+ line.setQty(Env.ZERO);
+ line.setLineNetAmt(Env.ZERO);
+ line.save(get_TrxName());
+ }
+ }
+ addDescription(Msg.getMsg(getCtx(), "Voided"));
+ // Clear Reservations
+ if (!reserveStock(null, lines))
+ {
+ m_processMsg = "Cannot unreserve Stock (void)";
+ return false;
+ }
+
+ if (!createReversals())
+ return false;
+
+ //MZ Goodwill
+ if (!isSOTrx())
+ {
+ // delete Matched PO Cost Detail
+ MOrderLine[] linesMZ = getLines();
+ for (int i = 0; i < lines.length; i++)
+ {
+ MMatchPO[] mPO = MMatchPO.getOrderLine(getCtx(), linesMZ[i].getC_OrderLine_ID(), get_TrxName());
+ // delete Cost Detail if the Matched PO has been deleted
+ if (mPO.length == 0)
+ {
+ MCostDetail cd = MCostDetail.get(getCtx(), "C_OrderLine_ID=? AND M_AttributeSetInstance_ID=?",
+ linesMZ[i].getC_OrderLine_ID(), linesMZ[i].getM_AttributeSetInstance_ID(), get_TrxName());
+ if (cd != null)
+ {
+ cd.setProcessed(false);
+ cd.delete(true);
+ }
+ }
+ }
+ }
+ //End MZ
+
+ // After Void
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_VOID);
+ if (m_processMsg != null)
+ return false;
+
+ setProcessed(true);
+ setDocAction(DOCACTION_None);
+ return true;
+ } // voidIt
+
+ /**
+ * Create Shipment/Invoice Reversals
+ * @return true if success
+ */
+ private boolean createReversals()
+ {
+ // Cancel only Sales
+ if (!isSOTrx())
+ return true;
+
+ log.info("createReversals");
+ StringBuffer info = new StringBuffer();
+
+ // Reverse All *Shipments*
+ info.append("@M_InOut_ID@:");
+ MInOut[] shipments = getShipments();
+ for (int i = 0; i < shipments.length; i++)
+ {
+ MInOut ship = shipments[i];
+ // if closed - ignore
+ if (MInOut.DOCSTATUS_Closed.equals(ship.getDocStatus())
+ || MInOut.DOCSTATUS_Reversed.equals(ship.getDocStatus())
+ || MInOut.DOCSTATUS_Voided.equals(ship.getDocStatus()) )
+ continue;
+ ship.set_TrxName(get_TrxName());
+
+ // If not completed - void - otherwise reverse it
+ if (!MInOut.DOCSTATUS_Completed.equals(ship.getDocStatus()))
+ {
+ if (ship.voidIt())
+ ship.setDocStatus(MInOut.DOCSTATUS_Voided);
+ }
+ else if (ship.reverseCorrectIt()) // completed shipment
+ {
+ ship.setDocStatus(MInOut.DOCSTATUS_Reversed);
+ info.append(" ").append(ship.getDocumentNo());
+ }
+ else
+ {
+ m_processMsg = "Could not reverse Shipment " + ship;
+ return false;
+ }
+ ship.setDocAction(MInOut.DOCACTION_None);
+ ship.save(get_TrxName());
+ } // for all shipments
+
+ // Reverse All *Invoices*
+ info.append(" - @C_Invoice_ID@:");
+ MInvoice[] invoices = getInvoices();
+ for (int i = 0; i < invoices.length; i++)
+ {
+ MInvoice invoice = invoices[i];
+ // if closed - ignore
+ if (MInvoice.DOCSTATUS_Closed.equals(invoice.getDocStatus())
+ || MInvoice.DOCSTATUS_Reversed.equals(invoice.getDocStatus())
+ || MInvoice.DOCSTATUS_Voided.equals(invoice.getDocStatus()) )
+ continue;
+ invoice.set_TrxName(get_TrxName());
+
+ // If not completed - void - otherwise reverse it
+ if (!MInvoice.DOCSTATUS_Completed.equals(invoice.getDocStatus()))
+ {
+ if (invoice.voidIt())
+ invoice.setDocStatus(MInvoice.DOCSTATUS_Voided);
+ }
+ else if (invoice.reverseCorrectIt()) // completed invoice
+ {
+ invoice.setDocStatus(MInvoice.DOCSTATUS_Reversed);
+ info.append(" ").append(invoice.getDocumentNo());
+ }
+ else
+ {
+ m_processMsg = "Could not reverse Invoice " + invoice;
+ return false;
+ }
+ invoice.setDocAction(MInvoice.DOCACTION_None);
+ invoice.save(get_TrxName());
+ } // for all shipments
+
+ m_processMsg = info.toString();
+ return true;
+ } // createReversals
+
+
+ /**
+ * Close Document.
+ * Cancel not delivered Qunatities
+ * @return true if success
+ */
+ public boolean closeIt()
+ {
+ log.info(toString());
+ // Before Close
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_CLOSE);
+ if (m_processMsg != null)
+ return false;
+
+ // Close Not delivered Qty - SO/PO
+ MOrderLine[] lines = getLines(true, "M_Product_ID");
+ for (int i = 0; i < lines.length; i++)
+ {
+ MOrderLine line = lines[i];
+ BigDecimal old = line.getQtyOrdered();
+ if (old.compareTo(line.getQtyDelivered()) != 0)
+ {
+ line.setQtyLostSales(line.getQtyOrdered().subtract(line.getQtyDelivered()));
+ line.setQtyOrdered(line.getQtyDelivered());
+ // QtyEntered unchanged
+ line.addDescription("Close (" + old + ")");
+ line.save(get_TrxName());
+ }
+ }
+ // Clear Reservations
+ if (!reserveStock(null, lines))
+ {
+ m_processMsg = "Cannot unreserve Stock (close)";
+ return false;
+ }
+ // After Close
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_CLOSE);
+ if (m_processMsg != null)
+ return false;
+
+ setProcessed(true);
+ setDocAction(DOCACTION_None);
+ return true;
+ } // closeIt
+
+ /**
+ * Reverse Correction - same void
+ * @return true if success
+ */
+ public boolean reverseCorrectIt()
+ {
+ log.info(toString());
+ // Before reverseCorrect
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSECORRECT);
+ if (m_processMsg != null)
+ return false;
+
+ // After reverseCorrect
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSECORRECT);
+ if (m_processMsg != null)
+ return false;
+
+ return voidIt();
+ } // reverseCorrectionIt
+
+ /**
+ * Reverse Accrual - none
+ * @return false
+ */
+ public boolean reverseAccrualIt()
+ {
+ log.info(toString());
+ // Before reverseAccrual
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSEACCRUAL);
+ if (m_processMsg != null)
+ return false;
+
+ // After reverseAccrual
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSEACCRUAL);
+ if (m_processMsg != null)
+ return false;
+
+ return false;
+ } // reverseAccrualIt
+
+ /**
+ * Re-activate.
+ * @return true if success
+ */
+ public boolean reActivateIt()
+ {
+ log.info(toString());
+ // Before reActivate
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REACTIVATE);
+ if (m_processMsg != null)
+ return false;
+
+
+
+ MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
+ String DocSubTypeSO = dt.getDocSubTypeSO();
+
+ // Replace Prepay with POS to revert all doc
+ if (MDocType.DOCSUBTYPESO_PrepayOrder.equals (DocSubTypeSO))
+ {
+ MDocType newDT = null;
+ MDocType[] dts = MDocType.getOfClient (getCtx());
+ for (int i = 0; i < dts.length; i++)
+ {
+ MDocType type = dts[i];
+ if (MDocType.DOCSUBTYPESO_PrepayOrder.equals(type.getDocSubTypeSO()))
+ {
+ if (type.isDefault() || newDT == null)
+ newDT = type;
+ }
+ }
+ if (newDT == null)
+ return false;
+ else
+ setC_DocType_ID (newDT.getC_DocType_ID());
+ }
+
+ // PO - just re-open
+ if (!isSOTrx())
+ log.info("Existing documents not modified - " + dt);
+ // Reverse Direct Documents
+ else if (MDocType.DOCSUBTYPESO_OnCreditOrder.equals(DocSubTypeSO) // (W)illCall(I)nvoice
+ || MDocType.DOCSUBTYPESO_WarehouseOrder.equals(DocSubTypeSO) // (W)illCall(P)ickup
+ || MDocType.DOCSUBTYPESO_POSOrder.equals(DocSubTypeSO)) // (W)alkIn(R)eceipt
+ {
+ if (!createReversals())
+ return false;
+ }
+ else
+ {
+ log.info("Existing documents not modified - SubType=" + DocSubTypeSO);
+ }
+ // After reActivate
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REACTIVATE);
+ if (m_processMsg != null)
+ return false;
+
+ setDocAction(DOCACTION_Complete);
+ setProcessed(false);
+ return true;
+ } // reActivateIt
+
+
+ /*************************************************************************
+ * Get Summary
+ * @return Summary of Document
+ */
+ public String getSummary()
+ {
+ StringBuffer sb = new StringBuffer();
+ sb.append(getDocumentNo());
+ // : Grand Total = 123.00 (#1)
+ sb.append(": ").
+ append(Msg.translate(getCtx(),"GrandTotal")).append("=").append(getGrandTotal());
+ if (m_lines != null)
+ sb.append(" (#").append(m_lines.length).append(")");
+ // - Description
+ if (getDescription() != null && getDescription().length() > 0)
+ sb.append(" - ").append(getDescription());
+ return sb.toString();
+ } // getSummary
+
+ /**
+ * Get Process Message
+ * @return clear text error message
+ */
+ public String getProcessMsg()
+ {
+ return m_processMsg;
+ } // getProcessMsg
+
+ /**
+ * Get Document Owner (Responsible)
+ * @return AD_User_ID
+ */
+ public int getDoc_User_ID()
+ {
+ return getSalesRep_ID();
+ } // getDoc_User_ID
+
+ /**
+ * Get Document Approval Amount
+ * @return amount
+ */
+ public BigDecimal getApprovalAmt()
+ {
+ return getGrandTotal();
+ } // getApprovalAmt
+
+} // MOrder
diff --git a/posterita/posterita/src/main/org/compiere/model/MPOS.java b/posterita/posterita/src/main/org/compiere/model/MPOS.java
new file mode 100644
index 0000000000..b284c90ab8
--- /dev/null
+++ b/posterita/posterita/src/main/org/compiere/model/MPOS.java
@@ -0,0 +1,134 @@
+/******************************************************************************
+ * Product: Adempiere ERP & CRM Smart Business Solution *
+ * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
+ * This program is free software; you can redistribute it and/or modify it *
+ * under the terms version 2 of the GNU General Public License as published *
+ * by the Free Software Foundation. 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, write to the Free Software Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
+ * For the text or an alternative of this public license, you may reach us *
+ * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
+ * or via info@compiere.org or http://www.compiere.org/license.html *
+ *****************************************************************************/
+package org.compiere.model;
+
+import java.sql.*;
+import java.util.*;
+import org.compiere.util.*;
+
+
+/**
+ * POS Terminal definition
+ *
+ * @author Jorg Janke
+ * @version $Id: MPOS.java,v 1.3 2006/07/30 00:51:05 jjanke Exp $
+ */
+public class MPOS extends X_C_POS
+{
+ /**
+ * Get POS from Cache
+ * @param ctx context
+ * @param C_POS_ID id
+ * @return MPOS
+ */
+ public static MPOS get (Properties ctx, int C_POS_ID)
+ {
+ Integer key = new Integer (C_POS_ID);
+ MPOS retValue = (MPOS) s_cache.get (key);
+ if (retValue != null)
+ return retValue;
+ retValue = new MPOS (ctx, C_POS_ID, null);
+ if (retValue.get_ID () != 0)
+ s_cache.put (key, retValue);
+ return retValue;
+ } // get
+
+ /** Cache */
+ private static CCache s_cache = new CCache("C_POS", 20);
+
+ /**
+ * Standard Constructor
+ * @param ctx context
+ * @param C_POS_ID id
+ * @param trxName transaction
+ */
+ public MPOS (Properties ctx, int C_POS_ID, String trxName)
+ {
+ super (ctx, C_POS_ID, trxName);
+ if (C_POS_ID == 0)
+ {
+ // setName (null);
+ // setSalesRep_ID (0);
+ // setC_CashBook_ID (0);
+ // setM_PriceList_ID (0);
+ setIsModifyPrice (false); // N
+ // setM_Warehouse_ID (0);
+ }
+ } // MPOS
+
+ /**
+ * Load Constructor
+ * @param ctx context
+ * @param rs result set
+ * @param trxName transaction
+ */
+ public MPOS (Properties ctx, ResultSet rs, String trxName)
+ {
+ super(ctx, rs, trxName);
+ } // MPOS
+
+ /** Cash Business Partner */
+ private MBPartner m_template = null;
+
+
+
+ /**
+ * Before Save
+ * @param newRecord new
+ * @return true
+ */
+ protected boolean beforeSave (boolean newRecord)
+ {
+ // Org Consistency
+ if (newRecord
+ || is_ValueChanged("C_CashBook_ID") || is_ValueChanged("M_Warehouse_ID"))
+ {
+ MCashBook cb = MCashBook.get(getCtx(), getC_CashBook_ID(), get_TrxName());
+ if (cb.getAD_Org_ID() != getAD_Org_ID())
+ {
+ log.saveError("Error", Msg.parseTranslation(getCtx(), "@AD_Org_ID@: @C_CashBook_ID@"));
+ return false;
+ }
+ MWarehouse wh = MWarehouse.get(getCtx(), getM_Warehouse_ID(), get_TrxName());
+ if (wh.getAD_Org_ID() != getAD_Org_ID())
+ {
+ log.saveError("Error", Msg.parseTranslation(getCtx(), "@AD_Org_ID@: @M_Warehouse_ID@"));
+ return false;
+ }
+ }
+ return true;
+ } // beforeSave
+
+
+ /**
+ * Get default Cash BPartner
+ * @return BPartner
+ */
+ public MBPartner getBPartner()
+ {
+ if (m_template == null)
+ {
+ if (getC_BPartnerCashTrx_ID() == 0)
+ m_template = MBPartner.getBPartnerCashTrx (getCtx(), getAD_Client_ID());
+ else
+ m_template = new MBPartner(getCtx(), getC_BPartnerCashTrx_ID(), get_TrxName());
+ log.fine("getBPartner - " + m_template);
+ }
+ return m_template;
+ } // getBPartner
+
+} // MPOS
diff --git a/posterita/posterita/src/main/org/compiere/model/MPOSTerminal.java b/posterita/posterita/src/main/org/compiere/model/MPOSTerminal.java
new file mode 100644
index 0000000000..635585b003
--- /dev/null
+++ b/posterita/posterita/src/main/org/compiere/model/MPOSTerminal.java
@@ -0,0 +1,137 @@
+/******************************************************************************
+ * Product: Posterita Web-Based POS and Adempiere Plugin *
+ * Copyright (C) 2008 Posterita Ltd *
+ * This file is part of POSterita *
+ * *
+ * POSterita is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License along *
+ * with this program; if not, write to the Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *
+ *****************************************************************************/
+package org.compiere.model;
+
+import java.sql.ResultSet;
+import java.sql.Timestamp;
+import java.util.Properties;
+
+import org.compiere.util.CCache;
+
+/**
+ * @author Ashley G Ramdass
+ *
+ */
+public class MPOSTerminal extends X_U_POSTerminal
+{
+ /** Cache */
+ static private CCache s_cache = new CCache("U_POSTerminal", 10, 60);
+
+ /**
+ * @param ctx Context
+ * @param rs Result Set
+ * @param trxName Transaction
+ */
+ public MPOSTerminal(Properties ctx, ResultSet rs, String trxName)
+ {
+ super(ctx, rs, trxName);
+ }
+
+ /**
+ * @param ctx
+ * @param U_POSTerminal_ID
+ * @param trxName
+ */
+ public MPOSTerminal(Properties ctx, int U_POSTerminal_ID, String trxName)
+ {
+ super(ctx, U_POSTerminal_ID, trxName);
+ }
+
+ /**
+ * @param ctx Context
+ * @param U_POSTerminal_ID Terminal ID
+ * @return Terminal
+ */
+ public static MPOSTerminal get(Properties ctx, int U_POSTerminal_ID)
+ {
+ Integer key = new Integer(U_POSTerminal_ID);
+ MPOSTerminal retValue = (MPOSTerminal)s_cache.get(key);
+ if (retValue == null)
+ {
+ retValue = new MPOSTerminal (ctx, U_POSTerminal_ID, null);
+ if (retValue.get_ID() <= 0)
+ {
+ return null;
+ }
+ s_cache.put(key, retValue);
+ }
+
+ checkLock(retValue);
+ return retValue;
+ }
+
+ protected void loadComplete(boolean success)
+ {
+ if (success)
+ {
+ checkLock(this);
+ }
+ }
+
+ public static void checkLock(MPOSTerminal terminal)
+ {
+ if (terminal.isLocked())
+ {
+ Timestamp currentTime = new Timestamp(System.currentTimeMillis());
+ if (terminal.getUnlockingTime() != null && currentTime.after(terminal.getUnlockingTime()))
+ {
+ terminal.setLocked(false);
+ }
+
+ if (terminal.getLastLockTime() != null && terminal.getLockTime() > 0)
+ {
+ long timeToUnlock = terminal.getLastLockTime().getTime() + (terminal.getLockTime() * 60 * 1000);
+ if (currentTime.after(new Timestamp(timeToUnlock)))
+ {
+ terminal.setLocked(false);
+ }
+ }
+ terminal.save();
+ }
+ }
+
+ /**
+ * @see org.compiere.model.PO#beforeSave(boolean)
+ */
+ protected boolean beforeSave(boolean newRecord)
+ {
+ if (is_ValueChanged(COLUMNNAME_Locked) && isLocked())
+ {
+ setLastLockTime(new Timestamp(System.currentTimeMillis()));
+ }
+
+ return true;
+ }
+
+ /**
+ * @see org.compiere.model.PO#afterSave(boolean, boolean)
+ */
+ protected boolean afterSave(boolean newRecord, boolean success)
+ {
+ success = super.afterSave(newRecord, success);
+
+ if (success)
+ {
+ s_cache.remove(new Integer(get_ID()));
+ }
+
+ return success;
+ }
+}
diff --git a/posterita/posterita/src/main/org/compiere/model/MPayment.java b/posterita/posterita/src/main/org/compiere/model/MPayment.java
new file mode 100644
index 0000000000..e657ce317d
--- /dev/null
+++ b/posterita/posterita/src/main/org/compiere/model/MPayment.java
@@ -0,0 +1,2467 @@
+/******************************************************************************
+ * Product: Adempiere ERP & CRM Smart Business Solution *
+ * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
+ * This program is free software; you can redistribute it and/or modify it *
+ * under the terms version 2 of the GNU General Public License as published *
+ * by the Free Software Foundation. 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, write to the Free Software Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
+ * For the text or an alternative of this public license, you may reach us *
+ * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
+ * or via info@compiere.org or http://www.compiere.org/license.html *
+ *****************************************************************************/
+package org.compiere.model;
+
+import java.io.*;
+import java.math.*;
+import java.rmi.*;
+import java.sql.*;
+import java.util.*;
+import java.util.logging.*;
+
+import org.compiere.db.*;
+import org.compiere.interfaces.*;
+import org.compiere.process.*;
+import org.compiere.util.*;
+
+/**
+ * Payment Model.
+ * - retrieve and create payments for invoice
+ *
+ * Event chain
+ * - Payment inserted
+ * C_Payment_Trg fires
+ * update DocumentNo with payment summary
+ * - Payment posted (C_Payment_Post)
+ * create allocation line
+ * C_Allocation_Trg fires
+ * Update C_BPartner Open Item Amount
+ * update invoice (IsPaid)
+ * link invoice-payment if batch
+ *
+ * Lifeline:
+ * - Created by VPayment or directly
+ * - When changed in VPayment
+ * - old payment is reversed
+ * - new payment created
+ *
+ * When Payment is posed, the Allocation is made
+ *
+ * @author Jorg Janke
+ * @version $Id: MPayment.java,v 1.4 2006/10/02 05:18:39 jjanke Exp $
+ */
+public final class MPayment extends X_C_Payment
+ implements DocAction, ProcessCall
+{
+ /**
+ * Get Payments Of BPartner
+ * @param ctx context
+ * @param C_BPartner_ID id
+ * @param trxName transaction
+ * @return array
+ */
+ public static MPayment[] getOfBPartner (Properties ctx, int C_BPartner_ID, String trxName)
+ {
+ ArrayList list = new ArrayList();
+ String sql = "SELECT * FROM C_Payment WHERE C_BPartner_ID=?";
+ PreparedStatement pstmt = null;
+ try
+ {
+ pstmt = DB.prepareStatement(sql, trxName);
+ pstmt.setInt(1, C_BPartner_ID);
+ ResultSet rs = pstmt.executeQuery();
+ while (rs.next())
+ list.add(new MPayment(ctx,rs, trxName));
+ rs.close();
+ pstmt.close();
+ pstmt = null;
+ }
+ catch (Exception e)
+ {
+ s_log.log(Level.SEVERE, sql, e);
+ }
+ try
+ {
+ if (pstmt != null)
+ pstmt.close();
+ pstmt = null;
+ }
+ catch (Exception e)
+ {
+ pstmt = null;
+ }
+
+ //
+ MPayment[] retValue = new MPayment[list.size()];
+ list.toArray(retValue);
+ return retValue;
+ } // getOfBPartner
+
+
+ /**************************************************************************
+ * Default Constructor
+ * @param ctx context
+ * @param C_Payment_ID payment to load, (0 create new payment)
+ * @param trxName trx name
+ */
+ public MPayment (Properties ctx, int C_Payment_ID, String trxName)
+ {
+ super (ctx, C_Payment_ID, trxName);
+ // New
+ if (C_Payment_ID == 0)
+ {
+ setDocAction(DOCACTION_Complete);
+ setDocStatus(DOCSTATUS_Drafted);
+ setTrxType(TRXTYPE_Sales);
+ //
+ setR_AvsAddr (R_AVSZIP_Unavailable);
+ setR_AvsZip (R_AVSZIP_Unavailable);
+ //
+ setIsReceipt (true);
+ setIsApproved (false);
+ setIsReconciled (false);
+ setIsAllocated(false);
+ setIsOnline (false);
+ setIsSelfService(false);
+ setIsDelayedCapture (false);
+ setIsPrepayment(false);
+ setProcessed(false);
+ setProcessing(false);
+ setPosted (false);
+ //
+ setPayAmt(Env.ZERO);
+ setDiscountAmt(Env.ZERO);
+ setTaxAmt(Env.ZERO);
+ setWriteOffAmt(Env.ZERO);
+ setIsOverUnderPayment (false);
+ setOverUnderAmt(Env.ZERO);
+ //
+ setDateTrx (new Timestamp(System.currentTimeMillis()));
+ setDateAcct (getDateTrx());
+ setTenderType(TENDERTYPE_Check);
+ }
+ } // MPayment
+
+ /**
+ * Load Constructor
+ * @param ctx context
+ * @param rs result set record
+ * @param trxName transaction
+ */
+ public MPayment (Properties ctx, ResultSet rs, String trxName)
+ {
+ super(ctx, rs, trxName);
+ } // MPayment
+
+ /** Temporary Payment Processors */
+ private MPaymentProcessor[] m_mPaymentProcessors = null;
+ /** Temporary Payment Processor */
+ private MPaymentProcessor m_mPaymentProcessor = null;
+ /** Logger */
+ private static CLogger s_log = CLogger.getCLogger (MPayment.class);
+ /** Error Message */
+ private String m_errorMessage = null;
+
+ /** Reversal Indicator */
+ public static String REVERSE_INDICATOR = "^";
+
+ /**
+ * Reset Payment to new status
+ */
+ public void resetNew()
+ {
+ setC_Payment_ID(0); // forces new Record
+ set_ValueNoCheck ("DocumentNo", null);
+ setDocAction(DOCACTION_Prepare);
+ setDocStatus(DOCSTATUS_Drafted);
+ setProcessed(false);
+ setPosted (false);
+ setIsReconciled (false);
+ setIsAllocated(false);
+ setIsOnline(false);
+ setIsDelayedCapture (false);
+ // setC_BPartner_ID(0);
+ setC_Invoice_ID(0);
+ setC_Order_ID(0);
+ setC_Charge_ID(0);
+ setC_Project_ID(0);
+ setIsPrepayment(false);
+ } // resetNew
+
+ /**
+ * Is Cashbook Transfer Trx
+ * @return true if Cash Trx
+ */
+ public boolean isCashTrx()
+ {
+ return "X".equals(getTenderType());
+ } // isCashTrx
+
+ /**************************************************************************
+ * Set Credit Card.
+ * Need to set PatmentProcessor after Amount/Currency Set
+ *
+ * @param TrxType Transaction Type see TRX_
+ * @param creditCardType CC type
+ * @param creditCardNumber CC number
+ * @param creditCardVV CC verification
+ * @param creditCardExpMM CC Exp MM
+ * @param creditCardExpYY CC Exp YY
+ * @return true if valid
+ */
+ public boolean setCreditCard (String TrxType, String creditCardType, String creditCardNumber,
+ String creditCardVV, int creditCardExpMM, int creditCardExpYY)
+ {
+ setTenderType(TENDERTYPE_CreditCard);
+ setTrxType(TrxType);
+ //
+ setCreditCardType (creditCardType);
+ setCreditCardNumber (creditCardNumber);
+ setCreditCardVV (creditCardVV);
+ setCreditCardExpMM (creditCardExpMM);
+ setCreditCardExpYY (creditCardExpYY);
+ //
+ int check = MPaymentValidate.validateCreditCardNumber(creditCardNumber, creditCardType).length()
+ + MPaymentValidate.validateCreditCardExp(creditCardExpMM, creditCardExpYY).length();
+ if (creditCardVV.length() > 0)
+ check += MPaymentValidate.validateCreditCardVV(creditCardVV, creditCardType).length();
+ return check == 0;
+ } // setCreditCard
+
+ /**
+ * Set Credit Card - Exp.
+ * Need to set PatmentProcessor after Amount/Currency Set
+ *
+ * @param TrxType Transaction Type see TRX_
+ * @param creditCardType CC type
+ * @param creditCardNumber CC number
+ * @param creditCardVV CC verification
+ * @param creditCardExp CC Exp
+ * @return true if valid
+ */
+ public boolean setCreditCard (String TrxType, String creditCardType, String creditCardNumber,
+ String creditCardVV, String creditCardExp)
+ {
+ return setCreditCard(TrxType, creditCardType, creditCardNumber,
+ creditCardVV, MPaymentValidate.getCreditCardExpMM(creditCardExp),
+ MPaymentValidate.getCreditCardExpYY(creditCardExp));
+ } // setCreditCard
+
+ /**
+ * Set ACH BankAccount Info
+ *
+ * @param C_BankAccount_ID bank account
+ * @param isReceipt true if receipt
+ * @return true if valid
+ */
+ public boolean setBankACH (MPaySelectionCheck preparedPayment)
+ {
+ // Our Bank
+ setC_BankAccount_ID(preparedPayment.getParent().getC_BankAccount_ID());
+ // Target Bank
+ int C_BP_BankAccount_ID = preparedPayment.getC_BP_BankAccount_ID();
+ MBPBankAccount ba = new MBPBankAccount (preparedPayment.getCtx(), C_BP_BankAccount_ID, null);
+ setRoutingNo(ba.getRoutingNo());
+ setAccountNo(ba.getAccountNo());
+ setIsReceipt (X_C_Order.PAYMENTRULE_DirectDebit.equals // AR only
+ (preparedPayment.getPaymentRule()));
+ //
+ int check = MPaymentValidate.validateRoutingNo(getRoutingNo()).length()
+ + MPaymentValidate.validateAccountNo(getAccountNo()).length();
+ return check == 0;
+ } // setBankACH
+
+ /**
+ * Set ACH BankAccount Info
+ *
+ * @param C_BankAccount_ID bank account
+ * @param isReceipt true if receipt
+ * @param tenderType - Direct Debit or Direct Deposit
+ * @param routingNo routing
+ * @param accountNo account
+ * @return true if valid
+ */
+ public boolean setBankACH (int C_BankAccount_ID, boolean isReceipt, String tenderType,
+ String routingNo, String accountNo)
+ {
+ setTenderType (tenderType);
+ setIsReceipt (isReceipt);
+ //
+ if (C_BankAccount_ID > 0
+ && (routingNo == null || routingNo.length() == 0 || accountNo == null || accountNo.length() == 0))
+ setBankAccountDetails(C_BankAccount_ID);
+ else
+ {
+ setC_BankAccount_ID(C_BankAccount_ID);
+ setRoutingNo (routingNo);
+ setAccountNo (accountNo);
+ }
+ setCheckNo ("");
+ //
+ int check = MPaymentValidate.validateRoutingNo(routingNo).length()
+ + MPaymentValidate.validateAccountNo(accountNo).length();
+ return check == 0;
+ } // setBankACH
+
+ /**
+ * Set Check BankAccount Info
+ *
+ * @param C_BankAccount_ID bank account
+ * @param isReceipt true if receipt
+ * @param checkNo chack no
+ * @return true if valid
+ */
+ public boolean setBankCheck (int C_BankAccount_ID, boolean isReceipt, String checkNo)
+ {
+ return setBankCheck (C_BankAccount_ID, isReceipt, null, null, checkNo);
+ } // setBankCheck
+
+ /**
+ * Set Check BankAccount Info
+ *
+ * @param C_BankAccount_ID bank account
+ * @param isReceipt true if receipt
+ * @param routingNo routing no
+ * @param accountNo account no
+ * @param checkNo chack no
+ * @return true if valid
+ */
+ public boolean setBankCheck (int C_BankAccount_ID, boolean isReceipt,
+ String routingNo, String accountNo, String checkNo)
+ {
+ setTenderType (TENDERTYPE_Check);
+ setIsReceipt (isReceipt);
+ //
+ if (C_BankAccount_ID > 0
+ && (routingNo == null || routingNo.length() == 0
+ || accountNo == null || accountNo.length() == 0))
+ setBankAccountDetails(C_BankAccount_ID);
+ else
+ {
+ setC_BankAccount_ID(C_BankAccount_ID);
+ setRoutingNo (routingNo);
+ setAccountNo (accountNo);
+ }
+ setCheckNo (checkNo);
+ //
+ int check = MPaymentValidate.validateRoutingNo(routingNo).length()
+ + MPaymentValidate.validateAccountNo(accountNo).length()
+ + MPaymentValidate.validateCheckNo(checkNo).length();
+ return check == 0; // no error message
+ } // setBankCheck
+
+ /**
+ * Set Bank Account Details.
+ * Look up Routing No & Bank Acct No
+ * @param C_BankAccount_ID bank account
+ */
+ public void setBankAccountDetails (int C_BankAccount_ID)
+ {
+ if (C_BankAccount_ID == 0)
+ return;
+ setC_BankAccount_ID(C_BankAccount_ID);
+ //
+ String sql = "SELECT b.RoutingNo, ba.AccountNo "
+ + "FROM C_BankAccount ba"
+ + " INNER JOIN C_Bank b ON (ba.C_Bank_ID=b.C_Bank_ID) "
+ + "WHERE C_BankAccount_ID=?";
+ try
+ {
+ PreparedStatement pstmt = DB.prepareStatement(sql, get_TrxName());
+ pstmt.setInt(1, C_BankAccount_ID);
+ ResultSet rs = pstmt.executeQuery();
+ if (rs.next())
+ {
+ setRoutingNo (rs.getString(1));
+ setAccountNo (rs.getString(2));
+ }
+ rs.close();
+ pstmt.close();
+ }
+ catch (SQLException e)
+ {
+ log.log(Level.SEVERE, sql, e);
+ }
+ } // setBankAccountDetails
+
+ /**
+ * Set Account Address
+ *
+ * @param name name
+ * @param street street
+ * @param city city
+ * @param state state
+ * @param zip zip
+ * @param country country
+ */
+ public void setAccountAddress (String name, String street,
+ String city, String state, String zip, String country)
+ {
+ setA_Name (name);
+ setA_Street (street);
+ setA_City (city);
+ setA_State (state);
+ setA_Zip (zip);
+ setA_Country(country);
+ } // setAccountAddress
+
+
+ /**************************************************************************
+ * Process Payment
+ * @return true if approved
+ */
+ public boolean processOnline()
+ {
+ log.info ("Amt=" + getPayAmt());
+ //
+ setIsOnline(true);
+ setErrorMessage(null);
+ // prevent charging twice
+ if (isApproved())
+ {
+ log.info("Already processed - " + getR_Result() + " - " + getR_RespMsg());
+ setErrorMessage("Payment already Processed");
+ return true;
+ }
+
+ if (m_mPaymentProcessor == null)
+ setPaymentProcessor();
+ if (m_mPaymentProcessor == null)
+ {
+ log.log(Level.WARNING, "No Payment Processor Model");
+ setErrorMessage("No Payment Processor Model");
+ return false;
+ }
+
+ boolean approved = false;
+ /** Process Payment on Server */
+ if (DB.isRemoteObjects())
+ {
+ Server server = CConnection.get().getServer();
+ try
+ {
+ if (server != null)
+ { // See ServerBean
+ String trxName = null; // unconditionally save
+ save(trxName); // server reads from disk
+ approved = server.paymentOnline (getCtx(), getC_Payment_ID(),
+ m_mPaymentProcessor.getC_PaymentProcessor_ID(), trxName);
+ if (CLogMgt.isLevelFinest())
+ s_log.fine("server => " + approved);
+ load(trxName); // server saves to disk
+ setIsApproved(approved);
+ return approved;
+ }
+ log.log(Level.WARNING, "AppsServer not found");
+ }
+ catch (RemoteException ex)
+ {
+ log.log(Level.SEVERE, "AppsServer error", ex);
+ }
+ }
+ /** **/
+
+ // Try locally
+ try
+ {
+ PaymentProcessor pp = PaymentProcessor.create(m_mPaymentProcessor, this);
+ if (pp == null)
+ setErrorMessage("No Payment Processor");
+ else
+ {
+ approved = pp.processCC ();
+ if (approved)
+ setErrorMessage(null);
+ else
+ setErrorMessage("From " + getCreditCardName() + ": " + getR_RespMsg());
+ }
+ }
+ catch (Exception e)
+ {
+ log.log(Level.SEVERE, "processOnline", e);
+ setErrorMessage("Payment Processor Error");
+ }
+ setIsApproved(approved);
+ return approved;
+ } // processOnline
+
+ /**
+ * Process Online Payment.
+ * implements ProcessCall after standard constructor
+ * Called when pressing the Process_Online button in C_Payment
+ *
+ * @param ctx Context
+ * @param pi Process Info
+ * @param trx transaction
+ * @return true if the next process should be performed
+ */
+ public boolean startProcess (Properties ctx, ProcessInfo pi, Trx trx)
+ {
+ log.info("startProcess - " + pi.getRecord_ID());
+ boolean retValue = false;
+ //
+ if (pi.getRecord_ID() != get_ID())
+ {
+ log.log(Level.SEVERE, "startProcess - Not same Payment - " + pi.getRecord_ID());
+ return false;
+ }
+ // Process it
+ retValue = processOnline();
+ save();
+ return retValue; // Payment processed
+ } // startProcess
+
+
+ /**
+ * Before Save
+ * @param newRecord new
+ * @return save
+ */
+ protected boolean beforeSave (boolean newRecord)
+ {
+ // @Trifon - CashPayments
+ //if ( getTenderType().equals("X") ) {
+ if ( isCashTrx() ) {
+ // Cash Book Is mandatory
+ if ( getC_CashBook_ID() <= 0 ) {
+ log.saveError("Error", Msg.parseTranslation(getCtx(), "@Mandatory@: @C_CashBook_ID@"));
+ return false;
+ }
+ } else {
+ // Bank Account Is mandatory
+ if ( getC_BankAccount_ID() <= 0 ) {
+ log.saveError("Error", Msg.parseTranslation(getCtx(), "@Mandatory@: @C_BankAccount_ID@"));
+ return false;
+ }
+ }
+ // end @Trifon - CashPayments
+
+ // We have a charge
+ if (getC_Charge_ID() != 0)
+ {
+ if (newRecord || is_ValueChanged("C_Charge_ID"))
+ {
+ setC_Order_ID(0);
+ setC_Invoice_ID(0);
+ setWriteOffAmt(Env.ZERO);
+ setDiscountAmt(Env.ZERO);
+ setIsOverUnderPayment(false);
+ setOverUnderAmt(Env.ZERO);
+ setIsPrepayment(false);
+ }
+ }
+ // We need a BPartner
+ else if (getC_BPartner_ID() == 0 && !isCashTrx())
+ {
+ if (getC_Invoice_ID() != 0)
+ ;
+ else if (getC_Order_ID() != 0)
+ ;
+ else
+ {
+ log.saveError("Error", Msg.parseTranslation(getCtx(), "@NotFound@: @C_BPartner_ID@"));
+ return false;
+ }
+ }
+ // Prepayment: No charge and order or project (not as acct dimension)
+ if (newRecord
+ || is_ValueChanged("C_Charge_ID") || is_ValueChanged("C_Invoice_ID")
+ || is_ValueChanged("C_Order_ID") || is_ValueChanged("C_Project_ID"))
+ setIsPrepayment (getC_Charge_ID() == 0
+ && getC_BPartner_ID() != 0
+ && (getC_Order_ID() != 0
+ || (getC_Project_ID() != 0 && getC_Invoice_ID() == 0)));
+ if (isPrepayment())
+ {
+ if (newRecord
+ || is_ValueChanged("C_Order_ID") || is_ValueChanged("C_Project_ID"))
+ {
+ setWriteOffAmt(Env.ZERO);
+ setDiscountAmt(Env.ZERO);
+ setIsOverUnderPayment(false);
+ setOverUnderAmt(Env.ZERO);
+ }
+ }
+
+ // Document Type/Receipt
+ if (getC_DocType_ID() == 0)
+ setC_DocType_ID();
+ else
+ {
+ MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
+ setIsReceipt(dt.isSOTrx());
+ }
+ setDocumentNo();
+ //
+ if (getDateAcct() == null)
+ setDateAcct(getDateTrx());
+ //
+ if (!isOverUnderPayment())
+ setOverUnderAmt(Env.ZERO);
+
+ // Organization
+ if ((newRecord || is_ValueChanged("C_BankAccount_ID"))
+ && getC_Charge_ID() == 0) // allow different org for charge
+ {
+ MBankAccount ba = MBankAccount.get(getCtx(), getC_BankAccount_ID());
+ if (ba.getAD_Org_ID() != 0)
+ setAD_Org_ID(ba.getAD_Org_ID());
+ }
+
+ // [ adempiere-Bugs-1885417 ] Validate BP on Payment Prepare or BeforeSave
+ // there is bp and (invoice or order)
+ if (getC_BPartner_ID() != 0 && (getC_Invoice_ID() != 0 || getC_Order_ID() != 0)) {
+ if (getC_Invoice_ID() != 0) {
+ MInvoice inv = new MInvoice(getCtx(), getC_Invoice_ID(), get_TrxName());
+ if (inv.getC_BPartner_ID() != getC_BPartner_ID()) {
+ log.saveError("Error", Msg.parseTranslation(getCtx(), "BP different from BP Invoice"));
+ return false;
+ }
+ }
+ if (getC_Order_ID() != 0) {
+ MOrder ord = new MOrder(getCtx(), getC_Order_ID(), get_TrxName());
+ if (ord.getC_BPartner_ID() != getC_BPartner_ID()) {
+ log.saveError("Error", Msg.parseTranslation(getCtx(), "BP different from BP Order"));
+ return false;
+ }
+ }
+ }
+
+ return true;
+ } // beforeSave
+
+ /**
+ * Get Allocated Amt in Payment Currency
+ * @return amount or null
+ */
+ public BigDecimal getAllocatedAmt ()
+ {
+ BigDecimal retValue = null;
+ if (getC_Charge_ID() != 0)
+ return getPayAmt();
+ //
+ String sql = "SELECT SUM(currencyConvert(al.Amount,"
+ + "ah.C_Currency_ID, p.C_Currency_ID,ah.DateTrx,p.C_ConversionType_ID, al.AD_Client_ID,al.AD_Org_ID)) "
+ + "FROM C_AllocationLine al"
+ + " INNER JOIN C_AllocationHdr ah ON (al.C_AllocationHdr_ID=ah.C_AllocationHdr_ID) "
+ + " INNER JOIN C_Payment p ON (al.C_Payment_ID=p.C_Payment_ID) "
+ + "WHERE al.C_Payment_ID=?"
+ + " AND ah.IsActive='Y' AND al.IsActive='Y'";
+ // + " AND al.C_Invoice_ID IS NOT NULL";
+ PreparedStatement pstmt = null;
+ try
+ {
+ pstmt = DB.prepareStatement(sql, get_TrxName());
+ pstmt.setInt(1, getC_Payment_ID());
+ ResultSet rs = pstmt.executeQuery();
+ if (rs.next())
+ retValue = rs.getBigDecimal(1);
+ rs.close();
+ pstmt.close();
+ pstmt = null;
+ }
+ catch (Exception e)
+ {
+ log.log(Level.SEVERE, "getAllocatedAmt", e);
+ }
+ try
+ {
+ if (pstmt != null)
+ pstmt.close();
+ pstmt = null;
+ }
+ catch (Exception e)
+ {
+ pstmt = null;
+ }
+ // log.fine("getAllocatedAmt - " + retValue);
+ // ? ROUND(NVL(v_AllocatedAmt,0), 2);
+ return retValue;
+ } // getAllocatedAmt
+
+ /**
+ * Test Allocation (and set allocated flag)
+ * @return true if updated
+ */
+ public boolean testAllocation()
+ {
+ // Cash Trx always allocated!!! WHY???
+/* @Trifon - CashPayments
+ if (isCashTrx())
+ {
+ if (!isAllocated())
+ {
+ setIsAllocated(true);
+ return true;
+ }
+ return false;
+ }
+*/
+ //
+ BigDecimal alloc = getAllocatedAmt();
+ if (alloc == null)
+ alloc = Env.ZERO;
+ BigDecimal total = getPayAmt();
+ if (!isReceipt())
+ total = total.negate();
+ boolean test = total.compareTo(alloc) == 0;
+ boolean change = test != isAllocated();
+ if (change)
+ setIsAllocated(test);
+ log.fine("Allocated=" + test
+ + " (" + alloc + "=" + total + ")");
+ return change;
+ } // testAllocation
+
+ /**
+ * Set Allocated Flag for payments
+ * @param ctx context
+ * @param C_BPartner_ID if 0 all
+ * @param trxName trx
+ */
+ public static void setIsAllocated (Properties ctx, int C_BPartner_ID, String trxName)
+ {
+ int counter = 0;
+ String sql = "SELECT * FROM C_Payment "
+ + "WHERE IsAllocated='N' AND DocStatus IN ('CO','CL')";
+ if (C_BPartner_ID > 1)
+ sql += " AND C_BPartner_ID=?";
+ else
+ sql += " AND AD_Client_ID=" + Env.getAD_Client_ID(ctx);
+ PreparedStatement pstmt = null;
+ try
+ {
+ pstmt = DB.prepareStatement (sql, trxName);
+ if (C_BPartner_ID > 1)
+ pstmt.setInt (1, C_BPartner_ID);
+ ResultSet rs = pstmt.executeQuery ();
+ while (rs.next ())
+ {
+ MPayment pay = new MPayment (ctx, rs, trxName);
+ if (pay.testAllocation())
+ if (pay.save())
+ counter++;
+ }
+ rs.close ();
+ pstmt.close ();
+ pstmt = null;
+ }
+ catch (Exception e)
+ {
+ s_log.log(Level.SEVERE, sql, e);
+ }
+ try
+ {
+ if (pstmt != null)
+ pstmt.close ();
+ pstmt = null;
+ }
+ catch (Exception e)
+ {
+ pstmt = null;
+ }
+ s_log.config("#" + counter);
+ } // setIsAllocated
+
+ /**************************************************************************
+ * Set Error Message
+ * @param errorMessage error message
+ */
+ public void setErrorMessage(String errorMessage)
+ {
+ m_errorMessage = errorMessage;
+ } // setErrorMessage
+
+ /**
+ * Get Error Message
+ * @return error message
+ */
+ public String getErrorMessage()
+ {
+ return m_errorMessage;
+ } // getErrorMessage
+
+
+ /**
+ * Set Bank Account for Payment.
+ * @param C_BankAccount_ID C_BankAccount_ID
+ */
+ public void setC_BankAccount_ID (int C_BankAccount_ID)
+ {
+ if (C_BankAccount_ID == 0)
+ {
+ setPaymentProcessor();
+ if (getC_BankAccount_ID() == 0)
+ throw new IllegalArgumentException("Can't find Bank Account");
+ }
+ else
+ super.setC_BankAccount_ID(C_BankAccount_ID);
+ } // setC_BankAccount_ID
+
+ /**
+ * Set BankAccount and PaymentProcessor
+ * @return true if found
+ */
+ public boolean setPaymentProcessor ()
+ {
+ return setPaymentProcessor (getTenderType(), getCreditCardType());
+ } // setPaymentProcessor
+
+ /**
+ * Set BankAccount and PaymentProcessor
+ * @param tender TenderType see TENDER_
+ * @param CCType CC Type see CC_
+ * @return true if found
+ */
+ public boolean setPaymentProcessor (String tender, String CCType)
+ {
+ m_mPaymentProcessor = null;
+ // Get Processor List
+ if (m_mPaymentProcessors == null || m_mPaymentProcessors.length == 0)
+ m_mPaymentProcessors = MPaymentProcessor.find (getCtx(), tender, CCType, getAD_Client_ID(),
+ getC_Currency_ID(), getPayAmt(), get_TrxName());
+ // Relax Amount
+ if (m_mPaymentProcessors == null || m_mPaymentProcessors.length == 0)
+ m_mPaymentProcessors = MPaymentProcessor.find (getCtx(), tender, CCType, getAD_Client_ID(),
+ getC_Currency_ID(), Env.ZERO, get_TrxName());
+ if (m_mPaymentProcessors == null || m_mPaymentProcessors.length == 0)
+ return false;
+
+ // Find the first right one
+ for (int i = 0; i < m_mPaymentProcessors.length; i++)
+ {
+ if (m_mPaymentProcessors[i].accepts (tender, CCType))
+ {
+ m_mPaymentProcessor = m_mPaymentProcessors[i];
+ }
+ }
+ if (m_mPaymentProcessor != null)
+ setC_BankAccount_ID (m_mPaymentProcessor.getC_BankAccount_ID());
+ //
+ return m_mPaymentProcessor != null;
+ } // setPaymentProcessor
+
+
+ /**
+ * Get Accepted Credit Cards for PayAmt (default 0)
+ * @return credit cards
+ */
+ public ValueNamePair[] getCreditCards ()
+ {
+ return getCreditCards(getPayAmt());
+ } // getCreditCards
+
+
+ /**
+ * Get Accepted Credit Cards for amount
+ * @param amt trx amount
+ * @return credit cards
+ */
+ public ValueNamePair[] getCreditCards (BigDecimal amt)
+ {
+ try
+ {
+ if (m_mPaymentProcessors == null || m_mPaymentProcessors.length == 0)
+ m_mPaymentProcessors = MPaymentProcessor.find (getCtx (), null, null,
+ getAD_Client_ID (), getC_Currency_ID (), amt, get_TrxName());
+ //
+ HashMap map = new HashMap(); // to eliminate duplicates
+ for (int i = 0; i < m_mPaymentProcessors.length; i++)
+ {
+ if (m_mPaymentProcessors[i].isAcceptAMEX ())
+ map.put (CREDITCARDTYPE_Amex, getCreditCardPair (CREDITCARDTYPE_Amex));
+ if (m_mPaymentProcessors[i].isAcceptDiners ())
+ map.put (CREDITCARDTYPE_Diners, getCreditCardPair (CREDITCARDTYPE_Diners));
+ if (m_mPaymentProcessors[i].isAcceptDiscover ())
+ map.put (CREDITCARDTYPE_Discover, getCreditCardPair (CREDITCARDTYPE_Discover));
+ if (m_mPaymentProcessors[i].isAcceptMC ())
+ map.put (CREDITCARDTYPE_MasterCard, getCreditCardPair (CREDITCARDTYPE_MasterCard));
+ if (m_mPaymentProcessors[i].isAcceptCorporate ())
+ map.put (CREDITCARDTYPE_PurchaseCard, getCreditCardPair (CREDITCARDTYPE_PurchaseCard));
+ if (m_mPaymentProcessors[i].isAcceptVisa ())
+ map.put (CREDITCARDTYPE_Visa, getCreditCardPair (CREDITCARDTYPE_Visa));
+ } // for all payment processors
+ //
+ ValueNamePair[] retValue = new ValueNamePair[map.size ()];
+ map.values ().toArray (retValue);
+ log.fine("getCreditCards - #" + retValue.length + " - Processors=" + m_mPaymentProcessors.length);
+ return retValue;
+ }
+ catch (Exception ex)
+ {
+ ex.printStackTrace();
+ return null;
+ }
+ } // getCreditCards
+
+ /**
+ * Get Type and name pair
+ * @param CreditCardType credit card Type
+ * @return pair
+ */
+ private ValueNamePair getCreditCardPair (String CreditCardType)
+ {
+ return new ValueNamePair (CreditCardType, getCreditCardName(CreditCardType));
+ } // getCreditCardPair
+
+
+ /**************************************************************************
+ * Credit Card Number
+ * @param CreditCardNumber CreditCard Number
+ */
+ public void setCreditCardNumber (String CreditCardNumber)
+ {
+ super.setCreditCardNumber (MPaymentValidate.checkNumeric(CreditCardNumber));
+ } // setCreditCardNumber
+
+ /**
+ * Verification Code
+ * @param newCreditCardVV CC verification
+ */
+ public void setCreditCardVV(String newCreditCardVV)
+ {
+ super.setCreditCardVV (MPaymentValidate.checkNumeric(newCreditCardVV));
+ } // setCreditCardVV
+
+ /**
+ * Two Digit CreditCard MM
+ * @param CreditCardExpMM Exp month
+ */
+ public void setCreditCardExpMM (int CreditCardExpMM)
+ {
+ if (CreditCardExpMM < 1 || CreditCardExpMM > 12)
+ ;
+ else
+ super.setCreditCardExpMM (CreditCardExpMM);
+ } // setCreditCardExpMM
+
+ /**
+ * Two digit CreditCard YY (til 2020)
+ * @param newCreditCardExpYY 2 or 4 digit year
+ */
+ public void setCreditCardExpYY (int newCreditCardExpYY)
+ {
+ int CreditCardExpYY = newCreditCardExpYY;
+ if (newCreditCardExpYY > 1999)
+ CreditCardExpYY = newCreditCardExpYY-2000;
+ super.setCreditCardExpYY(CreditCardExpYY);
+ } // setCreditCardExpYY
+
+ /**
+ * CreditCard Exp MMYY
+ * @param mmyy Exp in form of mmyy
+ * @return true if valid
+ */
+ public boolean setCreditCardExp (String mmyy)
+ {
+ if (MPaymentValidate.validateCreditCardExp(mmyy).length() != 0)
+ return false;
+ //
+ String exp = MPaymentValidate.checkNumeric(mmyy);
+ String mmStr = exp.substring(0,2);
+ String yyStr = exp.substring(2,4);
+ setCreditCardExpMM (Integer.parseInt(mmStr));
+ setCreditCardExpYY (Integer.parseInt(yyStr));
+ return true;
+ } // setCreditCardExp
+
+
+ /**
+ * CreditCard Exp MMYY
+ * @param delimiter / - or null
+ * @return Exp
+ */
+ public String getCreditCardExp(String delimiter)
+ {
+ String mm = String.valueOf(getCreditCardExpMM());
+ String yy = String.valueOf(getCreditCardExpYY());
+
+ StringBuffer retValue = new StringBuffer();
+ if (mm.length() == 1)
+ retValue.append("0");
+ retValue.append(mm);
+ //
+ if (delimiter != null)
+ retValue.append(delimiter);
+ //
+ if (yy.length() == 1)
+ retValue.append("0");
+ retValue.append(yy);
+ //
+ return (retValue.toString());
+ } // getCreditCardExp
+
+ /**
+ * MICR
+ * @param MICR MICR
+ */
+ public void setMicr (String MICR)
+ {
+ super.setMicr (MPaymentValidate.checkNumeric(MICR));
+ } // setBankMICR
+
+ /**
+ * Routing No
+ * @param RoutingNo Routing No
+ */
+ public void setRoutingNo(String RoutingNo)
+ {
+ super.setRoutingNo (MPaymentValidate.checkNumeric(RoutingNo));
+ } // setBankRoutingNo
+
+
+ /**
+ * Bank Account No
+ * @param AccountNo AccountNo
+ */
+ public void setAccountNo (String AccountNo)
+ {
+ super.setAccountNo (MPaymentValidate.checkNumeric(AccountNo));
+ } // setBankAccountNo
+
+
+ /**
+ * Check No
+ * @param CheckNo Check No
+ */
+ public void setCheckNo(String CheckNo)
+ {
+ super.setCheckNo(MPaymentValidate.checkNumeric(CheckNo));
+ } // setBankCheckNo
+
+
+ /**
+ * Set DocumentNo to Payment info.
+ * If there is a R_PnRef that is set automatically
+ */
+ private void setDocumentNo()
+ {
+ // Cash Transfer
+ if ("X".equals(getTenderType()))
+ return;
+ // Current Document No
+ String documentNo = getDocumentNo();
+ // Existing reversal
+ if (documentNo != null
+ && documentNo.indexOf(REVERSE_INDICATOR) >= 0)
+ return;
+
+ // If external number exists - enforce it
+ if (getR_PnRef() != null && getR_PnRef().length() > 0)
+ {
+ if (!getR_PnRef().equals(documentNo))
+ setDocumentNo(getR_PnRef());
+ return;
+ }
+
+ documentNo = "";
+ // globalqss - read configuration to assign credit card or check number number for Payments
+ // Credit Card
+ if (TENDERTYPE_CreditCard.equals(getTenderType()))
+ {
+ if (MSysConfig.getBooleanValue("PAYMENT_OVERWRITE_DOCUMENTNO_WITH_CREDIT_CARD", true, getAD_Client_ID())) {
+ documentNo = getCreditCardType()
+ + " " + Obscure.obscure(getCreditCardNumber())
+ + " " + getCreditCardExpMM()
+ + "/" + getCreditCardExpYY();
+ }
+ }
+ // Own Check No
+ else if (TENDERTYPE_Check.equals(getTenderType())
+ && !isReceipt()
+ && getCheckNo() != null && getCheckNo().length() > 0)
+ {
+ if (MSysConfig.getBooleanValue("PAYMENT_OVERWRITE_DOCUMENTNO_WITH_CHECK_ON_PAYMENT", true, getAD_Client_ID())) {
+ documentNo = getCheckNo();
+ }
+ }
+ // Customer Check: Routing: Account #Check
+ else if (TENDERTYPE_Check.equals(getTenderType())
+ && isReceipt())
+ {
+ if (MSysConfig.getBooleanValue("PAYMENT_OVERWRITE_DOCUMENTNO_WITH_CHECK_ON_RECEIPT", true, getAD_Client_ID())) {
+ if (getRoutingNo() != null)
+ documentNo = getRoutingNo() + ": ";
+ if (getAccountNo() != null)
+ documentNo += getAccountNo();
+ if (getCheckNo() != null)
+ {
+ if (documentNo.length() > 0)
+ documentNo += " ";
+ documentNo += "#" + getCheckNo();
+ }
+ }
+ }
+
+ // Set Document No
+ documentNo = documentNo.trim();
+ if (documentNo.length() > 0)
+ setDocumentNo(documentNo);
+ } // setDocumentNo
+
+ /**
+ * Set Refernce No (and Document No)
+ * @param R_PnRef reference
+ */
+ public void setR_PnRef (String R_PnRef)
+ {
+ super.setR_PnRef (R_PnRef);
+ if (R_PnRef != null)
+ setDocumentNo (R_PnRef);
+ } // setR_PnRef
+
+ // ---------------
+
+ /**
+ * Set Payment Amount
+ * @param PayAmt Pay Amt
+ */
+ public void setPayAmt (BigDecimal PayAmt)
+ {
+ super.setPayAmt(PayAmt == null ? Env.ZERO : PayAmt);
+ } // setPayAmt
+
+ /**
+ * Set Payment Amount
+ *
+ * @param C_Currency_ID currency
+ * @param payAmt amount
+ */
+ public void setAmount (int C_Currency_ID, BigDecimal payAmt)
+ {
+ if (C_Currency_ID == 0)
+ C_Currency_ID = MClient.get(getCtx()).getC_Currency_ID();
+ setC_Currency_ID(C_Currency_ID);
+ setPayAmt(payAmt);
+ } // setAmount
+
+ /**
+ * Discount Amt
+ * @param DiscountAmt Discount
+ */
+ public void setDiscountAmt (BigDecimal DiscountAmt)
+ {
+ super.setDiscountAmt (DiscountAmt == null ? Env.ZERO : DiscountAmt);
+ } // setDiscountAmt
+
+ /**
+ * WriteOff Amt
+ * @param WriteOffAmt WriteOff
+ */
+ public void setWriteOffAmt (BigDecimal WriteOffAmt)
+ {
+ super.setWriteOffAmt (WriteOffAmt == null ? Env.ZERO : WriteOffAmt);
+ } // setWriteOffAmt
+
+ /**
+ * OverUnder Amt
+ * @param OverUnderAmt OverUnder
+ */
+ public void setOverUnderAmt (BigDecimal OverUnderAmt)
+ {
+ super.setOverUnderAmt (OverUnderAmt == null ? Env.ZERO : OverUnderAmt);
+ setIsOverUnderPayment(getOverUnderAmt().compareTo(Env.ZERO) != 0);
+ } // setOverUnderAmt
+
+ /**
+ * Tax Amt
+ * @param TaxAmt Tax
+ */
+ public void setTaxAmt (BigDecimal TaxAmt)
+ {
+ super.setTaxAmt (TaxAmt == null ? Env.ZERO : TaxAmt);
+ } // setTaxAmt
+
+ /**
+ * Set Info from BP Bank Account
+ * @param ba BP bank account
+ */
+ public void setBP_BankAccount (MBPBankAccount ba)
+ {
+ log.fine("" + ba);
+ if (ba == null)
+ return;
+ setC_BPartner_ID(ba.getC_BPartner_ID());
+ setAccountAddress(ba.getA_Name(), ba.getA_Street(), ba.getA_City(),
+ ba.getA_State(), ba.getA_Zip(), ba.getA_Country());
+ setA_EMail(ba.getA_EMail());
+ setA_Ident_DL(ba.getA_Ident_DL());
+ setA_Ident_SSN(ba.getA_Ident_SSN());
+ // CC
+ if (ba.getCreditCardType() != null)
+ setCreditCardType(ba.getCreditCardType());
+ if (ba.getCreditCardNumber() != null)
+ setCreditCardNumber(ba.getCreditCardNumber());
+ if (ba.getCreditCardExpMM() != 0)
+ setCreditCardExpMM(ba.getCreditCardExpMM());
+ if (ba.getCreditCardExpYY() != 0)
+ setCreditCardExpYY(ba.getCreditCardExpYY());
+ if (ba.getCreditCardVV() != null)
+ setCreditCardVV(ba.getCreditCardVV());
+ // Bank
+ if (ba.getAccountNo() != null)
+ setAccountNo(ba.getAccountNo());
+ if (ba.getRoutingNo() != null)
+ setRoutingNo(ba.getRoutingNo());
+ } // setBP_BankAccount
+
+ /**
+ * Save Info from BP Bank Account
+ * @param ba BP bank account
+ * @return true if saved
+ */
+ public boolean saveToBP_BankAccount (MBPBankAccount ba)
+ {
+ if (ba == null)
+ return false;
+ ba.setA_Name(getA_Name());
+ ba.setA_Street(getA_Street());
+ ba.setA_City(getA_City());
+ ba.setA_State(getA_State());
+ ba.setA_Zip(getA_Zip());
+ ba.setA_Country(getA_Country());
+ ba.setA_EMail(getA_EMail());
+ ba.setA_Ident_DL(getA_Ident_DL());
+ ba.setA_Ident_SSN(getA_Ident_SSN());
+ // CC
+ ba.setCreditCardType(getCreditCardType());
+ ba.setCreditCardNumber(getCreditCardNumber());
+ ba.setCreditCardExpMM(getCreditCardExpMM());
+ ba.setCreditCardExpYY(getCreditCardExpYY());
+ ba.setCreditCardVV(getCreditCardVV());
+ // Bank
+ if (getAccountNo() != null)
+ ba.setAccountNo(getAccountNo());
+ if (getRoutingNo() != null)
+ ba.setRoutingNo(getRoutingNo());
+ // Trx
+ ba.setR_AvsAddr(getR_AvsAddr());
+ ba.setR_AvsZip(getR_AvsZip());
+ //
+ boolean ok = ba.save(get_TrxName());
+ log.fine("saveToBP_BankAccount - " + ba);
+ return ok;
+ } // setBP_BankAccount
+
+ /**
+ * Set Doc Type bases on IsReceipt
+ */
+ private void setC_DocType_ID ()
+ {
+ setC_DocType_ID(isReceipt());
+ } // setC_DocType_ID
+
+ /**
+ * Set Doc Type
+ * @param isReceipt is receipt
+ */
+ public void setC_DocType_ID (boolean isReceipt)
+ {
+ setIsReceipt(isReceipt);
+ String sql = "SELECT C_DocType_ID FROM C_DocType WHERE AD_Client_ID=? AND DocBaseType=? ORDER BY IsDefault DESC";
+ try
+ {
+ PreparedStatement pstmt = DB.prepareStatement(sql, get_TrxName());
+ pstmt.setInt(1, getAD_Client_ID());
+ if (isReceipt)
+ pstmt.setString(2, X_C_DocType.DOCBASETYPE_ARReceipt);
+ else
+ pstmt.setString(2, X_C_DocType.DOCBASETYPE_APPayment);
+ ResultSet rs = pstmt.executeQuery();
+ if (rs.next())
+ setC_DocType_ID(rs.getInt(1));
+ else
+ log.warning ("setDocType - NOT found - isReceipt=" + isReceipt);
+ rs.close();
+ pstmt.close();
+ }
+ catch (SQLException e)
+ {
+ log.log(Level.SEVERE, sql, e);
+ }
+ } // setC_DocType_ID
+
+
+ /**
+ * Set Document Type
+ * @param C_DocType_ID doc type
+ */
+ public void setC_DocType_ID (int C_DocType_ID)
+ {
+ // if (getDocumentNo() != null && getC_DocType_ID() != C_DocType_ID)
+ // setDocumentNo(null);
+ super.setC_DocType_ID(C_DocType_ID);
+ } // setC_DocType_ID
+
+ /**
+ * Verify Document Type with Invoice
+ * @return true if ok
+ */
+ private boolean verifyDocType()
+ {
+ if (getC_DocType_ID() == 0)
+ return false;
+ //
+ Boolean invoiceSO = null;
+ // Check Invoice First
+ if (getC_Invoice_ID() > 0)
+ {
+ String sql = "SELECT idt.IsSOTrx "
+ + "FROM C_Invoice i"
+ + " INNER JOIN C_DocType idt ON (i.C_DocType_ID=idt.C_DocType_ID) "
+ + "WHERE i.C_Invoice_ID=?";
+ PreparedStatement pstmt = null;
+ try
+ {
+ pstmt = DB.prepareStatement(sql, get_TrxName());
+ pstmt.setInt(1, getC_Invoice_ID());
+ ResultSet rs = pstmt.executeQuery();
+ if (rs.next())
+ invoiceSO = new Boolean ("Y".equals(rs.getString(1)));
+ rs.close();
+ pstmt.close();
+ pstmt = null;
+ }
+ catch (Exception e)
+ {
+ log.log(Level.SEVERE, sql, e);
+ }
+ try
+ {
+ if (pstmt != null)
+ pstmt.close();
+ pstmt = null;
+ }
+ catch (Exception e)
+ {
+ pstmt = null;
+ }
+ } // Invoice
+
+ // DocumentType
+ Boolean paymentSO = null;
+ PreparedStatement pstmt = null;
+ String sql = "SELECT IsSOTrx "
+ + "FROM C_DocType "
+ + "WHERE C_DocType_ID=?";
+ try
+ {
+ pstmt = DB.prepareStatement(sql, get_TrxName());
+ pstmt.setInt(1, getC_DocType_ID());
+ ResultSet rs = pstmt.executeQuery();
+ if (rs.next())
+ paymentSO = new Boolean ("Y".equals(rs.getString(1)));
+ rs.close();
+ pstmt.close();
+ pstmt = null;
+ }
+ catch (Exception e)
+ {
+ log.log(Level.SEVERE, sql, e);
+ }
+ try
+ {
+ if (pstmt != null)
+ pstmt.close();
+ pstmt = null;
+ }
+ catch (Exception e)
+ {
+ pstmt = null;
+ }
+ // No Payment info
+ if (paymentSO == null)
+ return false;
+ setIsReceipt(paymentSO.booleanValue());
+
+ // We have an Invoice .. and it does not match
+ if (invoiceSO != null
+ && invoiceSO.booleanValue() != paymentSO.booleanValue())
+ return false;
+ // OK
+ return true;
+ } // verifyDocType
+
+
+ /**
+ * Get ISO Code of Currency
+ * @return Currency ISO
+ */
+ public String getCurrencyISO()
+ {
+ return MCurrency.getISO_Code (getCtx(), getC_Currency_ID());
+ } // getCurrencyISO
+
+ /**
+ * Get Document Status
+ * @return Document Status Clear Text
+ */
+ public String getDocStatusName()
+ {
+ return MRefList.getListName(getCtx(), 131, getDocStatus());
+ } // getDocStatusName
+
+ /**
+ * Get Name of Credit Card
+ * @return Name
+ */
+ public String getCreditCardName()
+ {
+ return getCreditCardName(getCreditCardType());
+ } // getCreditCardName
+
+ /**
+ * Get Name of Credit Card
+ * @param CreditCardType credit card type
+ * @return Name
+ */
+ public String getCreditCardName(String CreditCardType)
+ {
+ if (CreditCardType == null)
+ return "--";
+ else if (CREDITCARDTYPE_MasterCard.equals(CreditCardType))
+ return "MasterCard";
+ else if (CREDITCARDTYPE_Visa.equals(CreditCardType))
+ return "Visa";
+ else if (CREDITCARDTYPE_Amex.equals(CreditCardType))
+ return "Amex";
+ else if (CREDITCARDTYPE_ATM.equals(CreditCardType))
+ return "ATM";
+ else if (CREDITCARDTYPE_Diners.equals(CreditCardType))
+ return "Diners";
+ else if (CREDITCARDTYPE_Discover.equals(CreditCardType))
+ return "Discover";
+ else if (CREDITCARDTYPE_PurchaseCard.equals(CreditCardType))
+ return "PurchaseCard";
+ return "?" + CreditCardType + "?";
+ } // getCreditCardName
+
+ /**
+ * Add to Description
+ * @param description text
+ */
+ public void addDescription (String description)
+ {
+ String desc = getDescription();
+ if (desc == null)
+ setDescription(description);
+ else
+ setDescription(desc + " | " + description);
+ } // addDescription
+
+
+ /**
+ * Get Pay Amt
+ * @param absolute if true the absolute amount (i.e. negative if payment)
+ * @return amount
+ */
+ public BigDecimal getPayAmt (boolean absolute)
+ {
+ if (isReceipt())
+ return super.getPayAmt();
+ return super.getPayAmt().negate();
+ } // getPayAmt
+
+ /**
+ * Get Pay Amt in cents
+ * @return amount in cents
+ */
+ public int getPayAmtInCents ()
+ {
+ BigDecimal bd = super.getPayAmt().multiply(Env.ONEHUNDRED);
+ return bd.intValue();
+ } // getPayAmtInCents
+
+ /**************************************************************************
+ * Process document
+ * @param processAction document action
+ * @return true if performed
+ */
+ public boolean processIt (String processAction)
+ {
+ m_processMsg = null;
+ DocumentEngine engine = new DocumentEngine (this, getDocStatus());
+ return engine.processIt (processAction, getDocAction());
+ } // process
+
+ /** Process Message */
+ private String m_processMsg = null;
+ /** Just Prepared Flag */
+ private boolean m_justPrepared = false;
+
+ /**
+ * Unlock Document.
+ * @return true if success
+ */
+ public boolean unlockIt()
+ {
+ log.info(toString());
+ setProcessing(false);
+ return true;
+ } // unlockIt
+
+ /**
+ * Invalidate Document
+ * @return true if success
+ */
+ public boolean invalidateIt()
+ {
+ log.info(toString());
+ setDocAction(DOCACTION_Prepare);
+ return true;
+ } // invalidateIt
+
+
+ /**************************************************************************
+ * Prepare Document
+ * @return new status (In Progress or Invalid)
+ */
+ public String prepareIt()
+ {
+ log.info(toString());
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_PREPARE);
+ if (m_processMsg != null)
+ return DocAction.STATUS_Invalid;
+
+ // Std Period open?
+ if (!MPeriod.isOpen(getCtx(), getDateAcct(),
+ isReceipt() ? X_C_DocType.DOCBASETYPE_ARReceipt : X_C_DocType.DOCBASETYPE_APPayment))
+ {
+ m_processMsg = "@PeriodClosed@";
+ return DocAction.STATUS_Invalid;
+ }
+
+ // Unsuccessful Online Payment
+ if (isOnline() && !isApproved())
+ {
+ if (getR_Result() != null)
+ m_processMsg = "@OnlinePaymentFailed@";
+ else
+ m_processMsg = "@PaymentNotProcessed@";
+ return DocAction.STATUS_Invalid;
+ }
+
+ // Waiting Payment - Need to create Invoice & Shipment
+ if (getC_Order_ID() != 0 && getC_Invoice_ID() == 0)
+ { // see WebOrder.process
+ MOrder order = new MOrder (getCtx(), getC_Order_ID(), get_TrxName());
+ if (DOCSTATUS_WaitingPayment.equals(order.getDocStatus()))
+ {
+ order.setC_Payment_ID(getC_Payment_ID());
+ order.setDocAction(X_C_Order.DOCACTION_WaitComplete);
+ order.set_TrxName(get_TrxName());
+ // boolean ok =
+ order.processIt (X_C_Order.DOCACTION_WaitComplete);
+ m_processMsg = order.getProcessMsg();
+ order.save(get_TrxName());
+ // Set Invoice
+ MInvoice[] invoices = order.getInvoices();
+ int length = invoices.length;
+ if (length > 0) // get last invoice
+ setC_Invoice_ID (invoices[length-1].getC_Invoice_ID());
+ //
+ if (getC_Invoice_ID() == 0)
+ {
+ m_processMsg = "@NotFound@ @C_Invoice_ID@";
+ return DocAction.STATUS_Invalid;
+ }
+ } // WaitingPayment
+ }
+
+ // Consistency of Invoice / Document Type and IsReceipt
+ if (!verifyDocType())
+ {
+ m_processMsg = "@PaymentDocTypeInvoiceInconsistent@";
+ return DocAction.STATUS_Invalid;
+ }
+
+ // Do not pay when Credit Stop/Hold
+ if (!isReceipt())
+ {
+ MBPartner bp = new MBPartner (getCtx(), getC_BPartner_ID(), get_TrxName());
+ if (X_C_BPartner.SOCREDITSTATUS_CreditStop.equals(bp.getSOCreditStatus()))
+ {
+ m_processMsg = "@BPartnerCreditStop@ - @TotalOpenBalance@="
+ + bp.getTotalOpenBalance()
+ + ", @SO_CreditLimit@=" + bp.getSO_CreditLimit();
+ return DocAction.STATUS_Invalid;
+ }
+ if (X_C_BPartner.SOCREDITSTATUS_CreditHold.equals(bp.getSOCreditStatus()))
+ {
+ m_processMsg = "@BPartnerCreditHold@ - @TotalOpenBalance@="
+ + bp.getTotalOpenBalance()
+ + ", @SO_CreditLimit@=" + bp.getSO_CreditLimit();
+ return DocAction.STATUS_Invalid;
+ }
+ }
+
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_PREPARE);
+ if (m_processMsg != null)
+ return DocAction.STATUS_Invalid;
+
+ m_justPrepared = true;
+ if (!DOCACTION_Complete.equals(getDocAction()))
+ setDocAction(DOCACTION_Complete);
+ return DocAction.STATUS_InProgress;
+ } // prepareIt
+
+ /**
+ * Approve Document
+ * @return true if success
+ */
+ public boolean approveIt()
+ {
+ log.info(toString());
+ setIsApproved(true);
+ return true;
+ } // approveIt
+
+ /**
+ * Reject Approval
+ * @return true if success
+ */
+ public boolean rejectIt()
+ {
+ log.info(toString());
+ setIsApproved(false);
+ return true;
+ } // rejectIt
+
+
+ /**************************************************************************
+ * Complete Document
+ * @return new status (Complete, In Progress, Invalid, Waiting ..)
+ */
+ public String completeIt()
+ {
+ // Re-Check
+ if (!m_justPrepared)
+ {
+ String status = prepareIt();
+ if (!DocAction.STATUS_InProgress.equals(status))
+ return status;
+ }
+
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE);
+ if (m_processMsg != null)
+ return DocAction.STATUS_Invalid;
+
+ // Implicit Approval
+ if (!isApproved())
+ approveIt();
+ log.info(toString());
+
+ // Charge Handling
+ if (getC_Charge_ID() != 0)
+ {
+ setIsAllocated(true);
+ }
+ else
+ {
+ allocateIt(); // Create Allocation Records
+ testAllocation();
+ }
+
+ // Project update
+ if (getC_Project_ID() != 0)
+ {
+ // MProject project = new MProject(getCtx(), getC_Project_ID());
+ }
+ // Update BP for Prepayments
+ if (getC_BPartner_ID() != 0 && getC_Invoice_ID() == 0)
+ {
+ MBPartner bp = new MBPartner (getCtx(), getC_BPartner_ID(), get_TrxName());
+ bp.setTotalOpenBalance();
+ bp.save();
+ }
+
+ // Counter Doc
+ MPayment counter = createCounterDoc();
+ if (counter != null)
+ m_processMsg += " @CounterDoc@: @C_Payment_ID@=" + counter.getDocumentNo();
+
+ // @Trifon - CashPayments
+ //if ( getTenderType().equals("X") ) {
+ if ( isCashTrx() ) {
+ // Create Cash Book entry
+ if ( getC_CashBook_ID() <= 0 ) {
+ log.saveError("Error", Msg.parseTranslation(getCtx(), "@Mandatory@: @C_CashBook_ID@"));
+ m_processMsg = "@NoCashBook@";
+ return DocAction.STATUS_Invalid;
+ }
+ MCash cash = MCash.get (getCtx(), getAD_Org_ID(), getDateAcct(), getC_Currency_ID(), get_TrxName());
+ if (cash == null || cash.get_ID() == 0)
+ {
+ m_processMsg = "@NoCashBook@";
+ return DocAction.STATUS_Invalid;
+ }
+ MCashLine cl = new MCashLine( cash );
+ cl.setCashType( X_C_CashLine.CASHTYPE_GeneralReceipts );
+ cl.setDescription("Generated From Payment #" + getDocumentNo());
+ cl.setC_Currency_ID( this.getC_Currency_ID() );
+ cl.setC_Payment_ID( getC_Payment_ID() ); // Set Reference to payment.
+ StringBuffer info=new StringBuffer();
+ info.append("Cash journal ( ")
+ .append(cash.getDocumentNo()).append(" )");
+ m_processMsg = info.toString();
+ // Amount
+ BigDecimal amt = this.getPayAmt();
+/*
+ MDocType dt = MDocType.get(getCtx(), invoice.getC_DocType_ID());
+ if (MDocType.DOCBASETYPE_APInvoice.equals( dt.getDocBaseType() )
+ || MDocType.DOCBASETYPE_ARCreditMemo.equals( dt.getDocBaseType() )
+ ) {
+ amt = amt.negate();
+ }
+*/
+ cl.setAmount( amt );
+ //
+ cl.setDiscountAmt( Env.ZERO );
+ cl.setWriteOffAmt( Env.ZERO );
+ cl.setIsGenerated( true );
+
+ if (!cl.save(get_TrxName()))
+ {
+ m_processMsg = "Could not save Cash Journal Line";
+ return DocAction.STATUS_Invalid;
+ }
+ }
+ // End Trifon - CashPayments
+
+ // User Validation
+ String valid = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_COMPLETE);
+ if (valid != null)
+ {
+ m_processMsg = valid;
+ return DocAction.STATUS_Invalid;
+ }
+
+ // Set the definite document number after completed (if needed)
+ setDefiniteDocumentNo();
+
+ //
+ setProcessed(true);
+ setDocAction(DOCACTION_Close);
+ return DocAction.STATUS_Completed;
+ } // completeIt
+
+ /**
+ * Set the definite document number after completed
+ */
+ private void setDefiniteDocumentNo() {
+ MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
+ if (dt.isOverwriteDateOnComplete()) {
+ setDateTrx(new Timestamp (System.currentTimeMillis()));
+ }
+ if (dt.isOverwriteSeqOnComplete()) {
+ String value = DB.getDocumentNo(getC_DocType_ID(), get_TrxName(), true, this);
+ if (value != null)
+ setDocumentNo(value);
+ }
+ }
+
+ /**
+ * Create Counter Document
+ * @return payment
+ */
+ private MPayment createCounterDoc()
+ {
+ // Is this a counter doc ?
+ if (getRef_Payment_ID() != 0)
+ return null;
+
+ // Org Must be linked to BPartner
+ MOrg org = MOrg.get(getCtx(), getAD_Org_ID());
+ int counterC_BPartner_ID = org.getLinkedC_BPartner_ID(get_TrxName());
+ if (counterC_BPartner_ID == 0)
+ return null;
+ // Business Partner needs to be linked to Org
+ MBPartner bp = new MBPartner (getCtx(), getC_BPartner_ID(), get_TrxName());
+ int counterAD_Org_ID = bp.getAD_OrgBP_ID_Int();
+ if (counterAD_Org_ID == 0)
+ return null;
+
+ MBPartner counterBP = new MBPartner (getCtx(), counterC_BPartner_ID, get_TrxName());
+ // MOrgInfo counterOrgInfo = MOrgInfo.get(getCtx(), counterAD_Org_ID);
+ log.info("Counter BP=" + counterBP.getName());
+
+ // Document Type
+ int C_DocTypeTarget_ID = 0;
+ MDocTypeCounter counterDT = MDocTypeCounter.getCounterDocType(getCtx(), getC_DocType_ID());
+ if (counterDT != null)
+ {
+ log.fine(counterDT.toString());
+ if (!counterDT.isCreateCounter() || !counterDT.isValid())
+ return null;
+ C_DocTypeTarget_ID = counterDT.getCounter_C_DocType_ID();
+ }
+ else // indirect
+ {
+ C_DocTypeTarget_ID = MDocTypeCounter.getCounterDocType_ID(getCtx(), getC_DocType_ID());
+ log.fine("Indirect C_DocTypeTarget_ID=" + C_DocTypeTarget_ID);
+ if (C_DocTypeTarget_ID <= 0)
+ return null;
+ }
+
+ // Deep Copy
+ MPayment counter = new MPayment (getCtx(), 0, get_TrxName());
+ counter.setAD_Org_ID(counterAD_Org_ID);
+ counter.setC_BPartner_ID(counterBP.getC_BPartner_ID());
+ counter.setIsReceipt(!isReceipt());
+ counter.setC_DocType_ID(C_DocTypeTarget_ID);
+ counter.setTrxType(getTrxType());
+ counter.setTenderType(getTenderType());
+ //
+ counter.setPayAmt(getPayAmt());
+ counter.setDiscountAmt(getDiscountAmt());
+ counter.setTaxAmt(getTaxAmt());
+ counter.setWriteOffAmt(getWriteOffAmt());
+ counter.setIsOverUnderPayment (isOverUnderPayment());
+ counter.setOverUnderAmt(getOverUnderAmt());
+ counter.setC_Currency_ID(getC_Currency_ID());
+ counter.setC_ConversionType_ID(getC_ConversionType_ID());
+ //
+ counter.setDateTrx (getDateTrx());
+ counter.setDateAcct (getDateAcct());
+ counter.setRef_Payment_ID(getC_Payment_ID());
+ //
+ String sql = "SELECT C_BankAccount_ID FROM C_BankAccount "
+ + "WHERE C_Currency_ID=? AND AD_Org_ID IN (0,?) AND IsActive='Y' "
+ + "ORDER BY IsDefault DESC";
+ int C_BankAccount_ID = DB.getSQLValue(get_TrxName(), sql, getC_Currency_ID(), counterAD_Org_ID);
+ counter.setC_BankAccount_ID(C_BankAccount_ID);
+
+ // References
+ counter.setC_Activity_ID(getC_Activity_ID());
+ counter.setC_Campaign_ID(getC_Campaign_ID());
+ counter.setC_Project_ID(getC_Project_ID());
+ counter.setUser1_ID(getUser1_ID());
+ counter.setUser2_ID(getUser2_ID());
+ counter.save(get_TrxName());
+ log.fine(counter.toString());
+ setRef_Payment_ID(counter.getC_Payment_ID());
+
+ // Document Action
+ if (counterDT != null)
+ {
+ if (counterDT.getDocAction() != null)
+ {
+ counter.setDocAction(counterDT.getDocAction());
+ counter.processIt(counterDT.getDocAction());
+ counter.save(get_TrxName());
+ }
+ }
+ return counter;
+ } // createCounterDoc
+
+ /**
+ * Allocate It.
+ * Only call when there is NO allocation as it will create duplicates.
+ * If an invoice exists, it allocates that
+ * otherwise it allocates Payment Selection.
+ * @return true if allocated
+ */
+ public boolean allocateIt()
+ {
+ // Create invoice Allocation - See also MCash.completeIt
+ if (getC_Invoice_ID() != 0)
+ return allocateInvoice();
+ // Invoices of a AP Payment Selection
+ if (allocatePaySelection())
+ return true;
+
+ if (getC_Order_ID() != 0)
+ return false;
+
+ // Allocate to multiple Payments based on entry
+ MPaymentAllocate[] pAllocs = MPaymentAllocate.get(this);
+ if (pAllocs.length == 0)
+ return false;
+
+ MAllocationHdr alloc = new MAllocationHdr(getCtx(), false,
+ getDateTrx(), getC_Currency_ID(),
+ Msg.translate(getCtx(), "C_Payment_ID") + ": " + getDocumentNo(),
+ get_TrxName());
+ alloc.setAD_Org_ID(getAD_Org_ID());
+ if (!alloc.save())
+ {
+ log.severe("P.Allocations not created");
+ return false;
+ }
+ // Lines
+ for (int i = 0; i < pAllocs.length; i++)
+ {
+ MPaymentAllocate pa = pAllocs[i];
+ MAllocationLine aLine = null;
+ if (isReceipt())
+ aLine = new MAllocationLine (alloc, pa.getAmount(),
+ pa.getDiscountAmt(), pa.getWriteOffAmt(), pa.getOverUnderAmt());
+ else
+ aLine = new MAllocationLine (alloc, pa.getAmount().negate(),
+ pa.getDiscountAmt().negate(), pa.getWriteOffAmt().negate(), pa.getOverUnderAmt().negate());
+ aLine.setDocInfo(pa.getC_BPartner_ID(), 0, pa.getC_Invoice_ID());
+ aLine.setPaymentInfo(getC_Payment_ID(), 0);
+ if (!aLine.save(get_TrxName()))
+ log.warning("P.Allocations - line not saved");
+ else
+ {
+ pa.setC_AllocationLine_ID(aLine.getC_AllocationLine_ID());
+ pa.save();
+ }
+ }
+ // Should start WF
+ alloc.processIt(DocAction.ACTION_Complete);
+ m_processMsg = "@C_AllocationHdr_ID@: " + alloc.getDocumentNo();
+ return alloc.save(get_TrxName());
+ } // allocateIt
+
+ /**
+ * Allocate single AP/AR Invoice
+ * @return true if allocated
+ */
+ private boolean allocateInvoice()
+ {
+ // calculate actual allocation
+ BigDecimal allocationAmt = getPayAmt(); // underpayment
+ if (getOverUnderAmt().signum() < 0 && getPayAmt().signum() > 0)
+ allocationAmt = allocationAmt.add(getOverUnderAmt()); // overpayment (negative)
+
+ MAllocationHdr alloc = new MAllocationHdr(getCtx(), false,
+ getDateTrx(), getC_Currency_ID(),
+ Msg.translate(getCtx(), "C_Payment_ID") + ": " + getDocumentNo() + " [1]", get_TrxName());
+ alloc.setAD_Org_ID(getAD_Org_ID());
+ if (!alloc.save())
+ {
+ log.log(Level.SEVERE, "Could not create Allocation Hdr");
+ return false;
+ }
+ MAllocationLine aLine = null;
+ if (isReceipt())
+ aLine = new MAllocationLine (alloc, allocationAmt,
+ getDiscountAmt(), getWriteOffAmt(), getOverUnderAmt());
+ else
+ aLine = new MAllocationLine (alloc, allocationAmt.negate(),
+ getDiscountAmt().negate(), getWriteOffAmt().negate(), getOverUnderAmt().negate());
+ aLine.setDocInfo(getC_BPartner_ID(), 0, getC_Invoice_ID());
+ aLine.setC_Payment_ID(getC_Payment_ID());
+ if (!aLine.save(get_TrxName()))
+ {
+ log.log(Level.SEVERE, "Could not create Allocation Line");
+ return false;
+ }
+ // Should start WF
+ alloc.processIt(DocAction.ACTION_Complete);
+ alloc.save(get_TrxName());
+ m_processMsg = "@C_AllocationHdr_ID@: " + alloc.getDocumentNo();
+
+ // Get Project from Invoice
+ int C_Project_ID = DB.getSQLValue(get_TrxName(),
+ "SELECT MAX(C_Project_ID) FROM C_Invoice WHERE C_Invoice_ID=?", getC_Invoice_ID());
+ if (C_Project_ID > 0 && getC_Project_ID() == 0)
+ setC_Project_ID(C_Project_ID);
+ else if (C_Project_ID > 0 && getC_Project_ID() > 0 && C_Project_ID != getC_Project_ID())
+ log.warning("Invoice C_Project_ID=" + C_Project_ID
+ + " <> Payment C_Project_ID=" + getC_Project_ID());
+ return true;
+ } // allocateInvoice
+
+ /**
+ * Allocate Payment Selection
+ * @return true if allocated
+ */
+ private boolean allocatePaySelection()
+ {
+ MAllocationHdr alloc = new MAllocationHdr(getCtx(), false,
+ getDateTrx(), getC_Currency_ID(),
+ Msg.translate(getCtx(), "C_Payment_ID") + ": " + getDocumentNo() + " [n]", get_TrxName());
+ alloc.setAD_Org_ID(getAD_Org_ID());
+
+ String sql = "SELECT psc.C_BPartner_ID, psl.C_Invoice_ID, psl.IsSOTrx, " // 1..3
+ + " psl.PayAmt, psl.DiscountAmt, psl.DifferenceAmt, psl.OpenAmt "
+ + "FROM C_PaySelectionLine psl"
+ + " INNER JOIN C_PaySelectionCheck psc ON (psl.C_PaySelectionCheck_ID=psc.C_PaySelectionCheck_ID) "
+ + "WHERE psc.C_Payment_ID=?";
+ PreparedStatement pstmt = null;
+ try
+ {
+ pstmt = DB.prepareStatement(sql, get_TrxName());
+ pstmt.setInt(1, getC_Payment_ID());
+ ResultSet rs = pstmt.executeQuery();
+ while (rs.next())
+ {
+ int C_BPartner_ID = rs.getInt(1);
+ int C_Invoice_ID = rs.getInt(2);
+ if (C_BPartner_ID == 0 && C_Invoice_ID == 0)
+ continue;
+ boolean isSOTrx = "Y".equals(rs.getString(3));
+ BigDecimal PayAmt = rs.getBigDecimal(4);
+ BigDecimal DiscountAmt = rs.getBigDecimal(5);
+ BigDecimal WriteOffAmt = rs.getBigDecimal(6);
+ BigDecimal OpenAmt = rs.getBigDecimal(7);
+ BigDecimal OverUnderAmt = OpenAmt.subtract(PayAmt)
+ .subtract(DiscountAmt).subtract(WriteOffAmt);
+ //
+ if (alloc.get_ID() == 0 && !alloc.save(get_TrxName()))
+ {
+ log.log(Level.SEVERE, "Could not create Allocation Hdr");
+ rs.close();
+ pstmt.close();
+ return false;
+ }
+ MAllocationLine aLine = null;
+ if (isSOTrx)
+ aLine = new MAllocationLine (alloc, PayAmt,
+ DiscountAmt, WriteOffAmt, OverUnderAmt);
+ else
+ aLine = new MAllocationLine (alloc, PayAmt.negate(),
+ DiscountAmt.negate(), WriteOffAmt.negate(), OverUnderAmt.negate());
+ aLine.setDocInfo(C_BPartner_ID, 0, C_Invoice_ID);
+ aLine.setC_Payment_ID(getC_Payment_ID());
+ if (!aLine.save(get_TrxName()))
+ log.log(Level.SEVERE, "Could not create Allocation Line");
+ }
+ rs.close();
+ pstmt.close();
+ pstmt = null;
+ }
+ catch (Exception e)
+ {
+ log.log(Level.SEVERE, "allocatePaySelection", e);
+ }
+ try
+ {
+ if (pstmt != null)
+ pstmt.close();
+ pstmt = null;
+ }
+ catch (Exception e)
+ {
+ pstmt = null;
+ }
+
+ // Should start WF
+ boolean ok = true;
+ if (alloc.get_ID() == 0)
+ {
+ log.fine("No Allocation created - C_Payment_ID="
+ + getC_Payment_ID());
+ ok = false;
+ }
+ else
+ {
+ alloc.processIt(DocAction.ACTION_Complete);
+ ok = alloc.save(get_TrxName());
+ m_processMsg = "@C_AllocationHdr_ID@: " + alloc.getDocumentNo();
+ }
+ return ok;
+ } // allocatePaySelection
+
+ /**
+ * De-allocate Payment.
+ * Unkink Invoices and Orders and delete Allocations
+ */
+ private void deAllocate()
+ {
+ if (getC_Order_ID() != 0)
+ setC_Order_ID(0);
+ // if (getC_Invoice_ID() == 0)
+ // return;
+ // De-Allocate all
+ MAllocationHdr[] allocations = MAllocationHdr.getOfPayment(getCtx(),
+ getC_Payment_ID(), get_TrxName());
+ log.fine("#" + allocations.length);
+ for (int i = 0; i < allocations.length; i++)
+ {
+ allocations[i].set_TrxName(get_TrxName());
+ allocations[i].setDocAction(DocAction.ACTION_Reverse_Correct);
+ allocations[i].processIt(DocAction.ACTION_Reverse_Correct);
+ allocations[i].save();
+ }
+
+ // Unlink (in case allocation did not get it)
+ if (getC_Invoice_ID() != 0)
+ {
+ // Invoice
+ String sql = "UPDATE C_Invoice "
+ + "SET C_Payment_ID = NULL, IsPaid='N' "
+ + "WHERE C_Invoice_ID=" + getC_Invoice_ID()
+ + " AND C_Payment_ID=" + getC_Payment_ID();
+ int no = DB.executeUpdate(sql, get_TrxName());
+ if (no != 0)
+ log.fine("Unlink Invoice #" + no);
+ // Order
+ sql = "UPDATE C_Order o "
+ + "SET C_Payment_ID = NULL "
+ + "WHERE EXISTS (SELECT * FROM C_Invoice i "
+ + "WHERE o.C_Order_ID=i.C_Order_ID AND i.C_Invoice_ID=" + getC_Invoice_ID() + ")"
+ + " AND C_Payment_ID=" + getC_Payment_ID();
+ no = DB.executeUpdate(sql, get_TrxName());
+ if (no != 0)
+ log.fine("Unlink Order #" + no);
+ }
+ //
+ setC_Invoice_ID(0);
+ setIsAllocated(false);
+ } // deallocate
+
+ /**
+ * Void Document.
+ * @return true if success
+ */
+ public boolean voidIt()
+ {
+ log.info(toString());
+ // Before Void
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_VOID);
+ if (m_processMsg != null)
+ return false;
+
+ if (DOCSTATUS_Closed.equals(getDocStatus())
+ || DOCSTATUS_Reversed.equals(getDocStatus())
+ || DOCSTATUS_Voided.equals(getDocStatus()))
+ {
+ m_processMsg = "Document Closed: " + getDocStatus();
+ setDocAction(DOCACTION_None);
+ return false;
+ }
+ // If on Bank Statement, don't void it - reverse it
+ if (getC_BankStatementLine_ID() > 0)
+ return reverseCorrectIt();
+
+ // Not Processed
+ if (DOCSTATUS_Drafted.equals(getDocStatus())
+ || DOCSTATUS_Invalid.equals(getDocStatus())
+ || DOCSTATUS_InProgress.equals(getDocStatus())
+ || DOCSTATUS_Approved.equals(getDocStatus())
+ || DOCSTATUS_NotApproved.equals(getDocStatus()) )
+ {
+ addDescription(Msg.getMsg(getCtx(), "Voided") + " (" + getPayAmt() + ")");
+ setPayAmt(Env.ZERO);
+ setDiscountAmt(Env.ZERO);
+ setWriteOffAmt(Env.ZERO);
+ setOverUnderAmt(Env.ZERO);
+ setIsAllocated(false);
+ // Unlink & De-Allocate
+ deAllocate();
+ }
+ else
+ return reverseCorrectIt();
+
+ //
+ // After Void
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_VOID);
+ if (m_processMsg != null)
+ return false;
+
+ setProcessed(true);
+ setDocAction(DOCACTION_None);
+ return true;
+ } // voidIt
+
+ /**
+ * Close Document.
+ * @return true if success
+ */
+ public boolean closeIt()
+ {
+ log.info(toString());
+ // Before Close
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_CLOSE);
+ if (m_processMsg != null)
+ return false;
+ // After Close
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_CLOSE);
+ if (m_processMsg != null)
+ return false;
+ setDocAction(DOCACTION_None);
+ return true;
+ } // closeIt
+
+ /**
+ * Reverse Correction
+ * @return true if success
+ */
+ public boolean reverseCorrectIt()
+ {
+ log.info(toString());
+ // Before reverseCorrect
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSECORRECT);
+ if (m_processMsg != null)
+ return false;
+
+ // Std Period open?
+ Timestamp dateAcct = getDateAcct();
+ if (!MPeriod.isOpen(getCtx(), dateAcct,
+ isReceipt() ? X_C_DocType.DOCBASETYPE_ARReceipt : X_C_DocType.DOCBASETYPE_APPayment))
+ dateAcct = new Timestamp(System.currentTimeMillis());
+
+ // Auto Reconcile if not on Bank Statement
+ boolean reconciled = getC_BankStatementLine_ID() == 0; //AZ Goodwill
+
+ // Create Reversal
+ MPayment reversal = new MPayment (getCtx(), 0, get_TrxName());
+ copyValues(this, reversal);
+ reversal.setClientOrg(this);
+ reversal.setC_Order_ID(0);
+ reversal.setC_Invoice_ID(0);
+ reversal.setDateAcct(dateAcct);
+ //
+ reversal.setDocumentNo(getDocumentNo() + REVERSE_INDICATOR); // indicate reversals
+ reversal.setDocStatus(DOCSTATUS_Drafted);
+ reversal.setDocAction(DOCACTION_Complete);
+ //
+ reversal.setPayAmt(getPayAmt().negate());
+ reversal.setDiscountAmt(getDiscountAmt().negate());
+ reversal.setWriteOffAmt(getWriteOffAmt().negate());
+ reversal.setOverUnderAmt(getOverUnderAmt().negate());
+ //
+ reversal.setIsAllocated(true);
+ reversal.setIsReconciled(reconciled); // to put on bank statement
+ reversal.setIsOnline(false);
+ reversal.setIsApproved(true);
+ reversal.setR_PnRef(null);
+ reversal.setR_Result(null);
+ reversal.setR_RespMsg(null);
+ reversal.setR_AuthCode(null);
+ reversal.setR_Info(null);
+ reversal.setProcessing(false);
+ reversal.setOProcessing("N");
+ reversal.setProcessed(false);
+ reversal.setPosted(false);
+ reversal.setDescription(getDescription());
+ reversal.addDescription("{->" + getDocumentNo() + ")");
+ reversal.save(get_TrxName());
+ // Post Reversal
+ if (!reversal.processIt(DocAction.ACTION_Complete))
+ {
+ m_processMsg = "Reversal ERROR: " + reversal.getProcessMsg();
+ return false;
+ }
+ reversal.closeIt();
+ reversal.setDocStatus(DOCSTATUS_Reversed);
+ reversal.setDocAction(DOCACTION_None);
+ reversal.save(get_TrxName());
+
+ // Unlink & De-Allocate
+ deAllocate();
+ setIsReconciled (reconciled);
+ setIsAllocated (true); // the allocation below is overwritten
+ // Set Status
+ addDescription("(" + reversal.getDocumentNo() + "<-)");
+ setDocStatus(DOCSTATUS_Reversed);
+ setDocAction(DOCACTION_None);
+ setProcessed(true);
+
+ // Create automatic Allocation
+ MAllocationHdr alloc = new MAllocationHdr (getCtx(), false,
+ getDateTrx(), getC_Currency_ID(),
+ Msg.translate(getCtx(), "C_Payment_ID") + ": " + reversal.getDocumentNo(), get_TrxName());
+ alloc.setAD_Org_ID(getAD_Org_ID());
+ if (!alloc.save())
+ log.warning("Automatic allocation - hdr not saved");
+ else
+ {
+ // Original Allocation
+ MAllocationLine aLine = new MAllocationLine (alloc, getPayAmt(true),
+ Env.ZERO, Env.ZERO, Env.ZERO);
+ aLine.setDocInfo(getC_BPartner_ID(), 0, 0);
+ aLine.setPaymentInfo(getC_Payment_ID(), 0);
+ if (!aLine.save(get_TrxName()))
+ log.warning("Automatic allocation - line not saved");
+ // Reversal Allocation
+ aLine = new MAllocationLine (alloc, reversal.getPayAmt(true),
+ Env.ZERO, Env.ZERO, Env.ZERO);
+ aLine.setDocInfo(reversal.getC_BPartner_ID(), 0, 0);
+ aLine.setPaymentInfo(reversal.getC_Payment_ID(), 0);
+ if (!aLine.save(get_TrxName()))
+ log.warning("Automatic allocation - reversal line not saved");
+ }
+ alloc.processIt(DocAction.ACTION_Complete);
+ alloc.save(get_TrxName());
+ //
+ StringBuffer info = new StringBuffer (reversal.getDocumentNo());
+ info.append(" - @C_AllocationHdr_ID@: ").append(alloc.getDocumentNo());
+
+ // Update BPartner
+ if (getC_BPartner_ID() != 0)
+ {
+ MBPartner bp = new MBPartner (getCtx(), getC_BPartner_ID(), get_TrxName());
+ bp.setTotalOpenBalance();
+ bp.save(get_TrxName());
+ }
+ // After reverseCorrect
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSECORRECT);
+ if (m_processMsg != null)
+ return false;
+
+ m_processMsg = info.toString();
+ return true;
+ } // reverseCorrectionIt
+
+ /**
+ * Get Bank Statement Line of payment or 0
+ * @return id or 0
+ */
+ private int getC_BankStatementLine_ID()
+ {
+ String sql = "SELECT C_BankStatementLine_ID FROM C_BankStatementLine WHERE C_Payment_ID=?";
+ int id = DB.getSQLValue(get_TrxName(), sql, getC_Payment_ID());
+ if (id < 0)
+ return 0;
+ return id;
+ } // getC_BankStatementLine_ID
+
+ /**
+ * Reverse Accrual - none
+ * @return true if success
+ */
+ public boolean reverseAccrualIt()
+ {
+ log.info(toString());
+
+ // Before reverseAccrual
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSEACCRUAL);
+ if (m_processMsg != null)
+ return false;
+
+ // After reverseAccrual
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSEACCRUAL);
+ if (m_processMsg != null)
+ return false;
+
+ return false;
+ } // reverseAccrualIt
+
+ /**
+ * Re-activate
+ * @return true if success
+ */
+ public boolean reActivateIt()
+ {
+ log.info(toString());
+ // Before reActivate
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REACTIVATE);
+ if (m_processMsg != null)
+ return false;
+
+ if (! reverseCorrectIt())
+ return false;
+
+ // After reActivate
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REACTIVATE);
+ if (m_processMsg != null)
+ return false;
+
+ return true;
+ } // reActivateIt
+
+ /**
+ * String Representation
+ * @return info
+ */
+ public String toString ()
+ {
+ StringBuffer sb = new StringBuffer ("MPayment[");
+ sb.append(get_ID()).append("-").append(getDocumentNo())
+ .append(",Receipt=").append(isReceipt())
+ .append(",PayAmt=").append(getPayAmt())
+ .append(",Discount=").append(getDiscountAmt())
+ .append(",WriteOff=").append(getWriteOffAmt())
+ .append(",OverUnder=").append(getOverUnderAmt());
+ return sb.toString ();
+ } // toString
+
+ /**
+ * Get Document Info
+ * @return document info (untranslated)
+ */
+ public String getDocumentInfo()
+ {
+ MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
+ return dt.getName() + " " + getDocumentNo();
+ } // getDocumentInfo
+
+ /**
+ * Create PDF
+ * @return File or null
+ */
+ public File createPDF ()
+ {
+ try
+ {
+ File temp = File.createTempFile(get_TableName()+get_ID()+"_", ".pdf");
+ return createPDF (temp);
+ }
+ catch (Exception e)
+ {
+ log.severe("Could not create PDF - " + e.getMessage());
+ }
+ return null;
+ } // getPDF
+
+ /**
+ * Create PDF file
+ * @param file output file
+ * @return file if success
+ */
+ public File createPDF (File file)
+ {
+ // ReportEngine re = ReportEngine.get (getCtx(), ReportEngine.PAYMENT, getC_Payment_ID());
+ // if (re == null)
+ return null;
+ // return re.getPDF(file);
+ } // createPDF
+
+
+ /*************************************************************************
+ * Get Summary
+ * @return Summary of Document
+ */
+ public String getSummary()
+ {
+ StringBuffer sb = new StringBuffer();
+ sb.append(getDocumentNo());
+ // : Total Lines = 123.00 (#1)
+ sb.append(": ")
+ .append(Msg.translate(getCtx(),"PayAmt")).append("=").append(getPayAmt())
+ .append(",").append(Msg.translate(getCtx(),"WriteOffAmt")).append("=").append(getWriteOffAmt());
+ // - Description
+ if (getDescription() != null && getDescription().length() > 0)
+ sb.append(" - ").append(getDescription());
+ return sb.toString();
+ } // getSummary
+
+ /**
+ * Get Process Message
+ * @return clear text error message
+ */
+ public String getProcessMsg()
+ {
+ return m_processMsg;
+ } // getProcessMsg
+
+ /**
+ * Get Document Owner (Responsible)
+ * @return AD_User_ID
+ */
+ public int getDoc_User_ID()
+ {
+ return getCreatedBy();
+ } // getDoc_User_ID
+
+ /**
+ * Get Document Approval Amount
+ * @return amount payment(AP) or write-off(AR)
+ */
+ public BigDecimal getApprovalAmt()
+ {
+ if (isReceipt())
+ return getWriteOffAmt();
+ return getPayAmt();
+ } // getApprovalAmt
+
+} // MPayment
diff --git a/posterita/posterita/src/main/org/compiere/model/MSequence.java b/posterita/posterita/src/main/org/compiere/model/MSequence.java
new file mode 100644
index 0000000000..6095b79c71
--- /dev/null
+++ b/posterita/posterita/src/main/org/compiere/model/MSequence.java
@@ -0,0 +1,1621 @@
+/******************************************************************************
+ * Product: Adempiere ERP & CRM Smart Business Solution *
+ * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
+ * This program is free software; you can redistribute it and/or modify it *
+ * under the terms version 2 of the GNU General Public License as published *
+ * by the Free Software Foundation. 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, write to the Free Software Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
+ * For the text or an alternative of this public license, you may reach us *
+ * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
+ * or via info@compiere.org or http://www.compiere.org/license.html *
+ *****************************************************************************/
+package org.compiere.model;
+
+import java.io.InputStream;
+import java.io.OutputStreamWriter;
+import java.io.PrintWriter;
+import java.net.Socket;
+import java.net.URL;
+import java.net.URLEncoder;
+import java.rmi.RemoteException;
+import java.sql.CallableStatement;
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Types;
+import java.text.DecimalFormat;
+import java.text.SimpleDateFormat;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.Properties;
+import java.util.Vector;
+import java.util.logging.Level;
+
+import org.compiere.db.CConnection;
+import org.compiere.interfaces.Server;
+import org.compiere.util.CLogMgt;
+import org.compiere.util.CLogger;
+import org.compiere.util.DB;
+import org.compiere.util.DBException;
+import org.compiere.util.Env;
+import org.compiere.util.Ini;
+import org.compiere.util.Trx;
+
+/**
+ * Sequence Model.
+ * @see org.compiere.process.SequenceCheck
+ * @author Jorg Janke
+ * @version $Id: MSequence.java,v 1.3 2006/07/30 00:58:04 jjanke Exp $
+ */
+public class MSequence extends X_AD_Sequence
+{
+ /** Use SQL procedure to get next id */
+ //begin vpj-cd e-evolution 02/11/2005 PostgreSQL
+ //private static final boolean USE_PROCEDURE = true;
+ private static boolean USE_PROCEDURE = false;
+ //end vpj-cd e-evolution 02/11/2005
+ /** Log Level for Next ID Call */
+ private static final Level LOGLEVEL = Level.ALL;
+
+ public static synchronized int getNextID (int AD_Client_ID, String TableName)
+ {
+ return getNextID(AD_Client_ID, TableName, null);
+ }
+
+ /**
+ *
+ * Get next number for Key column = 0 is Error.
+ * @param AD_Client_ID client
+ * @param TableName table name
+ * @param trxName deprecated.
+ * @return next no or (-1=not found, -2=error)
+ */
+ public static synchronized int getNextID (int AD_Client_ID, String TableName, String trxName)
+ {
+ if (TableName == null || TableName.length() == 0)
+ throw new IllegalArgumentException("TableName missing");
+
+ //get from server
+ if (DB.isRemoteObjects())
+ {
+ Server server = CConnection.get().getServer();
+ try
+ {
+ if (server != null)
+ { // See ServerBean
+ // hengsin: don't execute getNextID in tranaction to fix performance and locking issue
+ int id = server.getNextID(AD_Client_ID, TableName, null);
+ s_log.finest("server => " + id);
+ if (id < 0)
+ throw new DBException("No NextID");
+ return id;
+ }
+ s_log.log(Level.SEVERE, "AppsServer not found - " + TableName);
+ }
+ catch (RemoteException ex)
+ {
+ s_log.log(Level.SEVERE, "AppsServer error", ex);
+ }
+ // Try locally
+ }
+
+ int retValue = -1;
+
+ // Check AdempiereSys
+ boolean adempiereSys = Ini.isPropertyBool(Ini.P_ADEMPIERESYS);
+ if (adempiereSys && AD_Client_ID > 11)
+ adempiereSys = false;
+ //
+ if (CLogMgt.isLevel(LOGLEVEL))
+ s_log.log(LOGLEVEL, TableName + " - AdempiereSys=" + adempiereSys + " [" + trxName + "]");
+ //begin vpj-cd e-evolution 09/02/2005 PostgreSQL
+ String selectSQL = null;
+ if (DB.isOracle() == false || DB.isRemoteObjects())
+ {
+ selectSQL = "SELECT CurrentNext, CurrentNextSys, IncrementNo, AD_Sequence_ID "
+ + "FROM AD_Sequence "
+ + "WHERE Name=?"
+ + " AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y' "
+ + " FOR UPDATE OF AD_Sequence ";
+ USE_PROCEDURE=false;
+ }
+ else
+ {
+ selectSQL = "SELECT CurrentNext, CurrentNextSys, IncrementNo, AD_Sequence_ID "
+ + "FROM AD_Sequence "
+ + "WHERE Name=?"
+ + " AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y' "
+ + "FOR UPDATE"; // jz derby needs expicitly said it//OF CurrentNext, CurrentNextSys";
+
+ USE_PROCEDURE = true;
+ }
+
+ //hengsin: executing getNextID in transaction create huge performance and locking issue
+ //Trx trx = trxName == null ? null : Trx.get(trxName, true);
+ Connection conn = null;
+ PreparedStatement pstmt = null;
+ ResultSet rs = null;
+ for (int i = 0; i < 3; i++)
+ {
+ try
+ {
+ conn = DB.getConnectionID();
+ // Error
+ if (conn == null)
+ return -1;
+
+ pstmt = conn.prepareStatement(selectSQL,
+ ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
+ pstmt.setString(1, TableName);
+ //
+ rs = pstmt.executeQuery();
+ if (CLogMgt.isLevelFinest())
+ s_log.finest("AC=" + conn.getAutoCommit() + ", RO=" + conn.isReadOnly()
+ + " - Isolation=" + conn.getTransactionIsolation() + "(" + Connection.TRANSACTION_READ_COMMITTED
+ + ") - RSType=" + pstmt.getResultSetType() + "(" + ResultSet.TYPE_SCROLL_SENSITIVE
+ + "), RSConcur=" + pstmt.getResultSetConcurrency() + "(" + ResultSet.CONCUR_UPDATABLE
+ + ")");
+ if (rs.next())
+ {
+
+ // Get the table
+ MTable table = MTable.get(Env.getCtx(), TableName);
+ boolean hasEntityType = false;
+ if (table.getColumn("EntityType") != null)
+ hasEntityType = true;
+
+ int AD_Sequence_ID = rs.getInt(4);
+ boolean gotFromHTTP = false;
+
+ // If maintaining official dictionary try to get the ID from http official server
+ if (adempiereSys) {
+
+ String isUseCentralizedID = MSysConfig.getValue("DICTIONARY_ID_USE_CENTRALIZED_ID", "Y"); // defaults to Y
+ if ( ( ! isUseCentralizedID.equals("N") ) && ( ! isExceptionCentralized(TableName) ) ) {
+ // get ID from http site
+ retValue = getNextOfficialID_HTTP(TableName);
+ if (retValue > 0) {
+ PreparedStatement updateSQL;
+ updateSQL = conn.prepareStatement("UPDATE AD_Sequence SET CurrentNextSys = ? + 1 WHERE AD_Sequence_ID = ?");
+ try {
+ updateSQL.setInt(1, retValue);
+ updateSQL.setInt(2, AD_Sequence_ID);
+ updateSQL.executeUpdate();
+ } finally {
+ updateSQL.close();
+ }
+ }
+ gotFromHTTP = true;
+ }
+
+ }
+
+ // If not official dictionary try to get the ID from http custom server - if configured
+ if (hasEntityType && ( ! adempiereSys ) && ( ! isExceptionCentralized(TableName) ) ) {
+
+ String isUseProjectCentralizedID = MSysConfig.getValue("PROJECT_ID_USE_CENTRALIZED_ID", "N"); // defaults to N
+ if (isUseProjectCentralizedID.equals("Y")) {
+ // get ID from http site
+ retValue = getNextProjectID_HTTP(TableName);
+ if (retValue > 0) {
+ PreparedStatement updateSQL;
+ updateSQL = conn.prepareStatement("UPDATE AD_Sequence SET CurrentNext = GREATEST(CurrentNext, ? + 1) WHERE AD_Sequence_ID = ?");
+ try {
+ updateSQL.setInt(1, retValue);
+ updateSQL.setInt(2, AD_Sequence_ID);
+ updateSQL.executeUpdate();
+ } finally {
+ updateSQL.close();
+ }
+ }
+ gotFromHTTP = true;
+ }
+
+ }
+
+ if (! gotFromHTTP) {
+ //
+ if (USE_PROCEDURE)
+ {
+ retValue = nextID(conn, AD_Sequence_ID, adempiereSys);
+ }
+ else
+ {
+ PreparedStatement updateSQL;
+ int incrementNo = rs.getInt(3);
+ if (adempiereSys) {
+ updateSQL = conn
+ .prepareStatement("UPDATE AD_Sequence SET CurrentNextSys = CurrentNextSys + ? WHERE AD_Sequence_ID = ?");
+ retValue = rs.getInt(2);
+ } else {
+ updateSQL = conn
+ .prepareStatement("UPDATE AD_Sequence SET CurrentNext = CurrentNext + ? WHERE AD_Sequence_ID = ?");
+ retValue = rs.getInt(1);
+ }
+ try {
+ updateSQL.setInt(1, incrementNo);
+ updateSQL.setInt(2, AD_Sequence_ID);
+ updateSQL.executeUpdate();
+ } finally {
+ updateSQL.close();
+ }
+ }
+ }
+
+ //if (trx == null)
+ conn.commit();
+ }
+ else
+ s_log.severe ("No record found - " + TableName);
+
+ //
+ break; // EXIT
+ }
+ catch (Exception e)
+ {
+ s_log.log(Level.SEVERE, TableName + " - " + e.getMessage(), e);
+ try
+ {
+ if (conn != null)
+ conn.rollback();
+ } catch (SQLException e1) { }
+ }
+ finally
+ {
+ DB.close(rs, pstmt);
+ pstmt = null;
+ rs = null;
+ if (conn != null)
+ {
+ try {
+ conn.close();
+ } catch (SQLException e) {}
+ conn = null;
+ }
+ }
+ Thread.yield(); // give it time
+ }
+
+
+ //s_log.finest (retValue + " - Table=" + TableName + " [" + trx + "]");
+ return retValue;
+ } // getNextID
+
+ /**
+ * Get Next ID
+ * @param conn connection
+ * @param AD_Sequence_ID sequence
+ * @param adempiereSys sys
+ * @return next id or -1 (error) or -3 (parameter)
+ */
+ private static int nextID (Connection conn, int AD_Sequence_ID, boolean adempiereSys)
+ {
+ if (conn == null || AD_Sequence_ID == 0)
+ return -3;
+ //
+ int retValue = -1;
+ String sqlUpdate = "{call nextID(?,?,?)}";
+ CallableStatement cstmt = null;
+ try
+ {
+ cstmt = conn.prepareCall (sqlUpdate,
+ ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
+ cstmt.setInt(1, AD_Sequence_ID);
+ cstmt.setString(2, adempiereSys ? "Y" : "N");
+ cstmt.registerOutParameter(3, Types.INTEGER);
+ cstmt.execute();
+ retValue = cstmt.getInt(3);
+ }
+ catch (Exception e)
+ {
+ s_log.log(Level.SEVERE, e.toString());
+ }
+ finally
+ {
+ DB.close(cstmt);
+ }
+ return retValue;
+ } // nextID
+
+ /**
+ * Get next id by year
+ * @param conn
+ * @param AD_Sequence_ID
+ * @param incrementNo
+ * @param calendarYear
+ * @return next id
+ */
+ private static int nextIDByYear(Connection conn, int AD_Sequence_ID,
+ int incrementNo, String calendarYear) {
+ if (conn == null || AD_Sequence_ID == 0)
+ return -3;
+ //
+ int retValue = -1;
+ String sqlUpdate = "{call nextIDByYear(?,?,?,?)}";
+ CallableStatement cstmt = null;
+ try {
+ cstmt = conn.prepareCall(sqlUpdate, ResultSet.TYPE_FORWARD_ONLY,
+ ResultSet.CONCUR_READ_ONLY);
+
+ cstmt.setInt(1, AD_Sequence_ID);
+ cstmt.setInt(2, incrementNo);
+ cstmt.setString(3, calendarYear);
+ cstmt.registerOutParameter(4, Types.INTEGER);
+ cstmt.execute();
+ retValue = cstmt.getInt(4);
+ } catch (Exception e) {
+ s_log.log(Level.SEVERE, e.toString());
+ } finally {
+ DB.close(cstmt);
+ }
+ return retValue;
+ } // nextID
+
+ /**************************************************************************
+ * Get Document No from table
+ * @param AD_Client_ID client
+ * @param TableName table name
+ * @param trxName optional Transaction Name
+ * @return document no or null
+ */
+ public static synchronized String getDocumentNo (int AD_Client_ID, String TableName, String trxName)
+ {
+ return getDocumentNo(AD_Client_ID, TableName, trxName, null);
+
+ }
+ /**************************************************************************
+ * Get Document No from table
+ * @param AD_Client_ID client
+ * @param TableName table name
+ * @param trxName optional Transaction Name
+ * @param PO
+ * @return document no or null
+ */
+ public static synchronized String getDocumentNo (int AD_Client_ID, String TableName, String trxName, PO po)
+ {
+ if (TableName == null || TableName.length() == 0)
+ throw new IllegalArgumentException("TableName missing");
+
+ //get from server
+ if (DB.isRemoteObjects())
+ {
+ Server server = CConnection.get().getServer();
+ try
+ {
+ if (server != null)
+ { // See ServerBean
+ String dn = server.getDocumentNo (AD_Client_ID, TableName, trxName, po);
+ s_log.finest("Server => " + dn);
+ if (dn != null)
+ return dn;
+ }
+ s_log.log(Level.SEVERE, "AppsServer not found - " + TableName);
+ }
+ catch (RemoteException ex)
+ {
+ s_log.log(Level.SEVERE, "AppsServer error", ex);
+ }
+ }
+
+ //local
+ // Check AdempiereSys
+ boolean adempiereSys = Ini.isPropertyBool(Ini.P_ADEMPIERESYS);
+ if (adempiereSys && AD_Client_ID > 11)
+ adempiereSys = false;
+ //
+ if (CLogMgt.isLevel(LOGLEVEL))
+ s_log.log(LOGLEVEL, TableName + " - AdempiereSys=" + adempiereSys + " [" + trxName + "]");
+
+ PreparedStatement pstmt = null;
+ ResultSet rs = null;
+ boolean isStartNewYear = false;
+ String dateColumn = null;
+
+ if (!adempiereSys)
+ {
+ // Get the Start New Year flag
+ String startNewYearSQL = "SELECT StartNewYear, DateColumn FROM AD_Sequence "
+ + "WHERE Name = ? AND IsActive = 'Y' AND IsTableID = 'N' AND IsAutoSequence='Y' AND AD_Client_ID = ?";
+ try
+ {
+ pstmt = DB.prepareStatement(startNewYearSQL, trxName);
+ pstmt.setString(1, PREFIX_DOCSEQ + TableName);
+ pstmt.setInt(2, AD_Client_ID);
+ rs = pstmt.executeQuery();
+ if (rs.next()) {
+ isStartNewYear = "Y".equals(rs.getString(1));
+ dateColumn = rs.getString(2);
+ }
+ }
+ catch (Exception e)
+ {
+ s_log.log(Level.SEVERE, "(Table) [" + trxName + "]", e);
+ }
+ finally
+ {
+ DB.close(rs, pstmt);
+ }
+ }
+
+
+ String selectSQL = null;
+ if (DB.isOracle() == false || DB.isRemoteObjects())
+ {
+ if (isStartNewYear) {
+ selectSQL = "SELECT y.CurrentNext, s.CurrentNextSys, s.IncrementNo, s.Prefix, s.Suffix, s.DecimalPattern, s.AD_Sequence_ID "
+ + "FROM AD_Sequence_No y, AD_Sequence s "
+ + "WHERE y.AD_Sequence_ID = s.AD_Sequence_ID "
+ + "AND s.Name = ? "
+ + "AND s.AD_Client_ID = ? "
+ + "AND y.CalendarYear = ? "
+ + "AND s.IsActive='Y' AND s.IsTableID='N' AND s.IsAutoSequence='Y' "
+ + "ORDER BY s.AD_Client_ID DESC "
+ + "FOR UPDATE OF AD_Sequence_No";
+ } else {
+ selectSQL = "SELECT CurrentNext, CurrentNextSys, IncrementNo, Prefix, Suffix, DecimalPattern, AD_Sequence_ID "
+ + "FROM AD_Sequence "
+ + "WHERE Name = ? "
+ + "AND AD_Client_ID = ? "
+ + "AND IsActive='Y' AND IsTableID='N' AND IsAutoSequence='Y' "
+ + "ORDER BY AD_Client_ID DESC "
+ + "FOR UPDATE OF AD_Sequence";
+ }
+ USE_PROCEDURE=false;
+ }
+ else
+ {
+ if (isStartNewYear) {
+ selectSQL = "SELECT y.CurrentNext, s.CurrentNextSys, s.IncrementNo, Prefix, Suffix, DecimalPattern, s.AD_Sequence_ID "
+ + "FROM AD_Sequence_No y, AD_Sequence s "
+ + "WHERE y.AD_Sequence_ID = s.AD_Sequence_ID "
+ + "AND s.Name = ? "
+ + "AND s.AD_Client_ID = ? "
+ + "AND y.CalendarYear = ? "
+ + "AND s.IsActive='Y' AND s.IsTableID='N' AND s.IsAutoSequence='Y' "
+ + "ORDER BY s.AD_Client_ID DESC";
+ } else {
+ selectSQL = "SELECT CurrentNext, CurrentNextSys, IncrementNo, Prefix, Suffix, DecimalPattern, AD_Sequence_ID "
+ + "FROM AD_Sequence "
+ + "WHERE Name = ? "
+ + "AND AD_Client_ID = ? "
+ + "AND IsActive='Y' AND IsTableID='N' AND IsAutoSequence='Y' "
+ + "ORDER BY AD_Client_ID DESC";
+ }
+ USE_PROCEDURE = true;
+ }
+ Connection conn = null;
+ Trx trx = trxName == null ? null : Trx.get(trxName, true);
+ //
+ int AD_Sequence_ID = 0;
+ int incrementNo = 0;
+ int next = -1;
+ String prefix = "";
+ String suffix = "";
+ String decimalPattern = "";
+ String calendarYear = "";
+ try
+ {
+ if (trx != null)
+ conn = trx.getConnection();
+ else
+ conn = DB.getConnectionID();
+ // Error
+ if (conn == null)
+ return null;
+
+ if (isStartNewYear)
+ {
+ if (po != null && dateColumn != null && dateColumn.length() > 0)
+ {
+ Date docDate = (Date)po.get_Value(dateColumn);
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy");
+ calendarYear = sdf.format(docDate);
+ }
+ else
+ {
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy");
+ calendarYear = sdf.format(new Date());
+ }
+ }
+
+ //
+ pstmt = conn.prepareStatement(selectSQL,
+ ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
+ pstmt.setString(1, PREFIX_DOCSEQ + TableName);
+ pstmt.setInt(2, AD_Client_ID);
+ if (isStartNewYear)
+ pstmt.setString(3, calendarYear);
+
+ //
+ rs = pstmt.executeQuery();
+ // s_log.fine("AC=" + conn.getAutoCommit() + " -Iso=" + conn.getTransactionIsolation()
+ // + " - Type=" + pstmt.getResultSetType() + " - Concur=" + pstmt.getResultSetConcurrency());
+ if (rs.next())
+ {
+ AD_Sequence_ID = rs.getInt(7);
+ prefix = rs.getString(4);
+ suffix = rs.getString(5);
+ decimalPattern = rs.getString(6);
+ incrementNo = rs.getInt(3);
+ if (USE_PROCEDURE)
+ {
+ next = isStartNewYear
+ ? nextIDByYear(conn, AD_Sequence_ID, incrementNo, calendarYear)
+ : nextID(conn, AD_Sequence_ID, adempiereSys);
+ }
+ else
+ {
+ PreparedStatement updateSQL = null;
+ try
+ {
+ if (adempiereSys) {
+ updateSQL = conn
+ .prepareStatement("UPDATE AD_Sequence SET CurrentNextSys = CurrentNextSys + ? WHERE AD_Sequence_ID = ?");
+ next = rs.getInt(2);
+ } else {
+ String sql = isStartNewYear
+ ? "UPDATE AD_Sequence_No SET CurrentNext = CurrentNext + ? WHERE AD_Sequence_ID = ? AND CalendarYear = ?"
+ : "UPDATE AD_Sequence SET CurrentNext = CurrentNext + ? WHERE AD_Sequence_ID = ?";
+ updateSQL = conn
+ .prepareStatement(sql);
+ next = rs.getInt(1);
+ }
+ updateSQL.setInt(1, incrementNo);
+ updateSQL.setInt(2, AD_Sequence_ID);
+ if (isStartNewYear)
+ updateSQL.setString(3, calendarYear);
+ updateSQL.executeUpdate();
+ }
+ finally
+ {
+ DB.close(updateSQL);
+ }
+ }
+ }
+ else
+ {
+ s_log.warning ("(Table) - no record found - " + TableName);
+ MSequence seq = new MSequence (Env.getCtx(), AD_Client_ID, TableName, null);
+ next = seq.getNextID();
+ seq.save();
+ }
+ // Commit
+ if (trx == null)
+ {
+ conn.commit();
+ }
+ }
+ catch (Exception e)
+ {
+ s_log.log(Level.SEVERE, "(Table) [" + trxName + "]", e);
+ next = -2;
+ }
+ finally
+ {
+ //Finish
+ DB.close(rs, pstmt);
+ try
+ {
+ if (trx == null && conn != null) {
+ conn.close();
+ conn = null;
+ }
+ }
+ catch (Exception e)
+ {
+ s_log.log(Level.SEVERE, "(Table) - finish", e);
+ }
+ }
+
+ // Error
+ if (next < 0)
+ return null;
+
+ // create DocumentNo
+ StringBuffer doc = new StringBuffer();
+ if (prefix != null && prefix.length() > 0)
+ doc.append(Env.parseVariable(prefix, po, trxName, false));
+ if (decimalPattern != null && decimalPattern.length() > 0)
+ doc.append(new DecimalFormat(decimalPattern).format(next));
+ else
+ doc.append(next);
+ if (suffix != null && suffix.length() > 0)
+ doc.append(Env.parseVariable(suffix, po, trxName, false));
+ String documentNo = doc.toString();
+ s_log.finer (documentNo + " (" + incrementNo + ")"
+ + " - Table=" + TableName + " [" + trx + "]");
+ return documentNo;
+ } // getDocumentNo
+
+ /**
+ * Get Document No based on Document Type
+ * @param C_DocType_ID document type
+ * @param trxName optional Transaction Name
+ * @return document no or null
+ * @deprecated
+ */
+ public static String getDocumentNo(int C_DocType_ID, String trxName)
+ {
+ return getDocumentNo (C_DocType_ID, trxName, false);
+ } // getDocumentNo
+
+ /**
+ * Get Document No based on Document Type
+ * @param C_DocType_ID document type
+ * @param trxName optional Transaction Name
+ * @param definite asking for a definitive or temporary sequence
+ * @return document no or null
+ */
+ public static String getDocumentNo (int C_DocType_ID, String trxName, boolean definite)
+ {
+ return getDocumentNo(C_DocType_ID, trxName, definite, null);
+ }
+
+ /**
+ * Get Document No based on Document Type
+ * @param C_DocType_ID document type
+ * @param trxName optional Transaction Name
+ * @param definite asking for a definitive or temporary sequence
+ * @param po
+ * @return document no or null
+ */
+ public static String getDocumentNo (int C_DocType_ID, String trxName, boolean definite, PO po)
+ {
+ if (C_DocType_ID == 0)
+ {
+ s_log.severe ("C_DocType_ID=0");
+ return null;
+ }
+
+ //get from server
+
+ if (DB.isRemoteObjects())
+ {
+ Server server = CConnection.get().getServer();
+ try
+ {
+ if (server != null)
+ { // See ServerBean
+ String dn = server.getDocumentNo (C_DocType_ID, trxName, definite, po);
+ s_log.finest("Server => " + dn);
+ if (dn != null)
+ return dn;
+ }
+ s_log.log(Level.SEVERE, "AppsServer not found - " + C_DocType_ID);
+ }
+ catch (RemoteException ex)
+ {
+ s_log.log(Level.SEVERE, "AppsServer error", ex);
+ }
+ }
+
+ //local
+ MDocType dt = MDocType.get (Env.getCtx(), C_DocType_ID); // wrong for SERVER, but r/o
+ if (dt != null && !dt.isDocNoControlled())
+ {
+ s_log.finer("DocType_ID=" + C_DocType_ID + " Not DocNo controlled");
+ return null;
+ }
+ if (definite && ! dt.isOverwriteSeqOnComplete()) {
+ s_log.finer("DocType_ID=" + C_DocType_ID + " Not Sequence Overwrite on Complete");
+ return null;
+ }
+ if (dt == null || dt.getDocNoSequence_ID() == 0)
+ {
+ s_log.warning ("No Sequence for DocType - " + dt);
+ return null;
+ }
+ if (definite && dt.getDefiniteSequence_ID() == 0)
+ {
+ s_log.warning ("No Definite Sequence for DocType - " + dt);
+ return null;
+ }
+
+ // Check AdempiereSys
+ boolean adempiereSys = Ini.isPropertyBool(Ini.P_ADEMPIERESYS);
+ if (CLogMgt.isLevel(LOGLEVEL))
+ s_log.log(LOGLEVEL, "DocType_ID=" + C_DocType_ID + " [" + trxName + "]");
+
+ PreparedStatement pstmt = null;
+ ResultSet rs = null;
+ boolean isStartNewYear = false;
+ String dateColumn = null;
+
+ if (!adempiereSys)
+ {
+ // Get the Start New Year & Sequence Type
+ String startNewYearSQL = "SELECT StartNewYear, DateColumn FROM AD_Sequence "
+ + "WHERE AD_Sequence_ID = ? AND IsActive = 'Y' AND IsTableID = 'N' AND IsAutoSequence='Y'";
+ try {
+ pstmt = DB.prepareStatement(startNewYearSQL, trxName);
+ pstmt.setInt(1, definite ? dt.getDefiniteSequence_ID() : dt
+ .getDocNoSequence_ID());
+ rs = pstmt.executeQuery();
+ if (rs.next()) {
+ isStartNewYear = "Y".equals(rs.getString(1));
+ dateColumn = rs.getString(2);
+ }
+ } catch (Exception e) {
+ s_log.log(Level.SEVERE, "(Table) [" + trxName + "]", e);
+ }
+ finally
+ {
+ DB.close(rs, pstmt);
+ }
+ }
+
+ String selectSQL = null;
+ if (DB.isOracle() == false)
+ {
+ if (isStartNewYear)
+ {
+ selectSQL = "SELECT y.CurrentNext, s.CurrentNextSys, s.IncrementNo, s.Prefix, s.Suffix, s.DecimalPattern, s.AD_Client_ID, s.AD_Sequence_ID "
+ + "FROM AD_Sequence_No y, AD_Sequence s "
+ + "WHERE y.AD_Sequence_ID = s.AD_Sequence_ID "
+ + "AND s.AD_Sequence_ID = ? "
+ + "AND y.CalendarYear = ? "
+ + "AND s.IsActive='Y' AND s.IsTableID='N' AND s.IsAutoSequence='Y' "
+ + "FOR UPDATE OF AD_Sequence_No";
+ }
+ else
+ {
+ selectSQL = "SELECT CurrentNext, CurrentNextSys, IncrementNo, Prefix, Suffix, DecimalPattern, AD_Client_ID, AD_Sequence_ID "
+ + "FROM AD_Sequence "
+ + "WHERE AD_Sequence_ID = ? "
+ + "AND IsActive='Y' AND IsTableID='N' AND IsAutoSequence='Y' "
+ + "FOR UPDATE OF AD_Sequence";
+ }
+ USE_PROCEDURE=false;
+ }
+ else
+ {
+ if (isStartNewYear) {
+ selectSQL = "SELECT y.CurrentNext, s.CurrentNextSys, s.IncrementNo, s.Prefix, s.Suffix, s.DecimalPattern, s.AD_Client_ID, s.AD_Sequence_ID "
+ + "FROM AD_Sequence_No y, AD_Sequence s "
+ + "WHERE y.AD_Sequence_ID = s.AD_Sequence_ID "
+ + "AND s.AD_Sequence_ID = ? "
+ + "AND y.CalendarYear = ? "
+ + "AND s.IsActive='Y' AND s.IsTableID='N' AND s.IsAutoSequence='Y' ";
+ } else {
+ selectSQL = "SELECT CurrentNext, CurrentNextSys, IncrementNo, Prefix, Suffix, DecimalPattern, AD_Client_ID, AD_Sequence_ID "
+ + "FROM AD_Sequence "
+ + "WHERE AD_Sequence_ID = ? "
+ + "AND IsActive='Y' AND IsTableID='N' AND IsAutoSequence='Y' ";
+ }
+ USE_PROCEDURE = true;
+ }
+ Connection conn = null;
+ Trx trx = trxName == null ? null : Trx.get(trxName, true);
+ //
+ int AD_Sequence_ID = 0;
+ int incrementNo = 0;
+ int next = -1;
+ String prefix = "";
+ String suffix = "";
+ String decimalPattern = "";
+ String calendarYear = "";
+ try
+ {
+ if (trx != null)
+ conn = trx.getConnection();
+ else
+ conn = DB.getConnectionID();
+ // Error
+ if (conn == null)
+ return null;
+
+ if (isStartNewYear)
+ {
+ if (po != null && dateColumn != null && dateColumn.length() > 0)
+ {
+ Date docDate = (Date)po.get_Value(dateColumn);
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy");
+ calendarYear = sdf.format(docDate);
+ }
+ else
+ {
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy");
+ calendarYear = sdf.format(new Date());
+ }
+ }
+
+ pstmt = conn.prepareStatement(selectSQL,
+ ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
+ if (definite)
+ pstmt.setInt(1, dt.getDefiniteSequence_ID());
+ else
+ pstmt.setInt(1, dt.getDocNoSequence_ID());
+ if (isStartNewYear)
+ pstmt.setString(2, calendarYear);
+
+ //
+ rs = pstmt.executeQuery();
+ // s_log.fine("AC=" + conn.getAutoCommit() + " -Iso=" + conn.getTransactionIsolation()
+ // + " - Type=" + pstmt.getResultSetType() + " - Concur=" + pstmt.getResultSetConcurrency());
+ if (rs.next())
+ {
+ incrementNo = rs.getInt(3);
+ prefix = rs.getString(4);
+ suffix = rs.getString(5);
+ decimalPattern = rs.getString(6);
+ int AD_Client_ID = rs.getInt(7);
+ if (adempiereSys && AD_Client_ID > 11)
+ adempiereSys = false;
+ AD_Sequence_ID = rs.getInt(8);
+
+ if (USE_PROCEDURE)
+ {
+ next = isStartNewYear
+ ? nextIDByYear(conn, AD_Sequence_ID, incrementNo, calendarYear)
+ : nextID(conn, AD_Sequence_ID, adempiereSys);
+ }
+ else
+ {
+ PreparedStatement updateSQL = null;
+ try
+ {
+ if (adempiereSys) {
+ updateSQL = conn
+ .prepareStatement("UPDATE AD_Sequence SET CurrentNextSys = CurrentNextSys + ? WHERE AD_Sequence_ID = ?");
+ next = rs.getInt(2);
+ } else {
+ String sql = isStartNewYear
+ ? "UPDATE AD_Sequence_No SET CurrentNext = CurrentNext + ? WHERE AD_Sequence_ID = ? AND CalendarYear = ?"
+ : "UPDATE AD_Sequence SET CurrentNext = CurrentNext + ? WHERE AD_Sequence_ID = ?";
+ updateSQL = conn.prepareStatement(sql);
+ next = rs.getInt(1);
+ }
+ updateSQL.setInt(1, incrementNo);
+ updateSQL.setInt(2, AD_Sequence_ID);
+ if (isStartNewYear)
+ updateSQL.setString(3, calendarYear);
+ updateSQL.executeUpdate();
+ }
+ finally
+ {
+ DB.close(updateSQL);
+ }
+ }
+ }
+ else
+ {
+ s_log.warning ("(DocType)- no record found - " + dt);
+ next = -2;
+ }
+ // Commit
+ if (trx == null)
+ {
+ conn.commit();
+ }
+ }
+ catch (Exception e)
+ {
+ s_log.log(Level.SEVERE, "(DocType) [" + trxName + "]", e);
+ next = -2;
+ }
+ finally
+ {
+ // Finish
+ try
+ {
+ DB.close(rs, pstmt);
+ if (trx == null && conn != null) {
+ conn.close();
+ conn = null;
+ }
+ }
+ catch (Exception e)
+ {
+ s_log.log(Level.SEVERE, "(DocType) - finish", e);
+ }
+ }
+ // Error
+ if (next < 0)
+ return null;
+
+ // create DocumentNo
+ StringBuffer doc = new StringBuffer();
+ if (prefix != null && prefix.length() > 0)
+ doc.append(Env.parseVariable(prefix, po, trxName, false));
+ if (decimalPattern != null && decimalPattern.length() > 0)
+ doc.append(new DecimalFormat(decimalPattern).format(next));
+ else
+ doc.append(next);
+ if (suffix != null && suffix.length() > 0)
+ doc.append(Env.parseVariable(suffix, po, trxName, false));
+ String documentNo = doc.toString();
+ s_log.finer (documentNo + " (" + incrementNo + ")"
+ + " - C_DocType_ID=" + C_DocType_ID + " [" + trx + "]");
+ return documentNo;
+ } // getDocumentNo
+
+
+ /**************************************************************************
+ * Check/Initialize Client DocumentNo/Value Sequences
+ * @param ctx context
+ * @param AD_Client_ID client
+ * @param trxName transaction
+ * @return true if no error
+ */
+ public static boolean checkClientSequences (Properties ctx, int AD_Client_ID, String trxName)
+ {
+ String sql = "SELECT TableName "
+ + "FROM AD_Table t "
+ + "WHERE IsActive='Y' AND IsView='N'"
+ // Get all Tables with DocumentNo or Value
+ + " AND AD_Table_ID IN "
+ + "(SELECT AD_Table_ID FROM AD_Column "
+ + "WHERE ColumnName = 'DocumentNo' OR ColumnName = 'Value')"
+ // Ability to run multiple times
+ + " AND 'DocumentNo_' || TableName NOT IN "
+ + "(SELECT Name FROM AD_Sequence s "
+ + "WHERE s.AD_Client_ID=?)";
+ int counter = 0;
+ boolean success = true;
+ //
+ PreparedStatement pstmt = null;
+ ResultSet rs = null;
+ try
+ {
+ pstmt = DB.prepareStatement(sql, trxName);
+ pstmt.setInt(1, AD_Client_ID);
+ rs = pstmt.executeQuery();
+ while (rs.next())
+ {
+ String tableName = rs.getString(1);
+ s_log.fine("Add: " + tableName);
+ MSequence seq = new MSequence (ctx, AD_Client_ID, tableName, trxName);
+ if (seq.save())
+ counter++;
+ else
+ {
+ s_log.severe ("Not created - AD_Client_ID=" + AD_Client_ID
+ + " - " + tableName);
+ success = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ s_log.log(Level.SEVERE, sql, e);
+ }
+ finally
+ {
+ DB.close(rs, pstmt);
+ rs = null;
+ pstmt = null;
+ }
+ s_log.info ("AD_Client_ID=" + AD_Client_ID
+ + " - created #" + counter
+ + " - success=" + success);
+ return success;
+ } // checkClientSequences
+
+
+ /**
+ * Create Table ID Sequence
+ * @param ctx context
+ * @param TableName table name
+ * @param trxName transaction
+ * @return true if created
+ */
+ public static boolean createTableSequence (Properties ctx, String TableName, String trxName)
+ {
+ MSequence seq = new MSequence (ctx, 0, trxName);
+ seq.setClientOrg(0, 0);
+ seq.setName(TableName);
+ seq.setDescription("Table " + TableName);
+ seq.setIsTableID(true);
+ return seq.save();
+ } // createTableSequence
+
+
+ /**
+ * Get Sequence
+ * @param ctx context
+ * @param tableName table name
+ * @return Sequence
+ */
+ public static MSequence get (Properties ctx, String tableName)
+ {
+ return get(ctx, tableName, null);
+ }
+
+ /**
+ * Get Sequence
+ * @param ctx context
+ * @param tableName table name
+ * @param trxName optional transaction name
+ * @return Sequence
+ */
+ public static MSequence get (Properties ctx, String tableName, String trxName)
+ {
+ String sql = "SELECT * FROM AD_Sequence "
+ + "WHERE UPPER(Name)=?"
+ + " AND IsTableID='Y'";
+ MSequence retValue = null;
+ PreparedStatement pstmt = null;
+ ResultSet rs = null;
+ try
+ {
+ pstmt = DB.prepareStatement (sql, trxName);
+ pstmt.setString (1, tableName.toUpperCase());
+ rs = pstmt.executeQuery ();
+ if (rs.next ())
+ retValue = new MSequence (ctx, rs, trxName);
+ if (rs.next())
+ s_log.log(Level.SEVERE, "More then one sequence for " + tableName);
+ }
+ catch (Exception e)
+ {
+ s_log.log(Level.SEVERE, "get", e);
+ }
+ finally
+ {
+ DB.close(rs, pstmt);
+ rs = null;
+ pstmt = null;
+ }
+ return retValue;
+ } // get
+
+
+ /** Sequence for Table Document No's */
+ private static final String PREFIX_DOCSEQ = "DocumentNo_";
+ /** Start Number */
+ public static final int INIT_NO = 1000000; // 1 Mio
+ /** Start System Number */
+ // public static final int INIT_SYS_NO = 100; // start number for Compiere
+ public static final int INIT_SYS_NO = 50000; // start number for Adempiere
+ /** Static Logger */
+ private static CLogger s_log = CLogger.getCLogger(MSequence.class);
+
+
+ /**************************************************************************
+ * Standard Constructor
+ * @param ctx context
+ * @param AD_Sequence_ID id
+ * @param trxName transaction
+ */
+ public MSequence (Properties ctx, int AD_Sequence_ID, String trxName)
+ {
+ super(ctx, AD_Sequence_ID, trxName);
+ if (AD_Sequence_ID == 0)
+ {
+ // setName (null);
+ //
+ setIsTableID(false);
+ setStartNo (INIT_NO);
+ setCurrentNext (INIT_NO);
+ setCurrentNextSys (INIT_SYS_NO);
+ setIncrementNo (1);
+ setIsAutoSequence (true);
+ setIsAudited(false);
+ setStartNewYear(false);
+ }
+ } // MSequence
+
+ /**
+ * Load Constructor
+ * @param ctx context
+ * @param rs result set
+ * @param trxName transaction
+ */
+ public MSequence (Properties ctx, ResultSet rs, String trxName)
+ {
+ super(ctx, rs, trxName);
+ } // MSequence
+
+ /**
+ * New Document Sequence Constructor
+ * @param ctx context
+ * @param AD_Client_ID owner
+ * @param tableName name
+ * @param trxName transaction
+ */
+ public MSequence (Properties ctx, int AD_Client_ID, String tableName, String trxName)
+ {
+ this (ctx, 0, trxName);
+ setClientOrg(AD_Client_ID, 0); // Client Ownership
+ setName(PREFIX_DOCSEQ + tableName);
+ setDescription("DocumentNo/Value for Table " + tableName);
+ } // MSequence;
+
+ /**
+ * New Document Sequence Constructor
+ * @param ctx context
+ * @param AD_Client_ID owner
+ * @param sequenceName name
+ * @param StartNo start
+ * @param trxName trx
+ */
+ public MSequence (Properties ctx, int AD_Client_ID, String sequenceName, int StartNo, String trxName)
+ {
+ this (ctx, 0, trxName);
+ setClientOrg(AD_Client_ID, 0); // Client Ownership
+ setName(sequenceName);
+ setDescription(sequenceName);
+ setStartNo(StartNo);
+ setCurrentNext(StartNo);
+ setCurrentNextSys(StartNo/10);
+ } // MSequence;
+
+
+ /**************************************************************************
+ * Get Next No and increase current next
+ * @return next no to use
+ */
+ public int getNextID()
+ {
+ int retValue = getCurrentNext();
+ setCurrentNext(retValue + getIncrementNo());
+ return retValue;
+ } // getNextNo
+
+ /**
+ * Validate Table Sequence Values
+ * @return true if updated
+ */
+ public boolean validateTableIDValue()
+ {
+ if (!isTableID())
+ return false;
+ String tableName = getName();
+ int AD_Column_ID = DB.getSQLValue(null, "SELECT MAX(c.AD_Column_ID) "
+ + "FROM AD_Table t"
+ + " INNER JOIN AD_Column c ON (t.AD_Table_ID=c.AD_Table_ID) "
+ + "WHERE t.TableName='" + tableName + "'"
+ + " AND c.ColumnName='" + tableName + "_ID'");
+ if (AD_Column_ID <= 0)
+ return false;
+ //
+ MSystem system = MSystem.get(getCtx());
+ int IDRangeEnd = 0;
+ if (system.getIDRangeEnd() != null)
+ IDRangeEnd = system.getIDRangeEnd().intValue();
+ boolean change = false;
+ String info = null;
+
+ // Current Next
+ String sql = "SELECT MAX(" + tableName + "_ID) FROM " + tableName;
+ if (IDRangeEnd > 0)
+ sql += " WHERE " + tableName + "_ID < " + IDRangeEnd;
+ int maxTableID = DB.getSQLValue(null, sql);
+ if (maxTableID < INIT_NO)
+ maxTableID = INIT_NO - 1;
+ maxTableID++; // Next
+ if (getCurrentNext() < maxTableID)
+ {
+ setCurrentNext(maxTableID);
+ info = "CurrentNext=" + maxTableID;
+ change = true;
+ }
+
+ // Get Max System_ID used in Table
+ sql = "SELECT MAX(" + tableName + "_ID) FROM " + tableName
+ + " WHERE " + tableName + "_ID < " + INIT_NO;
+ int maxTableSysID = DB.getSQLValue(null, sql);
+ if (maxTableSysID <= 0)
+ maxTableSysID = INIT_SYS_NO - 1;
+ maxTableSysID++; // Next
+ if (getCurrentNextSys() < maxTableSysID)
+ {
+ setCurrentNextSys(maxTableSysID);
+ if (info == null)
+ info = "CurrentNextSys=" + maxTableSysID;
+ else
+ info += " - CurrentNextSys=" + maxTableSysID;
+ change = true;
+ }
+ if (info != null)
+ log.fine(getName() + " - " + info);
+ return change;
+ } // validate
+
+
+ /**************************************************************************
+ * Test
+ * @param args ignored
+ */
+ static public void main (String[] args)
+ {
+ // int id = getNextID_HTTP("AD_Column");
+ // if (true) return;
+
+ org.compiere.Adempiere.startup(true);
+ CLogMgt.setLevel(Level.SEVERE);
+ CLogMgt.setLoggerLevel(Level.SEVERE, null);
+ s_list = new Vector(1000);
+
+ /** Lock Test **/
+ String trxName = "test";
+ System.out.println(DB.getDocumentNo(115, trxName));
+ System.out.println(DB.getDocumentNo(116, trxName));
+ System.out.println(DB.getDocumentNo(117, trxName));
+ System.out.println(DB.getDocumentNo(118, trxName));
+ System.out.println(DB.getDocumentNo(118, trxName));
+ System.out.println(DB.getDocumentNo(117, trxName));
+
+ trxName = "test1";
+ System.out.println(DB.getDocumentNo(115, trxName)); // hangs here as supposed
+ System.out.println(DB.getDocumentNo(116, trxName));
+ System.out.println(DB.getDocumentNo(117, trxName));
+ System.out.println(DB.getDocumentNo(118, trxName));
+
+
+
+
+
+ /** **/
+
+ /** Time Test */
+ long time = System.currentTimeMillis();
+ Thread[] threads = new Thread[10];
+ for (int i = 0; i < 10; i++)
+ {
+ Runnable r = new GetIDs(i);
+ threads[i] = new Thread(r);
+ threads[i].start();
+ }
+ for (int i = 0; i < 10; i++)
+ {
+ try
+ {
+ threads[i].join();
+ }
+ catch (InterruptedException e)
+ {
+ }
+ }
+ time = System.currentTimeMillis() - time;
+
+ System.out.println("-------------------------------------------");
+ System.out.println("Size=" + s_list.size() + " (should be 1000)");
+ Integer[] ia = new Integer[s_list.size()];
+ s_list.toArray(ia);
+ Arrays.sort(ia);
+ Integer last = null;
+ int duplicates = 0;
+ for (int i = 0; i < ia.length; i++)
+ {
+ if (last != null)
+ {
+ if (last.compareTo(ia[i]) == 0)
+ {
+ // System.out.println(i + ": " + ia[i]);
+ duplicates++;
+ }
+ }
+ last = ia[i];
+ }
+ System.out.println("-------------------------------------------");
+ System.out.println("Size=" + s_list.size() + " (should be 1000)");
+ System.out.println("Duplicates=" + duplicates);
+ System.out.println("Time (ms)=" + time + " - " + ((float)time/s_list.size()) + " each" );
+ System.out.println("-------------------------------------------");
+
+
+
+ /** **
+ try
+ {
+ int retValue = -1;
+ Connection conn = DB.getConnectionRW ();
+ // DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
+ // Connection conn = DriverManager.getConnection ("jdbc:oracle:thin:@//dev2:1521/dev2", "adempiere", "adempiere");
+
+ conn.setAutoCommit(false);
+ String sql = "SELECT CurrentNext, CurrentNextSys, IncrementNo "
+ + "FROM AD_Sequence "
+ + "WHERE Name='AD_Sequence' ";
+ sql += "FOR UPDATE";
+ // creates ORA-00907: missing right parenthesis
+ // sql += "FOR UPDATE OF CurrentNext, CurrentNextSys";
+
+
+ PreparedStatement pstmt = conn.prepareStatement(sql,
+ ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
+ ResultSet rs = pstmt.executeQuery();
+ System.out.println("AC=" + conn.getAutoCommit() + ", RO=" + conn.isReadOnly()
+ + " - Isolation=" + conn.getTransactionIsolation() + "(" + Connection.TRANSACTION_READ_COMMITTED
+ + ") - RSType=" + pstmt.getResultSetType() + "(" + ResultSet.TYPE_SCROLL_SENSITIVE
+ + "), RSConcur=" + pstmt.getResultSetConcurrency() + "(" + ResultSet.CONCUR_UPDATABLE
+ + ")");
+
+ if (rs.next())
+ {
+ int IncrementNo = rs.getInt(3);
+ retValue = rs.getInt(1);
+ rs.updateInt(1, retValue + IncrementNo);
+ rs.updateRow();
+ }
+ else
+ s_log.severe ("no record found");
+ rs.close();
+ pstmt.close();
+ conn.commit();
+ conn.close();
+ //
+ System.out.println("Next=" + retValue);
+
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace ();
+ }
+
+ System.exit(0);
+
+ /** **
+
+ int AD_Client_ID = 0;
+ int C_DocType_ID = 115; // GL
+ String TableName = "C_Invoice";
+ String trxName = "x";
+ Trx trx = Trx.get(trxName, true);
+
+ System.out.println ("none " + getNextID (0, "Test"));
+ System.out.println ("----------------------------------------------");
+ System.out.println ("trx1 " + getNextID (0, "Test"));
+ System.out.println ("trx2 " + getNextID (0, "Test"));
+ // trx.rollback();
+ System.out.println ("trx3 " + getNextID (0, "Test"));
+ // trx.commit();
+ System.out.println ("trx4 " + getNextID (0, "Test"));
+ // trx.rollback();
+ // trx.close();
+ System.out.println ("----------------------------------------------");
+ System.out.println ("none " + getNextID (0, "Test"));
+ System.out.println ("==============================================");
+
+
+ trx = Trx.get(trxName, true);
+ System.out.println ("none " + getDocumentNo(AD_Client_ID, TableName, null));
+ System.out.println ("----------------------------------------------");
+ System.out.println ("trx1 " + getDocumentNo(AD_Client_ID, TableName, trxName));
+ System.out.println ("trx2 " + getDocumentNo(AD_Client_ID, TableName, trxName));
+ trx.rollback();
+ System.out.println ("trx3 " + getDocumentNo(AD_Client_ID, TableName, trxName));
+ trx.commit();
+ System.out.println ("trx4 " + getDocumentNo(AD_Client_ID, TableName, trxName));
+ trx.rollback();
+ trx.close();
+ System.out.println ("----------------------------------------------");
+ System.out.println ("none " + getDocumentNo(AD_Client_ID, TableName, null));
+ System.out.println ("==============================================");
+
+
+ trx = Trx.get(trxName, true);
+ System.out.println ("none " + getDocumentNo(C_DocType_ID, null));
+ System.out.println ("----------------------------------------------");
+ System.out.println ("trx1 " + getDocumentNo(C_DocType_ID, trxName));
+ System.out.println ("trx2 " + getDocumentNo(C_DocType_ID, trxName));
+ trx.rollback();
+ System.out.println ("trx3 " + getDocumentNo(C_DocType_ID, trxName));
+ trx.commit();
+ System.out.println ("trx4 " + getDocumentNo(C_DocType_ID, trxName));
+ trx.rollback();
+ trx.close();
+ System.out.println ("----------------------------------------------");
+ System.out.println ("none " + getDocumentNo(C_DocType_ID, null));
+ System.out.println ("==============================================");
+ /** **/
+ } // main
+
+ /** Test */
+ private static Vector s_list = null;
+
+ /**
+ * Test Sequence - Get IDs
+ *
+ * @author Jorg Janke
+ * @version $Id: MSequence.java,v 1.3 2006/07/30 00:58:04 jjanke Exp $
+ */
+ public static class GetIDs implements Runnable
+ {
+ /**
+ * Get IDs
+ * @param i
+ */
+ public GetIDs (int i)
+ {
+ m_i = i;
+ }
+ private int m_i;
+
+ /**
+ * Run
+ */
+ public void run()
+ {
+ for (int i = 0; i < 100; i++)
+ {
+ try
+ {
+ int no = DB.getNextID(0, "Test", null);
+ s_list.add(new Integer(no));
+ // System.out.println("#" + m_i + ": " + no);
+ }
+ catch (Exception e)
+ {
+ System.err.println(e.getMessage());
+ }
+ }
+ }
+ } // GetIDs
+
+ /**
+ * Get next number for Key column
+ * @param AD_Client_ID client
+ * @param TableName table name
+ * @param trxName optional Transaction Name
+ * @return next no or (-1=error)
+ */
+ public static synchronized int getNextOfficialID_HTTP (String TableName)
+ {
+ String website = MSysConfig.getValue("DICTIONARY_ID_WEBSITE"); // "http://developer.adempiere.com/cgi-bin/get_ID";
+ String prm_USER = MSysConfig.getValue("DICTIONARY_ID_USER"); // "globalqss";
+ String prm_PASSWORD = MSysConfig.getValue("DICTIONARY_ID_PASSWORD"); // "password_inseguro";
+ String prm_TABLE = TableName;
+ String prm_ALTKEY = ""; // TODO: generate alt-key based on key of table
+ String prm_COMMENT = MSysConfig.getValue("DICTIONARY_ID_COMMENTS");
+ String prm_PROJECT = new String("Adempiere");
+
+ return getNextID_HTTP(TableName, website, prm_USER,
+ prm_PASSWORD, prm_TABLE, prm_ALTKEY, prm_COMMENT, prm_PROJECT);
+ }
+
+ /**
+ * Get next number for Key column
+ * @param AD_Client_ID client
+ * @param TableName table name
+ * @param trxName optional Transaction Name
+ * @return next no or (-1=error)
+ */
+ public static synchronized int getNextProjectID_HTTP (String TableName)
+ {
+ String website = MSysConfig.getValue("PROJECT_ID_WEBSITE"); // "http://developer.adempiere.com/cgi-bin/get_ID";
+ String prm_USER = MSysConfig.getValue("PROJECT_ID_USER"); // "globalqss";
+ String prm_PASSWORD = MSysConfig.getValue("PROJECT_ID_PASSWORD"); // "password_inseguro";
+ String prm_TABLE = TableName;
+ String prm_ALTKEY = ""; // TODO: generate alt-key based on key of table
+ String prm_COMMENT = MSysConfig.getValue("PROJECT_ID_COMMENTS");
+ String prm_PROJECT = MSysConfig.getValue("PROJECT_ID_PROJECT");
+
+ return getNextID_HTTP(TableName, website, prm_USER,
+ prm_PASSWORD, prm_TABLE, prm_ALTKEY, prm_COMMENT, prm_PROJECT);
+ }
+
+ private static int getNextID_HTTP(String TableName,
+ String website, String prm_USER, String prm_PASSWORD,
+ String prm_TABLE, String prm_ALTKEY, String prm_COMMENT,
+ String prm_PROJECT) {
+ StringBuffer read = new StringBuffer("");
+ int retValue = -1;
+ try {
+ String completeUrl = website + "?" + "USER="
+ + URLEncoder.encode(prm_USER, "UTF-8") + "&PASSWORD="
+ + URLEncoder.encode(prm_PASSWORD, "UTF-8") + "&PROJECT="
+ + URLEncoder.encode(prm_PROJECT, "UTF-8") + "&TABLE="
+ + URLEncoder.encode(prm_TABLE, "UTF-8") + "&ALTKEY="
+ + URLEncoder.encode(prm_ALTKEY, "UTF-8") + "&COMMENT="
+ + URLEncoder.encode(prm_COMMENT, "UTF-8");
+
+ // Now use the URL class to parse the user-specified URL into
+ // its various parts: protocol, host, port, filename. Check the protocol
+ URL url = new URL(completeUrl);
+ String protocol = url.getProtocol();
+ if (!protocol.equals("http"))
+ throw new IllegalArgumentException("URL must use 'http:' protocol");
+ String host = url.getHost();
+ int port = url.getPort();
+ if (port == -1) port = 80; // if no port, use the default HTTP port
+ String filename = url.getFile();
+ // Open a network socket connection to the specified host and port
+ Socket socket = new Socket(host, port);
+ // Get input and output streams for the socket
+ InputStream from_server = socket.getInputStream();
+ PrintWriter to_server =
+ new PrintWriter(new OutputStreamWriter(socket.getOutputStream()));
+
+ // Send the HTTP GET command to the Web server, specifying the file.
+ // This uses an old and very simple version of the HTTP protocol
+ to_server.println("GET " + filename);
+ to_server.flush(); // Send it right now!
+
+ // Now read the server's response, and write it to the file
+ byte[] buffer = new byte[4096];
+ int bytes_read;
+ while((bytes_read = from_server.read(buffer)) != -1) {
+ for (int i = 0; i < bytes_read; i++) {
+ if (buffer[i] != 10)
+ read.append((char) buffer[i]);
+ }
+ }
+
+ // When the server closes the connection, we close our stuff
+ socket.close();
+ retValue = Integer.parseInt(read.toString());
+ if (retValue <= 0)
+ retValue = -1;
+ }
+ catch (Exception e) { // Report any errors that arise
+ System.err.println(e);
+ retValue = -1;
+ }
+ s_log.log(Level.INFO, "getNextID_HTTP - " + TableName + "=" + read + "(" + retValue + ")");
+
+ return retValue;
+ }
+
+ private static boolean isExceptionCentralized(String tableName) {
+ String [] exceptionTables = new String[] {
+ "AD_ACCESSLOG",
+ "AD_ALERTPROCESSORLOG",
+ "AD_CHANGELOG",
+ "AD_ISSUE",
+ "AD_LDAPPROCESSORLOG",
+ "AD_PACKAGE_IMP",
+ "AD_PACKAGE_IMP_BACKUP",
+ "AD_PACKAGE_IMP_DETAIL",
+ "AD_PACKAGE_IMP_INST",
+ "AD_PACKAGE_IMP_PROC",
+ "AD_PINSTANCE",
+ "AD_PINSTANCE_LOG",
+ "AD_PINSTANCE_PARA",
+ "AD_REPLICATION_LOG",
+ "AD_SCHEDULERLOG",
+ "AD_SESSION",
+ "AD_WORKFLOWPROCESSORLOG",
+ "CM_WEBACCESSLOG",
+ "C_ACCTPROCESSORLOG",
+ "K_INDEXLOG",
+ "R_REQUESTPROCESSORLOG",
+ "T_AGING",
+ "T_ALTER_COLUMN",
+ "T_DISTRIBUTIONRUNDETAIL",
+ "T_INVENTORYVALUE",
+ "T_INVOICEGL",
+ "T_REPLENISH",
+ "T_REPORT",
+ "T_REPORTSTATEMENT",
+ "T_SELECTION",
+ "T_SELECTION2",
+ "T_SPOOL",
+ "T_TRANSACTION",
+ "T_TRIALBALANCE"
+ };
+ for (int i = 0; i < exceptionTables.length; i++) {
+ if (tableName.equalsIgnoreCase(exceptionTables[i]))
+ return true;
+ }
+
+ // don't log selects or insert/update for exception tables (i.e. AD_Issue, AD_ChangeLog)
+ return false;
+ }
+
+ /**
+ * Get preliminary document no by year
+ * @param tab
+ * @param AD_Sequence_ID
+ * @param dateColumn
+ * @return Preliminary document no
+ */
+ public static String getPreliminaryNoByYear(GridTab tab, int AD_Sequence_ID, String dateColumn, String trxName) {
+ Date d = (Date)tab.getValue(dateColumn);
+ if (d == null)
+ d = new Date();
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy");
+ String calendarYear = sdf.format(d);
+ String sql = "select CurrentNext From AD_Sequence_No Where AD_Sequence_ID = ? and CalendarYear = ?";
+
+ return DB.getSQLValueString(trxName, sql, AD_Sequence_ID, calendarYear);
+ }
+
+} // MSequence
\ No newline at end of file
diff --git a/posterita/posterita/src/main/org/compiere/model/MWarehouse.java b/posterita/posterita/src/main/org/compiere/model/MWarehouse.java
new file mode 100644
index 0000000000..fbbfb4079c
--- /dev/null
+++ b/posterita/posterita/src/main/org/compiere/model/MWarehouse.java
@@ -0,0 +1,247 @@
+/******************************************************************************
+ * Product: Adempiere ERP & CRM Smart Business Solution *
+ * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
+ * This program is free software; you can redistribute it and/or modify it *
+ * under the terms version 2 of the GNU General Public License as published *
+ * by the Free Software Foundation. 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, write to the Free Software Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
+ * For the text or an alternative of this public license, you may reach us *
+ * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
+ * or via info@compiere.org or http://www.compiere.org/license.html *
+ *****************************************************************************/
+package org.compiere.model;
+
+import java.sql.*;
+import java.util.*;
+import java.util.logging.*;
+import org.compiere.util.*;
+
+/**
+ * Warehouse Model
+ *
+ * @author Jorg Janke
+ * @version $Id: MWarehouse.java,v 1.3 2006/07/30 00:58:05 jjanke Exp $
+ */
+public class MWarehouse extends X_M_Warehouse
+{
+ /**
+ * Get from Cache
+ * @param ctx context
+ * @param M_Warehouse_ID id
+ * @return warehouse
+ */
+ public static MWarehouse get (Properties ctx, int M_Warehouse_ID)
+ {
+ return get(ctx, M_Warehouse_ID, null);
+ } // get
+
+ /**
+ * Retrieves warehouse from cache under transaction scope
+ * @param ctx context
+ * @param M_Warehouse_ID id of warehouse to load
+ * @param trxName transaction name
+ * @return warehouse
+ */
+ public static MWarehouse get (Properties ctx, int M_Warehouse_ID, String trxName)
+ {
+ Integer key = new Integer(M_Warehouse_ID);
+ MWarehouse retValue = (MWarehouse)s_cache.get(key);
+ if (retValue != null)
+ return retValue;
+ //
+ retValue = new MWarehouse (ctx, M_Warehouse_ID, trxName);
+ s_cache.put (key, retValue);
+ return retValue;
+ }
+ /**
+ * Get Warehouses for Org
+ * @param ctx context
+ * @param AD_Org_ID id
+ * @return warehouse
+ */
+ public static MWarehouse[] getForOrg (Properties ctx, int AD_Org_ID)
+ {
+ ArrayList list = new ArrayList();
+ String sql = "SELECT * FROM M_Warehouse WHERE AD_Org_ID=? ORDER BY Created";
+ PreparedStatement pstmt = null;
+ try
+ {
+ pstmt = DB.prepareStatement (sql, null);
+ pstmt.setInt (1, AD_Org_ID);
+ ResultSet rs = pstmt.executeQuery ();
+ while (rs.next ())
+ list.add (new MWarehouse (ctx, rs, null));
+ rs.close ();
+ pstmt.close ();
+ pstmt = null;
+ }
+ catch (Exception e)
+ {
+ s_log.log(Level.SEVERE, sql, e);
+ }
+ try
+ {
+ if (pstmt != null)
+ pstmt.close ();
+ pstmt = null;
+ }
+ catch (Exception e)
+ {
+ pstmt = null;
+ }
+ MWarehouse[] retValue = new MWarehouse[list.size ()];
+ list.toArray (retValue);
+ return retValue;
+ } // get
+
+
+ /** Cache */
+ private static CCache s_cache = new CCache("M_Warehouse", 5);
+ /** Static Logger */
+ private static CLogger s_log = CLogger.getCLogger (MWarehouse.class);
+
+ /**
+ * Standard Constructor
+ * @param ctx context
+ * @param M_Warehouse_ID id
+ * @param trxName transaction
+ */
+ public MWarehouse (Properties ctx, int M_Warehouse_ID, String trxName)
+ {
+ super(ctx, M_Warehouse_ID, trxName);
+ if (M_Warehouse_ID == 0)
+ {
+ // setValue (null);
+ // setName (null);
+ // setC_Location_ID (0);
+ setSeparator ("*"); // *
+ }
+ } // MWarehouse
+
+ /**
+ * Load Constructor
+ * @param ctx context
+ * @param rs result set
+ * @param trxName transaction
+ */
+ public MWarehouse (Properties ctx, ResultSet rs, String trxName)
+ {
+ super(ctx, rs, trxName);
+ } // MWarehouse
+
+ /**
+ * Organization Constructor
+ * @param org parent
+ */
+ public MWarehouse (MOrg org)
+ {
+ this (org.getCtx(), 0, org.get_TrxName());
+ setClientOrg(org);
+ setValue (org.getValue());
+ setName (org.getName());
+ if (org.getInfo() != null)
+ setC_Location_ID (org.getInfo().getC_Location_ID());
+ } // MWarehouse
+
+ /** Warehouse Locators */
+ private MLocator[] m_locators = null;
+
+ /**
+ * Get Locators
+ * @param reload if true reload
+ * @return array of locators
+ */
+ public MLocator[] getLocators(boolean reload)
+ {
+ if (!reload && m_locators != null)
+ return m_locators;
+ //
+ String sql = "SELECT * FROM M_Locator WHERE M_Warehouse_ID=? ORDER BY X,Y,Z";
+ ArrayList list = new ArrayList();
+ PreparedStatement pstmt = null;
+ try
+ {
+ pstmt = DB.prepareStatement (sql, null);
+ pstmt.setInt (1, getM_Warehouse_ID());
+ ResultSet rs = pstmt.executeQuery ();
+ while (rs.next ())
+ list.add(new MLocator (getCtx(), rs, null));
+ rs.close ();
+ pstmt.close ();
+ pstmt = null;
+ }
+ catch (Exception e)
+ {
+ log.log(Level.SEVERE, sql, e);
+ }
+ try
+ {
+ if (pstmt != null)
+ pstmt.close ();
+ pstmt = null;
+ }
+ catch (Exception e)
+ {
+ pstmt = null;
+ }
+ //
+ m_locators = new MLocator[list.size()];
+ list.toArray (m_locators);
+ return m_locators;
+ } // getLocators
+
+ /**
+ * Get Default Locator
+ * @return (first) default locator
+ */
+ public MLocator getDefaultLocator()
+ {
+ MLocator[] locators = getLocators(false);
+ for (int i = 0; i < locators.length; i++)
+ {
+ if (locators[i].isDefault() && locators[i].isActive())
+ return locators[i];
+ }
+ // No Default - first one
+ if (locators.length > 0)
+ {
+ log.warning("No default locator for " + getName());
+ return locators[0];
+ }
+ // No Locator - create one
+ MLocator loc = new MLocator (this, "Standard");
+ loc.setIsDefault(true);
+ loc.save();
+ log.info("Created default locator for " + getName());
+ return loc;
+ } // getLocators
+
+ /**
+ * After Save
+ * @param newRecord new
+ * @param success success
+ * @return success
+ */
+ protected boolean afterSave (boolean newRecord, boolean success)
+ {
+ if (newRecord && success)
+ insert_Accounting("M_Warehouse_Acct", "C_AcctSchema_Default", null);
+
+ return success;
+ } // afterSave
+
+ /**
+ * Before Delete
+ * @return true
+ */
+ protected boolean beforeDelete ()
+ {
+ return delete_Accounting("M_Warehouse_Acct");
+ } // beforeDelete
+
+} // MWarehouse
diff --git a/posterita/posterita/src/main/org/compiere/model/X_AD_OrgInfo.java b/posterita/posterita/src/main/org/compiere/model/X_AD_OrgInfo.java
new file mode 100644
index 0000000000..d90eaae83f
--- /dev/null
+++ b/posterita/posterita/src/main/org/compiere/model/X_AD_OrgInfo.java
@@ -0,0 +1,384 @@
+/******************************************************************************
+ * Product: Adempiere ERP & CRM Smart Business Solution *
+ * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. *
+ * This program is free software; you can redistribute it and/or modify it *
+ * under the terms version 2 of the GNU General Public License as published *
+ * by the Free Software Foundation. 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, write to the Free Software Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
+ * For the text or an alternative of this public license, you may reach us *
+ * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
+ * or via info@compiere.org or http://www.compiere.org/license.html *
+ *****************************************************************************/
+/** Generated Model - DO NOT CHANGE */
+package org.compiere.model;
+
+import java.lang.reflect.Constructor;
+import java.sql.ResultSet;
+import java.util.Properties;
+import java.util.logging.Level;
+
+/** Generated Model for AD_OrgInfo
+ * @author Adempiere (generated)
+ * @version Release 3.4.0s - $Id$ */
+public class X_AD_OrgInfo extends PO implements I_AD_OrgInfo, I_Persistent
+{
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+
+ /** Standard Constructor */
+ public X_AD_OrgInfo (Properties ctx, int AD_OrgInfo_ID, String trxName)
+ {
+ super (ctx, AD_OrgInfo_ID, trxName);
+ /** if (AD_OrgInfo_ID == 0)
+ {
+ setDUNS (null);
+ setTaxID (null);
+ } */
+ }
+
+ /** Load Constructor */
+ public X_AD_OrgInfo (Properties ctx, ResultSet rs, String trxName)
+ {
+ super (ctx, rs, trxName);
+ }
+
+ /** AccessLevel
+ * @return 7 - System - Client - Org
+ */
+ protected int get_AccessLevel()
+ {
+ return accessLevel.intValue();
+ }
+
+ /** Load Meta Data */
+ protected POInfo initPO (Properties ctx)
+ {
+ POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
+ return poi;
+ }
+
+ public String toString()
+ {
+ StringBuffer sb = new StringBuffer ("X_AD_OrgInfo[")
+ .append(get_ID()).append("]");
+ return sb.toString();
+ }
+
+ public I_AD_OrgType getAD_OrgType() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_AD_OrgType.Table_Name);
+ I_AD_OrgType result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_AD_OrgType)constructor.newInstance(new Object[] {getCtx(), new Integer(getAD_OrgType_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Organization Type.
+ @param AD_OrgType_ID
+ Organization Type allows you to categorize your organizations
+ */
+ public void setAD_OrgType_ID (int AD_OrgType_ID)
+ {
+ if (AD_OrgType_ID < 1)
+ set_Value (COLUMNNAME_AD_OrgType_ID, null);
+ else
+ set_Value (COLUMNNAME_AD_OrgType_ID, Integer.valueOf(AD_OrgType_ID));
+ }
+
+ /** Get Organization Type.
+ @return Organization Type allows you to categorize your organizations
+ */
+ public int getAD_OrgType_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_AD_OrgType_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set Address.
+ @param C_Location_ID
+ Location or Address
+ */
+ public void setC_Location_ID (int C_Location_ID)
+ {
+ if (C_Location_ID < 1)
+ set_Value (COLUMNNAME_C_Location_ID, null);
+ else
+ set_Value (COLUMNNAME_C_Location_ID, Integer.valueOf(C_Location_ID));
+ }
+
+ /** Get Address.
+ @return Location or Address
+ */
+ public int getC_Location_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_Location_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set D-U-N-S.
+ @param DUNS
+ Dun & Bradstreet Number
+ */
+ public void setDUNS (String DUNS)
+ {
+ if (DUNS == null)
+ throw new IllegalArgumentException ("DUNS is mandatory.");
+
+ if (DUNS.length() > 11)
+ {
+ log.warning("Length > 11 - truncated");
+ DUNS = DUNS.substring(0, 11);
+ }
+ set_Value (COLUMNNAME_DUNS, DUNS);
+ }
+
+ /** Get D-U-N-S.
+ @return Dun & Bradstreet Number
+ */
+ public String getDUNS ()
+ {
+ return (String)get_Value(COLUMNNAME_DUNS);
+ }
+
+ public I_M_Warehouse getM_Warehouse() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_M_Warehouse.Table_Name);
+ I_M_Warehouse result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_M_Warehouse)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_Warehouse_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Warehouse.
+ @param M_Warehouse_ID
+ Storage Warehouse and Service Point
+ */
+ public void setM_Warehouse_ID (int M_Warehouse_ID)
+ {
+ if (M_Warehouse_ID < 1)
+ set_Value (COLUMNNAME_M_Warehouse_ID, null);
+ else
+ set_Value (COLUMNNAME_M_Warehouse_ID, Integer.valueOf(M_Warehouse_ID));
+ }
+
+ /** Get Warehouse.
+ @return Storage Warehouse and Service Point
+ */
+ public int getM_Warehouse_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_M_Warehouse_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_PA_Goal getPA_Goal() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_PA_Goal.Table_Name);
+ I_PA_Goal result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_PA_Goal)constructor.newInstance(new Object[] {getCtx(), new Integer(getPA_Goal_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Goal.
+ @param PA_Goal_ID
+ Performance Goal
+ */
+ public void setPA_Goal_ID (int PA_Goal_ID)
+ {
+ if (PA_Goal_ID < 1)
+ set_Value (COLUMNNAME_PA_Goal_ID, null);
+ else
+ set_Value (COLUMNNAME_PA_Goal_ID, Integer.valueOf(PA_Goal_ID));
+ }
+
+ /** Get Goal.
+ @return Performance Goal
+ */
+ public int getPA_Goal_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_PA_Goal_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Parent_Org_ID AD_Reference_ID=130 */
+ public static final int PARENT_ORG_ID_AD_Reference_ID=130;
+ /** Set Parent Organization.
+ @param Parent_Org_ID
+ Parent (superior) Organization
+ */
+ public void setParent_Org_ID (int Parent_Org_ID)
+ {
+ if (Parent_Org_ID < 1)
+ set_Value (COLUMNNAME_Parent_Org_ID, null);
+ else
+ set_Value (COLUMNNAME_Parent_Org_ID, Integer.valueOf(Parent_Org_ID));
+ }
+
+ /** Get Parent Organization.
+ @return Parent (superior) Organization
+ */
+ public int getParent_Org_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_Parent_Org_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set Receipt Footer Msg.
+ @param ReceiptFooterMsg
+ This message will be displayed at the bottom of a receipt when doing a sales or purchase
+ */
+ public void setReceiptFooterMsg (String ReceiptFooterMsg)
+ {
+
+ if (ReceiptFooterMsg != null && ReceiptFooterMsg.length() > 1023)
+ {
+ log.warning("Length > 1023 - truncated");
+ ReceiptFooterMsg = ReceiptFooterMsg.substring(0, 1023);
+ }
+ set_Value (COLUMNNAME_ReceiptFooterMsg, ReceiptFooterMsg);
+ }
+
+ /** Get Receipt Footer Msg.
+ @return This message will be displayed at the bottom of a receipt when doing a sales or purchase
+ */
+ public String getReceiptFooterMsg ()
+ {
+ return (String)get_Value(COLUMNNAME_ReceiptFooterMsg);
+ }
+
+ /** Supervisor_ID AD_Reference_ID=286 */
+ public static final int SUPERVISOR_ID_AD_Reference_ID=286;
+ /** Set Supervisor.
+ @param Supervisor_ID
+ Supervisor for this user/organization - used for escalation and approval
+ */
+ public void setSupervisor_ID (int Supervisor_ID)
+ {
+ if (Supervisor_ID < 1)
+ set_Value (COLUMNNAME_Supervisor_ID, null);
+ else
+ set_Value (COLUMNNAME_Supervisor_ID, Integer.valueOf(Supervisor_ID));
+ }
+
+ /** Get Supervisor.
+ @return Supervisor for this user/organization - used for escalation and approval
+ */
+ public int getSupervisor_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_Supervisor_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set Tax ID.
+ @param TaxID
+ Tax Identification
+ */
+ public void setTaxID (String TaxID)
+ {
+ if (TaxID == null)
+ throw new IllegalArgumentException ("TaxID is mandatory.");
+
+ if (TaxID.length() > 20)
+ {
+ log.warning("Length > 20 - truncated");
+ TaxID = TaxID.substring(0, 20);
+ }
+ set_Value (COLUMNNAME_TaxID, TaxID);
+ }
+
+ /** Get Tax ID.
+ @return Tax Identification
+ */
+ public String getTaxID ()
+ {
+ return (String)get_Value(COLUMNNAME_TaxID);
+ }
+
+ /** TransferBank_ID AD_Reference_ID=52001 */
+ public static final int TRANSFERBANK_ID_AD_Reference_ID=52001;
+ /** Set Bank for transfers.
+ @param TransferBank_ID
+ Bank account depending on currency will be used from this bank for doing transfers
+ */
+ public void setTransferBank_ID (int TransferBank_ID)
+ {
+ if (TransferBank_ID < 1)
+ set_Value (COLUMNNAME_TransferBank_ID, null);
+ else
+ set_Value (COLUMNNAME_TransferBank_ID, Integer.valueOf(TransferBank_ID));
+ }
+
+ /** Get Bank for transfers.
+ @return Bank account depending on currency will be used from this bank for doing transfers
+ */
+ public int getTransferBank_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_TransferBank_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** TransferCashBook_ID AD_Reference_ID=52004 */
+ public static final int TRANSFERCASHBOOK_ID_AD_Reference_ID=52004;
+ /** Set CashBook for transfers.
+ @param TransferCashBook_ID CashBook for transfers */
+ public void setTransferCashBook_ID (int TransferCashBook_ID)
+ {
+ if (TransferCashBook_ID < 1)
+ set_Value (COLUMNNAME_TransferCashBook_ID, null);
+ else
+ set_Value (COLUMNNAME_TransferCashBook_ID, Integer.valueOf(TransferCashBook_ID));
+ }
+
+ /** Get CashBook for transfers.
+ @return CashBook for transfers */
+ public int getTransferCashBook_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_TransferCashBook_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+}
\ No newline at end of file
diff --git a/posterita/posterita/src/main/org/compiere/model/X_AD_Role.java b/posterita/posterita/src/main/org/compiere/model/X_AD_Role.java
new file mode 100644
index 0000000000..221b025e78
--- /dev/null
+++ b/posterita/posterita/src/main/org/compiere/model/X_AD_Role.java
@@ -0,0 +1,1015 @@
+/******************************************************************************
+ * Product: Adempiere ERP & CRM Smart Business Solution *
+ * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. *
+ * This program is free software; you can redistribute it and/or modify it *
+ * under the terms version 2 of the GNU General Public License as published *
+ * by the Free Software Foundation. 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, write to the Free Software Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
+ * For the text or an alternative of this public license, you may reach us *
+ * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
+ * or via info@compiere.org or http://www.compiere.org/license.html *
+ *****************************************************************************/
+/** Generated Model - DO NOT CHANGE */
+package org.compiere.model;
+
+import java.lang.reflect.Constructor;
+import java.math.BigDecimal;
+import java.sql.ResultSet;
+import java.util.Properties;
+import java.util.logging.Level;
+import org.compiere.util.Env;
+import org.compiere.util.KeyNamePair;
+
+/** Generated Model for AD_Role
+ * @author Adempiere (generated)
+ * @version Release 3.4.0s - $Id$ */
+public class X_AD_Role extends PO implements I_AD_Role, I_Persistent
+{
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+
+ /** Standard Constructor */
+ public X_AD_Role (Properties ctx, int AD_Role_ID, String trxName)
+ {
+ super (ctx, AD_Role_ID, trxName);
+ /** if (AD_Role_ID == 0)
+ {
+ setAD_Role_ID (0);
+ setConfirmQueryRecords (0);
+// 0
+ setIsAccessAllOrgs (false);
+// N
+ setIsCanApproveOwnDoc (false);
+ setIsCanExport (true);
+// Y
+ setIsCanReport (true);
+// Y
+ setIsChangeLog (false);
+// N
+ setIsDiscountAllowedOnTotal (false);
+ setIsDiscountUptoLimitPrice (false);
+ setIsManual (false);
+ setIsPersonalAccess (false);
+// N
+ setIsPersonalLock (false);
+// N
+ setIsShowAcct (false);
+// N
+ setIsUseUserOrgAccess (false);
+// N
+ setMaxQueryRecords (0);
+// 0
+ setName (null);
+ setOverwritePriceLimit (false);
+// N
+ setPreferenceType (null);
+// O
+ setUserLevel (null);
+// O
+ } */
+ }
+
+ /** Load Constructor */
+ public X_AD_Role (Properties ctx, ResultSet rs, String trxName)
+ {
+ super (ctx, rs, trxName);
+ }
+
+ /** AccessLevel
+ * @return 6 - System - Client
+ */
+ protected int get_AccessLevel()
+ {
+ return accessLevel.intValue();
+ }
+
+ /** Load Meta Data */
+ protected POInfo initPO (Properties ctx)
+ {
+ POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
+ return poi;
+ }
+
+ public String toString()
+ {
+ StringBuffer sb = new StringBuffer ("X_AD_Role[")
+ .append(get_ID()).append("]");
+ return sb.toString();
+ }
+
+ /** Set Role.
+ @param AD_Role_ID
+ Responsibility Role
+ */
+ public void setAD_Role_ID (int AD_Role_ID)
+ {
+ if (AD_Role_ID < 0)
+ throw new IllegalArgumentException ("AD_Role_ID is mandatory.");
+ set_ValueNoCheck (COLUMNNAME_AD_Role_ID, Integer.valueOf(AD_Role_ID));
+ }
+
+ /** Get Role.
+ @return Responsibility Role
+ */
+ public int getAD_Role_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_AD_Role_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** AD_Tree_Menu_ID AD_Reference_ID=184 */
+ public static final int AD_TREE_MENU_ID_AD_Reference_ID=184;
+ /** Set Menu Tree.
+ @param AD_Tree_Menu_ID
+ Tree of the menu
+ */
+ public void setAD_Tree_Menu_ID (int AD_Tree_Menu_ID)
+ {
+ if (AD_Tree_Menu_ID < 1)
+ set_Value (COLUMNNAME_AD_Tree_Menu_ID, null);
+ else
+ set_Value (COLUMNNAME_AD_Tree_Menu_ID, Integer.valueOf(AD_Tree_Menu_ID));
+ }
+
+ /** Get Menu Tree.
+ @return Tree of the menu
+ */
+ public int getAD_Tree_Menu_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_AD_Tree_Menu_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** AD_Tree_Org_ID AD_Reference_ID=184 */
+ public static final int AD_TREE_ORG_ID_AD_Reference_ID=184;
+ /** Set Organization Tree.
+ @param AD_Tree_Org_ID
+ Tree to determine organizational hierarchy
+ */
+ public void setAD_Tree_Org_ID (int AD_Tree_Org_ID)
+ {
+ if (AD_Tree_Org_ID < 1)
+ set_Value (COLUMNNAME_AD_Tree_Org_ID, null);
+ else
+ set_Value (COLUMNNAME_AD_Tree_Org_ID, Integer.valueOf(AD_Tree_Org_ID));
+ }
+
+ /** Get Organization Tree.
+ @return Tree to determine organizational hierarchy
+ */
+ public int getAD_Tree_Org_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_AD_Tree_Org_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set Allow Info Account.
+ @param Allow_Info_Account Allow Info Account */
+ public void setAllow_Info_Account (boolean Allow_Info_Account)
+ {
+ set_Value (COLUMNNAME_Allow_Info_Account, Boolean.valueOf(Allow_Info_Account));
+ }
+
+ /** Get Allow Info Account.
+ @return Allow Info Account */
+ public boolean isAllow_Info_Account ()
+ {
+ Object oo = get_Value(COLUMNNAME_Allow_Info_Account);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Allow Info Asset.
+ @param Allow_Info_Asset Allow Info Asset */
+ public void setAllow_Info_Asset (boolean Allow_Info_Asset)
+ {
+ set_Value (COLUMNNAME_Allow_Info_Asset, Boolean.valueOf(Allow_Info_Asset));
+ }
+
+ /** Get Allow Info Asset.
+ @return Allow Info Asset */
+ public boolean isAllow_Info_Asset ()
+ {
+ Object oo = get_Value(COLUMNNAME_Allow_Info_Asset);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Allow Info BPartner.
+ @param Allow_Info_BPartner Allow Info BPartner */
+ public void setAllow_Info_BPartner (boolean Allow_Info_BPartner)
+ {
+ set_Value (COLUMNNAME_Allow_Info_BPartner, Boolean.valueOf(Allow_Info_BPartner));
+ }
+
+ /** Get Allow Info BPartner.
+ @return Allow Info BPartner */
+ public boolean isAllow_Info_BPartner ()
+ {
+ Object oo = get_Value(COLUMNNAME_Allow_Info_BPartner);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Allow Info CashJournal.
+ @param Allow_Info_CashJournal Allow Info CashJournal */
+ public void setAllow_Info_CashJournal (boolean Allow_Info_CashJournal)
+ {
+ set_Value (COLUMNNAME_Allow_Info_CashJournal, Boolean.valueOf(Allow_Info_CashJournal));
+ }
+
+ /** Get Allow Info CashJournal.
+ @return Allow Info CashJournal */
+ public boolean isAllow_Info_CashJournal ()
+ {
+ Object oo = get_Value(COLUMNNAME_Allow_Info_CashJournal);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Allow Info InOut.
+ @param Allow_Info_InOut Allow Info InOut */
+ public void setAllow_Info_InOut (boolean Allow_Info_InOut)
+ {
+ set_Value (COLUMNNAME_Allow_Info_InOut, Boolean.valueOf(Allow_Info_InOut));
+ }
+
+ /** Get Allow Info InOut.
+ @return Allow Info InOut */
+ public boolean isAllow_Info_InOut ()
+ {
+ Object oo = get_Value(COLUMNNAME_Allow_Info_InOut);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Allow Info Invoice.
+ @param Allow_Info_Invoice Allow Info Invoice */
+ public void setAllow_Info_Invoice (boolean Allow_Info_Invoice)
+ {
+ set_Value (COLUMNNAME_Allow_Info_Invoice, Boolean.valueOf(Allow_Info_Invoice));
+ }
+
+ /** Get Allow Info Invoice.
+ @return Allow Info Invoice */
+ public boolean isAllow_Info_Invoice ()
+ {
+ Object oo = get_Value(COLUMNNAME_Allow_Info_Invoice);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Allow Info Order.
+ @param Allow_Info_Order Allow Info Order */
+ public void setAllow_Info_Order (boolean Allow_Info_Order)
+ {
+ set_Value (COLUMNNAME_Allow_Info_Order, Boolean.valueOf(Allow_Info_Order));
+ }
+
+ /** Get Allow Info Order.
+ @return Allow Info Order */
+ public boolean isAllow_Info_Order ()
+ {
+ Object oo = get_Value(COLUMNNAME_Allow_Info_Order);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Allow Info Payment.
+ @param Allow_Info_Payment Allow Info Payment */
+ public void setAllow_Info_Payment (boolean Allow_Info_Payment)
+ {
+ set_Value (COLUMNNAME_Allow_Info_Payment, Boolean.valueOf(Allow_Info_Payment));
+ }
+
+ /** Get Allow Info Payment.
+ @return Allow Info Payment */
+ public boolean isAllow_Info_Payment ()
+ {
+ Object oo = get_Value(COLUMNNAME_Allow_Info_Payment);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Allow Info Product.
+ @param Allow_Info_Product Allow Info Product */
+ public void setAllow_Info_Product (boolean Allow_Info_Product)
+ {
+ set_Value (COLUMNNAME_Allow_Info_Product, Boolean.valueOf(Allow_Info_Product));
+ }
+
+ /** Get Allow Info Product.
+ @return Allow Info Product */
+ public boolean isAllow_Info_Product ()
+ {
+ Object oo = get_Value(COLUMNNAME_Allow_Info_Product);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Allow Info Resource.
+ @param Allow_Info_Resource Allow Info Resource */
+ public void setAllow_Info_Resource (boolean Allow_Info_Resource)
+ {
+ set_Value (COLUMNNAME_Allow_Info_Resource, Boolean.valueOf(Allow_Info_Resource));
+ }
+
+ /** Get Allow Info Resource.
+ @return Allow Info Resource */
+ public boolean isAllow_Info_Resource ()
+ {
+ Object oo = get_Value(COLUMNNAME_Allow_Info_Resource);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Allow Info Schedule.
+ @param Allow_Info_Schedule Allow Info Schedule */
+ public void setAllow_Info_Schedule (boolean Allow_Info_Schedule)
+ {
+ set_Value (COLUMNNAME_Allow_Info_Schedule, Boolean.valueOf(Allow_Info_Schedule));
+ }
+
+ /** Get Allow Info Schedule.
+ @return Allow Info Schedule */
+ public boolean isAllow_Info_Schedule ()
+ {
+ Object oo = get_Value(COLUMNNAME_Allow_Info_Schedule);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Approval Amount.
+ @param AmtApproval
+ The approval amount limit for this role
+ */
+ public void setAmtApproval (BigDecimal AmtApproval)
+ {
+ set_Value (COLUMNNAME_AmtApproval, AmtApproval);
+ }
+
+ /** Get Approval Amount.
+ @return The approval amount limit for this role
+ */
+ public BigDecimal getAmtApproval ()
+ {
+ BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_AmtApproval);
+ if (bd == null)
+ return Env.ZERO;
+ return bd;
+ }
+
+ public I_C_Currency getC_Currency() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_Currency.Table_Name);
+ I_C_Currency result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_Currency)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Currency_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Currency.
+ @param C_Currency_ID
+ The Currency for this record
+ */
+ public void setC_Currency_ID (int C_Currency_ID)
+ {
+ if (C_Currency_ID < 1)
+ set_Value (COLUMNNAME_C_Currency_ID, null);
+ else
+ set_Value (COLUMNNAME_C_Currency_ID, Integer.valueOf(C_Currency_ID));
+ }
+
+ /** Get Currency.
+ @return The Currency for this record
+ */
+ public int getC_Currency_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_Currency_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set Confirm Query Records.
+ @param ConfirmQueryRecords
+ Require Confirmation if more records will be returned by the query (If not defined 500)
+ */
+ public void setConfirmQueryRecords (int ConfirmQueryRecords)
+ {
+ set_Value (COLUMNNAME_ConfirmQueryRecords, Integer.valueOf(ConfirmQueryRecords));
+ }
+
+ /** Get Confirm Query Records.
+ @return Require Confirmation if more records will be returned by the query (If not defined 500)
+ */
+ public int getConfirmQueryRecords ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_ConfirmQueryRecords);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** ConnectionProfile AD_Reference_ID=364 */
+ public static final int CONNECTIONPROFILE_AD_Reference_ID=364;
+ /** LAN = L */
+ public static final String CONNECTIONPROFILE_LAN = "L";
+ /** Terminal Server = T */
+ public static final String CONNECTIONPROFILE_TerminalServer = "T";
+ /** VPN = V */
+ public static final String CONNECTIONPROFILE_VPN = "V";
+ /** WAN = W */
+ public static final String CONNECTIONPROFILE_WAN = "W";
+ /** Set Connection Profile.
+ @param ConnectionProfile
+ How a Java Client connects to the server(s)
+ */
+ public void setConnectionProfile (String ConnectionProfile)
+ {
+
+ if (ConnectionProfile == null || ConnectionProfile.equals("L") || ConnectionProfile.equals("T") || ConnectionProfile.equals("V") || ConnectionProfile.equals("W")); else throw new IllegalArgumentException ("ConnectionProfile Invalid value - " + ConnectionProfile + " - Reference_ID=364 - L - T - V - W");
+ if (ConnectionProfile != null && ConnectionProfile.length() > 1)
+ {
+ log.warning("Length > 1 - truncated");
+ ConnectionProfile = ConnectionProfile.substring(0, 1);
+ }
+ set_Value (COLUMNNAME_ConnectionProfile, ConnectionProfile);
+ }
+
+ /** Get Connection Profile.
+ @return How a Java Client connects to the server(s)
+ */
+ public String getConnectionProfile ()
+ {
+ return (String)get_Value(COLUMNNAME_ConnectionProfile);
+ }
+
+ /** Set Description.
+ @param Description
+ Optional short description of the record
+ */
+ public void setDescription (String Description)
+ {
+
+ if (Description != null && Description.length() > 255)
+ {
+ log.warning("Length > 255 - truncated");
+ Description = Description.substring(0, 255);
+ }
+ set_Value (COLUMNNAME_Description, Description);
+ }
+
+ /** Get Description.
+ @return Optional short description of the record
+ */
+ public String getDescription ()
+ {
+ return (String)get_Value(COLUMNNAME_Description);
+ }
+
+ /** Set Access all Orgs.
+ @param IsAccessAllOrgs
+ Access all Organizations (no org access control) of the client
+ */
+ public void setIsAccessAllOrgs (boolean IsAccessAllOrgs)
+ {
+ set_Value (COLUMNNAME_IsAccessAllOrgs, Boolean.valueOf(IsAccessAllOrgs));
+ }
+
+ /** Get Access all Orgs.
+ @return Access all Organizations (no org access control) of the client
+ */
+ public boolean isAccessAllOrgs ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsAccessAllOrgs);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Approve own Documents.
+ @param IsCanApproveOwnDoc
+ Users with this role can approve their own documents
+ */
+ public void setIsCanApproveOwnDoc (boolean IsCanApproveOwnDoc)
+ {
+ set_Value (COLUMNNAME_IsCanApproveOwnDoc, Boolean.valueOf(IsCanApproveOwnDoc));
+ }
+
+ /** Get Approve own Documents.
+ @return Users with this role can approve their own documents
+ */
+ public boolean isCanApproveOwnDoc ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsCanApproveOwnDoc);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Can Export.
+ @param IsCanExport
+ Users with this role can export data
+ */
+ public void setIsCanExport (boolean IsCanExport)
+ {
+ set_Value (COLUMNNAME_IsCanExport, Boolean.valueOf(IsCanExport));
+ }
+
+ /** Get Can Export.
+ @return Users with this role can export data
+ */
+ public boolean isCanExport ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsCanExport);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Can Report.
+ @param IsCanReport
+ Users with this role can create reports
+ */
+ public void setIsCanReport (boolean IsCanReport)
+ {
+ set_Value (COLUMNNAME_IsCanReport, Boolean.valueOf(IsCanReport));
+ }
+
+ /** Get Can Report.
+ @return Users with this role can create reports
+ */
+ public boolean isCanReport ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsCanReport);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Maintain Change Log.
+ @param IsChangeLog
+ Maintain a log of changes
+ */
+ public void setIsChangeLog (boolean IsChangeLog)
+ {
+ set_Value (COLUMNNAME_IsChangeLog, Boolean.valueOf(IsChangeLog));
+ }
+
+ /** Get Maintain Change Log.
+ @return Maintain a log of changes
+ */
+ public boolean isChangeLog ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsChangeLog);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set IsDiscountAllowedOnTotal.
+ @param IsDiscountAllowedOnTotal IsDiscountAllowedOnTotal */
+ public void setIsDiscountAllowedOnTotal (boolean IsDiscountAllowedOnTotal)
+ {
+ set_Value (COLUMNNAME_IsDiscountAllowedOnTotal, Boolean.valueOf(IsDiscountAllowedOnTotal));
+ }
+
+ /** Get IsDiscountAllowedOnTotal.
+ @return IsDiscountAllowedOnTotal */
+ public boolean isDiscountAllowedOnTotal ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsDiscountAllowedOnTotal);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set IsDiscountUptoLimitPrice.
+ @param IsDiscountUptoLimitPrice IsDiscountUptoLimitPrice */
+ public void setIsDiscountUptoLimitPrice (boolean IsDiscountUptoLimitPrice)
+ {
+ set_Value (COLUMNNAME_IsDiscountUptoLimitPrice, Boolean.valueOf(IsDiscountUptoLimitPrice));
+ }
+
+ /** Get IsDiscountUptoLimitPrice.
+ @return IsDiscountUptoLimitPrice */
+ public boolean isDiscountUptoLimitPrice ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsDiscountUptoLimitPrice);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Manual.
+ @param IsManual
+ This is a manual process
+ */
+ public void setIsManual (boolean IsManual)
+ {
+ set_Value (COLUMNNAME_IsManual, Boolean.valueOf(IsManual));
+ }
+
+ /** Get Manual.
+ @return This is a manual process
+ */
+ public boolean isManual ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsManual);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Personal Access.
+ @param IsPersonalAccess
+ Allow access to all personal records
+ */
+ public void setIsPersonalAccess (boolean IsPersonalAccess)
+ {
+ set_Value (COLUMNNAME_IsPersonalAccess, Boolean.valueOf(IsPersonalAccess));
+ }
+
+ /** Get Personal Access.
+ @return Allow access to all personal records
+ */
+ public boolean isPersonalAccess ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsPersonalAccess);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Personal Lock.
+ @param IsPersonalLock
+ Allow users with role to lock access to personal records
+ */
+ public void setIsPersonalLock (boolean IsPersonalLock)
+ {
+ set_Value (COLUMNNAME_IsPersonalLock, Boolean.valueOf(IsPersonalLock));
+ }
+
+ /** Get Personal Lock.
+ @return Allow users with role to lock access to personal records
+ */
+ public boolean isPersonalLock ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsPersonalLock);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Show Accounting.
+ @param IsShowAcct
+ Users with this role can see accounting information
+ */
+ public void setIsShowAcct (boolean IsShowAcct)
+ {
+ set_Value (COLUMNNAME_IsShowAcct, Boolean.valueOf(IsShowAcct));
+ }
+
+ /** Get Show Accounting.
+ @return Users with this role can see accounting information
+ */
+ public boolean isShowAcct ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsShowAcct);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Use User Org Access.
+ @param IsUseUserOrgAccess
+ Use Org Access defined by user instead of Role Org Access
+ */
+ public void setIsUseUserOrgAccess (boolean IsUseUserOrgAccess)
+ {
+ set_Value (COLUMNNAME_IsUseUserOrgAccess, Boolean.valueOf(IsUseUserOrgAccess));
+ }
+
+ /** Get Use User Org Access.
+ @return Use Org Access defined by user instead of Role Org Access
+ */
+ public boolean isUseUserOrgAccess ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsUseUserOrgAccess);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Max Query Records.
+ @param MaxQueryRecords
+ If defined, you cannot query more records as defined - the query criteria needs to be changed to query less records
+ */
+ public void setMaxQueryRecords (int MaxQueryRecords)
+ {
+ set_Value (COLUMNNAME_MaxQueryRecords, Integer.valueOf(MaxQueryRecords));
+ }
+
+ /** Get Max Query Records.
+ @return If defined, you cannot query more records as defined - the query criteria needs to be changed to query less records
+ */
+ public int getMaxQueryRecords ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_MaxQueryRecords);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set Name.
+ @param Name
+ Alphanumeric identifier of the entity
+ */
+ public void setName (String Name)
+ {
+ if (Name == null)
+ throw new IllegalArgumentException ("Name is mandatory.");
+
+ if (Name.length() > 60)
+ {
+ log.warning("Length > 60 - truncated");
+ Name = Name.substring(0, 60);
+ }
+ set_Value (COLUMNNAME_Name, Name);
+ }
+
+ /** Get Name.
+ @return Alphanumeric identifier of the entity
+ */
+ public String getName ()
+ {
+ return (String)get_Value(COLUMNNAME_Name);
+ }
+
+ /** Get Record ID/ColumnName
+ @return ID/ColumnName pair
+ */
+ public KeyNamePair getKeyNamePair()
+ {
+ return new KeyNamePair(get_ID(), getName());
+ }
+
+ /** Set Overwrite Price Limit.
+ @param OverwritePriceLimit
+ Overwrite Price Limit if the Price List enforces the Price Limit
+ */
+ public void setOverwritePriceLimit (boolean OverwritePriceLimit)
+ {
+ set_Value (COLUMNNAME_OverwritePriceLimit, Boolean.valueOf(OverwritePriceLimit));
+ }
+
+ /** Get Overwrite Price Limit.
+ @return Overwrite Price Limit if the Price List enforces the Price Limit
+ */
+ public boolean isOverwritePriceLimit ()
+ {
+ Object oo = get_Value(COLUMNNAME_OverwritePriceLimit);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** PreferenceType AD_Reference_ID=330 */
+ public static final int PREFERENCETYPE_AD_Reference_ID=330;
+ /** Client = C */
+ public static final String PREFERENCETYPE_Client = "C";
+ /** Organization = O */
+ public static final String PREFERENCETYPE_Organization = "O";
+ /** User = U */
+ public static final String PREFERENCETYPE_User = "U";
+ /** None = N */
+ public static final String PREFERENCETYPE_None = "N";
+ /** Set Preference Level.
+ @param PreferenceType
+ Determines what preferences the user can set
+ */
+ public void setPreferenceType (String PreferenceType)
+ {
+ if (PreferenceType == null) throw new IllegalArgumentException ("PreferenceType is mandatory");
+ if (PreferenceType.equals("C") || PreferenceType.equals("O") || PreferenceType.equals("U") || PreferenceType.equals("N")); else throw new IllegalArgumentException ("PreferenceType Invalid value - " + PreferenceType + " - Reference_ID=330 - C - O - U - N");
+ if (PreferenceType.length() > 1)
+ {
+ log.warning("Length > 1 - truncated");
+ PreferenceType = PreferenceType.substring(0, 1);
+ }
+ set_Value (COLUMNNAME_PreferenceType, PreferenceType);
+ }
+
+ /** Get Preference Level.
+ @return Determines what preferences the user can set
+ */
+ public String getPreferenceType ()
+ {
+ return (String)get_Value(COLUMNNAME_PreferenceType);
+ }
+
+ /** Supervisor_ID AD_Reference_ID=286 */
+ public static final int SUPERVISOR_ID_AD_Reference_ID=286;
+ /** Set Supervisor.
+ @param Supervisor_ID
+ Supervisor for this user/organization - used for escalation and approval
+ */
+ public void setSupervisor_ID (int Supervisor_ID)
+ {
+ if (Supervisor_ID < 1)
+ set_Value (COLUMNNAME_Supervisor_ID, null);
+ else
+ set_Value (COLUMNNAME_Supervisor_ID, Integer.valueOf(Supervisor_ID));
+ }
+
+ /** Get Supervisor.
+ @return Supervisor for this user/organization - used for escalation and approval
+ */
+ public int getSupervisor_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_Supervisor_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set UserDiscount.
+ @param UserDiscount UserDiscount */
+ public void setUserDiscount (BigDecimal UserDiscount)
+ {
+ set_Value (COLUMNNAME_UserDiscount, UserDiscount);
+ }
+
+ /** Get UserDiscount.
+ @return UserDiscount */
+ public BigDecimal getUserDiscount ()
+ {
+ BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_UserDiscount);
+ if (bd == null)
+ return Env.ZERO;
+ return bd;
+ }
+
+ /** UserLevel AD_Reference_ID=226 */
+ public static final int USERLEVEL_AD_Reference_ID=226;
+ /** System = S */
+ public static final String USERLEVEL_System = "S ";
+ /** Client = C */
+ public static final String USERLEVEL_Client = " C ";
+ /** Organization = O */
+ public static final String USERLEVEL_Organization = " O";
+ /** Client+Organization = CO */
+ public static final String USERLEVEL_ClientPlusOrganization = " CO";
+ /** Set User Level.
+ @param UserLevel
+ System Client Organization
+ */
+ public void setUserLevel (String UserLevel)
+ {
+ if (UserLevel == null) throw new IllegalArgumentException ("UserLevel is mandatory");
+ if (UserLevel.equals("S ") || UserLevel.equals(" C ") || UserLevel.equals(" O") || UserLevel.equals(" CO")); else throw new IllegalArgumentException ("UserLevel Invalid value - " + UserLevel + " - Reference_ID=226 - S - C - O - CO");
+ if (UserLevel.length() > 3)
+ {
+ log.warning("Length > 3 - truncated");
+ UserLevel = UserLevel.substring(0, 3);
+ }
+ set_Value (COLUMNNAME_UserLevel, UserLevel);
+ }
+
+ /** Get User Level.
+ @return System Client Organization
+ */
+ public String getUserLevel ()
+ {
+ return (String)get_Value(COLUMNNAME_UserLevel);
+ }
+}
\ No newline at end of file
diff --git a/posterita/posterita/src/main/org/compiere/model/X_C_CashLine.java b/posterita/posterita/src/main/org/compiere/model/X_C_CashLine.java
new file mode 100644
index 0000000000..b808c8ac18
--- /dev/null
+++ b/posterita/posterita/src/main/org/compiere/model/X_C_CashLine.java
@@ -0,0 +1,537 @@
+/******************************************************************************
+ * Product: Adempiere ERP & CRM Smart Business Solution *
+ * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. *
+ * This program is free software; you can redistribute it and/or modify it *
+ * under the terms version 2 of the GNU General Public License as published *
+ * by the Free Software Foundation. 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, write to the Free Software Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
+ * For the text or an alternative of this public license, you may reach us *
+ * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
+ * or via info@compiere.org or http://www.compiere.org/license.html *
+ *****************************************************************************/
+/** Generated Model - DO NOT CHANGE */
+package org.compiere.model;
+
+import java.lang.reflect.Constructor;
+import java.math.BigDecimal;
+import java.sql.ResultSet;
+import java.util.Properties;
+import java.util.logging.Level;
+import org.compiere.util.Env;
+import org.compiere.util.KeyNamePair;
+
+/** Generated Model for C_CashLine
+ * @author Adempiere (generated)
+ * @version Release 3.4.0s - $Id$ */
+public class X_C_CashLine extends PO implements I_C_CashLine, I_Persistent
+{
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+
+ /** Standard Constructor */
+ public X_C_CashLine (Properties ctx, int C_CashLine_ID, String trxName)
+ {
+ super (ctx, C_CashLine_ID, trxName);
+ /** if (C_CashLine_ID == 0)
+ {
+ setAmount (Env.ZERO);
+ setCashType (null);
+// E
+ setC_Cash_ID (0);
+ setC_CashLine_ID (0);
+ setLine (0);
+// @SQL=SELECT COALESCE(MAX(Line),0)+10 AS DefaultValue FROM C_CashLine WHERE C_Cash_ID=@C_Cash_ID@
+ setProcessed (false);
+ } */
+ }
+
+ /** Load Constructor */
+ public X_C_CashLine (Properties ctx, ResultSet rs, String trxName)
+ {
+ super (ctx, rs, trxName);
+ }
+
+ /** AccessLevel
+ * @return 3 - Client - Org
+ */
+ protected int get_AccessLevel()
+ {
+ return accessLevel.intValue();
+ }
+
+ /** Load Meta Data */
+ protected POInfo initPO (Properties ctx)
+ {
+ POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
+ return poi;
+ }
+
+ public String toString()
+ {
+ StringBuffer sb = new StringBuffer ("X_C_CashLine[")
+ .append(get_ID()).append("]");
+ return sb.toString();
+ }
+
+ /** Set Amount.
+ @param Amount
+ Amount in a defined currency
+ */
+ public void setAmount (BigDecimal Amount)
+ {
+ if (Amount == null)
+ throw new IllegalArgumentException ("Amount is mandatory.");
+ set_Value (COLUMNNAME_Amount, Amount);
+ }
+
+ /** Get Amount.
+ @return Amount in a defined currency
+ */
+ public BigDecimal getAmount ()
+ {
+ BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Amount);
+ if (bd == null)
+ return Env.ZERO;
+ return bd;
+ }
+
+ /** CashType AD_Reference_ID=217 */
+ public static final int CASHTYPE_AD_Reference_ID=217;
+ /** Bank Account Transfer = T */
+ public static final String CASHTYPE_BankAccountTransfer = "T";
+ /** Invoice = I */
+ public static final String CASHTYPE_Invoice = "I";
+ /** General Expense = E */
+ public static final String CASHTYPE_GeneralExpense = "E";
+ /** General Receipts = R */
+ public static final String CASHTYPE_GeneralReceipts = "R";
+ /** Charge = C */
+ public static final String CASHTYPE_Charge = "C";
+ /** Difference = D */
+ public static final String CASHTYPE_Difference = "D";
+ /** Set Cash Type.
+ @param CashType
+ Source of Cash
+ */
+ public void setCashType (String CashType)
+ {
+ if (CashType == null) throw new IllegalArgumentException ("CashType is mandatory");
+ if (CashType.equals("T") || CashType.equals("I") || CashType.equals("E") || CashType.equals("R") || CashType.equals("C") || CashType.equals("D")); else throw new IllegalArgumentException ("CashType Invalid value - " + CashType + " - Reference_ID=217 - T - I - E - R - C - D");
+ if (CashType.length() > 1)
+ {
+ log.warning("Length > 1 - truncated");
+ CashType = CashType.substring(0, 1);
+ }
+ set_ValueNoCheck (COLUMNNAME_CashType, CashType);
+ }
+
+ /** Get Cash Type.
+ @return Source of Cash
+ */
+ public String getCashType ()
+ {
+ return (String)get_Value(COLUMNNAME_CashType);
+ }
+
+ public I_C_BankAccount getC_BankAccount() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_BankAccount.Table_Name);
+ I_C_BankAccount result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_BankAccount)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_BankAccount_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Bank Account.
+ @param C_BankAccount_ID
+ Account at the Bank
+ */
+ public void setC_BankAccount_ID (int C_BankAccount_ID)
+ {
+ if (C_BankAccount_ID < 1)
+ set_Value (COLUMNNAME_C_BankAccount_ID, null);
+ else
+ set_Value (COLUMNNAME_C_BankAccount_ID, Integer.valueOf(C_BankAccount_ID));
+ }
+
+ /** Get Bank Account.
+ @return Account at the Bank
+ */
+ public int getC_BankAccount_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_BankAccount_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_C_Cash getC_Cash() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_Cash.Table_Name);
+ I_C_Cash result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_Cash)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Cash_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Cash Journal.
+ @param C_Cash_ID
+ Cash Journal
+ */
+ public void setC_Cash_ID (int C_Cash_ID)
+ {
+ if (C_Cash_ID < 1)
+ throw new IllegalArgumentException ("C_Cash_ID is mandatory.");
+ set_ValueNoCheck (COLUMNNAME_C_Cash_ID, Integer.valueOf(C_Cash_ID));
+ }
+
+ /** Get Cash Journal.
+ @return Cash Journal
+ */
+ public int getC_Cash_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_Cash_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Get Record ID/ColumnName
+ @return ID/ColumnName pair
+ */
+ public KeyNamePair getKeyNamePair()
+ {
+ return new KeyNamePair(get_ID(), String.valueOf(getC_Cash_ID()));
+ }
+
+ /** Set Cash Journal Line.
+ @param C_CashLine_ID
+ Cash Journal Line
+ */
+ public void setC_CashLine_ID (int C_CashLine_ID)
+ {
+ if (C_CashLine_ID < 1)
+ throw new IllegalArgumentException ("C_CashLine_ID is mandatory.");
+ set_ValueNoCheck (COLUMNNAME_C_CashLine_ID, Integer.valueOf(C_CashLine_ID));
+ }
+
+ /** Get Cash Journal Line.
+ @return Cash Journal Line
+ */
+ public int getC_CashLine_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_CashLine_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_C_Charge getC_Charge() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_Charge.Table_Name);
+ I_C_Charge result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_Charge)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Charge_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Charge.
+ @param C_Charge_ID
+ Additional document charges
+ */
+ public void setC_Charge_ID (int C_Charge_ID)
+ {
+ if (C_Charge_ID < 1)
+ set_Value (COLUMNNAME_C_Charge_ID, null);
+ else
+ set_Value (COLUMNNAME_C_Charge_ID, Integer.valueOf(C_Charge_ID));
+ }
+
+ /** Get Charge.
+ @return Additional document charges
+ */
+ public int getC_Charge_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_Charge_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_C_Currency getC_Currency() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_Currency.Table_Name);
+ I_C_Currency result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_Currency)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Currency_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Currency.
+ @param C_Currency_ID
+ The Currency for this record
+ */
+ public void setC_Currency_ID (int C_Currency_ID)
+ {
+ if (C_Currency_ID < 1)
+ set_ValueNoCheck (COLUMNNAME_C_Currency_ID, null);
+ else
+ set_ValueNoCheck (COLUMNNAME_C_Currency_ID, Integer.valueOf(C_Currency_ID));
+ }
+
+ /** Get Currency.
+ @return The Currency for this record
+ */
+ public int getC_Currency_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_Currency_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_C_Invoice getC_Invoice() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_Invoice.Table_Name);
+ I_C_Invoice result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_Invoice)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Invoice_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Invoice.
+ @param C_Invoice_ID
+ Invoice Identifier
+ */
+ public void setC_Invoice_ID (int C_Invoice_ID)
+ {
+ if (C_Invoice_ID < 1)
+ set_ValueNoCheck (COLUMNNAME_C_Invoice_ID, null);
+ else
+ set_ValueNoCheck (COLUMNNAME_C_Invoice_ID, Integer.valueOf(C_Invoice_ID));
+ }
+
+ /** Get Invoice.
+ @return Invoice Identifier
+ */
+ public int getC_Invoice_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_Invoice_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_C_Payment getC_Payment() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_Payment.Table_Name);
+ I_C_Payment result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_Payment)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Payment_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Payment.
+ @param C_Payment_ID
+ Payment identifier
+ */
+ public void setC_Payment_ID (int C_Payment_ID)
+ {
+ if (C_Payment_ID < 1)
+ set_ValueNoCheck (COLUMNNAME_C_Payment_ID, null);
+ else
+ set_ValueNoCheck (COLUMNNAME_C_Payment_ID, Integer.valueOf(C_Payment_ID));
+ }
+
+ /** Get Payment.
+ @return Payment identifier
+ */
+ public int getC_Payment_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_Payment_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set Description.
+ @param Description
+ Optional short description of the record
+ */
+ public void setDescription (String Description)
+ {
+
+ if (Description != null && Description.length() > 255)
+ {
+ log.warning("Length > 255 - truncated");
+ Description = Description.substring(0, 255);
+ }
+ set_Value (COLUMNNAME_Description, Description);
+ }
+
+ /** Get Description.
+ @return Optional short description of the record
+ */
+ public String getDescription ()
+ {
+ return (String)get_Value(COLUMNNAME_Description);
+ }
+
+ /** Set Discount Amount.
+ @param DiscountAmt
+ Calculated amount of discount
+ */
+ public void setDiscountAmt (BigDecimal DiscountAmt)
+ {
+ set_Value (COLUMNNAME_DiscountAmt, DiscountAmt);
+ }
+
+ /** Get Discount Amount.
+ @return Calculated amount of discount
+ */
+ public BigDecimal getDiscountAmt ()
+ {
+ BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_DiscountAmt);
+ if (bd == null)
+ return Env.ZERO;
+ return bd;
+ }
+
+ /** Set Generated.
+ @param IsGenerated
+ This Line is generated
+ */
+ public void setIsGenerated (boolean IsGenerated)
+ {
+ set_ValueNoCheck (COLUMNNAME_IsGenerated, Boolean.valueOf(IsGenerated));
+ }
+
+ /** Get Generated.
+ @return This Line is generated
+ */
+ public boolean isGenerated ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsGenerated);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Line No.
+ @param Line
+ Unique line for this document
+ */
+ public void setLine (int Line)
+ {
+ set_Value (COLUMNNAME_Line, Integer.valueOf(Line));
+ }
+
+ /** Get Line No.
+ @return Unique line for this document
+ */
+ public int getLine ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_Line);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set Processed.
+ @param Processed
+ The document has been processed
+ */
+ public void setProcessed (boolean Processed)
+ {
+ set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed));
+ }
+
+ /** Get Processed.
+ @return The document has been processed
+ */
+ public boolean isProcessed ()
+ {
+ Object oo = get_Value(COLUMNNAME_Processed);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Write-off Amount.
+ @param WriteOffAmt
+ Amount to write-off
+ */
+ public void setWriteOffAmt (BigDecimal WriteOffAmt)
+ {
+ set_Value (COLUMNNAME_WriteOffAmt, WriteOffAmt);
+ }
+
+ /** Get Write-off Amount.
+ @return Amount to write-off
+ */
+ public BigDecimal getWriteOffAmt ()
+ {
+ BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_WriteOffAmt);
+ if (bd == null)
+ return Env.ZERO;
+ return bd;
+ }
+}
\ No newline at end of file
diff --git a/posterita/posterita/src/main/org/compiere/model/X_C_Currency.java b/posterita/posterita/src/main/org/compiere/model/X_C_Currency.java
new file mode 100644
index 0000000000..e01758e0b1
--- /dev/null
+++ b/posterita/posterita/src/main/org/compiere/model/X_C_Currency.java
@@ -0,0 +1,337 @@
+/******************************************************************************
+ * Product: Adempiere ERP & CRM Smart Business Solution *
+ * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. *
+ * This program is free software; you can redistribute it and/or modify it *
+ * under the terms version 2 of the GNU General Public License as published *
+ * by the Free Software Foundation. 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, write to the Free Software Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
+ * For the text or an alternative of this public license, you may reach us *
+ * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
+ * or via info@compiere.org or http://www.compiere.org/license.html *
+ *****************************************************************************/
+/** Generated Model - DO NOT CHANGE */
+package org.compiere.model;
+
+import java.math.BigDecimal;
+import java.sql.ResultSet;
+import java.sql.Timestamp;
+import java.util.Properties;
+import org.compiere.util.Env;
+import org.compiere.util.KeyNamePair;
+
+/** Generated Model for C_Currency
+ * @author Adempiere (generated)
+ * @version Release 3.4.0s - $Id$ */
+public class X_C_Currency extends PO implements I_C_Currency, I_Persistent
+{
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+
+ /** Standard Constructor */
+ public X_C_Currency (Properties ctx, int C_Currency_ID, String trxName)
+ {
+ super (ctx, C_Currency_ID, trxName);
+ /** if (C_Currency_ID == 0)
+ {
+ setC_Currency_ID (0);
+ setCostingPrecision (0);
+// 4
+ setDescription (null);
+ setIsEMUMember (false);
+// N
+ setIsEuro (false);
+// N
+ setISO_Code (null);
+ setRoundOffFactor (Env.ZERO);
+// 1
+ setStdPrecision (0);
+// 2
+ } */
+ }
+
+ /** Load Constructor */
+ public X_C_Currency (Properties ctx, ResultSet rs, String trxName)
+ {
+ super (ctx, rs, trxName);
+ }
+
+ /** AccessLevel
+ * @return 6 - System - Client
+ */
+ protected int get_AccessLevel()
+ {
+ return accessLevel.intValue();
+ }
+
+ /** Load Meta Data */
+ protected POInfo initPO (Properties ctx)
+ {
+ POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
+ return poi;
+ }
+
+ public String toString()
+ {
+ StringBuffer sb = new StringBuffer ("X_C_Currency[")
+ .append(get_ID()).append("]");
+ return sb.toString();
+ }
+
+ /** Set Currency.
+ @param C_Currency_ID
+ The Currency for this record
+ */
+ public void setC_Currency_ID (int C_Currency_ID)
+ {
+ if (C_Currency_ID < 1)
+ throw new IllegalArgumentException ("C_Currency_ID is mandatory.");
+ set_ValueNoCheck (COLUMNNAME_C_Currency_ID, Integer.valueOf(C_Currency_ID));
+ }
+
+ /** Get Currency.
+ @return The Currency for this record
+ */
+ public int getC_Currency_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_Currency_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set Costing Precision.
+ @param CostingPrecision
+ Rounding used costing calculations
+ */
+ public void setCostingPrecision (int CostingPrecision)
+ {
+ set_Value (COLUMNNAME_CostingPrecision, Integer.valueOf(CostingPrecision));
+ }
+
+ /** Get Costing Precision.
+ @return Rounding used costing calculations
+ */
+ public int getCostingPrecision ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_CostingPrecision);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set Symbol.
+ @param CurSymbol
+ Symbol of the currency (opt used for printing only)
+ */
+ public void setCurSymbol (String CurSymbol)
+ {
+
+ if (CurSymbol != null && CurSymbol.length() > 10)
+ {
+ log.warning("Length > 10 - truncated");
+ CurSymbol = CurSymbol.substring(0, 10);
+ }
+ set_Value (COLUMNNAME_CurSymbol, CurSymbol);
+ }
+
+ /** Get Symbol.
+ @return Symbol of the currency (opt used for printing only)
+ */
+ public String getCurSymbol ()
+ {
+ return (String)get_Value(COLUMNNAME_CurSymbol);
+ }
+
+ /** Set Description.
+ @param Description
+ Optional short description of the record
+ */
+ public void setDescription (String Description)
+ {
+ if (Description == null)
+ throw new IllegalArgumentException ("Description is mandatory.");
+
+ if (Description.length() > 255)
+ {
+ log.warning("Length > 255 - truncated");
+ Description = Description.substring(0, 255);
+ }
+ set_Value (COLUMNNAME_Description, Description);
+ }
+
+ /** Get Description.
+ @return Optional short description of the record
+ */
+ public String getDescription ()
+ {
+ return (String)get_Value(COLUMNNAME_Description);
+ }
+
+ /** Set EMU Entry Date.
+ @param EMUEntryDate
+ Date when the currency joined / will join the EMU
+ */
+ public void setEMUEntryDate (Timestamp EMUEntryDate)
+ {
+ set_Value (COLUMNNAME_EMUEntryDate, EMUEntryDate);
+ }
+
+ /** Get EMU Entry Date.
+ @return Date when the currency joined / will join the EMU
+ */
+ public Timestamp getEMUEntryDate ()
+ {
+ return (Timestamp)get_Value(COLUMNNAME_EMUEntryDate);
+ }
+
+ /** Set EMU Rate.
+ @param EMURate
+ Official rate to the Euro
+ */
+ public void setEMURate (BigDecimal EMURate)
+ {
+ set_Value (COLUMNNAME_EMURate, EMURate);
+ }
+
+ /** Get EMU Rate.
+ @return Official rate to the Euro
+ */
+ public BigDecimal getEMURate ()
+ {
+ BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_EMURate);
+ if (bd == null)
+ return Env.ZERO;
+ return bd;
+ }
+
+ /** Set EMU Member.
+ @param IsEMUMember
+ This currency is member if the European Monetary Union
+ */
+ public void setIsEMUMember (boolean IsEMUMember)
+ {
+ set_Value (COLUMNNAME_IsEMUMember, Boolean.valueOf(IsEMUMember));
+ }
+
+ /** Get EMU Member.
+ @return This currency is member if the European Monetary Union
+ */
+ public boolean isEMUMember ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsEMUMember);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set The Euro Currency.
+ @param IsEuro
+ This currency is the Euro
+ */
+ public void setIsEuro (boolean IsEuro)
+ {
+ set_Value (COLUMNNAME_IsEuro, Boolean.valueOf(IsEuro));
+ }
+
+ /** Get The Euro Currency.
+ @return This currency is the Euro
+ */
+ public boolean isEuro ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsEuro);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set ISO Currency Code.
+ @param ISO_Code
+ Three letter ISO 4217 Code of the Currency
+ */
+ public void setISO_Code (String ISO_Code)
+ {
+ if (ISO_Code == null)
+ throw new IllegalArgumentException ("ISO_Code is mandatory.");
+
+ if (ISO_Code.length() > 3)
+ {
+ log.warning("Length > 3 - truncated");
+ ISO_Code = ISO_Code.substring(0, 3);
+ }
+ set_Value (COLUMNNAME_ISO_Code, ISO_Code);
+ }
+
+ /** Get ISO Currency Code.
+ @return Three letter ISO 4217 Code of the Currency
+ */
+ public String getISO_Code ()
+ {
+ return (String)get_Value(COLUMNNAME_ISO_Code);
+ }
+
+ /** Get Record ID/ColumnName
+ @return ID/ColumnName pair
+ */
+ public KeyNamePair getKeyNamePair()
+ {
+ return new KeyNamePair(get_ID(), getISO_Code());
+ }
+
+ /** Set RoundOffFactor.
+ @param RoundOffFactor
+ Used to Round Off Payment Amount
+ */
+ public void setRoundOffFactor (BigDecimal RoundOffFactor)
+ {
+ if (RoundOffFactor == null)
+ throw new IllegalArgumentException ("RoundOffFactor is mandatory.");
+ set_Value (COLUMNNAME_RoundOffFactor, RoundOffFactor);
+ }
+
+ /** Get RoundOffFactor.
+ @return Used to Round Off Payment Amount
+ */
+ public BigDecimal getRoundOffFactor ()
+ {
+ BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_RoundOffFactor);
+ if (bd == null)
+ return Env.ZERO;
+ return bd;
+ }
+
+ /** Set Standard Precision.
+ @param StdPrecision
+ Rule for rounding calculated amounts
+ */
+ public void setStdPrecision (int StdPrecision)
+ {
+ set_Value (COLUMNNAME_StdPrecision, Integer.valueOf(StdPrecision));
+ }
+
+ /** Get Standard Precision.
+ @return Rule for rounding calculated amounts
+ */
+ public int getStdPrecision ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_StdPrecision);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+}
\ No newline at end of file
diff --git a/posterita/posterita/src/main/org/compiere/model/X_C_Invoice.java b/posterita/posterita/src/main/org/compiere/model/X_C_Invoice.java
new file mode 100644
index 0000000000..959b7eb534
--- /dev/null
+++ b/posterita/posterita/src/main/org/compiere/model/X_C_Invoice.java
@@ -0,0 +1,1731 @@
+/******************************************************************************
+ * Product: Adempiere ERP & CRM Smart Business Solution *
+ * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. *
+ * This program is free software; you can redistribute it and/or modify it *
+ * under the terms version 2 of the GNU General Public License as published *
+ * by the Free Software Foundation. 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, write to the Free Software Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
+ * For the text or an alternative of this public license, you may reach us *
+ * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
+ * or via info@compiere.org or http://www.compiere.org/license.html *
+ *****************************************************************************/
+/** Generated Model - DO NOT CHANGE */
+package org.compiere.model;
+
+import java.lang.reflect.Constructor;
+import java.math.BigDecimal;
+import java.sql.ResultSet;
+import java.sql.Timestamp;
+import java.util.Properties;
+import java.util.logging.Level;
+import org.compiere.util.Env;
+import org.compiere.util.KeyNamePair;
+
+/** Generated Model for C_Invoice
+ * @author Adempiere (generated)
+ * @version Release 3.4.0s - $Id$ */
+public class X_C_Invoice extends PO implements I_C_Invoice, I_Persistent
+{
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+
+ /** Standard Constructor */
+ public X_C_Invoice (Properties ctx, int C_Invoice_ID, String trxName)
+ {
+ super (ctx, C_Invoice_ID, trxName);
+ /** if (C_Invoice_ID == 0)
+ {
+ setC_BPartner_ID (0);
+ setC_BPartner_Location_ID (0);
+ setC_Currency_ID (0);
+// @C_Currency_ID@
+ setC_DocType_ID (0);
+// 0
+ setC_DocTypeTarget_ID (0);
+ setC_Invoice_ID (0);
+ setC_PaymentTerm_ID (0);
+ setDateAcct (new Timestamp(System.currentTimeMillis()));
+// @#Date@
+ setDateInvoiced (new Timestamp(System.currentTimeMillis()));
+// @#Date@
+ setDocAction (null);
+// CO
+ setDocStatus (null);
+// DR
+ setDocumentNo (null);
+ setGrandTotal (Env.ZERO);
+ setIsApproved (false);
+// @IsApproved@
+ setIsDiscountPrinted (false);
+ setIsInDispute (false);
+// N
+ setIsPaid (false);
+ setIsPayScheduleValid (false);
+ setIsPrinted (false);
+ setIsSelfService (false);
+ setIsSOTrx (false);
+// @IsSOTrx@
+ setIsTaxIncluded (false);
+ setIsTransferred (false);
+ setM_PriceList_ID (0);
+ setPaymentRule (null);
+// P
+ setPosted (false);
+// N
+ setProcessed (false);
+ setSendEMail (false);
+ setTotalLines (Env.ZERO);
+ } */
+ }
+
+ /** Load Constructor */
+ public X_C_Invoice (Properties ctx, ResultSet rs, String trxName)
+ {
+ super (ctx, rs, trxName);
+ }
+
+ /** AccessLevel
+ * @return 1 - Org
+ */
+ protected int get_AccessLevel()
+ {
+ return accessLevel.intValue();
+ }
+
+ /** Load Meta Data */
+ protected POInfo initPO (Properties ctx)
+ {
+ POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
+ return poi;
+ }
+
+ public String toString()
+ {
+ StringBuffer sb = new StringBuffer ("X_C_Invoice[")
+ .append(get_ID()).append("]");
+ return sb.toString();
+ }
+
+ /** AD_OrgTrx_ID AD_Reference_ID=130 */
+ public static final int AD_ORGTRX_ID_AD_Reference_ID=130;
+ /** Set Trx Organization.
+ @param AD_OrgTrx_ID
+ Performing or initiating organization
+ */
+ public void setAD_OrgTrx_ID (int AD_OrgTrx_ID)
+ {
+ if (AD_OrgTrx_ID < 1)
+ set_Value (COLUMNNAME_AD_OrgTrx_ID, null);
+ else
+ set_Value (COLUMNNAME_AD_OrgTrx_ID, Integer.valueOf(AD_OrgTrx_ID));
+ }
+
+ /** Get Trx Organization.
+ @return Performing or initiating organization
+ */
+ public int getAD_OrgTrx_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_AD_OrgTrx_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_AD_User getAD_User() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_AD_User.Table_Name);
+ I_AD_User result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_AD_User)constructor.newInstance(new Object[] {getCtx(), new Integer(getAD_User_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set User/Contact.
+ @param AD_User_ID
+ User within the system - Internal or Business Partner Contact
+ */
+ public void setAD_User_ID (int AD_User_ID)
+ {
+ if (AD_User_ID < 0)
+ set_Value (COLUMNNAME_AD_User_ID, null);
+ else
+ set_Value (COLUMNNAME_AD_User_ID, Integer.valueOf(AD_User_ID));
+ }
+
+ /** Get User/Contact.
+ @return User within the system - Internal or Business Partner Contact
+ */
+ public int getAD_User_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_AD_User_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_C_Activity getC_Activity() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_Activity.Table_Name);
+ I_C_Activity result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_Activity)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Activity_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Activity.
+ @param C_Activity_ID
+ Business Activity
+ */
+ public void setC_Activity_ID (int C_Activity_ID)
+ {
+ if (C_Activity_ID < 1)
+ set_Value (COLUMNNAME_C_Activity_ID, null);
+ else
+ set_Value (COLUMNNAME_C_Activity_ID, Integer.valueOf(C_Activity_ID));
+ }
+
+ /** Get Activity.
+ @return Business Activity
+ */
+ public int getC_Activity_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_Activity_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_C_BPartner getC_BPartner() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_BPartner.Table_Name);
+ I_C_BPartner result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_BPartner)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_BPartner_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Business Partner .
+ @param C_BPartner_ID
+ Identifies a Business Partner
+ */
+ public void setC_BPartner_ID (int C_BPartner_ID)
+ {
+ if (C_BPartner_ID < 1)
+ throw new IllegalArgumentException ("C_BPartner_ID is mandatory.");
+ set_Value (COLUMNNAME_C_BPartner_ID, Integer.valueOf(C_BPartner_ID));
+ }
+
+ /** Get Business Partner .
+ @return Identifies a Business Partner
+ */
+ public int getC_BPartner_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_BPartner_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_C_BPartner_Location getC_BPartner_Location() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_BPartner_Location.Table_Name);
+ I_C_BPartner_Location result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_BPartner_Location)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_BPartner_Location_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Partner Location.
+ @param C_BPartner_Location_ID
+ Identifies the (ship to) address for this Business Partner
+ */
+ public void setC_BPartner_Location_ID (int C_BPartner_Location_ID)
+ {
+ if (C_BPartner_Location_ID < 1)
+ throw new IllegalArgumentException ("C_BPartner_Location_ID is mandatory.");
+ set_Value (COLUMNNAME_C_BPartner_Location_ID, Integer.valueOf(C_BPartner_Location_ID));
+ }
+
+ /** Get Partner Location.
+ @return Identifies the (ship to) address for this Business Partner
+ */
+ public int getC_BPartner_Location_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_BPartner_Location_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_C_Campaign getC_Campaign() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_Campaign.Table_Name);
+ I_C_Campaign result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_Campaign)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Campaign_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Campaign.
+ @param C_Campaign_ID
+ Marketing Campaign
+ */
+ public void setC_Campaign_ID (int C_Campaign_ID)
+ {
+ if (C_Campaign_ID < 1)
+ set_Value (COLUMNNAME_C_Campaign_ID, null);
+ else
+ set_Value (COLUMNNAME_C_Campaign_ID, Integer.valueOf(C_Campaign_ID));
+ }
+
+ /** Get Campaign.
+ @return Marketing Campaign
+ */
+ public int getC_Campaign_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_Campaign_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_C_CashLine getC_CashLine() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_CashLine.Table_Name);
+ I_C_CashLine result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_CashLine)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_CashLine_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Cash Journal Line.
+ @param C_CashLine_ID
+ Cash Journal Line
+ */
+ public void setC_CashLine_ID (int C_CashLine_ID)
+ {
+ if (C_CashLine_ID < 1)
+ set_Value (COLUMNNAME_C_CashLine_ID, null);
+ else
+ set_Value (COLUMNNAME_C_CashLine_ID, Integer.valueOf(C_CashLine_ID));
+ }
+
+ /** Get Cash Journal Line.
+ @return Cash Journal Line
+ */
+ public int getC_CashLine_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_CashLine_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** C_Charge_ID AD_Reference_ID=200 */
+ public static final int C_CHARGE_ID_AD_Reference_ID=200;
+ /** Set Charge.
+ @param C_Charge_ID
+ Additional document charges
+ */
+ public void setC_Charge_ID (int C_Charge_ID)
+ {
+ if (C_Charge_ID < 1)
+ set_Value (COLUMNNAME_C_Charge_ID, null);
+ else
+ set_Value (COLUMNNAME_C_Charge_ID, Integer.valueOf(C_Charge_ID));
+ }
+
+ /** Get Charge.
+ @return Additional document charges
+ */
+ public int getC_Charge_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_Charge_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_C_ConversionType getC_ConversionType() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_ConversionType.Table_Name);
+ I_C_ConversionType result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_ConversionType)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_ConversionType_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Currency Type.
+ @param C_ConversionType_ID
+ Currency Conversion Rate Type
+ */
+ public void setC_ConversionType_ID (int C_ConversionType_ID)
+ {
+ if (C_ConversionType_ID < 1)
+ set_Value (COLUMNNAME_C_ConversionType_ID, null);
+ else
+ set_Value (COLUMNNAME_C_ConversionType_ID, Integer.valueOf(C_ConversionType_ID));
+ }
+
+ /** Get Currency Type.
+ @return Currency Conversion Rate Type
+ */
+ public int getC_ConversionType_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_ConversionType_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_C_Currency getC_Currency() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_Currency.Table_Name);
+ I_C_Currency result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_Currency)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Currency_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Currency.
+ @param C_Currency_ID
+ The Currency for this record
+ */
+ public void setC_Currency_ID (int C_Currency_ID)
+ {
+ if (C_Currency_ID < 1)
+ throw new IllegalArgumentException ("C_Currency_ID is mandatory.");
+ set_Value (COLUMNNAME_C_Currency_ID, Integer.valueOf(C_Currency_ID));
+ }
+
+ /** Get Currency.
+ @return The Currency for this record
+ */
+ public int getC_Currency_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_Currency_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_C_DocType getC_DocType() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_DocType.Table_Name);
+ I_C_DocType result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_DocType)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_DocType_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Document Type.
+ @param C_DocType_ID
+ Document type or rules
+ */
+ public void setC_DocType_ID (int C_DocType_ID)
+ {
+ if (C_DocType_ID < 0)
+ throw new IllegalArgumentException ("C_DocType_ID is mandatory.");
+ set_ValueNoCheck (COLUMNNAME_C_DocType_ID, Integer.valueOf(C_DocType_ID));
+ }
+
+ /** Get Document Type.
+ @return Document type or rules
+ */
+ public int getC_DocType_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_DocType_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** C_DocTypeTarget_ID AD_Reference_ID=170 */
+ public static final int C_DOCTYPETARGET_ID_AD_Reference_ID=170;
+ /** Set Target Document Type.
+ @param C_DocTypeTarget_ID
+ Target document type for conversing documents
+ */
+ public void setC_DocTypeTarget_ID (int C_DocTypeTarget_ID)
+ {
+ if (C_DocTypeTarget_ID < 1)
+ throw new IllegalArgumentException ("C_DocTypeTarget_ID is mandatory.");
+ set_Value (COLUMNNAME_C_DocTypeTarget_ID, Integer.valueOf(C_DocTypeTarget_ID));
+ }
+
+ /** Get Target Document Type.
+ @return Target document type for conversing documents
+ */
+ public int getC_DocTypeTarget_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_DocTypeTarget_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_C_DunningLevel getC_DunningLevel() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_DunningLevel.Table_Name);
+ I_C_DunningLevel result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_DunningLevel)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_DunningLevel_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Dunning Level.
+ @param C_DunningLevel_ID Dunning Level */
+ public void setC_DunningLevel_ID (int C_DunningLevel_ID)
+ {
+ if (C_DunningLevel_ID < 1)
+ set_Value (COLUMNNAME_C_DunningLevel_ID, null);
+ else
+ set_Value (COLUMNNAME_C_DunningLevel_ID, Integer.valueOf(C_DunningLevel_ID));
+ }
+
+ /** Get Dunning Level.
+ @return Dunning Level */
+ public int getC_DunningLevel_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_DunningLevel_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set Charge amount.
+ @param ChargeAmt
+ Charge Amount
+ */
+ public void setChargeAmt (BigDecimal ChargeAmt)
+ {
+ set_Value (COLUMNNAME_ChargeAmt, ChargeAmt);
+ }
+
+ /** Get Charge amount.
+ @return Charge Amount
+ */
+ public BigDecimal getChargeAmt ()
+ {
+ BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ChargeAmt);
+ if (bd == null)
+ return Env.ZERO;
+ return bd;
+ }
+
+ /** Set Invoice.
+ @param C_Invoice_ID
+ Invoice Identifier
+ */
+ public void setC_Invoice_ID (int C_Invoice_ID)
+ {
+ if (C_Invoice_ID < 1)
+ throw new IllegalArgumentException ("C_Invoice_ID is mandatory.");
+ set_ValueNoCheck (COLUMNNAME_C_Invoice_ID, Integer.valueOf(C_Invoice_ID));
+ }
+
+ /** Get Invoice.
+ @return Invoice Identifier
+ */
+ public int getC_Invoice_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_Invoice_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set Copy From.
+ @param CopyFrom
+ Copy From Record
+ */
+ public void setCopyFrom (String CopyFrom)
+ {
+
+ if (CopyFrom != null && CopyFrom.length() > 1)
+ {
+ log.warning("Length > 1 - truncated");
+ CopyFrom = CopyFrom.substring(0, 1);
+ }
+ set_Value (COLUMNNAME_CopyFrom, CopyFrom);
+ }
+
+ /** Get Copy From.
+ @return Copy From Record
+ */
+ public String getCopyFrom ()
+ {
+ return (String)get_Value(COLUMNNAME_CopyFrom);
+ }
+
+ public I_C_Order getC_Order() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_Order.Table_Name);
+ I_C_Order result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_Order)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Order_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Order.
+ @param C_Order_ID
+ Order
+ */
+ public void setC_Order_ID (int C_Order_ID)
+ {
+ if (C_Order_ID < 1)
+ set_ValueNoCheck (COLUMNNAME_C_Order_ID, null);
+ else
+ set_ValueNoCheck (COLUMNNAME_C_Order_ID, Integer.valueOf(C_Order_ID));
+ }
+
+ /** Get Order.
+ @return Order
+ */
+ public int getC_Order_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_Order_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_C_Payment getC_Payment() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_Payment.Table_Name);
+ I_C_Payment result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_Payment)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Payment_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Payment.
+ @param C_Payment_ID
+ Payment identifier
+ */
+ public void setC_Payment_ID (int C_Payment_ID)
+ {
+ if (C_Payment_ID < 1)
+ set_Value (COLUMNNAME_C_Payment_ID, null);
+ else
+ set_Value (COLUMNNAME_C_Payment_ID, Integer.valueOf(C_Payment_ID));
+ }
+
+ /** Get Payment.
+ @return Payment identifier
+ */
+ public int getC_Payment_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_Payment_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_C_PaymentTerm getC_PaymentTerm() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_PaymentTerm.Table_Name);
+ I_C_PaymentTerm result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_PaymentTerm)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_PaymentTerm_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Payment Term.
+ @param C_PaymentTerm_ID
+ The terms of Payment (timing, discount)
+ */
+ public void setC_PaymentTerm_ID (int C_PaymentTerm_ID)
+ {
+ if (C_PaymentTerm_ID < 1)
+ throw new IllegalArgumentException ("C_PaymentTerm_ID is mandatory.");
+ set_Value (COLUMNNAME_C_PaymentTerm_ID, Integer.valueOf(C_PaymentTerm_ID));
+ }
+
+ /** Get Payment Term.
+ @return The terms of Payment (timing, discount)
+ */
+ public int getC_PaymentTerm_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_PaymentTerm_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_C_Project getC_Project() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_Project.Table_Name);
+ I_C_Project result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_Project)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Project_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Project.
+ @param C_Project_ID
+ Financial Project
+ */
+ public void setC_Project_ID (int C_Project_ID)
+ {
+ if (C_Project_ID < 1)
+ set_Value (COLUMNNAME_C_Project_ID, null);
+ else
+ set_Value (COLUMNNAME_C_Project_ID, Integer.valueOf(C_Project_ID));
+ }
+
+ /** Get Project.
+ @return Financial Project
+ */
+ public int getC_Project_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_Project_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set Create lines from.
+ @param CreateFrom
+ Process which will generate a new document lines based on an existing document
+ */
+ public void setCreateFrom (String CreateFrom)
+ {
+
+ if (CreateFrom != null && CreateFrom.length() > 1)
+ {
+ log.warning("Length > 1 - truncated");
+ CreateFrom = CreateFrom.substring(0, 1);
+ }
+ set_Value (COLUMNNAME_CreateFrom, CreateFrom);
+ }
+
+ /** Get Create lines from.
+ @return Process which will generate a new document lines based on an existing document
+ */
+ public String getCreateFrom ()
+ {
+ return (String)get_Value(COLUMNNAME_CreateFrom);
+ }
+
+ /** Set Account Date.
+ @param DateAcct
+ Accounting Date
+ */
+ public void setDateAcct (Timestamp DateAcct)
+ {
+ if (DateAcct == null)
+ throw new IllegalArgumentException ("DateAcct is mandatory.");
+ set_Value (COLUMNNAME_DateAcct, DateAcct);
+ }
+
+ /** Get Account Date.
+ @return Accounting Date
+ */
+ public Timestamp getDateAcct ()
+ {
+ return (Timestamp)get_Value(COLUMNNAME_DateAcct);
+ }
+
+ /** Set Date Invoiced.
+ @param DateInvoiced
+ Date printed on Invoice
+ */
+ public void setDateInvoiced (Timestamp DateInvoiced)
+ {
+ if (DateInvoiced == null)
+ throw new IllegalArgumentException ("DateInvoiced is mandatory.");
+ set_Value (COLUMNNAME_DateInvoiced, DateInvoiced);
+ }
+
+ /** Get Date Invoiced.
+ @return Date printed on Invoice
+ */
+ public Timestamp getDateInvoiced ()
+ {
+ return (Timestamp)get_Value(COLUMNNAME_DateInvoiced);
+ }
+
+ /** Set Date Ordered.
+ @param DateOrdered
+ Date of Order
+ */
+ public void setDateOrdered (Timestamp DateOrdered)
+ {
+ set_ValueNoCheck (COLUMNNAME_DateOrdered, DateOrdered);
+ }
+
+ /** Get Date Ordered.
+ @return Date of Order
+ */
+ public Timestamp getDateOrdered ()
+ {
+ return (Timestamp)get_Value(COLUMNNAME_DateOrdered);
+ }
+
+ /** Set Date printed.
+ @param DatePrinted
+ Date the document was printed.
+ */
+ public void setDatePrinted (Timestamp DatePrinted)
+ {
+ set_Value (COLUMNNAME_DatePrinted, DatePrinted);
+ }
+
+ /** Get Date printed.
+ @return Date the document was printed.
+ */
+ public Timestamp getDatePrinted ()
+ {
+ return (Timestamp)get_Value(COLUMNNAME_DatePrinted);
+ }
+
+ /** Set Description.
+ @param Description
+ Optional short description of the record
+ */
+ public void setDescription (String Description)
+ {
+
+ if (Description != null && Description.length() > 255)
+ {
+ log.warning("Length > 255 - truncated");
+ Description = Description.substring(0, 255);
+ }
+ set_Value (COLUMNNAME_Description, Description);
+ }
+
+ /** Get Description.
+ @return Optional short description of the record
+ */
+ public String getDescription ()
+ {
+ return (String)get_Value(COLUMNNAME_Description);
+ }
+
+ /** DocAction AD_Reference_ID=135 */
+ public static final int DOCACTION_AD_Reference_ID=135;
+ /** Complete = CO */
+ public static final String DOCACTION_Complete = "CO";
+ /** Approve = AP */
+ public static final String DOCACTION_Approve = "AP";
+ /** Reject = RJ */
+ public static final String DOCACTION_Reject = "RJ";
+ /** Post = PO */
+ public static final String DOCACTION_Post = "PO";
+ /** Void = VO */
+ public static final String DOCACTION_Void = "VO";
+ /** Close = CL */
+ public static final String DOCACTION_Close = "CL";
+ /** Reverse - Correct = RC */
+ public static final String DOCACTION_Reverse_Correct = "RC";
+ /** Reverse - Accrual = RA */
+ public static final String DOCACTION_Reverse_Accrual = "RA";
+ /** Invalidate = IN */
+ public static final String DOCACTION_Invalidate = "IN";
+ /** Re-activate = RE */
+ public static final String DOCACTION_Re_Activate = "RE";
+ /** = -- */
+ public static final String DOCACTION_None = "--";
+ /** Prepare = PR */
+ public static final String DOCACTION_Prepare = "PR";
+ /** Unlock = XL */
+ public static final String DOCACTION_Unlock = "XL";
+ /** Wait Complete = WC */
+ public static final String DOCACTION_WaitComplete = "WC";
+ /** Set Document Action.
+ @param DocAction
+ The targeted status of the document
+ */
+ public void setDocAction (String DocAction)
+ {
+ if (DocAction == null) throw new IllegalArgumentException ("DocAction is mandatory");
+ if (DocAction.equals("CO") || DocAction.equals("AP") || DocAction.equals("RJ") || DocAction.equals("PO") || DocAction.equals("VO") || DocAction.equals("CL") || DocAction.equals("RC") || DocAction.equals("RA") || DocAction.equals("IN") || DocAction.equals("RE") || DocAction.equals("--") || DocAction.equals("PR") || DocAction.equals("XL") || DocAction.equals("WC")); else throw new IllegalArgumentException ("DocAction Invalid value - " + DocAction + " - Reference_ID=135 - CO - AP - RJ - PO - VO - CL - RC - RA - IN - RE - -- - PR - XL - WC");
+ if (DocAction.length() > 2)
+ {
+ log.warning("Length > 2 - truncated");
+ DocAction = DocAction.substring(0, 2);
+ }
+ set_Value (COLUMNNAME_DocAction, DocAction);
+ }
+
+ /** Get Document Action.
+ @return The targeted status of the document
+ */
+ public String getDocAction ()
+ {
+ return (String)get_Value(COLUMNNAME_DocAction);
+ }
+
+ /** DocStatus AD_Reference_ID=131 */
+ public static final int DOCSTATUS_AD_Reference_ID=131;
+ /** Drafted = DR */
+ public static final String DOCSTATUS_Drafted = "DR";
+ /** Completed = CO */
+ public static final String DOCSTATUS_Completed = "CO";
+ /** Approved = AP */
+ public static final String DOCSTATUS_Approved = "AP";
+ /** Not Approved = NA */
+ public static final String DOCSTATUS_NotApproved = "NA";
+ /** Voided = VO */
+ public static final String DOCSTATUS_Voided = "VO";
+ /** Invalid = IN */
+ public static final String DOCSTATUS_Invalid = "IN";
+ /** Reversed = RE */
+ public static final String DOCSTATUS_Reversed = "RE";
+ /** Closed = CL */
+ public static final String DOCSTATUS_Closed = "CL";
+ /** Unknown = ?? */
+ public static final String DOCSTATUS_Unknown = "??";
+ /** In Progress = IP */
+ public static final String DOCSTATUS_InProgress = "IP";
+ /** Waiting Payment = WP */
+ public static final String DOCSTATUS_WaitingPayment = "WP";
+ /** Waiting Confirmation = WC */
+ public static final String DOCSTATUS_WaitingConfirmation = "WC";
+ /** Set Document Status.
+ @param DocStatus
+ The current status of the document
+ */
+ public void setDocStatus (String DocStatus)
+ {
+ if (DocStatus == null) throw new IllegalArgumentException ("DocStatus is mandatory");
+ if (DocStatus.equals("DR") || DocStatus.equals("CO") || DocStatus.equals("AP") || DocStatus.equals("NA") || DocStatus.equals("VO") || DocStatus.equals("IN") || DocStatus.equals("RE") || DocStatus.equals("CL") || DocStatus.equals("??") || DocStatus.equals("IP") || DocStatus.equals("WP") || DocStatus.equals("WC")); else throw new IllegalArgumentException ("DocStatus Invalid value - " + DocStatus + " - Reference_ID=131 - DR - CO - AP - NA - VO - IN - RE - CL - ?? - IP - WP - WC");
+ if (DocStatus.length() > 2)
+ {
+ log.warning("Length > 2 - truncated");
+ DocStatus = DocStatus.substring(0, 2);
+ }
+ set_Value (COLUMNNAME_DocStatus, DocStatus);
+ }
+
+ /** Get Document Status.
+ @return The current status of the document
+ */
+ public String getDocStatus ()
+ {
+ return (String)get_Value(COLUMNNAME_DocStatus);
+ }
+
+ /** Set Document No.
+ @param DocumentNo
+ Document sequence number of the document
+ */
+ public void setDocumentNo (String DocumentNo)
+ {
+ if (DocumentNo == null)
+ throw new IllegalArgumentException ("DocumentNo is mandatory.");
+
+ if (DocumentNo.length() > 30)
+ {
+ log.warning("Length > 30 - truncated");
+ DocumentNo = DocumentNo.substring(0, 30);
+ }
+ set_ValueNoCheck (COLUMNNAME_DocumentNo, DocumentNo);
+ }
+
+ /** Get Document No.
+ @return Document sequence number of the document
+ */
+ public String getDocumentNo ()
+ {
+ return (String)get_Value(COLUMNNAME_DocumentNo);
+ }
+
+ /** Get Record ID/ColumnName
+ @return ID/ColumnName pair
+ */
+ public KeyNamePair getKeyNamePair()
+ {
+ return new KeyNamePair(get_ID(), getDocumentNo());
+ }
+
+ /** Set Dunning Grace.
+ @param DunningGrace Dunning Grace */
+ public void setDunningGrace (Timestamp DunningGrace)
+ {
+ set_Value (COLUMNNAME_DunningGrace, DunningGrace);
+ }
+
+ /** Get Dunning Grace.
+ @return Dunning Grace */
+ public Timestamp getDunningGrace ()
+ {
+ return (Timestamp)get_Value(COLUMNNAME_DunningGrace);
+ }
+
+ /** Set Generate To.
+ @param GenerateTo
+ Generate To
+ */
+ public void setGenerateTo (String GenerateTo)
+ {
+
+ if (GenerateTo != null && GenerateTo.length() > 1)
+ {
+ log.warning("Length > 1 - truncated");
+ GenerateTo = GenerateTo.substring(0, 1);
+ }
+ set_Value (COLUMNNAME_GenerateTo, GenerateTo);
+ }
+
+ /** Get Generate To.
+ @return Generate To
+ */
+ public String getGenerateTo ()
+ {
+ return (String)get_Value(COLUMNNAME_GenerateTo);
+ }
+
+ /** Set Grand Total.
+ @param GrandTotal
+ Total amount of document
+ */
+ public void setGrandTotal (BigDecimal GrandTotal)
+ {
+ if (GrandTotal == null)
+ throw new IllegalArgumentException ("GrandTotal is mandatory.");
+ set_ValueNoCheck (COLUMNNAME_GrandTotal, GrandTotal);
+ }
+
+ /** Get Grand Total.
+ @return Total amount of document
+ */
+ public BigDecimal getGrandTotal ()
+ {
+ BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_GrandTotal);
+ if (bd == null)
+ return Env.ZERO;
+ return bd;
+ }
+
+ /** InvoiceCollectionType AD_Reference_ID=394 */
+ public static final int INVOICECOLLECTIONTYPE_AD_Reference_ID=394;
+ /** Dunning = D */
+ public static final String INVOICECOLLECTIONTYPE_Dunning = "D";
+ /** Collection Agency = C */
+ public static final String INVOICECOLLECTIONTYPE_CollectionAgency = "C";
+ /** Legal Procedure = L */
+ public static final String INVOICECOLLECTIONTYPE_LegalProcedure = "L";
+ /** Uncollectable = U */
+ public static final String INVOICECOLLECTIONTYPE_Uncollectable = "U";
+ /** Set Collection Status.
+ @param InvoiceCollectionType
+ Invoice Collection Status
+ */
+ public void setInvoiceCollectionType (String InvoiceCollectionType)
+ {
+
+ if (InvoiceCollectionType == null || InvoiceCollectionType.equals("D") || InvoiceCollectionType.equals("C") || InvoiceCollectionType.equals("L") || InvoiceCollectionType.equals("U")); else throw new IllegalArgumentException ("InvoiceCollectionType Invalid value - " + InvoiceCollectionType + " - Reference_ID=394 - D - C - L - U");
+ if (InvoiceCollectionType != null && InvoiceCollectionType.length() > 1)
+ {
+ log.warning("Length > 1 - truncated");
+ InvoiceCollectionType = InvoiceCollectionType.substring(0, 1);
+ }
+ set_Value (COLUMNNAME_InvoiceCollectionType, InvoiceCollectionType);
+ }
+
+ /** Get Collection Status.
+ @return Invoice Collection Status
+ */
+ public String getInvoiceCollectionType ()
+ {
+ return (String)get_Value(COLUMNNAME_InvoiceCollectionType);
+ }
+
+ /** Set Approved.
+ @param IsApproved
+ Indicates if this document requires approval
+ */
+ public void setIsApproved (boolean IsApproved)
+ {
+ set_ValueNoCheck (COLUMNNAME_IsApproved, Boolean.valueOf(IsApproved));
+ }
+
+ /** Get Approved.
+ @return Indicates if this document requires approval
+ */
+ public boolean isApproved ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsApproved);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Discount Printed.
+ @param IsDiscountPrinted
+ Print Discount on Invoice and Order
+ */
+ public void setIsDiscountPrinted (boolean IsDiscountPrinted)
+ {
+ set_Value (COLUMNNAME_IsDiscountPrinted, Boolean.valueOf(IsDiscountPrinted));
+ }
+
+ /** Get Discount Printed.
+ @return Print Discount on Invoice and Order
+ */
+ public boolean isDiscountPrinted ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsDiscountPrinted);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set In Dispute.
+ @param IsInDispute
+ Document is in dispute
+ */
+ public void setIsInDispute (boolean IsInDispute)
+ {
+ set_Value (COLUMNNAME_IsInDispute, Boolean.valueOf(IsInDispute));
+ }
+
+ /** Get In Dispute.
+ @return Document is in dispute
+ */
+ public boolean isInDispute ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsInDispute);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Paid.
+ @param IsPaid
+ The document is paid
+ */
+ public void setIsPaid (boolean IsPaid)
+ {
+ set_Value (COLUMNNAME_IsPaid, Boolean.valueOf(IsPaid));
+ }
+
+ /** Get Paid.
+ @return The document is paid
+ */
+ public boolean isPaid ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsPaid);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Pay Schedule valid.
+ @param IsPayScheduleValid
+ Is the Payment Schedule is valid
+ */
+ public void setIsPayScheduleValid (boolean IsPayScheduleValid)
+ {
+ set_ValueNoCheck (COLUMNNAME_IsPayScheduleValid, Boolean.valueOf(IsPayScheduleValid));
+ }
+
+ /** Get Pay Schedule valid.
+ @return Is the Payment Schedule is valid
+ */
+ public boolean isPayScheduleValid ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsPayScheduleValid);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Printed.
+ @param IsPrinted
+ Indicates if this document / line is printed
+ */
+ public void setIsPrinted (boolean IsPrinted)
+ {
+ set_ValueNoCheck (COLUMNNAME_IsPrinted, Boolean.valueOf(IsPrinted));
+ }
+
+ /** Get Printed.
+ @return Indicates if this document / line is printed
+ */
+ public boolean isPrinted ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsPrinted);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Self-Service.
+ @param IsSelfService
+ This is a Self-Service entry or this entry can be changed via Self-Service
+ */
+ public void setIsSelfService (boolean IsSelfService)
+ {
+ set_Value (COLUMNNAME_IsSelfService, Boolean.valueOf(IsSelfService));
+ }
+
+ /** Get Self-Service.
+ @return This is a Self-Service entry or this entry can be changed via Self-Service
+ */
+ public boolean isSelfService ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsSelfService);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Sales Transaction.
+ @param IsSOTrx
+ This is a Sales Transaction
+ */
+ public void setIsSOTrx (boolean IsSOTrx)
+ {
+ set_ValueNoCheck (COLUMNNAME_IsSOTrx, Boolean.valueOf(IsSOTrx));
+ }
+
+ /** Get Sales Transaction.
+ @return This is a Sales Transaction
+ */
+ public boolean isSOTrx ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsSOTrx);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Price includes Tax.
+ @param IsTaxIncluded
+ Tax is included in the price
+ */
+ public void setIsTaxIncluded (boolean IsTaxIncluded)
+ {
+ set_Value (COLUMNNAME_IsTaxIncluded, Boolean.valueOf(IsTaxIncluded));
+ }
+
+ /** Get Price includes Tax.
+ @return Tax is included in the price
+ */
+ public boolean isTaxIncluded ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsTaxIncluded);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Transferred.
+ @param IsTransferred
+ Transferred to General Ledger (i.e. accounted)
+ */
+ public void setIsTransferred (boolean IsTransferred)
+ {
+ set_ValueNoCheck (COLUMNNAME_IsTransferred, Boolean.valueOf(IsTransferred));
+ }
+
+ /** Get Transferred.
+ @return Transferred to General Ledger (i.e. accounted)
+ */
+ public boolean isTransferred ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsTransferred);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ public I_M_PriceList getM_PriceList() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_M_PriceList.Table_Name);
+ I_M_PriceList result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_M_PriceList)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_PriceList_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Price List.
+ @param M_PriceList_ID
+ Unique identifier of a Price List
+ */
+ public void setM_PriceList_ID (int M_PriceList_ID)
+ {
+ if (M_PriceList_ID < 1)
+ throw new IllegalArgumentException ("M_PriceList_ID is mandatory.");
+ set_Value (COLUMNNAME_M_PriceList_ID, Integer.valueOf(M_PriceList_ID));
+ }
+
+ /** Get Price List.
+ @return Unique identifier of a Price List
+ */
+ public int getM_PriceList_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_M_PriceList_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_M_RMA getM_RMA() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_M_RMA.Table_Name);
+ I_M_RMA result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_M_RMA)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_RMA_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set RMA.
+ @param M_RMA_ID
+ Return Material Authorization
+ */
+ public void setM_RMA_ID (int M_RMA_ID)
+ {
+ if (M_RMA_ID < 1)
+ set_Value (COLUMNNAME_M_RMA_ID, null);
+ else
+ set_Value (COLUMNNAME_M_RMA_ID, Integer.valueOf(M_RMA_ID));
+ }
+
+ /** Get RMA.
+ @return Return Material Authorization
+ */
+ public int getM_RMA_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_M_RMA_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** PaymentRule AD_Reference_ID=195 */
+ public static final int PAYMENTRULE_AD_Reference_ID=195;
+ /** Cash = B */
+ public static final String PAYMENTRULE_Cash = "B";
+ /** Credit Card = K */
+ public static final String PAYMENTRULE_CreditCard = "K";
+ /** Direct Deposit = T */
+ public static final String PAYMENTRULE_DirectDeposit = "T";
+ /** Check = S */
+ public static final String PAYMENTRULE_Check = "S";
+ /** On Credit = P */
+ public static final String PAYMENTRULE_OnCredit = "P";
+ /** Direct Debit = D */
+ public static final String PAYMENTRULE_DirectDebit = "D";
+ /** Mixed = M */
+ public static final String PAYMENTRULE_Mixed = "M";
+ /** Set Payment Rule.
+ @param PaymentRule
+ How you pay the invoice
+ */
+ public void setPaymentRule (String PaymentRule)
+ {
+ if (PaymentRule == null) throw new IllegalArgumentException ("PaymentRule is mandatory");
+ if (PaymentRule.equals("B") || PaymentRule.equals("K") || PaymentRule.equals("T") || PaymentRule.equals("S") || PaymentRule.equals("P") || PaymentRule.equals("D") || PaymentRule.equals("M")); else throw new IllegalArgumentException ("PaymentRule Invalid value - " + PaymentRule + " - Reference_ID=195 - B - K - T - S - P - D - M");
+ if (PaymentRule.length() > 1)
+ {
+ log.warning("Length > 1 - truncated");
+ PaymentRule = PaymentRule.substring(0, 1);
+ }
+ set_Value (COLUMNNAME_PaymentRule, PaymentRule);
+ }
+
+ /** Get Payment Rule.
+ @return How you pay the invoice
+ */
+ public String getPaymentRule ()
+ {
+ return (String)get_Value(COLUMNNAME_PaymentRule);
+ }
+
+ /** Set Order Reference.
+ @param POReference
+ Transaction Reference Number (Sales Order, Purchase Order) of your Business Partner
+ */
+ public void setPOReference (String POReference)
+ {
+
+ if (POReference != null && POReference.length() > 20)
+ {
+ log.warning("Length > 20 - truncated");
+ POReference = POReference.substring(0, 20);
+ }
+ set_Value (COLUMNNAME_POReference, POReference);
+ }
+
+ /** Get Order Reference.
+ @return Transaction Reference Number (Sales Order, Purchase Order) of your Business Partner
+ */
+ public String getPOReference ()
+ {
+ return (String)get_Value(COLUMNNAME_POReference);
+ }
+
+ /** Set Posted.
+ @param Posted
+ Posting status
+ */
+ public void setPosted (boolean Posted)
+ {
+ set_Value (COLUMNNAME_Posted, Boolean.valueOf(Posted));
+ }
+
+ /** Get Posted.
+ @return Posting status
+ */
+ public boolean isPosted ()
+ {
+ Object oo = get_Value(COLUMNNAME_Posted);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Processed.
+ @param Processed
+ The document has been processed
+ */
+ public void setProcessed (boolean Processed)
+ {
+ set_ValueNoCheck (COLUMNNAME_Processed, Boolean.valueOf(Processed));
+ }
+
+ /** Get Processed.
+ @return The document has been processed
+ */
+ public boolean isProcessed ()
+ {
+ Object oo = get_Value(COLUMNNAME_Processed);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Process Now.
+ @param Processing Process Now */
+ public void setProcessing (boolean Processing)
+ {
+ set_Value (COLUMNNAME_Processing, Boolean.valueOf(Processing));
+ }
+
+ /** Get Process Now.
+ @return Process Now */
+ public boolean isProcessing ()
+ {
+ Object oo = get_Value(COLUMNNAME_Processing);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Referenced Invoice.
+ @param Ref_Invoice_ID Referenced Invoice */
+ public void setRef_Invoice_ID (int Ref_Invoice_ID)
+ {
+ if (Ref_Invoice_ID < 1)
+ set_Value (COLUMNNAME_Ref_Invoice_ID, null);
+ else
+ set_Value (COLUMNNAME_Ref_Invoice_ID, Integer.valueOf(Ref_Invoice_ID));
+ }
+
+ /** Get Referenced Invoice.
+ @return Referenced Invoice */
+ public int getRef_Invoice_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_Ref_Invoice_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** SalesRep_ID AD_Reference_ID=190 */
+ public static final int SALESREP_ID_AD_Reference_ID=190;
+ /** Set Sales Representative.
+ @param SalesRep_ID
+ Sales Representative or Company Agent
+ */
+ public void setSalesRep_ID (int SalesRep_ID)
+ {
+ if (SalesRep_ID < 1)
+ set_Value (COLUMNNAME_SalesRep_ID, null);
+ else
+ set_Value (COLUMNNAME_SalesRep_ID, Integer.valueOf(SalesRep_ID));
+ }
+
+ /** Get Sales Representative.
+ @return Sales Representative or Company Agent
+ */
+ public int getSalesRep_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_SalesRep_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set Send EMail.
+ @param SendEMail
+ Enable sending Document EMail
+ */
+ public void setSendEMail (boolean SendEMail)
+ {
+ set_Value (COLUMNNAME_SendEMail, Boolean.valueOf(SendEMail));
+ }
+
+ /** Get Send EMail.
+ @return Enable sending Document EMail
+ */
+ public boolean isSendEMail ()
+ {
+ Object oo = get_Value(COLUMNNAME_SendEMail);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Total Lines.
+ @param TotalLines
+ Total of all document lines
+ */
+ public void setTotalLines (BigDecimal TotalLines)
+ {
+ if (TotalLines == null)
+ throw new IllegalArgumentException ("TotalLines is mandatory.");
+ set_ValueNoCheck (COLUMNNAME_TotalLines, TotalLines);
+ }
+
+ /** Get Total Lines.
+ @return Total of all document lines
+ */
+ public BigDecimal getTotalLines ()
+ {
+ BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_TotalLines);
+ if (bd == null)
+ return Env.ZERO;
+ return bd;
+ }
+
+ /** User1_ID AD_Reference_ID=134 */
+ public static final int USER1_ID_AD_Reference_ID=134;
+ /** Set User List 1.
+ @param User1_ID
+ User defined list element #1
+ */
+ public void setUser1_ID (int User1_ID)
+ {
+ if (User1_ID < 1)
+ set_Value (COLUMNNAME_User1_ID, null);
+ else
+ set_Value (COLUMNNAME_User1_ID, Integer.valueOf(User1_ID));
+ }
+
+ /** Get User List 1.
+ @return User defined list element #1
+ */
+ public int getUser1_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_User1_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** User2_ID AD_Reference_ID=137 */
+ public static final int USER2_ID_AD_Reference_ID=137;
+ /** Set User List 2.
+ @param User2_ID
+ User defined list element #2
+ */
+ public void setUser2_ID (int User2_ID)
+ {
+ if (User2_ID < 1)
+ set_Value (COLUMNNAME_User2_ID, null);
+ else
+ set_Value (COLUMNNAME_User2_ID, Integer.valueOf(User2_ID));
+ }
+
+ /** Get User List 2.
+ @return User defined list element #2
+ */
+ public int getUser2_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_User2_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+}
\ No newline at end of file
diff --git a/posterita/posterita/src/main/org/compiere/model/X_C_Order.java b/posterita/posterita/src/main/org/compiere/model/X_C_Order.java
new file mode 100644
index 0000000000..c49bd4c9ac
--- /dev/null
+++ b/posterita/posterita/src/main/org/compiere/model/X_C_Order.java
@@ -0,0 +1,2117 @@
+/******************************************************************************
+ * Product: Adempiere ERP & CRM Smart Business Solution *
+ * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. *
+ * This program is free software; you can redistribute it and/or modify it *
+ * under the terms version 2 of the GNU General Public License as published *
+ * by the Free Software Foundation. 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, write to the Free Software Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
+ * For the text or an alternative of this public license, you may reach us *
+ * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
+ * or via info@compiere.org or http://www.compiere.org/license.html *
+ *****************************************************************************/
+/** Generated Model - DO NOT CHANGE */
+package org.compiere.model;
+
+import java.lang.reflect.Constructor;
+import java.math.BigDecimal;
+import java.sql.ResultSet;
+import java.sql.Timestamp;
+import java.util.Properties;
+import java.util.logging.Level;
+import org.compiere.util.Env;
+import org.compiere.util.KeyNamePair;
+
+/** Generated Model for C_Order
+ * @author Adempiere (generated)
+ * @version Release 3.4.0s - $Id$ */
+public class X_C_Order extends PO implements I_C_Order, I_Persistent
+{
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+
+ /** Standard Constructor */
+ public X_C_Order (Properties ctx, int C_Order_ID, String trxName)
+ {
+ super (ctx, C_Order_ID, trxName);
+ /** if (C_Order_ID == 0)
+ {
+ setC_BPartner_ID (0);
+ setC_BPartner_Location_ID (0);
+ setC_Currency_ID (0);
+// @C_Currency_ID@
+ setC_DocType_ID (0);
+// 0
+ setC_DocTypeTarget_ID (0);
+ setC_Order_ID (0);
+ setC_PaymentTerm_ID (0);
+ setDateAcct (new Timestamp(System.currentTimeMillis()));
+// @#Date@
+ setDateOrdered (new Timestamp(System.currentTimeMillis()));
+// @#Date@
+ setDatePromised (new Timestamp(System.currentTimeMillis()));
+// @#Date@
+ setDeliveryRule (null);
+// F
+ setDeliveryViaRule (null);
+// P
+ setDocAction (null);
+// CO
+ setDocStatus (null);
+// DR
+ setDocumentNo (null);
+ setFreightAmt (Env.ZERO);
+ setFreightCostRule (null);
+// I
+ setGrandTotal (Env.ZERO);
+ setInvoiceRule (null);
+// I
+ setIsApproved (false);
+// @IsApproved@
+ setIsCreditApproved (false);
+ setIsDelivered (false);
+ setIsDiscountPrinted (false);
+ setIsDropShip (false);
+// N
+ setIsInvoiced (false);
+ setIsPrinted (false);
+ setIsSelected (false);
+ setIsSelfService (false);
+ setIsSOTrx (false);
+// @IsSOTrx@
+ setIsTaxIncluded (false);
+ setIsTransferred (false);
+ setM_PriceList_ID (0);
+ setM_Warehouse_ID (0);
+ setPaymentRule (null);
+// B
+ setPosted (false);
+// N
+ setPriorityRule (null);
+// 5
+ setProcessed (false);
+ setSalesRep_ID (0);
+ setSendEMail (false);
+ setTotalLines (Env.ZERO);
+ } */
+ }
+
+ /** Load Constructor */
+ public X_C_Order (Properties ctx, ResultSet rs, String trxName)
+ {
+ super (ctx, rs, trxName);
+ }
+
+ /** AccessLevel
+ * @return 1 - Org
+ */
+ protected int get_AccessLevel()
+ {
+ return accessLevel.intValue();
+ }
+
+ /** Load Meta Data */
+ protected POInfo initPO (Properties ctx)
+ {
+ POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
+ return poi;
+ }
+
+ public String toString()
+ {
+ StringBuffer sb = new StringBuffer ("X_C_Order[")
+ .append(get_ID()).append("]");
+ return sb.toString();
+ }
+
+ /** AD_OrgTrx_ID AD_Reference_ID=130 */
+ public static final int AD_ORGTRX_ID_AD_Reference_ID=130;
+ /** Set Trx Organization.
+ @param AD_OrgTrx_ID
+ Performing or initiating organization
+ */
+ public void setAD_OrgTrx_ID (int AD_OrgTrx_ID)
+ {
+ if (AD_OrgTrx_ID < 1)
+ set_Value (COLUMNNAME_AD_OrgTrx_ID, null);
+ else
+ set_Value (COLUMNNAME_AD_OrgTrx_ID, Integer.valueOf(AD_OrgTrx_ID));
+ }
+
+ /** Get Trx Organization.
+ @return Performing or initiating organization
+ */
+ public int getAD_OrgTrx_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_AD_OrgTrx_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_AD_User getAD_User() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_AD_User.Table_Name);
+ I_AD_User result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_AD_User)constructor.newInstance(new Object[] {getCtx(), new Integer(getAD_User_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set User/Contact.
+ @param AD_User_ID
+ User within the system - Internal or Business Partner Contact
+ */
+ public void setAD_User_ID (int AD_User_ID)
+ {
+ if (AD_User_ID < 0)
+ set_Value (COLUMNNAME_AD_User_ID, null);
+ else
+ set_Value (COLUMNNAME_AD_User_ID, Integer.valueOf(AD_User_ID));
+ }
+
+ /** Get User/Contact.
+ @return User within the system - Internal or Business Partner Contact
+ */
+ public int getAD_User_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_AD_User_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set AmountRefunded.
+ @param AmountRefunded AmountRefunded */
+ public void setAmountRefunded (BigDecimal AmountRefunded)
+ {
+ set_Value (COLUMNNAME_AmountRefunded, AmountRefunded);
+ }
+
+ /** Get AmountRefunded.
+ @return AmountRefunded */
+ public BigDecimal getAmountRefunded ()
+ {
+ BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_AmountRefunded);
+ if (bd == null)
+ return Env.ZERO;
+ return bd;
+ }
+
+ /** Set AmountTendered.
+ @param AmountTendered AmountTendered */
+ public void setAmountTendered (BigDecimal AmountTendered)
+ {
+ set_Value (COLUMNNAME_AmountTendered, AmountTendered);
+ }
+
+ /** Get AmountTendered.
+ @return AmountTendered */
+ public BigDecimal getAmountTendered ()
+ {
+ BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_AmountTendered);
+ if (bd == null)
+ return Env.ZERO;
+ return bd;
+ }
+
+ /** Bill_BPartner_ID AD_Reference_ID=138 */
+ public static final int BILL_BPARTNER_ID_AD_Reference_ID=138;
+ /** Set Invoice Partner.
+ @param Bill_BPartner_ID
+ Business Partner to be invoiced
+ */
+ public void setBill_BPartner_ID (int Bill_BPartner_ID)
+ {
+ if (Bill_BPartner_ID < 1)
+ set_Value (COLUMNNAME_Bill_BPartner_ID, null);
+ else
+ set_Value (COLUMNNAME_Bill_BPartner_ID, Integer.valueOf(Bill_BPartner_ID));
+ }
+
+ /** Get Invoice Partner.
+ @return Business Partner to be invoiced
+ */
+ public int getBill_BPartner_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_Bill_BPartner_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Bill_Location_ID AD_Reference_ID=159 */
+ public static final int BILL_LOCATION_ID_AD_Reference_ID=159;
+ /** Set Invoice Location.
+ @param Bill_Location_ID
+ Business Partner Location for invoicing
+ */
+ public void setBill_Location_ID (int Bill_Location_ID)
+ {
+ if (Bill_Location_ID < 1)
+ set_Value (COLUMNNAME_Bill_Location_ID, null);
+ else
+ set_Value (COLUMNNAME_Bill_Location_ID, Integer.valueOf(Bill_Location_ID));
+ }
+
+ /** Get Invoice Location.
+ @return Business Partner Location for invoicing
+ */
+ public int getBill_Location_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_Bill_Location_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Bill_User_ID AD_Reference_ID=110 */
+ public static final int BILL_USER_ID_AD_Reference_ID=110;
+ /** Set Invoice Contact.
+ @param Bill_User_ID
+ Business Partner Contact for invoicing
+ */
+ public void setBill_User_ID (int Bill_User_ID)
+ {
+ if (Bill_User_ID < 1)
+ set_Value (COLUMNNAME_Bill_User_ID, null);
+ else
+ set_Value (COLUMNNAME_Bill_User_ID, Integer.valueOf(Bill_User_ID));
+ }
+
+ /** Get Invoice Contact.
+ @return Business Partner Contact for invoicing
+ */
+ public int getBill_User_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_Bill_User_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_C_Activity getC_Activity() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_Activity.Table_Name);
+ I_C_Activity result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_Activity)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Activity_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Activity.
+ @param C_Activity_ID
+ Business Activity
+ */
+ public void setC_Activity_ID (int C_Activity_ID)
+ {
+ if (C_Activity_ID < 1)
+ set_Value (COLUMNNAME_C_Activity_ID, null);
+ else
+ set_Value (COLUMNNAME_C_Activity_ID, Integer.valueOf(C_Activity_ID));
+ }
+
+ /** Get Activity.
+ @return Business Activity
+ */
+ public int getC_Activity_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_Activity_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_C_BPartner getC_BPartner() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_BPartner.Table_Name);
+ I_C_BPartner result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_BPartner)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_BPartner_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Business Partner .
+ @param C_BPartner_ID
+ Identifies a Business Partner
+ */
+ public void setC_BPartner_ID (int C_BPartner_ID)
+ {
+ if (C_BPartner_ID < 1)
+ throw new IllegalArgumentException ("C_BPartner_ID is mandatory.");
+ set_Value (COLUMNNAME_C_BPartner_ID, Integer.valueOf(C_BPartner_ID));
+ }
+
+ /** Get Business Partner .
+ @return Identifies a Business Partner
+ */
+ public int getC_BPartner_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_BPartner_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_C_BPartner_Location getC_BPartner_Location() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_BPartner_Location.Table_Name);
+ I_C_BPartner_Location result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_BPartner_Location)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_BPartner_Location_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Partner Location.
+ @param C_BPartner_Location_ID
+ Identifies the (ship to) address for this Business Partner
+ */
+ public void setC_BPartner_Location_ID (int C_BPartner_Location_ID)
+ {
+ if (C_BPartner_Location_ID < 1)
+ throw new IllegalArgumentException ("C_BPartner_Location_ID is mandatory.");
+ set_Value (COLUMNNAME_C_BPartner_Location_ID, Integer.valueOf(C_BPartner_Location_ID));
+ }
+
+ /** Get Partner Location.
+ @return Identifies the (ship to) address for this Business Partner
+ */
+ public int getC_BPartner_Location_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_BPartner_Location_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_C_Campaign getC_Campaign() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_Campaign.Table_Name);
+ I_C_Campaign result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_Campaign)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Campaign_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Campaign.
+ @param C_Campaign_ID
+ Marketing Campaign
+ */
+ public void setC_Campaign_ID (int C_Campaign_ID)
+ {
+ if (C_Campaign_ID < 1)
+ set_Value (COLUMNNAME_C_Campaign_ID, null);
+ else
+ set_Value (COLUMNNAME_C_Campaign_ID, Integer.valueOf(C_Campaign_ID));
+ }
+
+ /** Get Campaign.
+ @return Marketing Campaign
+ */
+ public int getC_Campaign_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_Campaign_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_C_CashLine getC_CashLine() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_CashLine.Table_Name);
+ I_C_CashLine result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_CashLine)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_CashLine_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Cash Journal Line.
+ @param C_CashLine_ID
+ Cash Journal Line
+ */
+ public void setC_CashLine_ID (int C_CashLine_ID)
+ {
+ if (C_CashLine_ID < 1)
+ set_Value (COLUMNNAME_C_CashLine_ID, null);
+ else
+ set_Value (COLUMNNAME_C_CashLine_ID, Integer.valueOf(C_CashLine_ID));
+ }
+
+ /** Get Cash Journal Line.
+ @return Cash Journal Line
+ */
+ public int getC_CashLine_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_CashLine_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** C_Charge_ID AD_Reference_ID=200 */
+ public static final int C_CHARGE_ID_AD_Reference_ID=200;
+ /** Set Charge.
+ @param C_Charge_ID
+ Additional document charges
+ */
+ public void setC_Charge_ID (int C_Charge_ID)
+ {
+ if (C_Charge_ID < 1)
+ set_Value (COLUMNNAME_C_Charge_ID, null);
+ else
+ set_Value (COLUMNNAME_C_Charge_ID, Integer.valueOf(C_Charge_ID));
+ }
+
+ /** Get Charge.
+ @return Additional document charges
+ */
+ public int getC_Charge_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_Charge_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_C_ConversionType getC_ConversionType() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_ConversionType.Table_Name);
+ I_C_ConversionType result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_ConversionType)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_ConversionType_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Currency Type.
+ @param C_ConversionType_ID
+ Currency Conversion Rate Type
+ */
+ public void setC_ConversionType_ID (int C_ConversionType_ID)
+ {
+ if (C_ConversionType_ID < 1)
+ set_Value (COLUMNNAME_C_ConversionType_ID, null);
+ else
+ set_Value (COLUMNNAME_C_ConversionType_ID, Integer.valueOf(C_ConversionType_ID));
+ }
+
+ /** Get Currency Type.
+ @return Currency Conversion Rate Type
+ */
+ public int getC_ConversionType_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_ConversionType_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_C_Currency getC_Currency() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_Currency.Table_Name);
+ I_C_Currency result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_Currency)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Currency_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Currency.
+ @param C_Currency_ID
+ The Currency for this record
+ */
+ public void setC_Currency_ID (int C_Currency_ID)
+ {
+ if (C_Currency_ID < 1)
+ throw new IllegalArgumentException ("C_Currency_ID is mandatory.");
+ set_ValueNoCheck (COLUMNNAME_C_Currency_ID, Integer.valueOf(C_Currency_ID));
+ }
+
+ /** Get Currency.
+ @return The Currency for this record
+ */
+ public int getC_Currency_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_Currency_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** C_DocType_ID AD_Reference_ID=170 */
+ public static final int C_DOCTYPE_ID_AD_Reference_ID=170;
+ public I_C_DocType getC_DocType() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_DocType.Table_Name);
+ I_C_DocType result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_DocType)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_DocType_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Document Type.
+ @param C_DocType_ID
+ Document type or rules
+ */
+ public void setC_DocType_ID (int C_DocType_ID)
+ {
+ if (C_DocType_ID < 0)
+ throw new IllegalArgumentException ("C_DocType_ID is mandatory.");
+ set_ValueNoCheck (COLUMNNAME_C_DocType_ID, Integer.valueOf(C_DocType_ID));
+ }
+
+ /** Get Document Type.
+ @return Document type or rules
+ */
+ public int getC_DocType_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_DocType_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** C_DocTypeTarget_ID AD_Reference_ID=170 */
+ public static final int C_DOCTYPETARGET_ID_AD_Reference_ID=170;
+ /** Set Target Document Type.
+ @param C_DocTypeTarget_ID
+ Target document type for conversing documents
+ */
+ public void setC_DocTypeTarget_ID (int C_DocTypeTarget_ID)
+ {
+ if (C_DocTypeTarget_ID < 1)
+ throw new IllegalArgumentException ("C_DocTypeTarget_ID is mandatory.");
+ set_Value (COLUMNNAME_C_DocTypeTarget_ID, Integer.valueOf(C_DocTypeTarget_ID));
+ }
+
+ /** Get Target Document Type.
+ @return Target document type for conversing documents
+ */
+ public int getC_DocTypeTarget_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_DocTypeTarget_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set Charge amount.
+ @param ChargeAmt
+ Charge Amount
+ */
+ public void setChargeAmt (BigDecimal ChargeAmt)
+ {
+ set_Value (COLUMNNAME_ChargeAmt, ChargeAmt);
+ }
+
+ /** Get Charge amount.
+ @return Charge Amount
+ */
+ public BigDecimal getChargeAmt ()
+ {
+ BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ChargeAmt);
+ if (bd == null)
+ return Env.ZERO;
+ return bd;
+ }
+
+ /** Set Copy From.
+ @param CopyFrom
+ Copy From Record
+ */
+ public void setCopyFrom (String CopyFrom)
+ {
+
+ if (CopyFrom != null && CopyFrom.length() > 1)
+ {
+ log.warning("Length > 1 - truncated");
+ CopyFrom = CopyFrom.substring(0, 1);
+ }
+ set_Value (COLUMNNAME_CopyFrom, CopyFrom);
+ }
+
+ /** Get Copy From.
+ @return Copy From Record
+ */
+ public String getCopyFrom ()
+ {
+ return (String)get_Value(COLUMNNAME_CopyFrom);
+ }
+
+ /** Set Order.
+ @param C_Order_ID
+ Order
+ */
+ public void setC_Order_ID (int C_Order_ID)
+ {
+ if (C_Order_ID < 1)
+ throw new IllegalArgumentException ("C_Order_ID is mandatory.");
+ set_ValueNoCheck (COLUMNNAME_C_Order_ID, Integer.valueOf(C_Order_ID));
+ }
+
+ /** Get Order.
+ @return Order
+ */
+ public int getC_Order_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_Order_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_C_Payment getC_Payment() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_Payment.Table_Name);
+ I_C_Payment result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_Payment)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Payment_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Payment.
+ @param C_Payment_ID
+ Payment identifier
+ */
+ public void setC_Payment_ID (int C_Payment_ID)
+ {
+ if (C_Payment_ID < 1)
+ set_Value (COLUMNNAME_C_Payment_ID, null);
+ else
+ set_Value (COLUMNNAME_C_Payment_ID, Integer.valueOf(C_Payment_ID));
+ }
+
+ /** Get Payment.
+ @return Payment identifier
+ */
+ public int getC_Payment_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_Payment_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_C_PaymentTerm getC_PaymentTerm() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_PaymentTerm.Table_Name);
+ I_C_PaymentTerm result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_PaymentTerm)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_PaymentTerm_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Payment Term.
+ @param C_PaymentTerm_ID
+ The terms of Payment (timing, discount)
+ */
+ public void setC_PaymentTerm_ID (int C_PaymentTerm_ID)
+ {
+ if (C_PaymentTerm_ID < 1)
+ throw new IllegalArgumentException ("C_PaymentTerm_ID is mandatory.");
+ set_Value (COLUMNNAME_C_PaymentTerm_ID, Integer.valueOf(C_PaymentTerm_ID));
+ }
+
+ /** Get Payment Term.
+ @return The terms of Payment (timing, discount)
+ */
+ public int getC_PaymentTerm_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_PaymentTerm_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_C_POS getC_POS() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_POS.Table_Name);
+ I_C_POS result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_POS)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_POS_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set POS Terminal.
+ @param C_POS_ID
+ Point of Sales Terminal
+ */
+ public void setC_POS_ID (int C_POS_ID)
+ {
+ if (C_POS_ID < 1)
+ set_Value (COLUMNNAME_C_POS_ID, null);
+ else
+ set_Value (COLUMNNAME_C_POS_ID, Integer.valueOf(C_POS_ID));
+ }
+
+ /** Get POS Terminal.
+ @return Point of Sales Terminal
+ */
+ public int getC_POS_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_POS_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_C_Project getC_Project() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_Project.Table_Name);
+ I_C_Project result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_Project)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Project_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Project.
+ @param C_Project_ID
+ Financial Project
+ */
+ public void setC_Project_ID (int C_Project_ID)
+ {
+ if (C_Project_ID < 1)
+ set_Value (COLUMNNAME_C_Project_ID, null);
+ else
+ set_Value (COLUMNNAME_C_Project_ID, Integer.valueOf(C_Project_ID));
+ }
+
+ /** Get Project.
+ @return Financial Project
+ */
+ public int getC_Project_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_Project_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set Account Date.
+ @param DateAcct
+ Accounting Date
+ */
+ public void setDateAcct (Timestamp DateAcct)
+ {
+ if (DateAcct == null)
+ throw new IllegalArgumentException ("DateAcct is mandatory.");
+ set_Value (COLUMNNAME_DateAcct, DateAcct);
+ }
+
+ /** Get Account Date.
+ @return Accounting Date
+ */
+ public Timestamp getDateAcct ()
+ {
+ return (Timestamp)get_Value(COLUMNNAME_DateAcct);
+ }
+
+ /** Set Date Ordered.
+ @param DateOrdered
+ Date of Order
+ */
+ public void setDateOrdered (Timestamp DateOrdered)
+ {
+ if (DateOrdered == null)
+ throw new IllegalArgumentException ("DateOrdered is mandatory.");
+ set_Value (COLUMNNAME_DateOrdered, DateOrdered);
+ }
+
+ /** Get Date Ordered.
+ @return Date of Order
+ */
+ public Timestamp getDateOrdered ()
+ {
+ return (Timestamp)get_Value(COLUMNNAME_DateOrdered);
+ }
+
+ /** Set Date printed.
+ @param DatePrinted
+ Date the document was printed.
+ */
+ public void setDatePrinted (Timestamp DatePrinted)
+ {
+ set_Value (COLUMNNAME_DatePrinted, DatePrinted);
+ }
+
+ /** Get Date printed.
+ @return Date the document was printed.
+ */
+ public Timestamp getDatePrinted ()
+ {
+ return (Timestamp)get_Value(COLUMNNAME_DatePrinted);
+ }
+
+ /** Set Date Promised.
+ @param DatePromised
+ Date Order was promised
+ */
+ public void setDatePromised (Timestamp DatePromised)
+ {
+ if (DatePromised == null)
+ throw new IllegalArgumentException ("DatePromised is mandatory.");
+ set_Value (COLUMNNAME_DatePromised, DatePromised);
+ }
+
+ /** Get Date Promised.
+ @return Date Order was promised
+ */
+ public Timestamp getDatePromised ()
+ {
+ return (Timestamp)get_Value(COLUMNNAME_DatePromised);
+ }
+
+ /** DeliveryRule AD_Reference_ID=151 */
+ public static final int DELIVERYRULE_AD_Reference_ID=151;
+ /** After Receipt = R */
+ public static final String DELIVERYRULE_AfterReceipt = "R";
+ /** Availability = A */
+ public static final String DELIVERYRULE_Availability = "A";
+ /** Complete Line = L */
+ public static final String DELIVERYRULE_CompleteLine = "L";
+ /** Complete Order = O */
+ public static final String DELIVERYRULE_CompleteOrder = "O";
+ /** Force = F */
+ public static final String DELIVERYRULE_Force = "F";
+ /** Manual = M */
+ public static final String DELIVERYRULE_Manual = "M";
+ /** Set Delivery Rule.
+ @param DeliveryRule
+ Defines the timing of Delivery
+ */
+ public void setDeliveryRule (String DeliveryRule)
+ {
+ if (DeliveryRule == null) throw new IllegalArgumentException ("DeliveryRule is mandatory");
+ if (DeliveryRule.equals("R") || DeliveryRule.equals("A") || DeliveryRule.equals("L") || DeliveryRule.equals("O") || DeliveryRule.equals("F") || DeliveryRule.equals("M")); else throw new IllegalArgumentException ("DeliveryRule Invalid value - " + DeliveryRule + " - Reference_ID=151 - R - A - L - O - F - M");
+ if (DeliveryRule.length() > 1)
+ {
+ log.warning("Length > 1 - truncated");
+ DeliveryRule = DeliveryRule.substring(0, 1);
+ }
+ set_Value (COLUMNNAME_DeliveryRule, DeliveryRule);
+ }
+
+ /** Get Delivery Rule.
+ @return Defines the timing of Delivery
+ */
+ public String getDeliveryRule ()
+ {
+ return (String)get_Value(COLUMNNAME_DeliveryRule);
+ }
+
+ /** DeliveryViaRule AD_Reference_ID=152 */
+ public static final int DELIVERYVIARULE_AD_Reference_ID=152;
+ /** Pickup = P */
+ public static final String DELIVERYVIARULE_Pickup = "P";
+ /** Delivery = D */
+ public static final String DELIVERYVIARULE_Delivery = "D";
+ /** Shipper = S */
+ public static final String DELIVERYVIARULE_Shipper = "S";
+ /** Set Delivery Via.
+ @param DeliveryViaRule
+ How the order will be delivered
+ */
+ public void setDeliveryViaRule (String DeliveryViaRule)
+ {
+ if (DeliveryViaRule == null) throw new IllegalArgumentException ("DeliveryViaRule is mandatory");
+ if (DeliveryViaRule.equals("P") || DeliveryViaRule.equals("D") || DeliveryViaRule.equals("S")); else throw new IllegalArgumentException ("DeliveryViaRule Invalid value - " + DeliveryViaRule + " - Reference_ID=152 - P - D - S");
+ if (DeliveryViaRule.length() > 1)
+ {
+ log.warning("Length > 1 - truncated");
+ DeliveryViaRule = DeliveryViaRule.substring(0, 1);
+ }
+ set_Value (COLUMNNAME_DeliveryViaRule, DeliveryViaRule);
+ }
+
+ /** Get Delivery Via.
+ @return How the order will be delivered
+ */
+ public String getDeliveryViaRule ()
+ {
+ return (String)get_Value(COLUMNNAME_DeliveryViaRule);
+ }
+
+ /** Set Description.
+ @param Description
+ Optional short description of the record
+ */
+ public void setDescription (String Description)
+ {
+
+ if (Description != null && Description.length() > 255)
+ {
+ log.warning("Length > 255 - truncated");
+ Description = Description.substring(0, 255);
+ }
+ set_Value (COLUMNNAME_Description, Description);
+ }
+
+ /** Get Description.
+ @return Optional short description of the record
+ */
+ public String getDescription ()
+ {
+ return (String)get_Value(COLUMNNAME_Description);
+ }
+
+ /** DocAction AD_Reference_ID=135 */
+ public static final int DOCACTION_AD_Reference_ID=135;
+ /** Complete = CO */
+ public static final String DOCACTION_Complete = "CO";
+ /** Approve = AP */
+ public static final String DOCACTION_Approve = "AP";
+ /** Reject = RJ */
+ public static final String DOCACTION_Reject = "RJ";
+ /** Post = PO */
+ public static final String DOCACTION_Post = "PO";
+ /** Void = VO */
+ public static final String DOCACTION_Void = "VO";
+ /** Close = CL */
+ public static final String DOCACTION_Close = "CL";
+ /** Reverse - Correct = RC */
+ public static final String DOCACTION_Reverse_Correct = "RC";
+ /** Reverse - Accrual = RA */
+ public static final String DOCACTION_Reverse_Accrual = "RA";
+ /** Invalidate = IN */
+ public static final String DOCACTION_Invalidate = "IN";
+ /** Re-activate = RE */
+ public static final String DOCACTION_Re_Activate = "RE";
+ /** = -- */
+ public static final String DOCACTION_None = "--";
+ /** Prepare = PR */
+ public static final String DOCACTION_Prepare = "PR";
+ /** Unlock = XL */
+ public static final String DOCACTION_Unlock = "XL";
+ /** Wait Complete = WC */
+ public static final String DOCACTION_WaitComplete = "WC";
+ /** Set Document Action.
+ @param DocAction
+ The targeted status of the document
+ */
+ public void setDocAction (String DocAction)
+ {
+ if (DocAction == null) throw new IllegalArgumentException ("DocAction is mandatory");
+ if (DocAction.equals("CO") || DocAction.equals("AP") || DocAction.equals("RJ") || DocAction.equals("PO") || DocAction.equals("VO") || DocAction.equals("CL") || DocAction.equals("RC") || DocAction.equals("RA") || DocAction.equals("IN") || DocAction.equals("RE") || DocAction.equals("--") || DocAction.equals("PR") || DocAction.equals("XL") || DocAction.equals("WC")); else throw new IllegalArgumentException ("DocAction Invalid value - " + DocAction + " - Reference_ID=135 - CO - AP - RJ - PO - VO - CL - RC - RA - IN - RE - -- - PR - XL - WC");
+ if (DocAction.length() > 2)
+ {
+ log.warning("Length > 2 - truncated");
+ DocAction = DocAction.substring(0, 2);
+ }
+ set_Value (COLUMNNAME_DocAction, DocAction);
+ }
+
+ /** Get Document Action.
+ @return The targeted status of the document
+ */
+ public String getDocAction ()
+ {
+ return (String)get_Value(COLUMNNAME_DocAction);
+ }
+
+ /** DocStatus AD_Reference_ID=131 */
+ public static final int DOCSTATUS_AD_Reference_ID=131;
+ /** Drafted = DR */
+ public static final String DOCSTATUS_Drafted = "DR";
+ /** Completed = CO */
+ public static final String DOCSTATUS_Completed = "CO";
+ /** Approved = AP */
+ public static final String DOCSTATUS_Approved = "AP";
+ /** Not Approved = NA */
+ public static final String DOCSTATUS_NotApproved = "NA";
+ /** Voided = VO */
+ public static final String DOCSTATUS_Voided = "VO";
+ /** Invalid = IN */
+ public static final String DOCSTATUS_Invalid = "IN";
+ /** Reversed = RE */
+ public static final String DOCSTATUS_Reversed = "RE";
+ /** Closed = CL */
+ public static final String DOCSTATUS_Closed = "CL";
+ /** Unknown = ?? */
+ public static final String DOCSTATUS_Unknown = "??";
+ /** In Progress = IP */
+ public static final String DOCSTATUS_InProgress = "IP";
+ /** Waiting Payment = WP */
+ public static final String DOCSTATUS_WaitingPayment = "WP";
+ /** Waiting Confirmation = WC */
+ public static final String DOCSTATUS_WaitingConfirmation = "WC";
+ /** Set Document Status.
+ @param DocStatus
+ The current status of the document
+ */
+ public void setDocStatus (String DocStatus)
+ {
+ if (DocStatus == null) throw new IllegalArgumentException ("DocStatus is mandatory");
+ if (DocStatus.equals("DR") || DocStatus.equals("CO") || DocStatus.equals("AP") || DocStatus.equals("NA") || DocStatus.equals("VO") || DocStatus.equals("IN") || DocStatus.equals("RE") || DocStatus.equals("CL") || DocStatus.equals("??") || DocStatus.equals("IP") || DocStatus.equals("WP") || DocStatus.equals("WC")); else throw new IllegalArgumentException ("DocStatus Invalid value - " + DocStatus + " - Reference_ID=131 - DR - CO - AP - NA - VO - IN - RE - CL - ?? - IP - WP - WC");
+ if (DocStatus.length() > 2)
+ {
+ log.warning("Length > 2 - truncated");
+ DocStatus = DocStatus.substring(0, 2);
+ }
+ set_Value (COLUMNNAME_DocStatus, DocStatus);
+ }
+
+ /** Get Document Status.
+ @return The current status of the document
+ */
+ public String getDocStatus ()
+ {
+ return (String)get_Value(COLUMNNAME_DocStatus);
+ }
+
+ /** Set Document No.
+ @param DocumentNo
+ Document sequence number of the document
+ */
+ public void setDocumentNo (String DocumentNo)
+ {
+ if (DocumentNo == null)
+ throw new IllegalArgumentException ("DocumentNo is mandatory.");
+
+ if (DocumentNo.length() > 30)
+ {
+ log.warning("Length > 30 - truncated");
+ DocumentNo = DocumentNo.substring(0, 30);
+ }
+ set_ValueNoCheck (COLUMNNAME_DocumentNo, DocumentNo);
+ }
+
+ /** Get Document No.
+ @return Document sequence number of the document
+ */
+ public String getDocumentNo ()
+ {
+ return (String)get_Value(COLUMNNAME_DocumentNo);
+ }
+
+ /** Get Record ID/ColumnName
+ @return ID/ColumnName pair
+ */
+ public KeyNamePair getKeyNamePair()
+ {
+ return new KeyNamePair(get_ID(), getDocumentNo());
+ }
+
+ /** Set Freight Amount.
+ @param FreightAmt
+ Freight Amount
+ */
+ public void setFreightAmt (BigDecimal FreightAmt)
+ {
+ if (FreightAmt == null)
+ throw new IllegalArgumentException ("FreightAmt is mandatory.");
+ set_Value (COLUMNNAME_FreightAmt, FreightAmt);
+ }
+
+ /** Get Freight Amount.
+ @return Freight Amount
+ */
+ public BigDecimal getFreightAmt ()
+ {
+ BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_FreightAmt);
+ if (bd == null)
+ return Env.ZERO;
+ return bd;
+ }
+
+ /** FreightCostRule AD_Reference_ID=153 */
+ public static final int FREIGHTCOSTRULE_AD_Reference_ID=153;
+ /** Freight included = I */
+ public static final String FREIGHTCOSTRULE_FreightIncluded = "I";
+ /** Fix price = F */
+ public static final String FREIGHTCOSTRULE_FixPrice = "F";
+ /** Calculated = C */
+ public static final String FREIGHTCOSTRULE_Calculated = "C";
+ /** Line = L */
+ public static final String FREIGHTCOSTRULE_Line = "L";
+ /** Set Freight Cost Rule.
+ @param FreightCostRule
+ Method for charging Freight
+ */
+ public void setFreightCostRule (String FreightCostRule)
+ {
+ if (FreightCostRule == null) throw new IllegalArgumentException ("FreightCostRule is mandatory");
+ if (FreightCostRule.equals("I") || FreightCostRule.equals("F") || FreightCostRule.equals("C") || FreightCostRule.equals("L")); else throw new IllegalArgumentException ("FreightCostRule Invalid value - " + FreightCostRule + " - Reference_ID=153 - I - F - C - L");
+ if (FreightCostRule.length() > 1)
+ {
+ log.warning("Length > 1 - truncated");
+ FreightCostRule = FreightCostRule.substring(0, 1);
+ }
+ set_Value (COLUMNNAME_FreightCostRule, FreightCostRule);
+ }
+
+ /** Get Freight Cost Rule.
+ @return Method for charging Freight
+ */
+ public String getFreightCostRule ()
+ {
+ return (String)get_Value(COLUMNNAME_FreightCostRule);
+ }
+
+ /** Set Grand Total.
+ @param GrandTotal
+ Total amount of document
+ */
+ public void setGrandTotal (BigDecimal GrandTotal)
+ {
+ if (GrandTotal == null)
+ throw new IllegalArgumentException ("GrandTotal is mandatory.");
+ set_ValueNoCheck (COLUMNNAME_GrandTotal, GrandTotal);
+ }
+
+ /** Get Grand Total.
+ @return Total amount of document
+ */
+ public BigDecimal getGrandTotal ()
+ {
+ BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_GrandTotal);
+ if (bd == null)
+ return Env.ZERO;
+ return bd;
+ }
+
+ /** InvoiceRule AD_Reference_ID=150 */
+ public static final int INVOICERULE_AD_Reference_ID=150;
+ /** After Order delivered = O */
+ public static final String INVOICERULE_AfterOrderDelivered = "O";
+ /** After Delivery = D */
+ public static final String INVOICERULE_AfterDelivery = "D";
+ /** Customer Schedule after Delivery = S */
+ public static final String INVOICERULE_CustomerScheduleAfterDelivery = "S";
+ /** Immediate = I */
+ public static final String INVOICERULE_Immediate = "I";
+ /** Set Invoice Rule.
+ @param InvoiceRule
+ Frequency and method of invoicing
+ */
+ public void setInvoiceRule (String InvoiceRule)
+ {
+ if (InvoiceRule == null) throw new IllegalArgumentException ("InvoiceRule is mandatory");
+ if (InvoiceRule.equals("O") || InvoiceRule.equals("D") || InvoiceRule.equals("S") || InvoiceRule.equals("I")); else throw new IllegalArgumentException ("InvoiceRule Invalid value - " + InvoiceRule + " - Reference_ID=150 - O - D - S - I");
+ if (InvoiceRule.length() > 1)
+ {
+ log.warning("Length > 1 - truncated");
+ InvoiceRule = InvoiceRule.substring(0, 1);
+ }
+ set_Value (COLUMNNAME_InvoiceRule, InvoiceRule);
+ }
+
+ /** Get Invoice Rule.
+ @return Frequency and method of invoicing
+ */
+ public String getInvoiceRule ()
+ {
+ return (String)get_Value(COLUMNNAME_InvoiceRule);
+ }
+
+ /** Set Approved.
+ @param IsApproved
+ Indicates if this document requires approval
+ */
+ public void setIsApproved (boolean IsApproved)
+ {
+ set_ValueNoCheck (COLUMNNAME_IsApproved, Boolean.valueOf(IsApproved));
+ }
+
+ /** Get Approved.
+ @return Indicates if this document requires approval
+ */
+ public boolean isApproved ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsApproved);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Credit Approved.
+ @param IsCreditApproved
+ Credit has been approved
+ */
+ public void setIsCreditApproved (boolean IsCreditApproved)
+ {
+ set_ValueNoCheck (COLUMNNAME_IsCreditApproved, Boolean.valueOf(IsCreditApproved));
+ }
+
+ /** Get Credit Approved.
+ @return Credit has been approved
+ */
+ public boolean isCreditApproved ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsCreditApproved);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Delivered.
+ @param IsDelivered Delivered */
+ public void setIsDelivered (boolean IsDelivered)
+ {
+ set_ValueNoCheck (COLUMNNAME_IsDelivered, Boolean.valueOf(IsDelivered));
+ }
+
+ /** Get Delivered.
+ @return Delivered */
+ public boolean isDelivered ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsDelivered);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Discount Printed.
+ @param IsDiscountPrinted
+ Print Discount on Invoice and Order
+ */
+ public void setIsDiscountPrinted (boolean IsDiscountPrinted)
+ {
+ set_Value (COLUMNNAME_IsDiscountPrinted, Boolean.valueOf(IsDiscountPrinted));
+ }
+
+ /** Get Discount Printed.
+ @return Print Discount on Invoice and Order
+ */
+ public boolean isDiscountPrinted ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsDiscountPrinted);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Drop Shipment.
+ @param IsDropShip
+ Drop Shipments are sent from the Vendor directly to the Customer
+ */
+ public void setIsDropShip (boolean IsDropShip)
+ {
+ set_ValueNoCheck (COLUMNNAME_IsDropShip, Boolean.valueOf(IsDropShip));
+ }
+
+ /** Get Drop Shipment.
+ @return Drop Shipments are sent from the Vendor directly to the Customer
+ */
+ public boolean isDropShip ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsDropShip);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Invoiced.
+ @param IsInvoiced
+ Is this invoiced?
+ */
+ public void setIsInvoiced (boolean IsInvoiced)
+ {
+ set_ValueNoCheck (COLUMNNAME_IsInvoiced, Boolean.valueOf(IsInvoiced));
+ }
+
+ /** Get Invoiced.
+ @return Is this invoiced?
+ */
+ public boolean isInvoiced ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsInvoiced);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Printed.
+ @param IsPrinted
+ Indicates if this document / line is printed
+ */
+ public void setIsPrinted (boolean IsPrinted)
+ {
+ set_ValueNoCheck (COLUMNNAME_IsPrinted, Boolean.valueOf(IsPrinted));
+ }
+
+ /** Get Printed.
+ @return Indicates if this document / line is printed
+ */
+ public boolean isPrinted ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsPrinted);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Selected.
+ @param IsSelected Selected */
+ public void setIsSelected (boolean IsSelected)
+ {
+ set_Value (COLUMNNAME_IsSelected, Boolean.valueOf(IsSelected));
+ }
+
+ /** Get Selected.
+ @return Selected */
+ public boolean isSelected ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsSelected);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Self-Service.
+ @param IsSelfService
+ This is a Self-Service entry or this entry can be changed via Self-Service
+ */
+ public void setIsSelfService (boolean IsSelfService)
+ {
+ set_Value (COLUMNNAME_IsSelfService, Boolean.valueOf(IsSelfService));
+ }
+
+ /** Get Self-Service.
+ @return This is a Self-Service entry or this entry can be changed via Self-Service
+ */
+ public boolean isSelfService ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsSelfService);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Sales Transaction.
+ @param IsSOTrx
+ This is a Sales Transaction
+ */
+ public void setIsSOTrx (boolean IsSOTrx)
+ {
+ set_Value (COLUMNNAME_IsSOTrx, Boolean.valueOf(IsSOTrx));
+ }
+
+ /** Get Sales Transaction.
+ @return This is a Sales Transaction
+ */
+ public boolean isSOTrx ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsSOTrx);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Price includes Tax.
+ @param IsTaxIncluded
+ Tax is included in the price
+ */
+ public void setIsTaxIncluded (boolean IsTaxIncluded)
+ {
+ set_Value (COLUMNNAME_IsTaxIncluded, Boolean.valueOf(IsTaxIncluded));
+ }
+
+ /** Get Price includes Tax.
+ @return Tax is included in the price
+ */
+ public boolean isTaxIncluded ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsTaxIncluded);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Transferred.
+ @param IsTransferred
+ Transferred to General Ledger (i.e. accounted)
+ */
+ public void setIsTransferred (boolean IsTransferred)
+ {
+ set_ValueNoCheck (COLUMNNAME_IsTransferred, Boolean.valueOf(IsTransferred));
+ }
+
+ /** Get Transferred.
+ @return Transferred to General Ledger (i.e. accounted)
+ */
+ public boolean isTransferred ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsTransferred);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ public I_M_PriceList getM_PriceList() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_M_PriceList.Table_Name);
+ I_M_PriceList result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_M_PriceList)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_PriceList_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Price List.
+ @param M_PriceList_ID
+ Unique identifier of a Price List
+ */
+ public void setM_PriceList_ID (int M_PriceList_ID)
+ {
+ if (M_PriceList_ID < 1)
+ throw new IllegalArgumentException ("M_PriceList_ID is mandatory.");
+ set_Value (COLUMNNAME_M_PriceList_ID, Integer.valueOf(M_PriceList_ID));
+ }
+
+ /** Get Price List.
+ @return Unique identifier of a Price List
+ */
+ public int getM_PriceList_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_M_PriceList_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_M_Shipper getM_Shipper() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_M_Shipper.Table_Name);
+ I_M_Shipper result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_M_Shipper)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_Shipper_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Shipper.
+ @param M_Shipper_ID
+ Method or manner of product delivery
+ */
+ public void setM_Shipper_ID (int M_Shipper_ID)
+ {
+ if (M_Shipper_ID < 1)
+ set_Value (COLUMNNAME_M_Shipper_ID, null);
+ else
+ set_Value (COLUMNNAME_M_Shipper_ID, Integer.valueOf(M_Shipper_ID));
+ }
+
+ /** Get Shipper.
+ @return Method or manner of product delivery
+ */
+ public int getM_Shipper_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_M_Shipper_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_M_Warehouse getM_Warehouse() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_M_Warehouse.Table_Name);
+ I_M_Warehouse result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_M_Warehouse)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_Warehouse_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Warehouse.
+ @param M_Warehouse_ID
+ Storage Warehouse and Service Point
+ */
+ public void setM_Warehouse_ID (int M_Warehouse_ID)
+ {
+ if (M_Warehouse_ID < 1)
+ throw new IllegalArgumentException ("M_Warehouse_ID is mandatory.");
+ set_Value (COLUMNNAME_M_Warehouse_ID, Integer.valueOf(M_Warehouse_ID));
+ }
+
+ /** Get Warehouse.
+ @return Storage Warehouse and Service Point
+ */
+ public int getM_Warehouse_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_M_Warehouse_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set OrderType.
+ @param OrderType OrderType */
+ public void setOrderType (String OrderType)
+ {
+
+ if (OrderType != null && OrderType.length() > 510)
+ {
+ log.warning("Length > 510 - truncated");
+ OrderType = OrderType.substring(0, 510);
+ }
+ set_Value (COLUMNNAME_OrderType, OrderType);
+ }
+
+ /** Get OrderType.
+ @return OrderType */
+ public String getOrderType ()
+ {
+ return (String)get_Value(COLUMNNAME_OrderType);
+ }
+
+ /** Set Payment BPartner.
+ @param Pay_BPartner_ID
+ Business Partner responsible for the payment
+ */
+ public void setPay_BPartner_ID (int Pay_BPartner_ID)
+ {
+ if (Pay_BPartner_ID < 1)
+ set_Value (COLUMNNAME_Pay_BPartner_ID, null);
+ else
+ set_Value (COLUMNNAME_Pay_BPartner_ID, Integer.valueOf(Pay_BPartner_ID));
+ }
+
+ /** Get Payment BPartner.
+ @return Business Partner responsible for the payment
+ */
+ public int getPay_BPartner_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_Pay_BPartner_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set Payment Location.
+ @param Pay_Location_ID
+ Location of the Business Partner responsible for the payment
+ */
+ public void setPay_Location_ID (int Pay_Location_ID)
+ {
+ if (Pay_Location_ID < 1)
+ set_Value (COLUMNNAME_Pay_Location_ID, null);
+ else
+ set_Value (COLUMNNAME_Pay_Location_ID, Integer.valueOf(Pay_Location_ID));
+ }
+
+ /** Get Payment Location.
+ @return Location of the Business Partner responsible for the payment
+ */
+ public int getPay_Location_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_Pay_Location_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** PaymentRule AD_Reference_ID=195 */
+ public static final int PAYMENTRULE_AD_Reference_ID=195;
+ /** Cash = B */
+ public static final String PAYMENTRULE_Cash = "B";
+ /** Credit Card = K */
+ public static final String PAYMENTRULE_CreditCard = "K";
+ /** Direct Deposit = T */
+ public static final String PAYMENTRULE_DirectDeposit = "T";
+ /** Check = S */
+ public static final String PAYMENTRULE_Check = "S";
+ /** On Credit = P */
+ public static final String PAYMENTRULE_OnCredit = "P";
+ /** Direct Debit = D */
+ public static final String PAYMENTRULE_DirectDebit = "D";
+ /** Mixed = M */
+ public static final String PAYMENTRULE_Mixed = "M";
+ /** Set Payment Rule.
+ @param PaymentRule
+ How you pay the invoice
+ */
+ public void setPaymentRule (String PaymentRule)
+ {
+ if (PaymentRule == null) throw new IllegalArgumentException ("PaymentRule is mandatory");
+ if (PaymentRule.equals("B") || PaymentRule.equals("K") || PaymentRule.equals("T") || PaymentRule.equals("S") || PaymentRule.equals("P") || PaymentRule.equals("D") || PaymentRule.equals("M")); else throw new IllegalArgumentException ("PaymentRule Invalid value - " + PaymentRule + " - Reference_ID=195 - B - K - T - S - P - D - M");
+ if (PaymentRule.length() > 1)
+ {
+ log.warning("Length > 1 - truncated");
+ PaymentRule = PaymentRule.substring(0, 1);
+ }
+ set_Value (COLUMNNAME_PaymentRule, PaymentRule);
+ }
+
+ /** Get Payment Rule.
+ @return How you pay the invoice
+ */
+ public String getPaymentRule ()
+ {
+ return (String)get_Value(COLUMNNAME_PaymentRule);
+ }
+
+ /** Set Order Reference.
+ @param POReference
+ Transaction Reference Number (Sales Order, Purchase Order) of your Business Partner
+ */
+ public void setPOReference (String POReference)
+ {
+
+ if (POReference != null && POReference.length() > 20)
+ {
+ log.warning("Length > 20 - truncated");
+ POReference = POReference.substring(0, 20);
+ }
+ set_Value (COLUMNNAME_POReference, POReference);
+ }
+
+ /** Get Order Reference.
+ @return Transaction Reference Number (Sales Order, Purchase Order) of your Business Partner
+ */
+ public String getPOReference ()
+ {
+ return (String)get_Value(COLUMNNAME_POReference);
+ }
+
+ /** Set Posted.
+ @param Posted
+ Posting status
+ */
+ public void setPosted (boolean Posted)
+ {
+ set_Value (COLUMNNAME_Posted, Boolean.valueOf(Posted));
+ }
+
+ /** Get Posted.
+ @return Posting status
+ */
+ public boolean isPosted ()
+ {
+ Object oo = get_Value(COLUMNNAME_Posted);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** PriorityRule AD_Reference_ID=154 */
+ public static final int PRIORITYRULE_AD_Reference_ID=154;
+ /** High = 3 */
+ public static final String PRIORITYRULE_High = "3";
+ /** Medium = 5 */
+ public static final String PRIORITYRULE_Medium = "5";
+ /** Low = 7 */
+ public static final String PRIORITYRULE_Low = "7";
+ /** Urgent = 1 */
+ public static final String PRIORITYRULE_Urgent = "1";
+ /** Minor = 9 */
+ public static final String PRIORITYRULE_Minor = "9";
+ /** Set Priority.
+ @param PriorityRule
+ Priority of a document
+ */
+ public void setPriorityRule (String PriorityRule)
+ {
+ if (PriorityRule == null) throw new IllegalArgumentException ("PriorityRule is mandatory");
+ if (PriorityRule.equals("3") || PriorityRule.equals("5") || PriorityRule.equals("7") || PriorityRule.equals("1") || PriorityRule.equals("9")); else throw new IllegalArgumentException ("PriorityRule Invalid value - " + PriorityRule + " - Reference_ID=154 - 3 - 5 - 7 - 1 - 9");
+ if (PriorityRule.length() > 1)
+ {
+ log.warning("Length > 1 - truncated");
+ PriorityRule = PriorityRule.substring(0, 1);
+ }
+ set_Value (COLUMNNAME_PriorityRule, PriorityRule);
+ }
+
+ /** Get Priority.
+ @return Priority of a document
+ */
+ public String getPriorityRule ()
+ {
+ return (String)get_Value(COLUMNNAME_PriorityRule);
+ }
+
+ /** Set Processed.
+ @param Processed
+ The document has been processed
+ */
+ public void setProcessed (boolean Processed)
+ {
+ set_ValueNoCheck (COLUMNNAME_Processed, Boolean.valueOf(Processed));
+ }
+
+ /** Get Processed.
+ @return The document has been processed
+ */
+ public boolean isProcessed ()
+ {
+ Object oo = get_Value(COLUMNNAME_Processed);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Process Now.
+ @param Processing Process Now */
+ public void setProcessing (boolean Processing)
+ {
+ set_Value (COLUMNNAME_Processing, Boolean.valueOf(Processing));
+ }
+
+ /** Get Process Now.
+ @return Process Now */
+ public boolean isProcessing ()
+ {
+ Object oo = get_Value(COLUMNNAME_Processing);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Ref_Order_ID AD_Reference_ID=290 */
+ public static final int REF_ORDER_ID_AD_Reference_ID=290;
+ /** Set Referenced Order.
+ @param Ref_Order_ID
+ Reference to corresponding Sales/Purchase Order
+ */
+ public void setRef_Order_ID (int Ref_Order_ID)
+ {
+ if (Ref_Order_ID < 1)
+ set_Value (COLUMNNAME_Ref_Order_ID, null);
+ else
+ set_Value (COLUMNNAME_Ref_Order_ID, Integer.valueOf(Ref_Order_ID));
+ }
+
+ /** Get Referenced Order.
+ @return Reference to corresponding Sales/Purchase Order
+ */
+ public int getRef_Order_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_Ref_Order_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** SalesRep_ID AD_Reference_ID=190 */
+ public static final int SALESREP_ID_AD_Reference_ID=190;
+ /** Set Sales Representative.
+ @param SalesRep_ID
+ Sales Representative or Company Agent
+ */
+ public void setSalesRep_ID (int SalesRep_ID)
+ {
+ if (SalesRep_ID < 1)
+ throw new IllegalArgumentException ("SalesRep_ID is mandatory.");
+ set_Value (COLUMNNAME_SalesRep_ID, Integer.valueOf(SalesRep_ID));
+ }
+
+ /** Get Sales Representative.
+ @return Sales Representative or Company Agent
+ */
+ public int getSalesRep_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_SalesRep_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set Send EMail.
+ @param SendEMail
+ Enable sending Document EMail
+ */
+ public void setSendEMail (boolean SendEMail)
+ {
+ set_Value (COLUMNNAME_SendEMail, Boolean.valueOf(SendEMail));
+ }
+
+ /** Get Send EMail.
+ @return Enable sending Document EMail
+ */
+ public boolean isSendEMail ()
+ {
+ Object oo = get_Value(COLUMNNAME_SendEMail);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Total Lines.
+ @param TotalLines
+ Total of all document lines
+ */
+ public void setTotalLines (BigDecimal TotalLines)
+ {
+ if (TotalLines == null)
+ throw new IllegalArgumentException ("TotalLines is mandatory.");
+ set_ValueNoCheck (COLUMNNAME_TotalLines, TotalLines);
+ }
+
+ /** Get Total Lines.
+ @return Total of all document lines
+ */
+ public BigDecimal getTotalLines ()
+ {
+ BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_TotalLines);
+ if (bd == null)
+ return Env.ZERO;
+ return bd;
+ }
+
+ /** User1_ID AD_Reference_ID=134 */
+ public static final int USER1_ID_AD_Reference_ID=134;
+ /** Set User List 1.
+ @param User1_ID
+ User defined list element #1
+ */
+ public void setUser1_ID (int User1_ID)
+ {
+ if (User1_ID < 1)
+ set_Value (COLUMNNAME_User1_ID, null);
+ else
+ set_Value (COLUMNNAME_User1_ID, Integer.valueOf(User1_ID));
+ }
+
+ /** Get User List 1.
+ @return User defined list element #1
+ */
+ public int getUser1_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_User1_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** User2_ID AD_Reference_ID=137 */
+ public static final int USER2_ID_AD_Reference_ID=137;
+ /** Set User List 2.
+ @param User2_ID
+ User defined list element #2
+ */
+ public void setUser2_ID (int User2_ID)
+ {
+ if (User2_ID < 1)
+ set_Value (COLUMNNAME_User2_ID, null);
+ else
+ set_Value (COLUMNNAME_User2_ID, Integer.valueOf(User2_ID));
+ }
+
+ /** Get User List 2.
+ @return User defined list element #2
+ */
+ public int getUser2_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_User2_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set Volume.
+ @param Volume
+ Volume of a product
+ */
+ public void setVolume (BigDecimal Volume)
+ {
+ set_Value (COLUMNNAME_Volume, Volume);
+ }
+
+ /** Get Volume.
+ @return Volume of a product
+ */
+ public BigDecimal getVolume ()
+ {
+ BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Volume);
+ if (bd == null)
+ return Env.ZERO;
+ return bd;
+ }
+
+ /** Set Weight.
+ @param Weight
+ Weight of a product
+ */
+ public void setWeight (BigDecimal Weight)
+ {
+ set_Value (COLUMNNAME_Weight, Weight);
+ }
+
+ /** Get Weight.
+ @return Weight of a product
+ */
+ public BigDecimal getWeight ()
+ {
+ BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Weight);
+ if (bd == null)
+ return Env.ZERO;
+ return bd;
+ }
+}
\ No newline at end of file
diff --git a/posterita/posterita/src/main/org/compiere/model/X_C_Payment.java b/posterita/posterita/src/main/org/compiere/model/X_C_Payment.java
new file mode 100644
index 0000000000..7e73a76dcc
--- /dev/null
+++ b/posterita/posterita/src/main/org/compiere/model/X_C_Payment.java
@@ -0,0 +1,2242 @@
+/******************************************************************************
+ * Product: Adempiere ERP & CRM Smart Business Solution *
+ * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. *
+ * This program is free software; you can redistribute it and/or modify it *
+ * under the terms version 2 of the GNU General Public License as published *
+ * by the Free Software Foundation. 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, write to the Free Software Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
+ * For the text or an alternative of this public license, you may reach us *
+ * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
+ * or via info@compiere.org or http://www.compiere.org/license.html *
+ *****************************************************************************/
+/** Generated Model - DO NOT CHANGE */
+package org.compiere.model;
+
+import java.lang.reflect.Constructor;
+import java.math.BigDecimal;
+import java.sql.ResultSet;
+import java.sql.Timestamp;
+import java.util.Properties;
+import java.util.logging.Level;
+import org.compiere.util.Env;
+import org.compiere.util.KeyNamePair;
+
+/** Generated Model for C_Payment
+ * @author Adempiere (generated)
+ * @version Release 3.5.0 - $Id$ */
+public class X_C_Payment extends PO implements I_C_Payment, I_Persistent
+{
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+
+ /** Standard Constructor */
+ public X_C_Payment (Properties ctx, int C_Payment_ID, String trxName)
+ {
+ super (ctx, C_Payment_ID, trxName);
+ /** if (C_Payment_ID == 0)
+ {
+ setC_BPartner_ID (0);
+ setC_BankAccount_ID (0);
+ setC_Currency_ID (0);
+ setC_DocType_ID (0);
+ setC_Payment_ID (0);
+ setDateAcct (new Timestamp(System.currentTimeMillis()));
+// @#Date@
+ setDateTrx (new Timestamp(System.currentTimeMillis()));
+// @#Date@
+ setDocAction (null);
+// CO
+ setDocStatus (null);
+// DR
+ setDocumentNo (null);
+ setIsAllocated (false);
+ setIsApproved (false);
+// N
+ setIsDelayedCapture (false);
+ setIsOnline (false);
+ setIsOverUnderPayment (false);
+// N
+ setIsPrepayment (false);
+ setIsReceipt (false);
+ setIsReconciled (false);
+ setIsSelfService (false);
+ setPayAmt (Env.ZERO);
+// 0
+ setPosted (false);
+// N
+ setProcessed (false);
+ setTenderType (null);
+// K
+ setTrxType (null);
+// S
+ } */
+ }
+
+ /** Load Constructor */
+ public X_C_Payment (Properties ctx, ResultSet rs, String trxName)
+ {
+ super (ctx, rs, trxName);
+ }
+
+ /** AccessLevel
+ * @return 1 - Org
+ */
+ protected int get_AccessLevel()
+ {
+ return accessLevel.intValue();
+ }
+
+ /** Load Meta Data */
+ protected POInfo initPO (Properties ctx)
+ {
+ POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
+ return poi;
+ }
+
+ public String toString()
+ {
+ StringBuffer sb = new StringBuffer ("X_C_Payment[")
+ .append(get_ID()).append("]");
+ return sb.toString();
+ }
+
+ /** AD_OrgTrx_ID AD_Reference_ID=130 */
+ public static final int AD_ORGTRX_ID_AD_Reference_ID=130;
+ /** Set Trx Organization.
+ @param AD_OrgTrx_ID
+ Performing or initiating organization
+ */
+ public void setAD_OrgTrx_ID (int AD_OrgTrx_ID)
+ {
+ if (AD_OrgTrx_ID < 1)
+ set_Value (COLUMNNAME_AD_OrgTrx_ID, null);
+ else
+ set_Value (COLUMNNAME_AD_OrgTrx_ID, Integer.valueOf(AD_OrgTrx_ID));
+ }
+
+ /** Get Trx Organization.
+ @return Performing or initiating organization
+ */
+ public int getAD_OrgTrx_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_AD_OrgTrx_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set Account City.
+ @param A_City
+ City or the Credit Card or Account Holder
+ */
+ public void setA_City (String A_City)
+ {
+
+ if (A_City != null && A_City.length() > 60)
+ {
+ log.warning("Length > 60 - truncated");
+ A_City = A_City.substring(0, 60);
+ }
+ set_Value (COLUMNNAME_A_City, A_City);
+ }
+
+ /** Get Account City.
+ @return City or the Credit Card or Account Holder
+ */
+ public String getA_City ()
+ {
+ return (String)get_Value(COLUMNNAME_A_City);
+ }
+
+ /** Set Account Country.
+ @param A_Country
+ Country
+ */
+ public void setA_Country (String A_Country)
+ {
+
+ if (A_Country != null && A_Country.length() > 40)
+ {
+ log.warning("Length > 40 - truncated");
+ A_Country = A_Country.substring(0, 40);
+ }
+ set_Value (COLUMNNAME_A_Country, A_Country);
+ }
+
+ /** Get Account Country.
+ @return Country
+ */
+ public String getA_Country ()
+ {
+ return (String)get_Value(COLUMNNAME_A_Country);
+ }
+
+ /** Set Account EMail.
+ @param A_EMail
+ Email Address
+ */
+ public void setA_EMail (String A_EMail)
+ {
+
+ if (A_EMail != null && A_EMail.length() > 60)
+ {
+ log.warning("Length > 60 - truncated");
+ A_EMail = A_EMail.substring(0, 60);
+ }
+ set_Value (COLUMNNAME_A_EMail, A_EMail);
+ }
+
+ /** Get Account EMail.
+ @return Email Address
+ */
+ public String getA_EMail ()
+ {
+ return (String)get_Value(COLUMNNAME_A_EMail);
+ }
+
+ /** Set Driver License.
+ @param A_Ident_DL
+ Payment Identification - Driver License
+ */
+ public void setA_Ident_DL (String A_Ident_DL)
+ {
+
+ if (A_Ident_DL != null && A_Ident_DL.length() > 20)
+ {
+ log.warning("Length > 20 - truncated");
+ A_Ident_DL = A_Ident_DL.substring(0, 20);
+ }
+ set_Value (COLUMNNAME_A_Ident_DL, A_Ident_DL);
+ }
+
+ /** Get Driver License.
+ @return Payment Identification - Driver License
+ */
+ public String getA_Ident_DL ()
+ {
+ return (String)get_Value(COLUMNNAME_A_Ident_DL);
+ }
+
+ /** Set Social Security No.
+ @param A_Ident_SSN
+ Payment Identification - Social Security No
+ */
+ public void setA_Ident_SSN (String A_Ident_SSN)
+ {
+
+ if (A_Ident_SSN != null && A_Ident_SSN.length() > 20)
+ {
+ log.warning("Length > 20 - truncated");
+ A_Ident_SSN = A_Ident_SSN.substring(0, 20);
+ }
+ set_Value (COLUMNNAME_A_Ident_SSN, A_Ident_SSN);
+ }
+
+ /** Get Social Security No.
+ @return Payment Identification - Social Security No
+ */
+ public String getA_Ident_SSN ()
+ {
+ return (String)get_Value(COLUMNNAME_A_Ident_SSN);
+ }
+
+ /** Set Account Name.
+ @param A_Name
+ Name on Credit Card or Account holder
+ */
+ public void setA_Name (String A_Name)
+ {
+
+ if (A_Name != null && A_Name.length() > 60)
+ {
+ log.warning("Length > 60 - truncated");
+ A_Name = A_Name.substring(0, 60);
+ }
+ set_Value (COLUMNNAME_A_Name, A_Name);
+ }
+
+ /** Get Account Name.
+ @return Name on Credit Card or Account holder
+ */
+ public String getA_Name ()
+ {
+ return (String)get_Value(COLUMNNAME_A_Name);
+ }
+
+ /** Set Account State.
+ @param A_State
+ State of the Credit Card or Account holder
+ */
+ public void setA_State (String A_State)
+ {
+
+ if (A_State != null && A_State.length() > 40)
+ {
+ log.warning("Length > 40 - truncated");
+ A_State = A_State.substring(0, 40);
+ }
+ set_Value (COLUMNNAME_A_State, A_State);
+ }
+
+ /** Get Account State.
+ @return State of the Credit Card or Account holder
+ */
+ public String getA_State ()
+ {
+ return (String)get_Value(COLUMNNAME_A_State);
+ }
+
+ /** Set Account Street.
+ @param A_Street
+ Street address of the Credit Card or Account holder
+ */
+ public void setA_Street (String A_Street)
+ {
+
+ if (A_Street != null && A_Street.length() > 60)
+ {
+ log.warning("Length > 60 - truncated");
+ A_Street = A_Street.substring(0, 60);
+ }
+ set_Value (COLUMNNAME_A_Street, A_Street);
+ }
+
+ /** Get Account Street.
+ @return Street address of the Credit Card or Account holder
+ */
+ public String getA_Street ()
+ {
+ return (String)get_Value(COLUMNNAME_A_Street);
+ }
+
+ /** Set Account Zip/Postal.
+ @param A_Zip
+ Zip Code of the Credit Card or Account Holder
+ */
+ public void setA_Zip (String A_Zip)
+ {
+
+ if (A_Zip != null && A_Zip.length() > 20)
+ {
+ log.warning("Length > 20 - truncated");
+ A_Zip = A_Zip.substring(0, 20);
+ }
+ set_Value (COLUMNNAME_A_Zip, A_Zip);
+ }
+
+ /** Get Account Zip/Postal.
+ @return Zip Code of the Credit Card or Account Holder
+ */
+ public String getA_Zip ()
+ {
+ return (String)get_Value(COLUMNNAME_A_Zip);
+ }
+
+ /** Set Account No.
+ @param AccountNo
+ Account Number
+ */
+ public void setAccountNo (String AccountNo)
+ {
+
+ if (AccountNo != null && AccountNo.length() > 20)
+ {
+ log.warning("Length > 20 - truncated");
+ AccountNo = AccountNo.substring(0, 20);
+ }
+ set_Value (COLUMNNAME_AccountNo, AccountNo);
+ }
+
+ /** Get Account No.
+ @return Account Number
+ */
+ public String getAccountNo ()
+ {
+ return (String)get_Value(COLUMNNAME_AccountNo);
+ }
+
+ public I_C_Activity getC_Activity() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_Activity.Table_Name);
+ I_C_Activity result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_Activity)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Activity_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Activity.
+ @param C_Activity_ID
+ Business Activity
+ */
+ public void setC_Activity_ID (int C_Activity_ID)
+ {
+ if (C_Activity_ID < 1)
+ set_Value (COLUMNNAME_C_Activity_ID, null);
+ else
+ set_Value (COLUMNNAME_C_Activity_ID, Integer.valueOf(C_Activity_ID));
+ }
+
+ /** Get Activity.
+ @return Business Activity
+ */
+ public int getC_Activity_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_Activity_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_C_BP_BankAccount getC_BP_BankAccount() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_BP_BankAccount.Table_Name);
+ I_C_BP_BankAccount result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_BP_BankAccount)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_BP_BankAccount_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Partner Bank Account.
+ @param C_BP_BankAccount_ID
+ Bank Account of the Business Partner
+ */
+ public void setC_BP_BankAccount_ID (int C_BP_BankAccount_ID)
+ {
+ if (C_BP_BankAccount_ID < 1)
+ set_Value (COLUMNNAME_C_BP_BankAccount_ID, null);
+ else
+ set_Value (COLUMNNAME_C_BP_BankAccount_ID, Integer.valueOf(C_BP_BankAccount_ID));
+ }
+
+ /** Get Partner Bank Account.
+ @return Bank Account of the Business Partner
+ */
+ public int getC_BP_BankAccount_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_BP_BankAccount_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_C_BPartner getC_BPartner() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_BPartner.Table_Name);
+ I_C_BPartner result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_BPartner)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_BPartner_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Business Partner .
+ @param C_BPartner_ID
+ Identifies a Business Partner
+ */
+ public void setC_BPartner_ID (int C_BPartner_ID)
+ {
+ if (C_BPartner_ID < 1)
+ throw new IllegalArgumentException ("C_BPartner_ID is mandatory.");
+ set_Value (COLUMNNAME_C_BPartner_ID, Integer.valueOf(C_BPartner_ID));
+ }
+
+ /** Get Business Partner .
+ @return Identifies a Business Partner
+ */
+ public int getC_BPartner_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_BPartner_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_C_BankAccount getC_BankAccount() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_BankAccount.Table_Name);
+ I_C_BankAccount result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_BankAccount)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_BankAccount_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Bank Account.
+ @param C_BankAccount_ID
+ Account at the Bank
+ */
+ public void setC_BankAccount_ID (int C_BankAccount_ID)
+ {
+ if (C_BankAccount_ID < 1)
+ set_Value (COLUMNNAME_C_BankAccount_ID, null);
+ else
+ set_Value (COLUMNNAME_C_BankAccount_ID, Integer.valueOf(C_BankAccount_ID));
+ }
+
+ /** Get Bank Account.
+ @return Account at the Bank
+ */
+ public int getC_BankAccount_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_BankAccount_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_C_Campaign getC_Campaign() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_Campaign.Table_Name);
+ I_C_Campaign result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_Campaign)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Campaign_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Campaign.
+ @param C_Campaign_ID
+ Marketing Campaign
+ */
+ public void setC_Campaign_ID (int C_Campaign_ID)
+ {
+ if (C_Campaign_ID < 1)
+ set_Value (COLUMNNAME_C_Campaign_ID, null);
+ else
+ set_Value (COLUMNNAME_C_Campaign_ID, Integer.valueOf(C_Campaign_ID));
+ }
+
+ /** Get Campaign.
+ @return Marketing Campaign
+ */
+ public int getC_Campaign_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_Campaign_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_C_CashBook getC_CashBook() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_CashBook.Table_Name);
+ I_C_CashBook result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_CashBook)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_CashBook_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Cash Book.
+ @param C_CashBook_ID
+ Cash Book for recording petty cash transactions
+ */
+ public void setC_CashBook_ID (int C_CashBook_ID)
+ {
+ if (C_CashBook_ID < 1)
+ set_Value (COLUMNNAME_C_CashBook_ID, null);
+ else
+ set_Value (COLUMNNAME_C_CashBook_ID, Integer.valueOf(C_CashBook_ID));
+ }
+
+ /** Get Cash Book.
+ @return Cash Book for recording petty cash transactions
+ */
+ public int getC_CashBook_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_CashBook_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_C_Charge getC_Charge() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_Charge.Table_Name);
+ I_C_Charge result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_Charge)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Charge_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Charge.
+ @param C_Charge_ID
+ Additional document charges
+ */
+ public void setC_Charge_ID (int C_Charge_ID)
+ {
+ if (C_Charge_ID < 1)
+ set_Value (COLUMNNAME_C_Charge_ID, null);
+ else
+ set_Value (COLUMNNAME_C_Charge_ID, Integer.valueOf(C_Charge_ID));
+ }
+
+ /** Get Charge.
+ @return Additional document charges
+ */
+ public int getC_Charge_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_Charge_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_C_ConversionType getC_ConversionType() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_ConversionType.Table_Name);
+ I_C_ConversionType result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_ConversionType)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_ConversionType_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Currency Type.
+ @param C_ConversionType_ID
+ Currency Conversion Rate Type
+ */
+ public void setC_ConversionType_ID (int C_ConversionType_ID)
+ {
+ if (C_ConversionType_ID < 1)
+ set_Value (COLUMNNAME_C_ConversionType_ID, null);
+ else
+ set_Value (COLUMNNAME_C_ConversionType_ID, Integer.valueOf(C_ConversionType_ID));
+ }
+
+ /** Get Currency Type.
+ @return Currency Conversion Rate Type
+ */
+ public int getC_ConversionType_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_ConversionType_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_C_Currency getC_Currency() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_Currency.Table_Name);
+ I_C_Currency result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_Currency)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Currency_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Currency.
+ @param C_Currency_ID
+ The Currency for this record
+ */
+ public void setC_Currency_ID (int C_Currency_ID)
+ {
+ if (C_Currency_ID < 1)
+ throw new IllegalArgumentException ("C_Currency_ID is mandatory.");
+ set_Value (COLUMNNAME_C_Currency_ID, Integer.valueOf(C_Currency_ID));
+ }
+
+ /** Get Currency.
+ @return The Currency for this record
+ */
+ public int getC_Currency_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_Currency_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_C_DocType getC_DocType() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_DocType.Table_Name);
+ I_C_DocType result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_DocType)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_DocType_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Document Type.
+ @param C_DocType_ID
+ Document type or rules
+ */
+ public void setC_DocType_ID (int C_DocType_ID)
+ {
+ if (C_DocType_ID < 0)
+ throw new IllegalArgumentException ("C_DocType_ID is mandatory.");
+ set_Value (COLUMNNAME_C_DocType_ID, Integer.valueOf(C_DocType_ID));
+ }
+
+ /** Get Document Type.
+ @return Document type or rules
+ */
+ public int getC_DocType_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_DocType_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_C_Invoice getC_Invoice() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_Invoice.Table_Name);
+ I_C_Invoice result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_Invoice)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Invoice_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Invoice.
+ @param C_Invoice_ID
+ Invoice Identifier
+ */
+ public void setC_Invoice_ID (int C_Invoice_ID)
+ {
+ if (C_Invoice_ID < 1)
+ set_Value (COLUMNNAME_C_Invoice_ID, null);
+ else
+ set_Value (COLUMNNAME_C_Invoice_ID, Integer.valueOf(C_Invoice_ID));
+ }
+
+ /** Get Invoice.
+ @return Invoice Identifier
+ */
+ public int getC_Invoice_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_Invoice_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_C_Order getC_Order() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_Order.Table_Name);
+ I_C_Order result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_Order)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Order_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Order.
+ @param C_Order_ID
+ Order
+ */
+ public void setC_Order_ID (int C_Order_ID)
+ {
+ if (C_Order_ID < 1)
+ set_Value (COLUMNNAME_C_Order_ID, null);
+ else
+ set_Value (COLUMNNAME_C_Order_ID, Integer.valueOf(C_Order_ID));
+ }
+
+ /** Get Order.
+ @return Order
+ */
+ public int getC_Order_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_Order_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_C_PaymentBatch getC_PaymentBatch() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_PaymentBatch.Table_Name);
+ I_C_PaymentBatch result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_PaymentBatch)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_PaymentBatch_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Payment Batch.
+ @param C_PaymentBatch_ID
+ Payment batch for EFT
+ */
+ public void setC_PaymentBatch_ID (int C_PaymentBatch_ID)
+ {
+ if (C_PaymentBatch_ID < 1)
+ set_Value (COLUMNNAME_C_PaymentBatch_ID, null);
+ else
+ set_Value (COLUMNNAME_C_PaymentBatch_ID, Integer.valueOf(C_PaymentBatch_ID));
+ }
+
+ /** Get Payment Batch.
+ @return Payment batch for EFT
+ */
+ public int getC_PaymentBatch_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_PaymentBatch_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set Payment.
+ @param C_Payment_ID
+ Payment identifier
+ */
+ public void setC_Payment_ID (int C_Payment_ID)
+ {
+ if (C_Payment_ID < 1)
+ throw new IllegalArgumentException ("C_Payment_ID is mandatory.");
+ set_ValueNoCheck (COLUMNNAME_C_Payment_ID, Integer.valueOf(C_Payment_ID));
+ }
+
+ /** Get Payment.
+ @return Payment identifier
+ */
+ public int getC_Payment_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_Payment_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_C_Project getC_Project() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_Project.Table_Name);
+ I_C_Project result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_Project)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Project_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Project.
+ @param C_Project_ID
+ Financial Project
+ */
+ public void setC_Project_ID (int C_Project_ID)
+ {
+ if (C_Project_ID < 1)
+ set_Value (COLUMNNAME_C_Project_ID, null);
+ else
+ set_Value (COLUMNNAME_C_Project_ID, Integer.valueOf(C_Project_ID));
+ }
+
+ /** Get Project.
+ @return Financial Project
+ */
+ public int getC_Project_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_Project_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set Charge amount.
+ @param ChargeAmt
+ Charge Amount
+ */
+ public void setChargeAmt (BigDecimal ChargeAmt)
+ {
+ set_Value (COLUMNNAME_ChargeAmt, ChargeAmt);
+ }
+
+ /** Get Charge amount.
+ @return Charge Amount
+ */
+ public BigDecimal getChargeAmt ()
+ {
+ BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ChargeAmt);
+ if (bd == null)
+ return Env.ZERO;
+ return bd;
+ }
+
+ /** Set Check No.
+ @param CheckNo
+ Check Number
+ */
+ public void setCheckNo (String CheckNo)
+ {
+
+ if (CheckNo != null && CheckNo.length() > 20)
+ {
+ log.warning("Length > 20 - truncated");
+ CheckNo = CheckNo.substring(0, 20);
+ }
+ set_Value (COLUMNNAME_CheckNo, CheckNo);
+ }
+
+ /** Get Check No.
+ @return Check Number
+ */
+ public String getCheckNo ()
+ {
+ return (String)get_Value(COLUMNNAME_CheckNo);
+ }
+
+ /** Set Exp. Month.
+ @param CreditCardExpMM
+ Expiry Month
+ */
+ public void setCreditCardExpMM (int CreditCardExpMM)
+ {
+ set_Value (COLUMNNAME_CreditCardExpMM, Integer.valueOf(CreditCardExpMM));
+ }
+
+ /** Get Exp. Month.
+ @return Expiry Month
+ */
+ public int getCreditCardExpMM ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_CreditCardExpMM);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set Exp. Year.
+ @param CreditCardExpYY
+ Expiry Year
+ */
+ public void setCreditCardExpYY (int CreditCardExpYY)
+ {
+ set_Value (COLUMNNAME_CreditCardExpYY, Integer.valueOf(CreditCardExpYY));
+ }
+
+ /** Get Exp. Year.
+ @return Expiry Year
+ */
+ public int getCreditCardExpYY ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_CreditCardExpYY);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set Number.
+ @param CreditCardNumber
+ Credit Card Number
+ */
+ public void setCreditCardNumber (String CreditCardNumber)
+ {
+
+ if (CreditCardNumber != null && CreditCardNumber.length() > 20)
+ {
+ log.warning("Length > 20 - truncated");
+ CreditCardNumber = CreditCardNumber.substring(0, 20);
+ }
+ set_Value (COLUMNNAME_CreditCardNumber, CreditCardNumber);
+ }
+
+ /** Get Number.
+ @return Credit Card Number
+ */
+ public String getCreditCardNumber ()
+ {
+ return (String)get_Value(COLUMNNAME_CreditCardNumber);
+ }
+
+ /** CreditCardType AD_Reference_ID=149 */
+ public static final int CREDITCARDTYPE_AD_Reference_ID=149;
+ /** Amex = A */
+ public static final String CREDITCARDTYPE_Amex = "A";
+ /** MasterCard = M */
+ public static final String CREDITCARDTYPE_MasterCard = "M";
+ /** Visa = V */
+ public static final String CREDITCARDTYPE_Visa = "V";
+ /** ATM = C */
+ public static final String CREDITCARDTYPE_ATM = "C";
+ /** Diners = D */
+ public static final String CREDITCARDTYPE_Diners = "D";
+ /** Discover = N */
+ public static final String CREDITCARDTYPE_Discover = "N";
+ /** Purchase Card = P */
+ public static final String CREDITCARDTYPE_PurchaseCard = "P";
+ /** Set Credit Card.
+ @param CreditCardType
+ Credit Card (Visa, MC, AmEx)
+ */
+ public void setCreditCardType (String CreditCardType)
+ {
+
+ if (CreditCardType == null || CreditCardType.equals("A") || CreditCardType.equals("M") || CreditCardType.equals("V") || CreditCardType.equals("C") || CreditCardType.equals("D") || CreditCardType.equals("N") || CreditCardType.equals("P")); else throw new IllegalArgumentException ("CreditCardType Invalid value - " + CreditCardType + " - Reference_ID=149 - A - M - V - C - D - N - P");
+ if (CreditCardType != null && CreditCardType.length() > 1)
+ {
+ log.warning("Length > 1 - truncated");
+ CreditCardType = CreditCardType.substring(0, 1);
+ }
+ set_Value (COLUMNNAME_CreditCardType, CreditCardType);
+ }
+
+ /** Get Credit Card.
+ @return Credit Card (Visa, MC, AmEx)
+ */
+ public String getCreditCardType ()
+ {
+ return (String)get_Value(COLUMNNAME_CreditCardType);
+ }
+
+ /** Set Verification Code.
+ @param CreditCardVV
+ Credit Card Verification code on credit card
+ */
+ public void setCreditCardVV (String CreditCardVV)
+ {
+
+ if (CreditCardVV != null && CreditCardVV.length() > 4)
+ {
+ log.warning("Length > 4 - truncated");
+ CreditCardVV = CreditCardVV.substring(0, 4);
+ }
+ set_Value (COLUMNNAME_CreditCardVV, CreditCardVV);
+ }
+
+ /** Get Verification Code.
+ @return Credit Card Verification code on credit card
+ */
+ public String getCreditCardVV ()
+ {
+ return (String)get_Value(COLUMNNAME_CreditCardVV);
+ }
+
+ /** Set Account Date.
+ @param DateAcct
+ Accounting Date
+ */
+ public void setDateAcct (Timestamp DateAcct)
+ {
+ if (DateAcct == null)
+ throw new IllegalArgumentException ("DateAcct is mandatory.");
+ set_Value (COLUMNNAME_DateAcct, DateAcct);
+ }
+
+ /** Get Account Date.
+ @return Accounting Date
+ */
+ public Timestamp getDateAcct ()
+ {
+ return (Timestamp)get_Value(COLUMNNAME_DateAcct);
+ }
+
+ /** Set Transaction Date.
+ @param DateTrx
+ Transaction Date
+ */
+ public void setDateTrx (Timestamp DateTrx)
+ {
+ if (DateTrx == null)
+ throw new IllegalArgumentException ("DateTrx is mandatory.");
+ set_Value (COLUMNNAME_DateTrx, DateTrx);
+ }
+
+ /** Get Transaction Date.
+ @return Transaction Date
+ */
+ public Timestamp getDateTrx ()
+ {
+ return (Timestamp)get_Value(COLUMNNAME_DateTrx);
+ }
+
+ /** Set Description.
+ @param Description
+ Optional short description of the record
+ */
+ public void setDescription (String Description)
+ {
+
+ if (Description != null && Description.length() > 255)
+ {
+ log.warning("Length > 255 - truncated");
+ Description = Description.substring(0, 255);
+ }
+ set_Value (COLUMNNAME_Description, Description);
+ }
+
+ /** Get Description.
+ @return Optional short description of the record
+ */
+ public String getDescription ()
+ {
+ return (String)get_Value(COLUMNNAME_Description);
+ }
+
+ /** Set Discount Amount.
+ @param DiscountAmt
+ Calculated amount of discount
+ */
+ public void setDiscountAmt (BigDecimal DiscountAmt)
+ {
+ set_Value (COLUMNNAME_DiscountAmt, DiscountAmt);
+ }
+
+ /** Get Discount Amount.
+ @return Calculated amount of discount
+ */
+ public BigDecimal getDiscountAmt ()
+ {
+ BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_DiscountAmt);
+ if (bd == null)
+ return Env.ZERO;
+ return bd;
+ }
+
+ /** DocAction AD_Reference_ID=135 */
+ public static final int DOCACTION_AD_Reference_ID=135;
+ /** Complete = CO */
+ public static final String DOCACTION_Complete = "CO";
+ /** Approve = AP */
+ public static final String DOCACTION_Approve = "AP";
+ /** Reject = RJ */
+ public static final String DOCACTION_Reject = "RJ";
+ /** Post = PO */
+ public static final String DOCACTION_Post = "PO";
+ /** Void = VO */
+ public static final String DOCACTION_Void = "VO";
+ /** Close = CL */
+ public static final String DOCACTION_Close = "CL";
+ /** Reverse - Correct = RC */
+ public static final String DOCACTION_Reverse_Correct = "RC";
+ /** Reverse - Accrual = RA */
+ public static final String DOCACTION_Reverse_Accrual = "RA";
+ /** Invalidate = IN */
+ public static final String DOCACTION_Invalidate = "IN";
+ /** Re-activate = RE */
+ public static final String DOCACTION_Re_Activate = "RE";
+ /** = -- */
+ public static final String DOCACTION_None = "--";
+ /** Prepare = PR */
+ public static final String DOCACTION_Prepare = "PR";
+ /** Unlock = XL */
+ public static final String DOCACTION_Unlock = "XL";
+ /** Wait Complete = WC */
+ public static final String DOCACTION_WaitComplete = "WC";
+ /** Set Document Action.
+ @param DocAction
+ The targeted status of the document
+ */
+ public void setDocAction (String DocAction)
+ {
+ if (DocAction == null) throw new IllegalArgumentException ("DocAction is mandatory");
+ if (DocAction.equals("CO") || DocAction.equals("AP") || DocAction.equals("RJ") || DocAction.equals("PO") || DocAction.equals("VO") || DocAction.equals("CL") || DocAction.equals("RC") || DocAction.equals("RA") || DocAction.equals("IN") || DocAction.equals("RE") || DocAction.equals("--") || DocAction.equals("PR") || DocAction.equals("XL") || DocAction.equals("WC")); else throw new IllegalArgumentException ("DocAction Invalid value - " + DocAction + " - Reference_ID=135 - CO - AP - RJ - PO - VO - CL - RC - RA - IN - RE - -- - PR - XL - WC");
+ if (DocAction.length() > 2)
+ {
+ log.warning("Length > 2 - truncated");
+ DocAction = DocAction.substring(0, 2);
+ }
+ set_Value (COLUMNNAME_DocAction, DocAction);
+ }
+
+ /** Get Document Action.
+ @return The targeted status of the document
+ */
+ public String getDocAction ()
+ {
+ return (String)get_Value(COLUMNNAME_DocAction);
+ }
+
+ /** DocStatus AD_Reference_ID=131 */
+ public static final int DOCSTATUS_AD_Reference_ID=131;
+ /** Drafted = DR */
+ public static final String DOCSTATUS_Drafted = "DR";
+ /** Completed = CO */
+ public static final String DOCSTATUS_Completed = "CO";
+ /** Approved = AP */
+ public static final String DOCSTATUS_Approved = "AP";
+ /** Not Approved = NA */
+ public static final String DOCSTATUS_NotApproved = "NA";
+ /** Voided = VO */
+ public static final String DOCSTATUS_Voided = "VO";
+ /** Invalid = IN */
+ public static final String DOCSTATUS_Invalid = "IN";
+ /** Reversed = RE */
+ public static final String DOCSTATUS_Reversed = "RE";
+ /** Closed = CL */
+ public static final String DOCSTATUS_Closed = "CL";
+ /** Unknown = ?? */
+ public static final String DOCSTATUS_Unknown = "??";
+ /** In Progress = IP */
+ public static final String DOCSTATUS_InProgress = "IP";
+ /** Waiting Payment = WP */
+ public static final String DOCSTATUS_WaitingPayment = "WP";
+ /** Waiting Confirmation = WC */
+ public static final String DOCSTATUS_WaitingConfirmation = "WC";
+ /** Set Document Status.
+ @param DocStatus
+ The current status of the document
+ */
+ public void setDocStatus (String DocStatus)
+ {
+ if (DocStatus == null) throw new IllegalArgumentException ("DocStatus is mandatory");
+ if (DocStatus.equals("DR") || DocStatus.equals("CO") || DocStatus.equals("AP") || DocStatus.equals("NA") || DocStatus.equals("VO") || DocStatus.equals("IN") || DocStatus.equals("RE") || DocStatus.equals("CL") || DocStatus.equals("??") || DocStatus.equals("IP") || DocStatus.equals("WP") || DocStatus.equals("WC")); else throw new IllegalArgumentException ("DocStatus Invalid value - " + DocStatus + " - Reference_ID=131 - DR - CO - AP - NA - VO - IN - RE - CL - ?? - IP - WP - WC");
+ if (DocStatus.length() > 2)
+ {
+ log.warning("Length > 2 - truncated");
+ DocStatus = DocStatus.substring(0, 2);
+ }
+ set_Value (COLUMNNAME_DocStatus, DocStatus);
+ }
+
+ /** Get Document Status.
+ @return The current status of the document
+ */
+ public String getDocStatus ()
+ {
+ return (String)get_Value(COLUMNNAME_DocStatus);
+ }
+
+ /** Set Document No.
+ @param DocumentNo
+ Document sequence number of the document
+ */
+ public void setDocumentNo (String DocumentNo)
+ {
+ if (DocumentNo == null)
+ throw new IllegalArgumentException ("DocumentNo is mandatory.");
+
+ if (DocumentNo.length() > 30)
+ {
+ log.warning("Length > 30 - truncated");
+ DocumentNo = DocumentNo.substring(0, 30);
+ }
+ set_Value (COLUMNNAME_DocumentNo, DocumentNo);
+ }
+
+ /** Get Document No.
+ @return Document sequence number of the document
+ */
+ public String getDocumentNo ()
+ {
+ return (String)get_Value(COLUMNNAME_DocumentNo);
+ }
+
+ /** Get Record ID/ColumnName
+ @return ID/ColumnName pair
+ */
+ public KeyNamePair getKeyNamePair()
+ {
+ return new KeyNamePair(get_ID(), getDocumentNo());
+ }
+
+ /** Set Allocated.
+ @param IsAllocated
+ Indicates if the payment has been allocated
+ */
+ public void setIsAllocated (boolean IsAllocated)
+ {
+ set_Value (COLUMNNAME_IsAllocated, Boolean.valueOf(IsAllocated));
+ }
+
+ /** Get Allocated.
+ @return Indicates if the payment has been allocated
+ */
+ public boolean isAllocated ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsAllocated);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Approved.
+ @param IsApproved
+ Indicates if this document requires approval
+ */
+ public void setIsApproved (boolean IsApproved)
+ {
+ set_ValueNoCheck (COLUMNNAME_IsApproved, Boolean.valueOf(IsApproved));
+ }
+
+ /** Get Approved.
+ @return Indicates if this document requires approval
+ */
+ public boolean isApproved ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsApproved);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Delayed Capture.
+ @param IsDelayedCapture
+ Charge after Shipment
+ */
+ public void setIsDelayedCapture (boolean IsDelayedCapture)
+ {
+ set_Value (COLUMNNAME_IsDelayedCapture, Boolean.valueOf(IsDelayedCapture));
+ }
+
+ /** Get Delayed Capture.
+ @return Charge after Shipment
+ */
+ public boolean isDelayedCapture ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsDelayedCapture);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Online Access.
+ @param IsOnline
+ Can be accessed online
+ */
+ public void setIsOnline (boolean IsOnline)
+ {
+ set_Value (COLUMNNAME_IsOnline, Boolean.valueOf(IsOnline));
+ }
+
+ /** Get Online Access.
+ @return Can be accessed online
+ */
+ public boolean isOnline ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsOnline);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Over/Under Payment.
+ @param IsOverUnderPayment
+ Over-Payment (unallocated) or Under-Payment (partial payment)
+ */
+ public void setIsOverUnderPayment (boolean IsOverUnderPayment)
+ {
+ set_Value (COLUMNNAME_IsOverUnderPayment, Boolean.valueOf(IsOverUnderPayment));
+ }
+
+ /** Get Over/Under Payment.
+ @return Over-Payment (unallocated) or Under-Payment (partial payment)
+ */
+ public boolean isOverUnderPayment ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsOverUnderPayment);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Prepayment.
+ @param IsPrepayment
+ The Payment/Receipt is a Prepayment
+ */
+ public void setIsPrepayment (boolean IsPrepayment)
+ {
+ set_Value (COLUMNNAME_IsPrepayment, Boolean.valueOf(IsPrepayment));
+ }
+
+ /** Get Prepayment.
+ @return The Payment/Receipt is a Prepayment
+ */
+ public boolean isPrepayment ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsPrepayment);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Receipt.
+ @param IsReceipt
+ This is a sales transaction (receipt)
+ */
+ public void setIsReceipt (boolean IsReceipt)
+ {
+ set_Value (COLUMNNAME_IsReceipt, Boolean.valueOf(IsReceipt));
+ }
+
+ /** Get Receipt.
+ @return This is a sales transaction (receipt)
+ */
+ public boolean isReceipt ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsReceipt);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Reconciled.
+ @param IsReconciled
+ Payment is reconciled with bank statement
+ */
+ public void setIsReconciled (boolean IsReconciled)
+ {
+ set_Value (COLUMNNAME_IsReconciled, Boolean.valueOf(IsReconciled));
+ }
+
+ /** Get Reconciled.
+ @return Payment is reconciled with bank statement
+ */
+ public boolean isReconciled ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsReconciled);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Self-Service.
+ @param IsSelfService
+ This is a Self-Service entry or this entry can be changed via Self-Service
+ */
+ public void setIsSelfService (boolean IsSelfService)
+ {
+ set_Value (COLUMNNAME_IsSelfService, Boolean.valueOf(IsSelfService));
+ }
+
+ /** Get Self-Service.
+ @return This is a Self-Service entry or this entry can be changed via Self-Service
+ */
+ public boolean isSelfService ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsSelfService);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Micr.
+ @param Micr
+ Combination of routing no, account and check no
+ */
+ public void setMicr (String Micr)
+ {
+
+ if (Micr != null && Micr.length() > 20)
+ {
+ log.warning("Length > 20 - truncated");
+ Micr = Micr.substring(0, 20);
+ }
+ set_Value (COLUMNNAME_Micr, Micr);
+ }
+
+ /** Get Micr.
+ @return Combination of routing no, account and check no
+ */
+ public String getMicr ()
+ {
+ return (String)get_Value(COLUMNNAME_Micr);
+ }
+
+ /** Set Online Processing.
+ @param OProcessing
+ This payment can be processed online
+ */
+ public void setOProcessing (String OProcessing)
+ {
+
+ if (OProcessing != null && OProcessing.length() > 1)
+ {
+ log.warning("Length > 1 - truncated");
+ OProcessing = OProcessing.substring(0, 1);
+ }
+ set_Value (COLUMNNAME_OProcessing, OProcessing);
+ }
+
+ /** Get Online Processing.
+ @return This payment can be processed online
+ */
+ public String getOProcessing ()
+ {
+ return (String)get_Value(COLUMNNAME_OProcessing);
+ }
+
+ /** Set Original Transaction ID.
+ @param Orig_TrxID
+ Original Transaction ID
+ */
+ public void setOrig_TrxID (String Orig_TrxID)
+ {
+
+ if (Orig_TrxID != null && Orig_TrxID.length() > 20)
+ {
+ log.warning("Length > 20 - truncated");
+ Orig_TrxID = Orig_TrxID.substring(0, 20);
+ }
+ set_Value (COLUMNNAME_Orig_TrxID, Orig_TrxID);
+ }
+
+ /** Get Original Transaction ID.
+ @return Original Transaction ID
+ */
+ public String getOrig_TrxID ()
+ {
+ return (String)get_Value(COLUMNNAME_Orig_TrxID);
+ }
+
+ /** Set Over/Under Payment.
+ @param OverUnderAmt
+ Over-Payment (unallocated) or Under-Payment (partial payment) Amount
+ */
+ public void setOverUnderAmt (BigDecimal OverUnderAmt)
+ {
+ set_Value (COLUMNNAME_OverUnderAmt, OverUnderAmt);
+ }
+
+ /** Get Over/Under Payment.
+ @return Over-Payment (unallocated) or Under-Payment (partial payment) Amount
+ */
+ public BigDecimal getOverUnderAmt ()
+ {
+ BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_OverUnderAmt);
+ if (bd == null)
+ return Env.ZERO;
+ return bd;
+ }
+
+ /** Set PO Number.
+ @param PONum
+ Purchase Order Number
+ */
+ public void setPONum (String PONum)
+ {
+
+ if (PONum != null && PONum.length() > 60)
+ {
+ log.warning("Length > 60 - truncated");
+ PONum = PONum.substring(0, 60);
+ }
+ set_Value (COLUMNNAME_PONum, PONum);
+ }
+
+ /** Get PO Number.
+ @return Purchase Order Number
+ */
+ public String getPONum ()
+ {
+ return (String)get_Value(COLUMNNAME_PONum);
+ }
+
+ /** Set Payment amount.
+ @param PayAmt
+ Amount being paid
+ */
+ public void setPayAmt (BigDecimal PayAmt)
+ {
+ if (PayAmt == null)
+ throw new IllegalArgumentException ("PayAmt is mandatory.");
+ set_Value (COLUMNNAME_PayAmt, PayAmt);
+ }
+
+ /** Get Payment amount.
+ @return Amount being paid
+ */
+ public BigDecimal getPayAmt ()
+ {
+ BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PayAmt);
+ if (bd == null)
+ return Env.ZERO;
+ return bd;
+ }
+
+ /** Set Posted.
+ @param Posted
+ Posting status
+ */
+ public void setPosted (boolean Posted)
+ {
+ set_Value (COLUMNNAME_Posted, Boolean.valueOf(Posted));
+ }
+
+ /** Get Posted.
+ @return Posting status
+ */
+ public boolean isPosted ()
+ {
+ Object oo = get_Value(COLUMNNAME_Posted);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Processed.
+ @param Processed
+ The document has been processed
+ */
+ public void setProcessed (boolean Processed)
+ {
+ set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed));
+ }
+
+ /** Get Processed.
+ @return The document has been processed
+ */
+ public boolean isProcessed ()
+ {
+ Object oo = get_Value(COLUMNNAME_Processed);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Process Now.
+ @param Processing Process Now */
+ public void setProcessing (boolean Processing)
+ {
+ set_Value (COLUMNNAME_Processing, Boolean.valueOf(Processing));
+ }
+
+ /** Get Process Now.
+ @return Process Now */
+ public boolean isProcessing ()
+ {
+ Object oo = get_Value(COLUMNNAME_Processing);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Authorization Code.
+ @param R_AuthCode
+ Authorization Code returned
+ */
+ public void setR_AuthCode (String R_AuthCode)
+ {
+
+ if (R_AuthCode != null && R_AuthCode.length() > 20)
+ {
+ log.warning("Length > 20 - truncated");
+ R_AuthCode = R_AuthCode.substring(0, 20);
+ }
+ set_ValueNoCheck (COLUMNNAME_R_AuthCode, R_AuthCode);
+ }
+
+ /** Get Authorization Code.
+ @return Authorization Code returned
+ */
+ public String getR_AuthCode ()
+ {
+ return (String)get_Value(COLUMNNAME_R_AuthCode);
+ }
+
+ /** Set Authorization Code (DC).
+ @param R_AuthCode_DC
+ Authorization Code Delayed Capture returned
+ */
+ public void setR_AuthCode_DC (String R_AuthCode_DC)
+ {
+
+ if (R_AuthCode_DC != null && R_AuthCode_DC.length() > 20)
+ {
+ log.warning("Length > 20 - truncated");
+ R_AuthCode_DC = R_AuthCode_DC.substring(0, 20);
+ }
+ set_ValueNoCheck (COLUMNNAME_R_AuthCode_DC, R_AuthCode_DC);
+ }
+
+ /** Get Authorization Code (DC).
+ @return Authorization Code Delayed Capture returned
+ */
+ public String getR_AuthCode_DC ()
+ {
+ return (String)get_Value(COLUMNNAME_R_AuthCode_DC);
+ }
+
+ /** R_AvsAddr AD_Reference_ID=213 */
+ public static final int R_AVSADDR_AD_Reference_ID=213;
+ /** Match = Y */
+ public static final String R_AVSADDR_Match = "Y";
+ /** No Match = N */
+ public static final String R_AVSADDR_NoMatch = "N";
+ /** Unavailable = X */
+ public static final String R_AVSADDR_Unavailable = "X";
+ /** Set Address verified.
+ @param R_AvsAddr
+ This address has been verified
+ */
+ public void setR_AvsAddr (String R_AvsAddr)
+ {
+
+ if (R_AvsAddr == null || R_AvsAddr.equals("Y") || R_AvsAddr.equals("N") || R_AvsAddr.equals("X")); else throw new IllegalArgumentException ("R_AvsAddr Invalid value - " + R_AvsAddr + " - Reference_ID=213 - Y - N - X");
+ if (R_AvsAddr != null && R_AvsAddr.length() > 1)
+ {
+ log.warning("Length > 1 - truncated");
+ R_AvsAddr = R_AvsAddr.substring(0, 1);
+ }
+ set_ValueNoCheck (COLUMNNAME_R_AvsAddr, R_AvsAddr);
+ }
+
+ /** Get Address verified.
+ @return This address has been verified
+ */
+ public String getR_AvsAddr ()
+ {
+ return (String)get_Value(COLUMNNAME_R_AvsAddr);
+ }
+
+ /** R_AvsZip AD_Reference_ID=213 */
+ public static final int R_AVSZIP_AD_Reference_ID=213;
+ /** Match = Y */
+ public static final String R_AVSZIP_Match = "Y";
+ /** No Match = N */
+ public static final String R_AVSZIP_NoMatch = "N";
+ /** Unavailable = X */
+ public static final String R_AVSZIP_Unavailable = "X";
+ /** Set Zip verified.
+ @param R_AvsZip
+ The Zip Code has been verified
+ */
+ public void setR_AvsZip (String R_AvsZip)
+ {
+
+ if (R_AvsZip == null || R_AvsZip.equals("Y") || R_AvsZip.equals("N") || R_AvsZip.equals("X")); else throw new IllegalArgumentException ("R_AvsZip Invalid value - " + R_AvsZip + " - Reference_ID=213 - Y - N - X");
+ if (R_AvsZip != null && R_AvsZip.length() > 1)
+ {
+ log.warning("Length > 1 - truncated");
+ R_AvsZip = R_AvsZip.substring(0, 1);
+ }
+ set_ValueNoCheck (COLUMNNAME_R_AvsZip, R_AvsZip);
+ }
+
+ /** Get Zip verified.
+ @return The Zip Code has been verified
+ */
+ public String getR_AvsZip ()
+ {
+ return (String)get_Value(COLUMNNAME_R_AvsZip);
+ }
+
+ /** Set CVV Match.
+ @param R_CVV2Match
+ Credit Card Verification Code Match
+ */
+ public void setR_CVV2Match (boolean R_CVV2Match)
+ {
+ set_ValueNoCheck (COLUMNNAME_R_CVV2Match, Boolean.valueOf(R_CVV2Match));
+ }
+
+ /** Get CVV Match.
+ @return Credit Card Verification Code Match
+ */
+ public boolean isR_CVV2Match ()
+ {
+ Object oo = get_Value(COLUMNNAME_R_CVV2Match);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Info.
+ @param R_Info
+ Response info
+ */
+ public void setR_Info (String R_Info)
+ {
+
+ if (R_Info != null && R_Info.length() > 2000)
+ {
+ log.warning("Length > 2000 - truncated");
+ R_Info = R_Info.substring(0, 2000);
+ }
+ set_ValueNoCheck (COLUMNNAME_R_Info, R_Info);
+ }
+
+ /** Get Info.
+ @return Response info
+ */
+ public String getR_Info ()
+ {
+ return (String)get_Value(COLUMNNAME_R_Info);
+ }
+
+ /** Set Reference.
+ @param R_PnRef
+ Payment reference
+ */
+ public void setR_PnRef (String R_PnRef)
+ {
+
+ if (R_PnRef != null && R_PnRef.length() > 20)
+ {
+ log.warning("Length > 20 - truncated");
+ R_PnRef = R_PnRef.substring(0, 20);
+ }
+ set_ValueNoCheck (COLUMNNAME_R_PnRef, R_PnRef);
+ }
+
+ /** Get Reference.
+ @return Payment reference
+ */
+ public String getR_PnRef ()
+ {
+ return (String)get_Value(COLUMNNAME_R_PnRef);
+ }
+
+ /** Set Reference (DC).
+ @param R_PnRef_DC
+ Payment Reference Delayed Capture
+ */
+ public void setR_PnRef_DC (String R_PnRef_DC)
+ {
+
+ if (R_PnRef_DC != null && R_PnRef_DC.length() > 20)
+ {
+ log.warning("Length > 20 - truncated");
+ R_PnRef_DC = R_PnRef_DC.substring(0, 20);
+ }
+ set_ValueNoCheck (COLUMNNAME_R_PnRef_DC, R_PnRef_DC);
+ }
+
+ /** Get Reference (DC).
+ @return Payment Reference Delayed Capture
+ */
+ public String getR_PnRef_DC ()
+ {
+ return (String)get_Value(COLUMNNAME_R_PnRef_DC);
+ }
+
+ /** Set Response Message.
+ @param R_RespMsg
+ Response message
+ */
+ public void setR_RespMsg (String R_RespMsg)
+ {
+
+ if (R_RespMsg != null && R_RespMsg.length() > 60)
+ {
+ log.warning("Length > 60 - truncated");
+ R_RespMsg = R_RespMsg.substring(0, 60);
+ }
+ set_ValueNoCheck (COLUMNNAME_R_RespMsg, R_RespMsg);
+ }
+
+ /** Get Response Message.
+ @return Response message
+ */
+ public String getR_RespMsg ()
+ {
+ return (String)get_Value(COLUMNNAME_R_RespMsg);
+ }
+
+ /** Set Result.
+ @param R_Result
+ Result of transmission
+ */
+ public void setR_Result (String R_Result)
+ {
+
+ if (R_Result != null && R_Result.length() > 20)
+ {
+ log.warning("Length > 20 - truncated");
+ R_Result = R_Result.substring(0, 20);
+ }
+ set_ValueNoCheck (COLUMNNAME_R_Result, R_Result);
+ }
+
+ /** Get Result.
+ @return Result of transmission
+ */
+ public String getR_Result ()
+ {
+ return (String)get_Value(COLUMNNAME_R_Result);
+ }
+
+ /** Ref_Payment_ID AD_Reference_ID=343 */
+ public static final int REF_PAYMENT_ID_AD_Reference_ID=343;
+ /** Set Referenced Payment.
+ @param Ref_Payment_ID Referenced Payment */
+ public void setRef_Payment_ID (int Ref_Payment_ID)
+ {
+ if (Ref_Payment_ID < 1)
+ set_ValueNoCheck (COLUMNNAME_Ref_Payment_ID, null);
+ else
+ set_ValueNoCheck (COLUMNNAME_Ref_Payment_ID, Integer.valueOf(Ref_Payment_ID));
+ }
+
+ /** Get Referenced Payment.
+ @return Referenced Payment */
+ public int getRef_Payment_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_Ref_Payment_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set Routing No.
+ @param RoutingNo
+ Bank Routing Number
+ */
+ public void setRoutingNo (String RoutingNo)
+ {
+
+ if (RoutingNo != null && RoutingNo.length() > 20)
+ {
+ log.warning("Length > 20 - truncated");
+ RoutingNo = RoutingNo.substring(0, 20);
+ }
+ set_Value (COLUMNNAME_RoutingNo, RoutingNo);
+ }
+
+ /** Get Routing No.
+ @return Bank Routing Number
+ */
+ public String getRoutingNo ()
+ {
+ return (String)get_Value(COLUMNNAME_RoutingNo);
+ }
+
+ /** Set Swipe.
+ @param Swipe
+ Track 1 and 2 of the Credit Card
+ */
+ public void setSwipe (String Swipe)
+ {
+
+ if (Swipe != null && Swipe.length() > 80)
+ {
+ log.warning("Length > 80 - truncated");
+ Swipe = Swipe.substring(0, 80);
+ }
+ set_ValueNoCheck (COLUMNNAME_Swipe, Swipe);
+ }
+
+ /** Get Swipe.
+ @return Track 1 and 2 of the Credit Card
+ */
+ public String getSwipe ()
+ {
+ return (String)get_Value(COLUMNNAME_Swipe);
+ }
+
+ /** Set Tax Amount.
+ @param TaxAmt
+ Tax Amount for a document
+ */
+ public void setTaxAmt (BigDecimal TaxAmt)
+ {
+ set_Value (COLUMNNAME_TaxAmt, TaxAmt);
+ }
+
+ /** Get Tax Amount.
+ @return Tax Amount for a document
+ */
+ public BigDecimal getTaxAmt ()
+ {
+ BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_TaxAmt);
+ if (bd == null)
+ return Env.ZERO;
+ return bd;
+ }
+
+ /** TenderType AD_Reference_ID=214 */
+ public static final int TENDERTYPE_AD_Reference_ID=214;
+ /** Credit Card = C */
+ public static final String TENDERTYPE_CreditCard = "C";
+ /** Check = K */
+ public static final String TENDERTYPE_Check = "K";
+ /** Direct Deposit = A */
+ public static final String TENDERTYPE_DirectDeposit = "A";
+ /** Direct Debit = D */
+ public static final String TENDERTYPE_DirectDebit = "D";
+ /** Account = T */
+ public static final String TENDERTYPE_Account = "T";
+ /** Cash = X */
+ public static final String TENDERTYPE_Cash = "X";
+ /** Set Tender type.
+ @param TenderType
+ Method of Payment
+ */
+ public void setTenderType (String TenderType)
+ {
+ if (TenderType == null) throw new IllegalArgumentException ("TenderType is mandatory");
+ if (TenderType.equals("C") || TenderType.equals("K") || TenderType.equals("A") || TenderType.equals("D") || TenderType.equals("T") || TenderType.equals("X")); else throw new IllegalArgumentException ("TenderType Invalid value - " + TenderType + " - Reference_ID=214 - C - K - A - D - T - X");
+ if (TenderType.length() > 1)
+ {
+ log.warning("Length > 1 - truncated");
+ TenderType = TenderType.substring(0, 1);
+ }
+ set_Value (COLUMNNAME_TenderType, TenderType);
+ }
+
+ /** Get Tender type.
+ @return Method of Payment
+ */
+ public String getTenderType ()
+ {
+ return (String)get_Value(COLUMNNAME_TenderType);
+ }
+
+ /** TrxType AD_Reference_ID=215 */
+ public static final int TRXTYPE_AD_Reference_ID=215;
+ /** Sales = S */
+ public static final String TRXTYPE_Sales = "S";
+ /** Delayed Capture = D */
+ public static final String TRXTYPE_DelayedCapture = "D";
+ /** Credit (Payment) = C */
+ public static final String TRXTYPE_CreditPayment = "C";
+ /** Voice Authorization = F */
+ public static final String TRXTYPE_VoiceAuthorization = "F";
+ /** Authorization = A */
+ public static final String TRXTYPE_Authorization = "A";
+ /** Void = V */
+ public static final String TRXTYPE_Void = "V";
+ /** Set Transaction Type.
+ @param TrxType
+ Type of credit card transaction
+ */
+ public void setTrxType (String TrxType)
+ {
+ if (TrxType == null) throw new IllegalArgumentException ("TrxType is mandatory");
+ if (TrxType.equals("S") || TrxType.equals("D") || TrxType.equals("C") || TrxType.equals("F") || TrxType.equals("A") || TrxType.equals("V")); else throw new IllegalArgumentException ("TrxType Invalid value - " + TrxType + " - Reference_ID=215 - S - D - C - F - A - V");
+ if (TrxType.length() > 1)
+ {
+ log.warning("Length > 1 - truncated");
+ TrxType = TrxType.substring(0, 1);
+ }
+ set_Value (COLUMNNAME_TrxType, TrxType);
+ }
+
+ /** Get Transaction Type.
+ @return Type of credit card transaction
+ */
+ public String getTrxType ()
+ {
+ return (String)get_Value(COLUMNNAME_TrxType);
+ }
+
+ /** User1_ID AD_Reference_ID=134 */
+ public static final int USER1_ID_AD_Reference_ID=134;
+ /** Set User List 1.
+ @param User1_ID
+ User defined list element #1
+ */
+ public void setUser1_ID (int User1_ID)
+ {
+ if (User1_ID < 1)
+ set_Value (COLUMNNAME_User1_ID, null);
+ else
+ set_Value (COLUMNNAME_User1_ID, Integer.valueOf(User1_ID));
+ }
+
+ /** Get User List 1.
+ @return User defined list element #1
+ */
+ public int getUser1_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_User1_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** User2_ID AD_Reference_ID=137 */
+ public static final int USER2_ID_AD_Reference_ID=137;
+ /** Set User List 2.
+ @param User2_ID
+ User defined list element #2
+ */
+ public void setUser2_ID (int User2_ID)
+ {
+ if (User2_ID < 1)
+ set_Value (COLUMNNAME_User2_ID, null);
+ else
+ set_Value (COLUMNNAME_User2_ID, Integer.valueOf(User2_ID));
+ }
+
+ /** Get User List 2.
+ @return User defined list element #2
+ */
+ public int getUser2_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_User2_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set Voice authorization code.
+ @param VoiceAuthCode
+ Voice Authorization Code from credit card company
+ */
+ public void setVoiceAuthCode (String VoiceAuthCode)
+ {
+
+ if (VoiceAuthCode != null && VoiceAuthCode.length() > 20)
+ {
+ log.warning("Length > 20 - truncated");
+ VoiceAuthCode = VoiceAuthCode.substring(0, 20);
+ }
+ set_Value (COLUMNNAME_VoiceAuthCode, VoiceAuthCode);
+ }
+
+ /** Get Voice authorization code.
+ @return Voice Authorization Code from credit card company
+ */
+ public String getVoiceAuthCode ()
+ {
+ return (String)get_Value(COLUMNNAME_VoiceAuthCode);
+ }
+
+ /** Set Write-off Amount.
+ @param WriteOffAmt
+ Amount to write-off
+ */
+ public void setWriteOffAmt (BigDecimal WriteOffAmt)
+ {
+ set_Value (COLUMNNAME_WriteOffAmt, WriteOffAmt);
+ }
+
+ /** Get Write-off Amount.
+ @return Amount to write-off
+ */
+ public BigDecimal getWriteOffAmt ()
+ {
+ BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_WriteOffAmt);
+ if (bd == null)
+ return Env.ZERO;
+ return bd;
+ }
+}
\ No newline at end of file
diff --git a/posterita/posterita/src/main/org/compiere/model/X_M_InventoryLine.java b/posterita/posterita/src/main/org/compiere/model/X_M_InventoryLine.java
new file mode 100644
index 0000000000..88a85e30e9
--- /dev/null
+++ b/posterita/posterita/src/main/org/compiere/model/X_M_InventoryLine.java
@@ -0,0 +1,477 @@
+/******************************************************************************
+ * Product: Adempiere ERP & CRM Smart Business Solution *
+ * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. *
+ * This program is free software; you can redistribute it and/or modify it *
+ * under the terms version 2 of the GNU General Public License as published *
+ * by the Free Software Foundation. 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, write to the Free Software Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
+ * For the text or an alternative of this public license, you may reach us *
+ * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
+ * or via info@compiere.org or http://www.compiere.org/license.html *
+ *****************************************************************************/
+/** Generated Model - DO NOT CHANGE */
+package org.compiere.model;
+
+import java.lang.reflect.Constructor;
+import java.math.BigDecimal;
+import java.sql.ResultSet;
+import java.util.Properties;
+import java.util.logging.Level;
+import org.compiere.util.Env;
+import org.compiere.util.KeyNamePair;
+
+/** Generated Model for M_InventoryLine
+ * @author Adempiere (generated)
+ * @version Release 3.4.0s - $Id$ */
+public class X_M_InventoryLine extends PO implements I_M_InventoryLine, I_Persistent
+{
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+
+ /** Standard Constructor */
+ public X_M_InventoryLine (Properties ctx, int M_InventoryLine_ID, String trxName)
+ {
+ super (ctx, M_InventoryLine_ID, trxName);
+ /** if (M_InventoryLine_ID == 0)
+ {
+ setInventoryType (null);
+// D
+ setM_AttributeSetInstance_ID (0);
+ setM_Inventory_ID (0);
+ setM_InventoryLine_ID (0);
+ setM_Locator_ID (0);
+// @M_Locator_ID@
+ setM_Product_ID (0);
+ setProcessed (false);
+ setQtyBook (Env.ZERO);
+ setQtyCount (Env.ZERO);
+ setqtycsv (Env.ZERO);
+ } */
+ }
+
+ /** Load Constructor */
+ public X_M_InventoryLine (Properties ctx, ResultSet rs, String trxName)
+ {
+ super (ctx, rs, trxName);
+ }
+
+ /** AccessLevel
+ * @return 1 - Org
+ */
+ protected int get_AccessLevel()
+ {
+ return accessLevel.intValue();
+ }
+
+ /** Load Meta Data */
+ protected POInfo initPO (Properties ctx)
+ {
+ POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
+ return poi;
+ }
+
+ public String toString()
+ {
+ StringBuffer sb = new StringBuffer ("X_M_InventoryLine[")
+ .append(get_ID()).append("]");
+ return sb.toString();
+ }
+
+ public I_C_Charge getC_Charge() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_Charge.Table_Name);
+ I_C_Charge result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_Charge)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Charge_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Charge.
+ @param C_Charge_ID
+ Additional document charges
+ */
+ public void setC_Charge_ID (int C_Charge_ID)
+ {
+ if (C_Charge_ID < 1)
+ set_Value (COLUMNNAME_C_Charge_ID, null);
+ else
+ set_Value (COLUMNNAME_C_Charge_ID, Integer.valueOf(C_Charge_ID));
+ }
+
+ /** Get Charge.
+ @return Additional document charges
+ */
+ public int getC_Charge_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_Charge_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set Description.
+ @param Description
+ Optional short description of the record
+ */
+ public void setDescription (String Description)
+ {
+
+ if (Description != null && Description.length() > 255)
+ {
+ log.warning("Length > 255 - truncated");
+ Description = Description.substring(0, 255);
+ }
+ set_Value (COLUMNNAME_Description, Description);
+ }
+
+ /** Get Description.
+ @return Optional short description of the record
+ */
+ public String getDescription ()
+ {
+ return (String)get_Value(COLUMNNAME_Description);
+ }
+
+ /** InventoryType AD_Reference_ID=292 */
+ public static final int INVENTORYTYPE_AD_Reference_ID=292;
+ /** Inventory Difference = D */
+ public static final String INVENTORYTYPE_InventoryDifference = "D";
+ /** Charge Account = C */
+ public static final String INVENTORYTYPE_ChargeAccount = "C";
+ /** Set Inventory Type.
+ @param InventoryType
+ Type of inventory difference
+ */
+ public void setInventoryType (String InventoryType)
+ {
+ if (InventoryType == null) throw new IllegalArgumentException ("InventoryType is mandatory");
+ if (InventoryType.equals("D") || InventoryType.equals("C")); else throw new IllegalArgumentException ("InventoryType Invalid value - " + InventoryType + " - Reference_ID=292 - D - C");
+ if (InventoryType.length() > 1)
+ {
+ log.warning("Length > 1 - truncated");
+ InventoryType = InventoryType.substring(0, 1);
+ }
+ set_Value (COLUMNNAME_InventoryType, InventoryType);
+ }
+
+ /** Get Inventory Type.
+ @return Type of inventory difference
+ */
+ public String getInventoryType ()
+ {
+ return (String)get_Value(COLUMNNAME_InventoryType);
+ }
+
+ /** Set Line No.
+ @param Line
+ Unique line for this document
+ */
+ public void setLine (int Line)
+ {
+ set_Value (COLUMNNAME_Line, Integer.valueOf(Line));
+ }
+
+ /** Get Line No.
+ @return Unique line for this document
+ */
+ public int getLine ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_Line);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Get Record ID/ColumnName
+ @return ID/ColumnName pair
+ */
+ public KeyNamePair getKeyNamePair()
+ {
+ return new KeyNamePair(get_ID(), String.valueOf(getLine()));
+ }
+
+ /** Set Attribute Set Instance.
+ @param M_AttributeSetInstance_ID
+ Product Attribute Set Instance
+ */
+ public void setM_AttributeSetInstance_ID (int M_AttributeSetInstance_ID)
+ {
+ if (M_AttributeSetInstance_ID < 0)
+ throw new IllegalArgumentException ("M_AttributeSetInstance_ID is mandatory.");
+ set_Value (COLUMNNAME_M_AttributeSetInstance_ID, Integer.valueOf(M_AttributeSetInstance_ID));
+ }
+
+ /** Get Attribute Set Instance.
+ @return Product Attribute Set Instance
+ */
+ public int getM_AttributeSetInstance_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_M_AttributeSetInstance_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_M_Inventory getM_Inventory() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_M_Inventory.Table_Name);
+ I_M_Inventory result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_M_Inventory)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_Inventory_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Phys.Inventory.
+ @param M_Inventory_ID
+ Parameters for a Physical Inventory
+ */
+ public void setM_Inventory_ID (int M_Inventory_ID)
+ {
+ if (M_Inventory_ID < 1)
+ throw new IllegalArgumentException ("M_Inventory_ID is mandatory.");
+ set_ValueNoCheck (COLUMNNAME_M_Inventory_ID, Integer.valueOf(M_Inventory_ID));
+ }
+
+ /** Get Phys.Inventory.
+ @return Parameters for a Physical Inventory
+ */
+ public int getM_Inventory_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_M_Inventory_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set Phys.Inventory Line.
+ @param M_InventoryLine_ID
+ Unique line in an Inventory document
+ */
+ public void setM_InventoryLine_ID (int M_InventoryLine_ID)
+ {
+ if (M_InventoryLine_ID < 1)
+ throw new IllegalArgumentException ("M_InventoryLine_ID is mandatory.");
+ set_ValueNoCheck (COLUMNNAME_M_InventoryLine_ID, Integer.valueOf(M_InventoryLine_ID));
+ }
+
+ /** Get Phys.Inventory Line.
+ @return Unique line in an Inventory document
+ */
+ public int getM_InventoryLine_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_M_InventoryLine_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set Locator.
+ @param M_Locator_ID
+ Warehouse Locator
+ */
+ public void setM_Locator_ID (int M_Locator_ID)
+ {
+ if (M_Locator_ID < 1)
+ throw new IllegalArgumentException ("M_Locator_ID is mandatory.");
+ set_Value (COLUMNNAME_M_Locator_ID, Integer.valueOf(M_Locator_ID));
+ }
+
+ /** Get Locator.
+ @return Warehouse Locator
+ */
+ public int getM_Locator_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_M_Locator_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** M_Product_ID AD_Reference_ID=171 */
+ public static final int M_PRODUCT_ID_AD_Reference_ID=171;
+ /** Set Product.
+ @param M_Product_ID
+ Product, Service, Item
+ */
+ public void setM_Product_ID (int M_Product_ID)
+ {
+ if (M_Product_ID < 1)
+ throw new IllegalArgumentException ("M_Product_ID is mandatory.");
+ set_Value (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID));
+ }
+
+ /** Get Product.
+ @return Product, Service, Item
+ */
+ public int getM_Product_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set Processed.
+ @param Processed
+ The document has been processed
+ */
+ public void setProcessed (boolean Processed)
+ {
+ set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed));
+ }
+
+ /** Get Processed.
+ @return The document has been processed
+ */
+ public boolean isProcessed ()
+ {
+ Object oo = get_Value(COLUMNNAME_Processed);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Quantity book.
+ @param QtyBook
+ Book Quantity
+ */
+ public void setQtyBook (BigDecimal QtyBook)
+ {
+ if (QtyBook == null)
+ throw new IllegalArgumentException ("QtyBook is mandatory.");
+ set_ValueNoCheck (COLUMNNAME_QtyBook, QtyBook);
+ }
+
+ /** Get Quantity book.
+ @return Book Quantity
+ */
+ public BigDecimal getQtyBook ()
+ {
+ BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyBook);
+ if (bd == null)
+ return Env.ZERO;
+ return bd;
+ }
+
+ /** Set Quantity count.
+ @param QtyCount
+ Counted Quantity
+ */
+ public void setQtyCount (BigDecimal QtyCount)
+ {
+ if (QtyCount == null)
+ throw new IllegalArgumentException ("QtyCount is mandatory.");
+ set_Value (COLUMNNAME_QtyCount, QtyCount);
+ }
+
+ /** Get Quantity count.
+ @return Counted Quantity
+ */
+ public BigDecimal getQtyCount ()
+ {
+ BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyCount);
+ if (bd == null)
+ return Env.ZERO;
+ return bd;
+ }
+
+ /** Set Quantity CSV.
+ @param Quantity CSV
+ Quantity CSV
+ */
+ public void setQtyCsv (BigDecimal QtyCsv)
+ {
+ if (QtyCsv == null)
+ throw new IllegalArgumentException ("qtycsv is mandatory.");
+ set_Value (COLUMNNAME_QtyCsv, QtyCsv);
+ }
+
+ /** Get Quantity CSV.
+ @return Quantity CSV
+ */
+ public BigDecimal getQtyCsv ()
+ {
+ BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyCsv);
+ if (bd == null)
+ return Env.ZERO;
+ return bd;
+ }
+
+ /** Set Internal Use Qty.
+ @param QtyInternalUse
+ Internal Use Quantity removed from Inventory
+ */
+ public void setQtyInternalUse (BigDecimal QtyInternalUse)
+ {
+ set_Value (COLUMNNAME_QtyInternalUse, QtyInternalUse);
+ }
+
+ /** Get Internal Use Qty.
+ @return Internal Use Quantity removed from Inventory
+ */
+ public BigDecimal getQtyInternalUse ()
+ {
+ BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyInternalUse);
+ if (bd == null)
+ return Env.ZERO;
+ return bd;
+ }
+
+ /** Set UPC/EAN.
+ @param UPC
+ Bar Code (Universal Product Code or its superset European Article Number)
+ */
+ public void setUPC (String UPC)
+ {
+ throw new IllegalArgumentException ("UPC is virtual column"); }
+
+ /** Get UPC/EAN.
+ @return Bar Code (Universal Product Code or its superset European Article Number)
+ */
+ public String getUPC ()
+ {
+ return (String)get_Value(COLUMNNAME_UPC);
+ }
+
+ /** Set Search Key.
+ @param Value
+ Search key for the record in the format required - must be unique
+ */
+ public void setValue (String Value)
+ {
+ throw new IllegalArgumentException ("Value is virtual column"); }
+
+ /** Get Search Key.
+ @return Search key for the record in the format required - must be unique
+ */
+ public String getValue ()
+ {
+ return (String)get_Value(COLUMNNAME_Value);
+ }
+}
\ No newline at end of file
diff --git a/posterita/posterita/src/main/org/compiere/model/X_M_PriceList.java b/posterita/posterita/src/main/org/compiere/model/X_M_PriceList.java
new file mode 100644
index 0000000000..56e1fd22bf
--- /dev/null
+++ b/posterita/posterita/src/main/org/compiere/model/X_M_PriceList.java
@@ -0,0 +1,388 @@
+/******************************************************************************
+ * Product: Adempiere ERP & CRM Smart Business Solution *
+ * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. *
+ * This program is free software; you can redistribute it and/or modify it *
+ * under the terms version 2 of the GNU General Public License as published *
+ * by the Free Software Foundation. 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, write to the Free Software Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
+ * For the text or an alternative of this public license, you may reach us *
+ * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
+ * or via info@compiere.org or http://www.compiere.org/license.html *
+ *****************************************************************************/
+/** Generated Model - DO NOT CHANGE */
+package org.compiere.model;
+
+import java.lang.reflect.Constructor;
+import java.math.BigDecimal;
+import java.sql.ResultSet;
+import java.util.Properties;
+import java.util.logging.Level;
+import org.compiere.util.Env;
+import org.compiere.util.KeyNamePair;
+
+/** Generated Model for M_PriceList
+ * @author Adempiere (generated)
+ * @version Release 3.3.1b - $Id$ */
+public class X_M_PriceList extends PO implements I_M_PriceList, I_Persistent
+{
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+
+ /** Standard Constructor */
+ public X_M_PriceList (Properties ctx, int M_PriceList_ID, String trxName)
+ {
+ super (ctx, M_PriceList_ID, trxName);
+ /** if (M_PriceList_ID == 0)
+ {
+ setC_Currency_ID (0);
+ setEnforcePriceLimit (false);
+ setIsDefault (false);
+ setIsSOPriceList (false);
+ setIsTaxIncluded (false);
+ setM_PriceList_ID (0);
+ setName (null);
+ setPricePrecision (Env.ZERO);
+// 2
+ } */
+ }
+
+ /** Load Constructor */
+ public X_M_PriceList (Properties ctx, ResultSet rs, String trxName)
+ {
+ super (ctx, rs, trxName);
+ }
+
+ /** AccessLevel
+ * @return 3 - Client - Org
+ */
+ protected int get_AccessLevel()
+ {
+ return accessLevel.intValue();
+ }
+
+ /** Load Meta Data */
+ protected POInfo initPO (Properties ctx)
+ {
+ POInfo poi = POInfo.getPOInfo (ctx, Table_ID);
+ return poi;
+ }
+
+ public String toString()
+ {
+ StringBuffer sb = new StringBuffer ("X_M_PriceList[")
+ .append(get_ID()).append("]");
+ return sb.toString();
+ }
+
+ /** BasePriceList_ID AD_Reference_ID=166 */
+ public static final int BASEPRICELIST_ID_AD_Reference_ID=166;
+ /** Set Base Pricelist.
+ @param BasePriceList_ID
+ Pricelist to be used, if product not found on this pricelist
+ */
+ public void setBasePriceList_ID (int BasePriceList_ID)
+ {
+ if (BasePriceList_ID <= 0)
+ set_Value (COLUMNNAME_BasePriceList_ID, null);
+ else
+ set_Value (COLUMNNAME_BasePriceList_ID, Integer.valueOf(BasePriceList_ID));
+ }
+
+ /** Get Base Pricelist.
+ @return Pricelist to be used, if product not found on this pricelist
+ */
+ public int getBasePriceList_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_BasePriceList_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_C_Currency getC_Currency() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_Currency.Table_Name);
+ I_C_Currency result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_Currency)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Currency_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Currency.
+ @param C_Currency_ID
+ The Currency for this record
+ */
+ public void setC_Currency_ID (int C_Currency_ID)
+ {
+ if (C_Currency_ID < 1)
+ throw new IllegalArgumentException ("C_Currency_ID is mandatory.");
+ set_Value (COLUMNNAME_C_Currency_ID, Integer.valueOf(C_Currency_ID));
+ }
+
+ /** Get Currency.
+ @return The Currency for this record
+ */
+ public int getC_Currency_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_Currency_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set Description.
+ @param Description
+ Optional short description of the record
+ */
+ public void setDescription (String Description)
+ {
+
+ if (Description != null && Description.length() > 255)
+ {
+ log.warning("Length > 255 - truncated");
+ Description = Description.substring(0, 255);
+ }
+ set_Value (COLUMNNAME_Description, Description);
+ }
+
+ /** Get Description.
+ @return Optional short description of the record
+ */
+ public String getDescription ()
+ {
+ return (String)get_Value(COLUMNNAME_Description);
+ }
+
+ /** Set Enforce price limit.
+ @param EnforcePriceLimit
+ Do not allow prices below the limit price
+ */
+ public void setEnforcePriceLimit (boolean EnforcePriceLimit)
+ {
+ set_Value (COLUMNNAME_EnforcePriceLimit, Boolean.valueOf(EnforcePriceLimit));
+ }
+
+ /** Get Enforce price limit.
+ @return Do not allow prices below the limit price
+ */
+ public boolean isEnforcePriceLimit ()
+ {
+ Object oo = get_Value(COLUMNNAME_EnforcePriceLimit);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Default.
+ @param IsDefault
+ Default value
+ */
+ public void setIsDefault (boolean IsDefault)
+ {
+ set_Value (COLUMNNAME_IsDefault, Boolean.valueOf(IsDefault));
+ }
+
+ /** Get Default.
+ @return Default value
+ */
+ public boolean isDefault ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsDefault);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Mandatory.
+ @param IsMandatory
+ Data entry is required in this column
+ */
+ public void setIsMandatory (boolean IsMandatory)
+ {
+ set_Value (COLUMNNAME_IsMandatory, Boolean.valueOf(IsMandatory));
+ }
+
+ /** Get Mandatory.
+ @return Data entry is required in this column
+ */
+ public boolean isMandatory ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsMandatory);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set isPresentForProduct.
+ @param isPresentForProduct isPresentForProduct */
+ public void setisPresentForProduct (boolean isPresentForProduct)
+ {
+ set_Value (COLUMNNAME_isPresentForProduct, Boolean.valueOf(isPresentForProduct));
+ }
+
+ /** Get isPresentForProduct.
+ @return isPresentForProduct */
+ public boolean isPresentForProduct ()
+ {
+ Object oo = get_Value(COLUMNNAME_isPresentForProduct);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Sales Price list.
+ @param IsSOPriceList
+ This is a Sales Price List
+ */
+ public void setIsSOPriceList (boolean IsSOPriceList)
+ {
+ set_Value (COLUMNNAME_IsSOPriceList, Boolean.valueOf(IsSOPriceList));
+ }
+
+ /** Get Sales Price list.
+ @return This is a Sales Price List
+ */
+ public boolean isSOPriceList ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsSOPriceList);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Price includes Tax.
+ @param IsTaxIncluded
+ Tax is included in the price
+ */
+ public void setIsTaxIncluded (boolean IsTaxIncluded)
+ {
+ set_Value (COLUMNNAME_IsTaxIncluded, Boolean.valueOf(IsTaxIncluded));
+ }
+
+ /** Get Price includes Tax.
+ @return Tax is included in the price
+ */
+ public boolean isTaxIncluded ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsTaxIncluded);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Price List.
+ @param M_PriceList_ID
+ Unique identifier of a Price List
+ */
+ public void setM_PriceList_ID (int M_PriceList_ID)
+ {
+ if (M_PriceList_ID < 1)
+ throw new IllegalArgumentException ("M_PriceList_ID is mandatory.");
+ set_ValueNoCheck (COLUMNNAME_M_PriceList_ID, Integer.valueOf(M_PriceList_ID));
+ }
+
+ /** Get Price List.
+ @return Unique identifier of a Price List
+ */
+ public int getM_PriceList_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_M_PriceList_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set Name.
+ @param Name
+ Alphanumeric identifier of the entity
+ */
+ public void setName (String Name)
+ {
+ if (Name == null)
+ throw new IllegalArgumentException ("Name is mandatory.");
+
+ if (Name.length() > 60)
+ {
+ log.warning("Length > 60 - truncated");
+ Name = Name.substring(0, 60);
+ }
+ set_Value (COLUMNNAME_Name, Name);
+ }
+
+ /** Get Name.
+ @return Alphanumeric identifier of the entity
+ */
+ public String getName ()
+ {
+ return (String)get_Value(COLUMNNAME_Name);
+ }
+
+ /** Get Record ID/ColumnName
+ @return ID/ColumnName pair
+ */
+ public KeyNamePair getKeyNamePair()
+ {
+ return new KeyNamePair(get_ID(), getName());
+ }
+
+ /** Set Price Precision.
+ @param PricePrecision
+ Precision (number of decimals) for the Price
+ */
+ public void setPricePrecision (BigDecimal PricePrecision)
+ {
+ if (PricePrecision == null)
+ throw new IllegalArgumentException ("PricePrecision is mandatory.");
+ set_Value (COLUMNNAME_PricePrecision, PricePrecision);
+ }
+
+ /** Get Price Precision.
+ @return Precision (number of decimals) for the Price
+ */
+ public BigDecimal getPricePrecision ()
+ {
+ BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PricePrecision);
+ if (bd == null)
+ return Env.ZERO;
+ return bd;
+ }
+}
\ No newline at end of file
diff --git a/posterita/posterita/src/main/org/compiere/model/X_M_Product.java b/posterita/posterita/src/main/org/compiere/model/X_M_Product.java
new file mode 100644
index 0000000000..df11c39fed
--- /dev/null
+++ b/posterita/posterita/src/main/org/compiere/model/X_M_Product.java
@@ -0,0 +1,1440 @@
+/******************************************************************************
+ * Product: Adempiere ERP & CRM Smart Business Solution *
+ * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. *
+ * This program is free software; you can redistribute it and/or modify it *
+ * under the terms version 2 of the GNU General Public License as published *
+ * by the Free Software Foundation. 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, write to the Free Software Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
+ * For the text or an alternative of this public license, you may reach us *
+ * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
+ * or via info@compiere.org or http://www.compiere.org/license.html *
+ *****************************************************************************/
+/** Generated Model - DO NOT CHANGE */
+package org.compiere.model;
+
+import java.lang.reflect.Constructor;
+import java.math.BigDecimal;
+import java.sql.ResultSet;
+import java.sql.Timestamp;
+import java.util.Properties;
+import java.util.logging.Level;
+import org.compiere.util.Env;
+import org.compiere.util.KeyNamePair;
+
+/** Generated Model for M_Product
+ * @author Adempiere (generated)
+ * @version Release 3.4.0s - $Id$ */
+public class X_M_Product extends PO implements I_M_Product, I_Persistent
+{
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+
+ /** Standard Constructor */
+ public X_M_Product (Properties ctx, int M_Product_ID, String trxName)
+ {
+ super (ctx, M_Product_ID, trxName);
+ /** if (M_Product_ID == 0)
+ {
+ setC_TaxCategory_ID (0);
+ setC_UOM_ID (0);
+ setIsBOM (false);
+// N
+ setIsDropShip (false);
+ setIsExcludeAutoDelivery (false);
+// N
+ setIsInvoicePrintDetails (false);
+ setIsPickListPrintDetails (false);
+ setIsPurchased (true);
+// Y
+ setIsSelfService (true);
+// Y
+ setIsSold (true);
+// Y
+ setIsStocked (true);
+// Y
+ setIsSummary (false);
+ setIsVerified (false);
+// N
+ setIsWebStoreFeatured (false);
+ setM_AttributeSetInstance_ID (0);
+ setM_Product_Category_ID (0);
+ setM_Product_ID (0);
+ setName (null);
+ setProductType (null);
+// I
+ setValue (null);
+ } */
+ }
+
+ /** Load Constructor */
+ public X_M_Product (Properties ctx, ResultSet rs, String trxName)
+ {
+ super (ctx, rs, trxName);
+ }
+
+ /** AccessLevel
+ * @return 3 - Client - Org
+ */
+ protected int get_AccessLevel()
+ {
+ return accessLevel.intValue();
+ }
+
+ /** Load Meta Data */
+ protected POInfo initPO (Properties ctx)
+ {
+ POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
+ return poi;
+ }
+
+ public String toString()
+ {
+ StringBuffer sb = new StringBuffer ("X_M_Product[")
+ .append(get_ID()).append("]");
+ return sb.toString();
+ }
+
+ /** Set Classification.
+ @param Classification
+ Classification for grouping
+ */
+ public void setClassification (String Classification)
+ {
+
+ if (Classification != null && Classification.length() > 1)
+ {
+ log.warning("Length > 1 - truncated");
+ Classification = Classification.substring(0, 1);
+ }
+ set_Value (COLUMNNAME_Classification, Classification);
+ }
+
+ /** Get Classification.
+ @return Classification for grouping
+ */
+ public String getClassification ()
+ {
+ return (String)get_Value(COLUMNNAME_Classification);
+ }
+
+ public I_C_RevenueRecognition getC_RevenueRecognition() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_RevenueRecognition.Table_Name);
+ I_C_RevenueRecognition result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_RevenueRecognition)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_RevenueRecognition_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Revenue Recognition.
+ @param C_RevenueRecognition_ID
+ Method for recording revenue
+ */
+ public void setC_RevenueRecognition_ID (int C_RevenueRecognition_ID)
+ {
+ if (C_RevenueRecognition_ID < 1)
+ set_Value (COLUMNNAME_C_RevenueRecognition_ID, null);
+ else
+ set_Value (COLUMNNAME_C_RevenueRecognition_ID, Integer.valueOf(C_RevenueRecognition_ID));
+ }
+
+ /** Get Revenue Recognition.
+ @return Method for recording revenue
+ */
+ public int getC_RevenueRecognition_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_RevenueRecognition_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set Subscription Type.
+ @param C_SubscriptionType_ID
+ Type of subscription
+ */
+ public void setC_SubscriptionType_ID (int C_SubscriptionType_ID)
+ {
+ if (C_SubscriptionType_ID < 1)
+ set_Value (COLUMNNAME_C_SubscriptionType_ID, null);
+ else
+ set_Value (COLUMNNAME_C_SubscriptionType_ID, Integer.valueOf(C_SubscriptionType_ID));
+ }
+
+ /** Get Subscription Type.
+ @return Type of subscription
+ */
+ public int getC_SubscriptionType_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_SubscriptionType_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_C_TaxCategory getC_TaxCategory() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_TaxCategory.Table_Name);
+ I_C_TaxCategory result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_TaxCategory)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_TaxCategory_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Tax Category.
+ @param C_TaxCategory_ID
+ Tax Category
+ */
+ public void setC_TaxCategory_ID (int C_TaxCategory_ID)
+ {
+ if (C_TaxCategory_ID < 1)
+ throw new IllegalArgumentException ("C_TaxCategory_ID is mandatory.");
+ set_Value (COLUMNNAME_C_TaxCategory_ID, Integer.valueOf(C_TaxCategory_ID));
+ }
+
+ /** Get Tax Category.
+ @return Tax Category
+ */
+ public int getC_TaxCategory_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_TaxCategory_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_C_UOM getC_UOM() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_UOM.Table_Name);
+ I_C_UOM result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_UOM)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_UOM_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set UOM.
+ @param C_UOM_ID
+ Unit of Measure
+ */
+ public void setC_UOM_ID (int C_UOM_ID)
+ {
+ if (C_UOM_ID < 1)
+ throw new IllegalArgumentException ("C_UOM_ID is mandatory.");
+ set_Value (COLUMNNAME_C_UOM_ID, Integer.valueOf(C_UOM_ID));
+ }
+
+ /** Get UOM.
+ @return Unit of Measure
+ */
+ public int getC_UOM_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_UOM_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set Description.
+ @param Description
+ Optional short description of the record
+ */
+ public void setDescription (String Description)
+ {
+
+ if (Description != null && Description.length() > 255)
+ {
+ log.warning("Length > 255 - truncated");
+ Description = Description.substring(0, 255);
+ }
+ set_Value (COLUMNNAME_Description, Description);
+ }
+
+ /** Get Description.
+ @return Optional short description of the record
+ */
+ public String getDescription ()
+ {
+ return (String)get_Value(COLUMNNAME_Description);
+ }
+
+ /** Set Description URL.
+ @param DescriptionURL
+ URL for the description
+ */
+ public void setDescriptionURL (String DescriptionURL)
+ {
+
+ if (DescriptionURL != null && DescriptionURL.length() > 120)
+ {
+ log.warning("Length > 120 - truncated");
+ DescriptionURL = DescriptionURL.substring(0, 120);
+ }
+ set_Value (COLUMNNAME_DescriptionURL, DescriptionURL);
+ }
+
+ /** Get Description URL.
+ @return URL for the description
+ */
+ public String getDescriptionURL ()
+ {
+ return (String)get_Value(COLUMNNAME_DescriptionURL);
+ }
+
+ /** Set Discontinued.
+ @param Discontinued
+ This product is no longer available
+ */
+ public void setDiscontinued (boolean Discontinued)
+ {
+ set_Value (COLUMNNAME_Discontinued, Boolean.valueOf(Discontinued));
+ }
+
+ /** Get Discontinued.
+ @return This product is no longer available
+ */
+ public boolean isDiscontinued ()
+ {
+ Object oo = get_Value(COLUMNNAME_Discontinued);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Discontinued by.
+ @param DiscontinuedBy
+ Discontinued By
+ */
+ public void setDiscontinuedBy (Timestamp DiscontinuedBy)
+ {
+ set_Value (COLUMNNAME_DiscontinuedBy, DiscontinuedBy);
+ }
+
+ /** Get Discontinued by.
+ @return Discontinued By
+ */
+ public Timestamp getDiscontinuedBy ()
+ {
+ return (Timestamp)get_Value(COLUMNNAME_DiscontinuedBy);
+ }
+
+ /** Set Document Note.
+ @param DocumentNote
+ Additional information for a Document
+ */
+ public void setDocumentNote (String DocumentNote)
+ {
+
+ if (DocumentNote != null && DocumentNote.length() > 2000)
+ {
+ log.warning("Length > 2000 - truncated");
+ DocumentNote = DocumentNote.substring(0, 2000);
+ }
+ set_Value (COLUMNNAME_DocumentNote, DocumentNote);
+ }
+
+ /** Get Document Note.
+ @return Additional information for a Document
+ */
+ public String getDocumentNote ()
+ {
+ return (String)get_Value(COLUMNNAME_DocumentNote);
+ }
+
+ /** Set Group1.
+ @param Group1 Group1 */
+ public void setGroup1 (String Group1)
+ {
+
+ if (Group1 != null && Group1.length() > 255)
+ {
+ log.warning("Length > 255 - truncated");
+ Group1 = Group1.substring(0, 255);
+ }
+ set_Value (COLUMNNAME_Group1, Group1);
+ }
+
+ /** Get Group1.
+ @return Group1 */
+ public String getGroup1 ()
+ {
+ return (String)get_Value(COLUMNNAME_Group1);
+ }
+
+ /** Set Group2.
+ @param Group2 Group2 */
+ public void setGroup2 (String Group2)
+ {
+
+ if (Group2 != null && Group2.length() > 255)
+ {
+ log.warning("Length > 255 - truncated");
+ Group2 = Group2.substring(0, 255);
+ }
+ set_Value (COLUMNNAME_Group2, Group2);
+ }
+
+ /** Get Group2.
+ @return Group2 */
+ public String getGroup2 ()
+ {
+ return (String)get_Value(COLUMNNAME_Group2);
+ }
+
+ /** Set Guarantee Days.
+ @param GuaranteeDays
+ Number of days the product is guaranteed or available
+ */
+ public void setGuaranteeDays (int GuaranteeDays)
+ {
+ set_Value (COLUMNNAME_GuaranteeDays, Integer.valueOf(GuaranteeDays));
+ }
+
+ /** Get Guarantee Days.
+ @return Number of days the product is guaranteed or available
+ */
+ public int getGuaranteeDays ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_GuaranteeDays);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set Min Guarantee Days.
+ @param GuaranteeDaysMin
+ Minumum number of guarantee days
+ */
+ public void setGuaranteeDaysMin (int GuaranteeDaysMin)
+ {
+ set_Value (COLUMNNAME_GuaranteeDaysMin, Integer.valueOf(GuaranteeDaysMin));
+ }
+
+ /** Get Min Guarantee Days.
+ @return Minumum number of guarantee days
+ */
+ public int getGuaranteeDaysMin ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_GuaranteeDaysMin);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set Comment/Help.
+ @param Help
+ Comment or Hint
+ */
+ public void setHelp (String Help)
+ {
+
+ if (Help != null && Help.length() > 2000)
+ {
+ log.warning("Length > 2000 - truncated");
+ Help = Help.substring(0, 2000);
+ }
+ set_Value (COLUMNNAME_Help, Help);
+ }
+
+ /** Get Comment/Help.
+ @return Comment or Hint
+ */
+ public String getHelp ()
+ {
+ return (String)get_Value(COLUMNNAME_Help);
+ }
+
+ /** Set Image URL.
+ @param ImageURL
+ URL of image
+ */
+ public void setImageURL (String ImageURL)
+ {
+
+ if (ImageURL != null && ImageURL.length() > 120)
+ {
+ log.warning("Length > 120 - truncated");
+ ImageURL = ImageURL.substring(0, 120);
+ }
+ set_Value (COLUMNNAME_ImageURL, ImageURL);
+ }
+
+ /** Get Image URL.
+ @return URL of image
+ */
+ public String getImageURL ()
+ {
+ return (String)get_Value(COLUMNNAME_ImageURL);
+ }
+
+ /** Set Bill of Materials.
+ @param IsBOM
+ Bill of Materials
+ */
+ public void setIsBOM (boolean IsBOM)
+ {
+ set_Value (COLUMNNAME_IsBOM, Boolean.valueOf(IsBOM));
+ }
+
+ /** Get Bill of Materials.
+ @return Bill of Materials
+ */
+ public boolean isBOM ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsBOM);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Drop Shipment.
+ @param IsDropShip
+ Drop Shipments are sent from the Vendor directly to the Customer
+ */
+ public void setIsDropShip (boolean IsDropShip)
+ {
+ set_Value (COLUMNNAME_IsDropShip, Boolean.valueOf(IsDropShip));
+ }
+
+ /** Get Drop Shipment.
+ @return Drop Shipments are sent from the Vendor directly to the Customer
+ */
+ public boolean isDropShip ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsDropShip);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Exclude Auto Delivery.
+ @param IsExcludeAutoDelivery
+ Exclude from automatic Delivery
+ */
+ public void setIsExcludeAutoDelivery (boolean IsExcludeAutoDelivery)
+ {
+ set_Value (COLUMNNAME_IsExcludeAutoDelivery, Boolean.valueOf(IsExcludeAutoDelivery));
+ }
+
+ /** Get Exclude Auto Delivery.
+ @return Exclude from automatic Delivery
+ */
+ public boolean isExcludeAutoDelivery ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsExcludeAutoDelivery);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Print detail records on invoice .
+ @param IsInvoicePrintDetails
+ Print detail BOM elements on the invoice
+ */
+ public void setIsInvoicePrintDetails (boolean IsInvoicePrintDetails)
+ {
+ set_Value (COLUMNNAME_IsInvoicePrintDetails, Boolean.valueOf(IsInvoicePrintDetails));
+ }
+
+ /** Get Print detail records on invoice .
+ @return Print detail BOM elements on the invoice
+ */
+ public boolean isInvoicePrintDetails ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsInvoicePrintDetails);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Print detail records on pick list.
+ @param IsPickListPrintDetails
+ Print detail BOM elements on the pick list
+ */
+ public void setIsPickListPrintDetails (boolean IsPickListPrintDetails)
+ {
+ set_Value (COLUMNNAME_IsPickListPrintDetails, Boolean.valueOf(IsPickListPrintDetails));
+ }
+
+ /** Get Print detail records on pick list.
+ @return Print detail BOM elements on the pick list
+ */
+ public boolean isPickListPrintDetails ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsPickListPrintDetails);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Purchased.
+ @param IsPurchased
+ Organization purchases this product
+ */
+ public void setIsPurchased (boolean IsPurchased)
+ {
+ set_Value (COLUMNNAME_IsPurchased, Boolean.valueOf(IsPurchased));
+ }
+
+ /** Get Purchased.
+ @return Organization purchases this product
+ */
+ public boolean isPurchased ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsPurchased);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Self-Service.
+ @param IsSelfService
+ This is a Self-Service entry or this entry can be changed via Self-Service
+ */
+ public void setIsSelfService (boolean IsSelfService)
+ {
+ set_Value (COLUMNNAME_IsSelfService, Boolean.valueOf(IsSelfService));
+ }
+
+ /** Get Self-Service.
+ @return This is a Self-Service entry or this entry can be changed via Self-Service
+ */
+ public boolean isSelfService ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsSelfService);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Sold.
+ @param IsSold
+ Organization sells this product
+ */
+ public void setIsSold (boolean IsSold)
+ {
+ set_Value (COLUMNNAME_IsSold, Boolean.valueOf(IsSold));
+ }
+
+ /** Get Sold.
+ @return Organization sells this product
+ */
+ public boolean isSold ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsSold);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Stocked.
+ @param IsStocked
+ Organization stocks this product
+ */
+ public void setIsStocked (boolean IsStocked)
+ {
+ set_Value (COLUMNNAME_IsStocked, Boolean.valueOf(IsStocked));
+ }
+
+ /** Get Stocked.
+ @return Organization stocks this product
+ */
+ public boolean isStocked ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsStocked);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Summary Level.
+ @param IsSummary
+ This is a summary entity
+ */
+ public void setIsSummary (boolean IsSummary)
+ {
+ set_Value (COLUMNNAME_IsSummary, Boolean.valueOf(IsSummary));
+ }
+
+ /** Get Summary Level.
+ @return This is a summary entity
+ */
+ public boolean isSummary ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsSummary);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Verified.
+ @param IsVerified
+ The BOM configuration has been verified
+ */
+ public void setIsVerified (boolean IsVerified)
+ {
+ set_ValueNoCheck (COLUMNNAME_IsVerified, Boolean.valueOf(IsVerified));
+ }
+
+ /** Get Verified.
+ @return The BOM configuration has been verified
+ */
+ public boolean isVerified ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsVerified);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Featured in Web Store.
+ @param IsWebStoreFeatured
+ If selected, the product is displayed in the inital or any empy search
+ */
+ public void setIsWebStoreFeatured (boolean IsWebStoreFeatured)
+ {
+ set_Value (COLUMNNAME_IsWebStoreFeatured, Boolean.valueOf(IsWebStoreFeatured));
+ }
+
+ /** Get Featured in Web Store.
+ @return If selected, the product is displayed in the inital or any empy search
+ */
+ public boolean isWebStoreFeatured ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsWebStoreFeatured);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ public I_M_AttributeSet getM_AttributeSet() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_M_AttributeSet.Table_Name);
+ I_M_AttributeSet result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_M_AttributeSet)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_AttributeSet_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Attribute Set.
+ @param M_AttributeSet_ID
+ Product Attribute Set
+ */
+ public void setM_AttributeSet_ID (int M_AttributeSet_ID)
+ {
+ if (M_AttributeSet_ID < 0)
+ set_Value (COLUMNNAME_M_AttributeSet_ID, null);
+ else
+ set_Value (COLUMNNAME_M_AttributeSet_ID, Integer.valueOf(M_AttributeSet_ID));
+ }
+
+ /** Get Attribute Set.
+ @return Product Attribute Set
+ */
+ public int getM_AttributeSet_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_M_AttributeSet_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set Attribute Set Instance.
+ @param M_AttributeSetInstance_ID
+ Product Attribute Set Instance
+ */
+ public void setM_AttributeSetInstance_ID (int M_AttributeSetInstance_ID)
+ {
+ if (M_AttributeSetInstance_ID < 0)
+ throw new IllegalArgumentException ("M_AttributeSetInstance_ID is mandatory.");
+ set_Value (COLUMNNAME_M_AttributeSetInstance_ID, Integer.valueOf(M_AttributeSetInstance_ID));
+ }
+
+ /** Get Attribute Set Instance.
+ @return Product Attribute Set Instance
+ */
+ public int getM_AttributeSetInstance_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_M_AttributeSetInstance_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_M_FreightCategory getM_FreightCategory() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_M_FreightCategory.Table_Name);
+ I_M_FreightCategory result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_M_FreightCategory)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_FreightCategory_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Freight Category.
+ @param M_FreightCategory_ID
+ Category of the Freight
+ */
+ public void setM_FreightCategory_ID (int M_FreightCategory_ID)
+ {
+ if (M_FreightCategory_ID < 1)
+ set_Value (COLUMNNAME_M_FreightCategory_ID, null);
+ else
+ set_Value (COLUMNNAME_M_FreightCategory_ID, Integer.valueOf(M_FreightCategory_ID));
+ }
+
+ /** Get Freight Category.
+ @return Category of the Freight
+ */
+ public int getM_FreightCategory_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_M_FreightCategory_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set Locator.
+ @param M_Locator_ID
+ Warehouse Locator
+ */
+ public void setM_Locator_ID (int M_Locator_ID)
+ {
+ if (M_Locator_ID < 1)
+ set_Value (COLUMNNAME_M_Locator_ID, null);
+ else
+ set_Value (COLUMNNAME_M_Locator_ID, Integer.valueOf(M_Locator_ID));
+ }
+
+ /** Get Locator.
+ @return Warehouse Locator
+ */
+ public int getM_Locator_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_M_Locator_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** M_Product_Category_ID AD_Reference_ID=163 */
+ public static final int M_PRODUCT_CATEGORY_ID_AD_Reference_ID=163;
+ public I_M_Product_Category getM_Product_Category() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_M_Product_Category.Table_Name);
+ I_M_Product_Category result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_M_Product_Category)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_Product_Category_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Product Category.
+ @param M_Product_Category_ID
+ Category of a Product
+ */
+ public void setM_Product_Category_ID (int M_Product_Category_ID)
+ {
+ if (M_Product_Category_ID < 1)
+ throw new IllegalArgumentException ("M_Product_Category_ID is mandatory.");
+ set_Value (COLUMNNAME_M_Product_Category_ID, Integer.valueOf(M_Product_Category_ID));
+ }
+
+ /** Get Product Category.
+ @return Category of a Product
+ */
+ public int getM_Product_Category_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_Category_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set Product.
+ @param M_Product_ID
+ Product, Service, Item
+ */
+ public void setM_Product_ID (int M_Product_ID)
+ {
+ if (M_Product_ID < 1)
+ throw new IllegalArgumentException ("M_Product_ID is mandatory.");
+ set_ValueNoCheck (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID));
+ }
+
+ /** Get Product.
+ @return Product, Service, Item
+ */
+ public int getM_Product_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set Name.
+ @param Name
+ Alphanumeric identifier of the entity
+ */
+ public void setName (String Name)
+ {
+ if (Name == null)
+ throw new IllegalArgumentException ("Name is mandatory.");
+
+ if (Name.length() > 60)
+ {
+ log.warning("Length > 60 - truncated");
+ Name = Name.substring(0, 60);
+ }
+ set_Value (COLUMNNAME_Name, Name);
+ }
+
+ /** Get Name.
+ @return Alphanumeric identifier of the entity
+ */
+ public String getName ()
+ {
+ return (String)get_Value(COLUMNNAME_Name);
+ }
+
+ /** Get Record ID/ColumnName
+ @return ID/ColumnName pair
+ */
+ public KeyNamePair getKeyNamePair()
+ {
+ return new KeyNamePair(get_ID(), getName());
+ }
+
+ /** Set Process Now.
+ @param Processing Process Now */
+ public void setProcessing (boolean Processing)
+ {
+ set_Value (COLUMNNAME_Processing, Boolean.valueOf(Processing));
+ }
+
+ /** Get Process Now.
+ @return Process Now */
+ public boolean isProcessing ()
+ {
+ Object oo = get_Value(COLUMNNAME_Processing);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** ProductType AD_Reference_ID=270 */
+ public static final int PRODUCTTYPE_AD_Reference_ID=270;
+ /** Item = I */
+ public static final String PRODUCTTYPE_Item = "I";
+ /** Service = S */
+ public static final String PRODUCTTYPE_Service = "S";
+ /** Resource = R */
+ public static final String PRODUCTTYPE_Resource = "R";
+ /** Expense type = E */
+ public static final String PRODUCTTYPE_ExpenseType = "E";
+ /** Online = O */
+ public static final String PRODUCTTYPE_Online = "O";
+ /** Set Product Type.
+ @param ProductType
+ Type of product
+ */
+ public void setProductType (String ProductType)
+ {
+ if (ProductType == null) throw new IllegalArgumentException ("ProductType is mandatory");
+ if (ProductType.equals("I") || ProductType.equals("S") || ProductType.equals("R") || ProductType.equals("E") || ProductType.equals("O")); else throw new IllegalArgumentException ("ProductType Invalid value - " + ProductType + " - Reference_ID=270 - I - S - R - E - O");
+ if (ProductType.length() > 1)
+ {
+ log.warning("Length > 1 - truncated");
+ ProductType = ProductType.substring(0, 1);
+ }
+ set_Value (COLUMNNAME_ProductType, ProductType);
+ }
+
+ /** Get Product Type.
+ @return Type of product
+ */
+ public String getProductType ()
+ {
+ return (String)get_Value(COLUMNNAME_ProductType);
+ }
+
+ public I_R_MailText getR_MailText() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_R_MailText.Table_Name);
+ I_R_MailText result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_R_MailText)constructor.newInstance(new Object[] {getCtx(), new Integer(getR_MailText_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Mail Template.
+ @param R_MailText_ID
+ Text templates for mailings
+ */
+ public void setR_MailText_ID (int R_MailText_ID)
+ {
+ if (R_MailText_ID < 1)
+ set_Value (COLUMNNAME_R_MailText_ID, null);
+ else
+ set_Value (COLUMNNAME_R_MailText_ID, Integer.valueOf(R_MailText_ID));
+ }
+
+ /** Get Mail Template.
+ @return Text templates for mailings
+ */
+ public int getR_MailText_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_R_MailText_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** SalesRep_ID AD_Reference_ID=190 */
+ public static final int SALESREP_ID_AD_Reference_ID=190;
+ /** Set Sales Representative.
+ @param SalesRep_ID
+ Sales Representative or Company Agent
+ */
+ public void setSalesRep_ID (int SalesRep_ID)
+ {
+ if (SalesRep_ID < 1)
+ set_Value (COLUMNNAME_SalesRep_ID, null);
+ else
+ set_Value (COLUMNNAME_SalesRep_ID, Integer.valueOf(SalesRep_ID));
+ }
+
+ /** Get Sales Representative.
+ @return Sales Representative or Company Agent
+ */
+ public int getSalesRep_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_SalesRep_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_S_ExpenseType getS_ExpenseType() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_S_ExpenseType.Table_Name);
+ I_S_ExpenseType result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_S_ExpenseType)constructor.newInstance(new Object[] {getCtx(), new Integer(getS_ExpenseType_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Expense Type.
+ @param S_ExpenseType_ID
+ Expense report type
+ */
+ public void setS_ExpenseType_ID (int S_ExpenseType_ID)
+ {
+ if (S_ExpenseType_ID < 1)
+ set_ValueNoCheck (COLUMNNAME_S_ExpenseType_ID, null);
+ else
+ set_ValueNoCheck (COLUMNNAME_S_ExpenseType_ID, Integer.valueOf(S_ExpenseType_ID));
+ }
+
+ /** Get Expense Type.
+ @return Expense report type
+ */
+ public int getS_ExpenseType_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_S_ExpenseType_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set Shelf Depth.
+ @param ShelfDepth
+ Shelf depth required
+ */
+ public void setShelfDepth (int ShelfDepth)
+ {
+ set_Value (COLUMNNAME_ShelfDepth, Integer.valueOf(ShelfDepth));
+ }
+
+ /** Get Shelf Depth.
+ @return Shelf depth required
+ */
+ public int getShelfDepth ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_ShelfDepth);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set Shelf Height.
+ @param ShelfHeight
+ Shelf height required
+ */
+ public void setShelfHeight (int ShelfHeight)
+ {
+ set_Value (COLUMNNAME_ShelfHeight, Integer.valueOf(ShelfHeight));
+ }
+
+ /** Get Shelf Height.
+ @return Shelf height required
+ */
+ public int getShelfHeight ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_ShelfHeight);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set Shelf Width.
+ @param ShelfWidth
+ Shelf width required
+ */
+ public void setShelfWidth (int ShelfWidth)
+ {
+ set_Value (COLUMNNAME_ShelfWidth, Integer.valueOf(ShelfWidth));
+ }
+
+ /** Get Shelf Width.
+ @return Shelf width required
+ */
+ public int getShelfWidth ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_ShelfWidth);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set SKU.
+ @param SKU
+ Stock Keeping Unit
+ */
+ public void setSKU (String SKU)
+ {
+
+ if (SKU != null && SKU.length() > 30)
+ {
+ log.warning("Length > 30 - truncated");
+ SKU = SKU.substring(0, 30);
+ }
+ set_Value (COLUMNNAME_SKU, SKU);
+ }
+
+ /** Get SKU.
+ @return Stock Keeping Unit
+ */
+ public String getSKU ()
+ {
+ return (String)get_Value(COLUMNNAME_SKU);
+ }
+
+ public I_S_Resource getS_Resource() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_S_Resource.Table_Name);
+ I_S_Resource result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_S_Resource)constructor.newInstance(new Object[] {getCtx(), new Integer(getS_Resource_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Resource.
+ @param S_Resource_ID
+ Resource
+ */
+ public void setS_Resource_ID (int S_Resource_ID)
+ {
+ if (S_Resource_ID < 1)
+ set_ValueNoCheck (COLUMNNAME_S_Resource_ID, null);
+ else
+ set_ValueNoCheck (COLUMNNAME_S_Resource_ID, Integer.valueOf(S_Resource_ID));
+ }
+
+ /** Get Resource.
+ @return Resource
+ */
+ public int getS_Resource_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_S_Resource_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set UnitsPerPack.
+ @param UnitsPerPack
+ The Units Per Pack indicates the no of units of a product packed together.
+ */
+ public void setUnitsPerPack (int UnitsPerPack)
+ {
+ set_Value (COLUMNNAME_UnitsPerPack, Integer.valueOf(UnitsPerPack));
+ }
+
+ /** Get UnitsPerPack.
+ @return The Units Per Pack indicates the no of units of a product packed together.
+ */
+ public int getUnitsPerPack ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_UnitsPerPack);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set Units Per Pallet.
+ @param UnitsPerPallet
+ Units Per Pallet
+ */
+ public void setUnitsPerPallet (int UnitsPerPallet)
+ {
+ set_Value (COLUMNNAME_UnitsPerPallet, Integer.valueOf(UnitsPerPallet));
+ }
+
+ /** Get Units Per Pallet.
+ @return Units Per Pallet
+ */
+ public int getUnitsPerPallet ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_UnitsPerPallet);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set UPC/EAN.
+ @param UPC
+ Bar Code (Universal Product Code or its superset European Article Number)
+ */
+ public void setUPC (String UPC)
+ {
+
+ if (UPC != null && UPC.length() > 30)
+ {
+ log.warning("Length > 30 - truncated");
+ UPC = UPC.substring(0, 30);
+ }
+ set_Value (COLUMNNAME_UPC, UPC);
+ }
+
+ /** Get UPC/EAN.
+ @return Bar Code (Universal Product Code or its superset European Article Number)
+ */
+ public String getUPC ()
+ {
+ return (String)get_Value(COLUMNNAME_UPC);
+ }
+
+ /** Set Search Key.
+ @param Value
+ Search key for the record in the format required - must be unique
+ */
+ public void setValue (String Value)
+ {
+ if (Value == null)
+ throw new IllegalArgumentException ("Value is mandatory.");
+
+ if (Value.length() > 40)
+ {
+ log.warning("Length > 40 - truncated");
+ Value = Value.substring(0, 40);
+ }
+ set_Value (COLUMNNAME_Value, Value);
+ }
+
+ /** Get Search Key.
+ @return Search key for the record in the format required - must be unique
+ */
+ public String getValue ()
+ {
+ return (String)get_Value(COLUMNNAME_Value);
+ }
+
+ /** Set Version No.
+ @param VersionNo
+ Version Number
+ */
+ public void setVersionNo (String VersionNo)
+ {
+
+ if (VersionNo != null && VersionNo.length() > 20)
+ {
+ log.warning("Length > 20 - truncated");
+ VersionNo = VersionNo.substring(0, 20);
+ }
+ set_Value (COLUMNNAME_VersionNo, VersionNo);
+ }
+
+ /** Get Version No.
+ @return Version Number
+ */
+ public String getVersionNo ()
+ {
+ return (String)get_Value(COLUMNNAME_VersionNo);
+ }
+
+ /** Set Volume.
+ @param Volume
+ Volume of a product
+ */
+ public void setVolume (BigDecimal Volume)
+ {
+ set_Value (COLUMNNAME_Volume, Volume);
+ }
+
+ /** Get Volume.
+ @return Volume of a product
+ */
+ public BigDecimal getVolume ()
+ {
+ BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Volume);
+ if (bd == null)
+ return Env.ZERO;
+ return bd;
+ }
+
+ /** Set Weight.
+ @param Weight
+ Weight of a product
+ */
+ public void setWeight (BigDecimal Weight)
+ {
+ set_Value (COLUMNNAME_Weight, Weight);
+ }
+
+ /** Get Weight.
+ @return Weight of a product
+ */
+ public BigDecimal getWeight ()
+ {
+ BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Weight);
+ if (bd == null)
+ return Env.ZERO;
+ return bd;
+ }
+}
\ No newline at end of file
diff --git a/posterita/posterita/src/main/org/compiere/model/X_U_POSTerminal.java b/posterita/posterita/src/main/org/compiere/model/X_U_POSTerminal.java
new file mode 100644
index 0000000000..b7b411bd85
--- /dev/null
+++ b/posterita/posterita/src/main/org/compiere/model/X_U_POSTerminal.java
@@ -0,0 +1,774 @@
+/******************************************************************************
+ * Product: Adempiere ERP & CRM Smart Business Solution *
+ * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. *
+ * This program is free software; you can redistribute it and/or modify it *
+ * under the terms version 2 of the GNU General Public License as published *
+ * by the Free Software Foundation. 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, write to the Free Software Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
+ * For the text or an alternative of this public license, you may reach us *
+ * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
+ * or via info@compiere.org or http://www.compiere.org/license.html *
+ *****************************************************************************/
+/** Generated Model - DO NOT CHANGE */
+package org.compiere.model;
+
+import java.lang.reflect.Constructor;
+import java.sql.ResultSet;
+import java.sql.Timestamp;
+import java.util.Properties;
+import java.util.logging.Level;
+
+/** Generated Model for U_POSTerminal
+ * @author Adempiere (generated)
+ * @version Release 3.4.0s - $Id$ */
+public class X_U_POSTerminal extends PO implements I_U_POSTerminal, I_Persistent
+{
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+
+ /** Standard Constructor */
+ public X_U_POSTerminal (Properties ctx, int U_POSTerminal_ID, String trxName)
+ {
+ super (ctx, U_POSTerminal_ID, trxName);
+ /** if (U_POSTerminal_ID == 0)
+ {
+ setAutoLock (false);
+// N
+ setCashBookTransferType (null);
+ setC_CashBook_ID (0);
+ setC_CashBPartner_ID (0);
+ setU_POSTerminal_ID (0);
+ } */
+ }
+
+ /** Load Constructor */
+ public X_U_POSTerminal (Properties ctx, ResultSet rs, String trxName)
+ {
+ super (ctx, rs, trxName);
+ }
+
+ /** AccessLevel
+ * @return 1 - Org
+ */
+ protected int get_AccessLevel()
+ {
+ return accessLevel.intValue();
+ }
+
+ /** Load Meta Data */
+ protected POInfo initPO (Properties ctx)
+ {
+ POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
+ return poi;
+ }
+
+ public String toString()
+ {
+ StringBuffer sb = new StringBuffer ("X_U_POSTerminal[")
+ .append(get_ID()).append("]");
+ return sb.toString();
+ }
+
+ /** Set Auto Lock.
+ @param AutoLock
+ Whether to automatically lock the terminal when till is closed
+ */
+ public void setAutoLock (boolean AutoLock)
+ {
+ set_Value (COLUMNNAME_AutoLock, Boolean.valueOf(AutoLock));
+ }
+
+ /** Get Auto Lock.
+ @return Whether to automatically lock the terminal when till is closed
+ */
+ public boolean isAutoLock ()
+ {
+ Object oo = get_Value(COLUMNNAME_AutoLock);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Card_BankAccount_ID AD_Reference_ID=52003 */
+ public static final int CARD_BANKACCOUNT_ID_AD_Reference_ID=52003;
+ /** Set Card Bank Account.
+ @param Card_BankAccount_ID
+ Bank Account on which card transactions will be processed
+ */
+ public void setCard_BankAccount_ID (int Card_BankAccount_ID)
+ {
+ if (Card_BankAccount_ID < 1)
+ set_Value (COLUMNNAME_Card_BankAccount_ID, null);
+ else
+ set_Value (COLUMNNAME_Card_BankAccount_ID, Integer.valueOf(Card_BankAccount_ID));
+ }
+
+ /** Get Card Bank Account.
+ @return Bank Account on which card transactions will be processed
+ */
+ public int getCard_BankAccount_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_Card_BankAccount_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** CardTransferBankAccount_ID AD_Reference_ID=52003 */
+ public static final int CARDTRANSFERBANKACCOUNT_ID_AD_Reference_ID=52003;
+ /** Set Transfer Card trx to.
+ @param CardTransferBankAccount_ID
+ Bank account on which to transfer Card transactions
+ */
+ public void setCardTransferBankAccount_ID (int CardTransferBankAccount_ID)
+ {
+ if (CardTransferBankAccount_ID < 1)
+ set_Value (COLUMNNAME_CardTransferBankAccount_ID, null);
+ else
+ set_Value (COLUMNNAME_CardTransferBankAccount_ID, Integer.valueOf(CardTransferBankAccount_ID));
+ }
+
+ /** Get Transfer Card trx to.
+ @return Bank account on which to transfer Card transactions
+ */
+ public int getCardTransferBankAccount_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_CardTransferBankAccount_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** CardTransferCashBook_ID AD_Reference_ID=52004 */
+ public static final int CARDTRANSFERCASHBOOK_ID_AD_Reference_ID=52004;
+ /** Set Transfer Card trx to.
+ @param CardTransferCashBook_ID
+ Cash Book on which to transfer all Card transactions
+ */
+ public void setCardTransferCashBook_ID (int CardTransferCashBook_ID)
+ {
+ if (CardTransferCashBook_ID < 1)
+ set_Value (COLUMNNAME_CardTransferCashBook_ID, null);
+ else
+ set_Value (COLUMNNAME_CardTransferCashBook_ID, Integer.valueOf(CardTransferCashBook_ID));
+ }
+
+ /** Get Transfer Card trx to.
+ @return Cash Book on which to transfer all Card transactions
+ */
+ public int getCardTransferCashBook_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_CardTransferCashBook_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** CardTransferType AD_Reference_ID=52002 */
+ public static final int CARDTRANSFERTYPE_AD_Reference_ID=52002;
+ /** Bank Account = B */
+ public static final String CARDTRANSFERTYPE_BankAccount = "B";
+ /** CashBook = C */
+ public static final String CARDTRANSFERTYPE_CashBook = "C";
+ /** Set Card Transfer Type.
+ @param CardTransferType Card Transfer Type */
+ public void setCardTransferType (String CardTransferType)
+ {
+
+ if (CardTransferType == null || CardTransferType.equals("B") || CardTransferType.equals("C")); else throw new IllegalArgumentException ("CardTransferType Invalid value - " + CardTransferType + " - Reference_ID=52002 - B - C");
+ if (CardTransferType != null && CardTransferType.length() > 1)
+ {
+ log.warning("Length > 1 - truncated");
+ CardTransferType = CardTransferType.substring(0, 1);
+ }
+ set_Value (COLUMNNAME_CardTransferType, CardTransferType);
+ }
+
+ /** Get Card Transfer Type.
+ @return Card Transfer Type */
+ public String getCardTransferType ()
+ {
+ return (String)get_Value(COLUMNNAME_CardTransferType);
+ }
+
+ /** CashBookTransferType AD_Reference_ID=52002 */
+ public static final int CASHBOOKTRANSFERTYPE_AD_Reference_ID=52002;
+ /** Bank Account = B */
+ public static final String CASHBOOKTRANSFERTYPE_BankAccount = "B";
+ /** CashBook = C */
+ public static final String CASHBOOKTRANSFERTYPE_CashBook = "C";
+ /** Set Cash Book Transfer Type.
+ @param CashBookTransferType
+ Where the money in the cash book should be transfered to. Either a Bank Account or another Cash Book
+ */
+ public void setCashBookTransferType (String CashBookTransferType)
+ {
+ if (CashBookTransferType == null) throw new IllegalArgumentException ("CashBookTransferType is mandatory");
+ if (CashBookTransferType.equals("B") || CashBookTransferType.equals("C")); else throw new IllegalArgumentException ("CashBookTransferType Invalid value - " + CashBookTransferType + " - Reference_ID=52002 - B - C");
+ if (CashBookTransferType.length() > 1)
+ {
+ log.warning("Length > 1 - truncated");
+ CashBookTransferType = CashBookTransferType.substring(0, 1);
+ }
+ set_Value (COLUMNNAME_CashBookTransferType, CashBookTransferType);
+ }
+
+ /** Get Cash Book Transfer Type.
+ @return Where the money in the cash book should be transfered to. Either a Bank Account or another Cash Book
+ */
+ public String getCashBookTransferType ()
+ {
+ return (String)get_Value(COLUMNNAME_CashBookTransferType);
+ }
+
+ /** CashTransferBankAccount_ID AD_Reference_ID=52003 */
+ public static final int CASHTRANSFERBANKACCOUNT_ID_AD_Reference_ID=52003;
+ /** Set Transfer Cash trx to.
+ @param CashTransferBankAccount_ID
+ Bank Account on which to transfer all Cash transactions
+ */
+ public void setCashTransferBankAccount_ID (int CashTransferBankAccount_ID)
+ {
+ if (CashTransferBankAccount_ID < 1)
+ set_Value (COLUMNNAME_CashTransferBankAccount_ID, null);
+ else
+ set_Value (COLUMNNAME_CashTransferBankAccount_ID, Integer.valueOf(CashTransferBankAccount_ID));
+ }
+
+ /** Get Transfer Cash trx to.
+ @return Bank Account on which to transfer all Cash transactions
+ */
+ public int getCashTransferBankAccount_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_CashTransferBankAccount_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** CashTransferCashBook_ID AD_Reference_ID=52004 */
+ public static final int CASHTRANSFERCASHBOOK_ID_AD_Reference_ID=52004;
+ /** Set Transfer Cash trx to.
+ @param CashTransferCashBook_ID
+ Cash Book on which to transfer all Cash transactions
+ */
+ public void setCashTransferCashBook_ID (int CashTransferCashBook_ID)
+ {
+ if (CashTransferCashBook_ID < 1)
+ set_Value (COLUMNNAME_CashTransferCashBook_ID, null);
+ else
+ set_Value (COLUMNNAME_CashTransferCashBook_ID, Integer.valueOf(CashTransferCashBook_ID));
+ }
+
+ /** Get Transfer Cash trx to.
+ @return Cash Book on which to transfer all Cash transactions
+ */
+ public int getCashTransferCashBook_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_CashTransferCashBook_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_C_CashBook getC_CashBook() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_C_CashBook.Table_Name);
+ I_C_CashBook result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_C_CashBook)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_CashBook_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Cash Book.
+ @param C_CashBook_ID
+ Cash Book for recording petty cash transactions
+ */
+ public void setC_CashBook_ID (int C_CashBook_ID)
+ {
+ if (C_CashBook_ID < 1)
+ throw new IllegalArgumentException ("C_CashBook_ID is mandatory.");
+ set_Value (COLUMNNAME_C_CashBook_ID, Integer.valueOf(C_CashBook_ID));
+ }
+
+ /** Get Cash Book.
+ @return Cash Book for recording petty cash transactions
+ */
+ public int getC_CashBook_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_CashBook_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** C_CashBPartner_ID AD_Reference_ID=173 */
+ public static final int C_CASHBPARTNER_ID_AD_Reference_ID=173;
+ /** Set Cash BPartner.
+ @param C_CashBPartner_ID
+ BPartner to be used for Cash transactions
+ */
+ public void setC_CashBPartner_ID (int C_CashBPartner_ID)
+ {
+ if (C_CashBPartner_ID < 1)
+ throw new IllegalArgumentException ("C_CashBPartner_ID is mandatory.");
+ set_Value (COLUMNNAME_C_CashBPartner_ID, Integer.valueOf(C_CashBPartner_ID));
+ }
+
+ /** Get Cash BPartner.
+ @return BPartner to be used for Cash transactions
+ */
+ public int getC_CashBPartner_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_CashBPartner_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Check_BankAccount_ID AD_Reference_ID=52003 */
+ public static final int CHECK_BANKACCOUNT_ID_AD_Reference_ID=52003;
+ /** Set Check Bank Account.
+ @param Check_BankAccount_ID
+ Bank Account to be used for processing Check transactions
+ */
+ public void setCheck_BankAccount_ID (int Check_BankAccount_ID)
+ {
+ if (Check_BankAccount_ID < 1)
+ set_Value (COLUMNNAME_Check_BankAccount_ID, null);
+ else
+ set_Value (COLUMNNAME_Check_BankAccount_ID, Integer.valueOf(Check_BankAccount_ID));
+ }
+
+ /** Get Check Bank Account.
+ @return Bank Account to be used for processing Check transactions
+ */
+ public int getCheck_BankAccount_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_Check_BankAccount_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** CheckTransferBankAccount_ID AD_Reference_ID=52003 */
+ public static final int CHECKTRANSFERBANKACCOUNT_ID_AD_Reference_ID=52003;
+ /** Set Tranfer Check trx to.
+ @param CheckTransferBankAccount_ID
+ Bank account on which to transfer Check transactions
+ */
+ public void setCheckTransferBankAccount_ID (int CheckTransferBankAccount_ID)
+ {
+ if (CheckTransferBankAccount_ID < 1)
+ set_Value (COLUMNNAME_CheckTransferBankAccount_ID, null);
+ else
+ set_Value (COLUMNNAME_CheckTransferBankAccount_ID, Integer.valueOf(CheckTransferBankAccount_ID));
+ }
+
+ /** Get Tranfer Check trx to.
+ @return Bank account on which to transfer Check transactions
+ */
+ public int getCheckTransferBankAccount_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_CheckTransferBankAccount_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** CheckTransferCashBook_ID AD_Reference_ID=52004 */
+ public static final int CHECKTRANSFERCASHBOOK_ID_AD_Reference_ID=52004;
+ /** Set Transfer Check trx to.
+ @param CheckTransferCashBook_ID
+ Cash Book on which to transfer all Check transactions
+ */
+ public void setCheckTransferCashBook_ID (int CheckTransferCashBook_ID)
+ {
+ if (CheckTransferCashBook_ID < 1)
+ set_Value (COLUMNNAME_CheckTransferCashBook_ID, null);
+ else
+ set_Value (COLUMNNAME_CheckTransferCashBook_ID, Integer.valueOf(CheckTransferCashBook_ID));
+ }
+
+ /** Get Transfer Check trx to.
+ @return Cash Book on which to transfer all Check transactions
+ */
+ public int getCheckTransferCashBook_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_CheckTransferCashBook_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** CheckTransferType AD_Reference_ID=52002 */
+ public static final int CHECKTRANSFERTYPE_AD_Reference_ID=52002;
+ /** Bank Account = B */
+ public static final String CHECKTRANSFERTYPE_BankAccount = "B";
+ /** CashBook = C */
+ public static final String CHECKTRANSFERTYPE_CashBook = "C";
+ /** Set Check Transfer Type.
+ @param CheckTransferType Check Transfer Type */
+ public void setCheckTransferType (String CheckTransferType)
+ {
+
+ if (CheckTransferType == null || CheckTransferType.equals("B") || CheckTransferType.equals("C")); else throw new IllegalArgumentException ("CheckTransferType Invalid value - " + CheckTransferType + " - Reference_ID=52002 - B - C");
+ if (CheckTransferType != null && CheckTransferType.length() > 1)
+ {
+ log.warning("Length > 1 - truncated");
+ CheckTransferType = CheckTransferType.substring(0, 1);
+ }
+ set_Value (COLUMNNAME_CheckTransferType, CheckTransferType);
+ }
+
+ /** Get Check Transfer Type.
+ @return Check Transfer Type */
+ public String getCheckTransferType ()
+ {
+ return (String)get_Value(COLUMNNAME_CheckTransferType);
+ }
+
+ /** C_TemplateBPartner_ID AD_Reference_ID=173 */
+ public static final int C_TEMPLATEBPARTNER_ID_AD_Reference_ID=173;
+ /** Set Template BPartner.
+ @param C_TemplateBPartner_ID
+ BPartner that is to be used as template when new customers are created
+ */
+ public void setC_TemplateBPartner_ID (int C_TemplateBPartner_ID)
+ {
+ if (C_TemplateBPartner_ID < 1)
+ set_Value (COLUMNNAME_C_TemplateBPartner_ID, null);
+ else
+ set_Value (COLUMNNAME_C_TemplateBPartner_ID, Integer.valueOf(C_TemplateBPartner_ID));
+ }
+
+ /** Get Template BPartner.
+ @return BPartner that is to be used as template when new customers are created
+ */
+ public int getC_TemplateBPartner_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_C_TemplateBPartner_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set Description.
+ @param Description
+ Optional short description of the record
+ */
+ public void setDescription (String Description)
+ {
+
+ if (Description != null && Description.length() > 255)
+ {
+ log.warning("Length > 255 - truncated");
+ Description = Description.substring(0, 255);
+ }
+ set_Value (COLUMNNAME_Description, Description);
+ }
+
+ /** Get Description.
+ @return Optional short description of the record
+ */
+ public String getDescription ()
+ {
+ return (String)get_Value(COLUMNNAME_Description);
+ }
+
+ /** Set Comment/Help.
+ @param Help
+ Comment or Hint
+ */
+ public void setHelp (String Help)
+ {
+
+ if (Help != null && Help.length() > 2000)
+ {
+ log.warning("Length > 2000 - truncated");
+ Help = Help.substring(0, 2000);
+ }
+ set_Value (COLUMNNAME_Help, Help);
+ }
+
+ /** Get Comment/Help.
+ @return Comment or Hint
+ */
+ public String getHelp ()
+ {
+ return (String)get_Value(COLUMNNAME_Help);
+ }
+
+ /** Set Last Lock Time.
+ @param LastLockTime
+ Last time at which the terminal was locked
+ */
+ public void setLastLockTime (Timestamp LastLockTime)
+ {
+ set_Value (COLUMNNAME_LastLockTime, LastLockTime);
+ }
+
+ /** Get Last Lock Time.
+ @return Last time at which the terminal was locked
+ */
+ public Timestamp getLastLockTime ()
+ {
+ return (Timestamp)get_Value(COLUMNNAME_LastLockTime);
+ }
+
+ /** Set Locked.
+ @param Locked
+ Whether the terminal is locked
+ */
+ public void setLocked (boolean Locked)
+ {
+ set_Value (COLUMNNAME_Locked, Boolean.valueOf(Locked));
+ }
+
+ /** Get Locked.
+ @return Whether the terminal is locked
+ */
+ public boolean isLocked ()
+ {
+ Object oo = get_Value(COLUMNNAME_Locked);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Lock Time.
+ @param LockTime
+ Time in minutes the terminal should be kept in a locked state.
+ */
+ public void setLockTime (int LockTime)
+ {
+ set_Value (COLUMNNAME_LockTime, Integer.valueOf(LockTime));
+ }
+
+ /** Get Lock Time.
+ @return Time in minutes the terminal should be kept in a locked state.
+ */
+ public int getLockTime ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_LockTime);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ public I_M_Warehouse getM_Warehouse() throws Exception
+ {
+ Class> clazz = MTable.getClass(I_M_Warehouse.Table_Name);
+ I_M_Warehouse result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_M_Warehouse)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_Warehouse_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw e;
+ }
+ return result;
+ }
+
+ /** Set Warehouse.
+ @param M_Warehouse_ID
+ Storage Warehouse and Service Point
+ */
+ public void setM_Warehouse_ID (int M_Warehouse_ID)
+ {
+ if (M_Warehouse_ID < 1)
+ set_Value (COLUMNNAME_M_Warehouse_ID, null);
+ else
+ set_Value (COLUMNNAME_M_Warehouse_ID, Integer.valueOf(M_Warehouse_ID));
+ }
+
+ /** Get Warehouse.
+ @return Storage Warehouse and Service Point
+ */
+ public int getM_Warehouse_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_M_Warehouse_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set Name.
+ @param Name
+ Alphanumeric identifier of the entity
+ */
+ public void setName (String Name)
+ {
+
+ if (Name != null && Name.length() > 60)
+ {
+ log.warning("Length > 60 - truncated");
+ Name = Name.substring(0, 60);
+ }
+ set_Value (COLUMNNAME_Name, Name);
+ }
+
+ /** Get Name.
+ @return Alphanumeric identifier of the entity
+ */
+ public String getName ()
+ {
+ return (String)get_Value(COLUMNNAME_Name);
+ }
+
+ /** PO_PriceList_ID AD_Reference_ID=166 */
+ public static final int PO_PRICELIST_ID_AD_Reference_ID=166;
+ /** Set Purchase Pricelist.
+ @param PO_PriceList_ID
+ Price List used by this Business Partner
+ */
+ public void setPO_PriceList_ID (int PO_PriceList_ID)
+ {
+ if (PO_PriceList_ID < 1)
+ set_Value (COLUMNNAME_PO_PriceList_ID, null);
+ else
+ set_Value (COLUMNNAME_PO_PriceList_ID, Integer.valueOf(PO_PriceList_ID));
+ }
+
+ /** Get Purchase Pricelist.
+ @return Price List used by this Business Partner
+ */
+ public int getPO_PriceList_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_PO_PriceList_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set Printer Name.
+ @param PrinterName
+ Name of the Printer
+ */
+ public void setPrinterName (String PrinterName)
+ {
+
+ if (PrinterName != null && PrinterName.length() > 60)
+ {
+ log.warning("Length > 60 - truncated");
+ PrinterName = PrinterName.substring(0, 60);
+ }
+ set_Value (COLUMNNAME_PrinterName, PrinterName);
+ }
+
+ /** Get Printer Name.
+ @return Name of the Printer
+ */
+ public String getPrinterName ()
+ {
+ return (String)get_Value(COLUMNNAME_PrinterName);
+ }
+
+ /** SalesRep_ID AD_Reference_ID=316 */
+ public static final int SALESREP_ID_AD_Reference_ID=316;
+ /** Set Sales Representative.
+ @param SalesRep_ID
+ Sales Representative or Company Agent
+ */
+ public void setSalesRep_ID (int SalesRep_ID)
+ {
+ if (SalesRep_ID < 1)
+ set_Value (COLUMNNAME_SalesRep_ID, null);
+ else
+ set_Value (COLUMNNAME_SalesRep_ID, Integer.valueOf(SalesRep_ID));
+ }
+
+ /** Get Sales Representative.
+ @return Sales Representative or Company Agent
+ */
+ public int getSalesRep_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_SalesRep_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** SO_PriceList_ID AD_Reference_ID=166 */
+ public static final int SO_PRICELIST_ID_AD_Reference_ID=166;
+ /** Set Sales Pricelist.
+ @param SO_PriceList_ID Sales Pricelist */
+ public void setSO_PriceList_ID (int SO_PriceList_ID)
+ {
+ if (SO_PriceList_ID < 1)
+ set_Value (COLUMNNAME_SO_PriceList_ID, null);
+ else
+ set_Value (COLUMNNAME_SO_PriceList_ID, Integer.valueOf(SO_PriceList_ID));
+ }
+
+ /** Get Sales Pricelist.
+ @return Sales Pricelist */
+ public int getSO_PriceList_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_SO_PriceList_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set UnlockingTime.
+ @param UnlockingTime
+ Time at which the terminal should be unlocked
+ */
+ public void setUnlockingTime (Timestamp UnlockingTime)
+ {
+ set_Value (COLUMNNAME_UnlockingTime, UnlockingTime);
+ }
+
+ /** Get UnlockingTime.
+ @return Time at which the terminal should be unlocked
+ */
+ public Timestamp getUnlockingTime ()
+ {
+ return (Timestamp)get_Value(COLUMNNAME_UnlockingTime);
+ }
+
+ /** Set POS Terminal.
+ @param U_POSTerminal_ID POS Terminal */
+ public void setU_POSTerminal_ID (int U_POSTerminal_ID)
+ {
+ if (U_POSTerminal_ID < 1)
+ throw new IllegalArgumentException ("U_POSTerminal_ID is mandatory.");
+ set_ValueNoCheck (COLUMNNAME_U_POSTerminal_ID, Integer.valueOf(U_POSTerminal_ID));
+ }
+
+ /** Get POS Terminal.
+ @return POS Terminal */
+ public int getU_POSTerminal_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_U_POSTerminal_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+}
\ No newline at end of file
diff --git a/posterita/posterita/src/main/org/compiere/report/ReportStarter.java b/posterita/posterita/src/main/org/compiere/report/ReportStarter.java
new file mode 100644
index 0000000000..d6896b52e0
--- /dev/null
+++ b/posterita/posterita/src/main/org/compiere/report/ReportStarter.java
@@ -0,0 +1,1123 @@
+/*
+ */
+package org.compiere.report;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.FilenameFilter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.math.BigDecimal;
+import java.net.InetAddress;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.net.UnknownHostException;
+import java.rmi.RemoteException;
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.Map;
+import java.util.Properties;
+import java.util.PropertyResourceBundle;
+
+import javax.ejb.CreateException;
+import javax.ejb.RemoveException;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+import net.sf.jasperreports.engine.JRException;
+import net.sf.jasperreports.engine.JasperCompileManager;
+import net.sf.jasperreports.engine.JasperFillManager;
+import net.sf.jasperreports.engine.JasperPrint;
+import net.sf.jasperreports.engine.JasperReport;
+import net.sf.jasperreports.engine.util.JRLoader;
+
+import org.compiere.db.CConnection;
+import org.compiere.db.ServerConnection;
+import org.compiere.interfaces.MD5;
+import org.compiere.interfaces.MD5Home;
+import org.compiere.model.MAttachment;
+import org.compiere.model.MAttachmentEntry;
+import org.compiere.model.MProcess;
+import org.compiere.process.ClientProcess;
+import org.compiere.process.ProcessCall;
+import org.compiere.process.ProcessInfo;
+import org.compiere.process.ProcessInfoParameter;
+import org.compiere.util.CLogger;
+import org.compiere.util.DB;
+import org.compiere.util.Env;
+import org.compiere.util.Ini;
+import org.compiere.util.Language;
+import org.compiere.util.Trx;
+import org.compiere.utils.DBUtils;
+import org.compiere.utils.DigestOfFile;
+
+/**
+ * @author rlemeill
+ * originaly coming from an application note from compiere.co.uk
+ * ---
+ * Modifications: Allow Jasper Reports to be able to be run on VPN profile (i.e: no direct connection to DB).
+ * Implemented ClientProcess for it to run on client.
+ * @author Ashley Ramdass
+ */
+public class ReportStarter implements ProcessCall, ClientProcess {
+//logger
+ private static CLogger log = CLogger.getCLogger(ReportStarter.class);
+ private static File REPORT_HOME = null;
+
+ private static JRViewerProvider viewerProvider = new SwingJRViewerProvider();
+ private static JasperPrint jasperPrint;
+
+ static {
+ System.setProperty( "javax.xml.parsers.SAXParserFactory", "org.apache.xerces.jaxp.SAXParserFactoryImpl");
+ System.setProperty( "org.xml.sax.driver", "org.apache.xerces.parsers.SAXParser");
+
+ String reportPath = System.getProperty("org.compiere.report.path");
+ if (reportPath == null) {
+ REPORT_HOME = new File(Ini.getAdempiereHome() + File.separator + "reports");
+ } else {
+ REPORT_HOME = new File(reportPath);
+ }
+ }
+
+ private ProcessInfo processInfo;
+ private MAttachment attachment;
+
+
+ /**
+ * @param requestURL
+ * @return true if the report is on the same ip address than Application Server
+ */
+ private boolean isRequestedonAS(URL requestURL)
+ {
+ boolean tBool = false;
+ try{
+ InetAddress[] request_iaddrs = InetAddress.getAllByName(requestURL.getHost());
+ InetAddress as_iaddr = InetAddress.getByName(CConnection.get().getAppsHost());
+ for(int i=0;i 0)
+ fout.write(buf, 0, s);
+
+ in.close();
+ fout.flush();
+ fout.close();
+ return downloadedFile;
+ } catch (FileNotFoundException e) {
+ if(reportLocation.indexOf("Subreport") == -1) // Only show the warning if it is not a subreport
+ log.warning("404 not found: Report cannot be found on server "+ e.getMessage());
+ return null;
+ } catch (IOException e) {
+ log.severe("I/O error when trying to download (sub)report from server "+ e.getMessage());
+ return null;
+ }
+ }
+
+ /**
+ * Search for additional subreports deployed to a webcontext if
+ * the parent report is located there
+ * @author deathmeat
+ * @param reportName The original reportname
+ * @param reportPath The full path to the parent report
+ * @param fileExtension The file extension of the parent report
+ * @return An Array of File objects referencing to the downloaded subreports
+ */
+ private File[] getHttpSubreports(String reportName, String reportPath, String fileExtension)
+ {
+ ArrayList subreports = new ArrayList();
+ String remoteDir = reportPath.substring(0, reportPath.lastIndexOf("/"));
+
+ // Currently check hardcoded for max. 10 subreports
+ for(int i=1; i<10; i++)
+ {
+ // Check if subreport number i exists
+ File subreport = httpDownloadedReport(remoteDir + "/" + reportName + i + fileExtension);
+ if(subreport == null) // Subreport doesn't exist, abort further approaches
+ break;
+
+ subreports.add(subreport);
+ }
+
+ File[] subreportsTemp = new File[0];
+ subreportsTemp = subreports.toArray(subreportsTemp);
+ return subreportsTemp;
+ }
+
+ /**
+ * @author rlemeill
+ * @param reportLocation http string url ex: http://adempiereserver.domain.com/webApp/standalone.jrxml
+ * @return downloaded File (or already existing one)
+ */
+ private File httpDownloadedReport(String reportLocation)
+ {
+ File reportFile = null;
+ File downloadedFile = null;
+ log.info(" report deployed to " + reportLocation);
+ try {
+
+
+ String[] tmps = reportLocation.split("/");
+ String cleanFile = tmps[tmps.length-1];
+ String localFile = System.getProperty("java.io.tmpdir") + System.getProperty("file.separator") + cleanFile;
+ String downloadedLocalFile = System.getProperty("java.io.tmpdir") + System.getProperty("file.separator")+"TMP" + cleanFile;
+
+ reportFile = new File(localFile);
+
+
+ if (reportFile.exists())
+ {
+ String localMD5hash = DigestOfFile.GetLocalMD5Hash(reportFile);
+ String remoteMD5Hash = ejbGetRemoteMD5(reportLocation);
+ log.info("MD5 for local file is "+localMD5hash );
+ if ( remoteMD5Hash != null)
+ {
+ if (localMD5hash.equals(remoteMD5Hash))
+ {
+ log.info(" no need to download: local report is up-to-date");
+ }
+ else
+ {
+ log.info(" report on server is different that local one, download and replace");
+ downloadedFile = getRemoteFile(reportLocation, downloadedLocalFile);
+ reportFile.delete();
+ downloadedFile.renameTo(reportFile);
+ }
+ }
+ else
+ {
+ log.warning("Remote hashing is not available did you deployed webApp.ear?");
+ downloadedFile = getRemoteFile(reportLocation, downloadedLocalFile);
+ // compare hash of existing and downloaded
+ if ( DigestOfFile.md5localHashCompare(reportFile,downloadedFile) )
+ {
+ //nothing file are identic
+ log.info(" no need to replace your existing report");
+ }
+ else
+ {
+ log.info(" report on server is different that local one, replacing");
+ reportFile.delete();
+ downloadedFile.renameTo(reportFile);
+ }
+ }
+ }
+ else
+ {
+ reportFile = getRemoteFile(reportLocation,localFile);
+ }
+
+ }
+ catch (Exception e) {
+ log.severe("Unknown exception: "+ e.getMessage());
+ return null;
+ }
+ return reportFile;
+ }
+
+ /**
+ * Returns the Server Connection if direct connection is not available
+ * (VPN, WAN, Terminal) and thus query has to be run on server only else return
+ * a direct connection to DB.
+ *
+ * Notes: Need to refactor and integrate in DB if confirmed to be working as
+ * expected.
+ *
+ * @author Ashley Ramdass
+ * @return Connection DB Connection
+ */
+ protected Connection getConnection()
+ {
+ if (DB.isRemoteObjects())
+ {
+ return new ServerConnection();
+ }
+ else
+ {
+ return DB.getConnectionRW();
+ }
+ }
+
+ /**
+ * Start the process.
+ * Called then pressing the Process button in R_Request.
+ * It should only return false, if the function could not be performed
+ * as this causes the process to abort.
+ * @author rlemeill
+ * @param ctx context
+ * @param pi Compiere standard process info
+ * @param trx
+ * @return true if success
+ */
+ public boolean startProcess(Properties ctx, ProcessInfo pi, Trx trx) {
+
+ processInfo = pi;
+ String Name=pi.getTitle();
+ int AD_PInstance_ID=pi.getAD_PInstance_ID();
+ int Record_ID=pi.getRecord_ID();
+ log.info( "Name="+Name+" AD_PInstance_ID="+AD_PInstance_ID+" Record_ID="+Record_ID);
+ String trxName = null;
+ if (trx != null) {
+ trxName = trx.getTrxName();
+ }
+ ReportData reportData = getReportData( pi, trxName);
+ if (reportData==null) {
+ reportResult( AD_PInstance_ID, "Can not find report data", trxName);
+ return false;
+ }
+
+ String reportPath = reportData.getReportFilePath();
+ if ((reportPath==null)||(reportPath.length()==0)) {
+ reportResult( AD_PInstance_ID, "Can not find report", trxName);
+ return false;
+ }
+
+ JasperData data = null;
+ File reportFile = null;
+ String fileExtension = "";
+ HashMap params = new HashMap( ctx);
+
+ addProcessParameters( AD_PInstance_ID, params, trxName);
+
+ addProcessInfoParameters(params, pi.getParameter());
+
+ reportFile = getReportFile(reportPath, (String)params.get("ReportType"));
+
+ if (reportFile == null || reportFile.exists() == false)
+ {
+ log.severe("No report file found for given type, falling back to " + reportPath);
+ reportFile = getReportFile(reportPath);
+ }
+
+ if (reportFile == null || reportFile.exists() == false) {
+ String tmp = "Can not find report file at path - " + reportPath;
+ log.severe(tmp);
+ reportResult(AD_PInstance_ID, tmp, trxName);
+ }
+
+ if (reportFile != null)
+ {
+ data = processReport(reportFile);
+ fileExtension = reportFile.getName().substring(reportFile.getName().lastIndexOf("."),
+ reportFile.getName().length());
+ }
+ else
+ {
+ return false;
+ }
+
+ JasperReport jasperReport = data.getJasperReport();
+ String jasperName = data.getJasperName();
+ File reportDir = data.getReportDir();
+
+ if (jasperReport != null) {
+ File[] subreports;
+
+ // Subreports
+ if(reportPath.startsWith("http://") || reportPath.startsWith("https://"))
+ {
+ // Locate and download subreports from remote webcontext
+ subreports = getHttpSubreports(jasperName + "Subreport", reportPath, fileExtension);
+ }
+ else if (reportPath.startsWith("attachment:"))
+ {
+ subreports = getAttachmentSubreports(reportPath);
+ }
+ else if (reportPath.startsWith("resource:"))
+ {
+ subreports = getResourceSubreports(jasperName + "Subreport", reportPath, fileExtension);
+ }
+ // TODO: Implement file:/ lookup for subreports
+ else
+ {
+ // Locate subreports from local/remote filesystem
+ subreports = reportDir.listFiles( new FileFilter( jasperName+"Subreport", reportDir, fileExtension));
+ }
+
+ for( int i=0; i 0)
+ params.put("RECORD_ID", new Integer( Record_ID));
+
+ // contribution from Ricardo (ralexsander)
+ // in iReports you can 'SELECT' AD_Client_ID, AD_Org_ID and AD_User_ID using only AD_PINSTANCE_ID
+ params.put("AD_PINSTANCE_ID", new Integer( AD_PInstance_ID));
+
+ Language currLang = Env.getLanguage(Env.getCtx());
+ params.put("CURRENT_LANG", currLang.getAD_Language());
+ // Resources
+ File resFile = null;
+ if (reportPath.startsWith("attachment:") && attachment != null) {
+ resFile = getAttachmentResourceFile(jasperName, currLang);
+ } else if (reportPath.startsWith("resource:")) {
+ resFile = getResourcesForResourceFile(jasperName, currLang);
+ // TODO: Implement file:/ for resources
+ } else {
+ File[] resources = reportDir.listFiles( new FileFilter( jasperName, reportDir, ".properties"));
+ // try baseName + "_" + language
+ for( int i=0; i subreports = new ArrayList();
+ MAttachmentEntry[] entries = attachment.getEntries();
+ for(int i = 0; i < entries.length; i++) {
+ if (!entries[i].getName().equals(name) &&
+ (entries[i].getName().endsWith(".jrxml") || entries[i].getName().endsWith(".jasper"))) {
+ File reportFile = getAttachmentEntryFile(entries[i]);
+ if (reportFile != null)
+ subreports.add(reportFile);
+ }
+ }
+ File[] files = new File[subreports.size()];
+ File[] subreportsTemp = new File[0];
+ subreportsTemp = subreports.toArray(subreportsTemp);
+ return subreportsTemp;
+ }
+
+ /**
+ * Search for additional subreports deployed as resources
+ * @param reportName The original reportname
+ * @param reportPath The full path to the parent report
+ * @param fileExtension The file extension of the parent report
+ * @return An Array of File objects referencing to the downloaded subreports
+ */
+ private File[] getResourceSubreports(String reportName, String reportPath, String fileExtension)
+ {
+ ArrayList subreports = new ArrayList();
+ String remoteDir = reportPath.substring(0, reportPath.lastIndexOf("/"));
+
+ // Currently check hardcoded for max. 10 subreports
+ for(int i=1; i<10; i++)
+ {
+ // Check if subreport number i exists
+ File subreport = null;
+ try {
+ subreport = getFileAsResource(remoteDir + "/" + reportName + i + fileExtension);
+ } catch (Exception e) {
+ // just ignore it
+ }
+ if(subreport == null) // Subreport doesn't exist, abort further approaches
+ break;
+
+ subreports.add(subreport);
+ }
+
+ File[] subreportsTemp = new File[0];
+ subreportsTemp = subreports.toArray(subreportsTemp);
+ return subreportsTemp;
+ }
+
+ /**
+ * @author alinv
+ * @param reportPath
+ * @param reportType
+ * @return the abstract file corresponding to typed report
+ */
+ protected File getReportFile(String reportPath, String reportType) {
+
+ if (reportType != null)
+ {
+ int cpos = reportPath.lastIndexOf('.');
+ reportPath = reportPath.substring(0, cpos) + "_" + reportType + reportPath.substring(cpos, reportPath.length());
+ }
+
+ return getReportFile(reportPath);
+ }
+
+ /**
+ * @author alinv
+ * @param reportPath
+ * @return the abstract file corresponding to report
+ */
+ protected File getReportFile(String reportPath) {
+ File reportFile = null;
+
+ // Reports deployement on web server Thanks to Alin Vaida
+ if (reportPath.startsWith("http://") || reportPath.startsWith("https://")) {
+ reportFile = httpDownloadedReport(reportPath);
+ } else if (reportPath.startsWith("attachment:")) {
+ //report file from process attachment
+ reportFile = downloadAttachment(reportPath);
+ } else if(reportPath.startsWith("/")) {
+ reportFile = new File(reportPath);
+ } else if (reportPath.startsWith("file:/")) {
+ try {
+ reportFile = new File(new URI(reportPath));
+ } catch (URISyntaxException e) {
+ log.warning(e.getLocalizedMessage());
+ reportFile = null;
+ }
+ } else if (reportPath.startsWith("resource:")) {
+ try {
+ reportFile = getFileAsResource(reportPath);
+ } catch (Exception e) {
+ log.warning(e.getLocalizedMessage());
+ reportFile = null;
+ }
+ } else {
+ reportFile = new File(REPORT_HOME, reportPath);
+ }
+
+ // Set org.compiere.report.path because it is used in reports which refer to subreports
+ System.setProperty("org.compiere.report.path", reportFile.getParentFile().getAbsolutePath());
+ return reportFile;
+ }
+
+ /**
+ * @param reportPath
+ * @return
+ * @throws Exception
+ */
+ private File getFileAsResource(String reportPath) throws Exception {
+ File reportFile;
+ String name = reportPath.substring("resource:".length()).trim();
+ String localName = name.replace('/', '_');
+ log.info("reportPath = " + reportPath);
+ log.info("getting resource from = " + getClass().getClassLoader().getResource(name));
+ InputStream inputStream = getClass().getClassLoader().getResourceAsStream(name);
+ String localFile = System.getProperty("java.io.tmpdir") + System.getProperty("file.separator") + localName;
+ log.info("localFile = " + localFile);
+ reportFile = new File(localFile);
+
+ OutputStream out = null;
+ out = new FileOutputStream(reportFile);
+ if (out != null){
+ byte buf[]=new byte[1024];
+ int len;
+ while((len=inputStream.read(buf))>0)
+ out.write(buf,0,len);
+ out.close();
+ inputStream.close();
+ }
+
+ return reportFile;
+ }
+
+ /**
+ * Download db attachment
+ * @param reportPath must of syntax attachment:filename
+ * @return File
+ */
+ private File downloadAttachment(String reportPath) {
+ File reportFile = null;
+ String name = reportPath.substring("attachment:".length()).trim();
+ MProcess process = new MProcess(Env.getCtx(), processInfo.getAD_Process_ID(), processInfo.getTransactionName());
+ attachment = process.getAttachment();
+ if (attachment != null) {
+ MAttachmentEntry[] entries = attachment.getEntries();
+ MAttachmentEntry entry = null;
+ for (int i = 0; i < entries.length; i++) {
+ if (entries[i].getName().equals(name)) {
+ entry = entries[i];
+ break;
+ }
+ }
+ if (entry != null) {
+ reportFile = getAttachmentEntryFile(entry);
+ }
+ }
+ return reportFile;
+ }
+
+ /**
+ * Download db attachment to local file
+ * @param entry
+ * @return File
+ */
+ private File getAttachmentEntryFile(MAttachmentEntry entry) {
+ String localFile = System.getProperty("java.io.tmpdir") + System.getProperty("file.separator") + entry.getName();
+ String downloadedLocalFile = System.getProperty("java.io.tmpdir") + System.getProperty("file.separator")+"TMP" + entry.getName();
+ File reportFile = new File(localFile);
+ if (reportFile.exists()) {
+ String localMD5hash = DigestOfFile.GetLocalMD5Hash(reportFile);
+ String entryMD5hash = DigestOfFile.getMD5Hash(entry.getData());
+ if (localMD5hash.equals(entryMD5hash))
+ {
+ log.info(" no need to download: local report is up-to-date");
+ }
+ else
+ {
+ log.info(" report on server is different that local one, download and replace");
+ File downloadedFile = new File(downloadedLocalFile);
+ entry.getFile(downloadedFile);
+ reportFile.delete();
+ downloadedFile.renameTo(reportFile);
+ }
+ } else {
+ entry.getFile(reportFile);
+ }
+ return reportFile;
+ }
+
+ /**
+ * @author rlemeill
+ * @param AD_PInstance_ID
+ * @param errMsg
+ */
+ protected void reportResult( int AD_PInstance_ID, String errMsg, String trxName) {
+ int result = (errMsg==null)?1:0;
+ errMsg = (errMsg==null)?"":errMsg;
+ String sql = "UPDATE AD_PInstance SET result="+result+", errormsg='"+errMsg+"' "+
+ "WHERE AD_PInstance_ID="+AD_PInstance_ID;
+ Statement pstmt = null;
+ try {
+ pstmt = DB.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE, trxName);
+ pstmt.executeUpdate(sql);
+ pstmt.close();
+ } catch (SQLException e) {
+ log.severe(sql+e.getMessage());
+ } finally {
+ DBUtils.close( pstmt);
+ }
+ }
+
+ /**
+ * @author rlemeill
+ * @param reportFile
+ * @return
+ */
+ protected JasperData processReport( File reportFile) {
+ log.info( "reportFile.getAbsolutePath() = "+reportFile.getAbsolutePath());
+ JasperReport jasperReport = null;
+
+ String jasperName = reportFile.getName();
+ int pos = jasperName.indexOf('.');
+ if (pos!=-1) jasperName = jasperName.substring(0, pos);
+ File reportDir = reportFile.getParentFile();
+
+ //test if the compiled report exists
+ File jasperFile = new File( reportDir.getAbsolutePath(), jasperName+".jasper");
+ if (jasperFile.exists()) { // test time
+ if (reportFile.lastModified() == jasperFile.lastModified()) {
+ log.info(" no need to compile use "+jasperFile.getAbsolutePath());
+ try {
+ jasperReport = (JasperReport)JRLoader.loadObject(jasperFile.getAbsolutePath());
+ } catch (JRException e) {
+ jasperReport = null;
+ log.severe("Can not load report - "+ e.getMessage());
+ }
+ } else {
+ jasperReport = compileReport( reportFile, jasperFile);
+ }
+ } else { // create new jasper file
+ jasperReport = compileReport( reportFile, jasperFile);
+ }
+
+ return new JasperData( jasperReport, reportDir, jasperName, jasperFile);
+ }
+
+
+ protected void addProcessParameters( int AD_PInstance_ID, Map params, String trxName) {
+ log.info("");
+ String sql = "SELECT ParameterName, "+
+ "P_String, "+
+ "P_String_To, "+
+ "P_Number, "+
+ "P_Number_To, "+
+ "P_Date, "+
+ "P_Date_To "+
+ "FROM AD_PInstance_Para "+
+ "WHERE AD_PInstance_ID=?";
+ PreparedStatement pstmt = null;
+ ResultSet rs = null;
+ try {
+ pstmt = DB.prepareStatement(sql, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY, trxName);
+ pstmt.setInt(1, AD_PInstance_ID);
+ rs = pstmt.executeQuery();
+ while (rs.next()) {
+ String name = rs.getString(1);
+ String pStr = rs.getString(2);
+ String pStrTo = rs.getString(3);
+ //Double pNum = new Double( rs.getDouble(4));
+ //Double pNumTo = new Double( rs.getDouble(5));
+ BigDecimal pNum = rs.getBigDecimal(4);
+ BigDecimal pNumTo = rs.getBigDecimal(5);
+
+ Timestamp pDate = rs.getTimestamp(6);
+ Timestamp pDateTo = rs.getTimestamp(7);
+ if (pStr != null) {
+ if (pStrTo!=null) {
+ params.put( name+"1", pStr);
+ params.put( name+"2", pStrTo);
+ } else {
+ params.put( name, pStr);
+ }
+ } else if (pDate != null) {
+ if (pDateTo!=null) {
+ params.put( name+"1", pDate);
+ params.put( name+"2", pDateTo);
+ } else {
+ params.put( name, pDate);
+ }
+ } else if (pNum != null) {
+ if (rs.getBigDecimal(5)!=null) {
+ params.put( name+"1", pNum);
+ params.put( name+"2", pNumTo);
+ } else {
+ params.put( name, pNum);
+ }
+ }
+ }
+ } catch (SQLException e) {
+ log.severe("Execption; sql = "+sql+"; e.getMessage() = " +e.getMessage());
+ } finally {
+ DBUtils.close( rs);
+ DBUtils.close( pstmt);
+ }
+ }
+
+ private void addProcessInfoParameters(Map params, ProcessInfoParameter[] para) {
+ if (para != null) {
+ for (int i = 0; i < para.length; i++) {
+ if (para[i].getParameter_To() == null) {
+ params.put(para[i].getParameterName(), para[i].getParameter());
+ } else {
+ params.put( para[i].getParameterName()+"1", para[i].getParameter());
+ params.put( para[i].getParameterName()+"2", para[i].getParameter_To());
+ }
+ }
+ }
+ }
+
+ /**
+ * @author rlemeill
+ * Correct the class path if loaded from java web start
+ */
+ private void JWScorrectClassPath()
+ {
+ URL jasperreportsAbsoluteURL = Thread.currentThread().getContextClassLoader().getResource("net/sf/jasperreports/engine");
+ String jasperreportsAbsolutePath = "";
+
+ if(jasperreportsAbsoluteURL.toString().startsWith("jar:http:") || jasperreportsAbsoluteURL.toString().startsWith("jar:https:"))
+ {
+ // Jasper classes are deployed to a webserver (Java Webstart)
+ jasperreportsAbsolutePath = jasperreportsAbsoluteURL.toString().split("!")[0].split("jar:")[1];
+
+ // Download the required jasper libraries if they are not already existing
+ File reqLib = new File(System.getProperty("java.io.tmpdir"), "CompiereJasperReqs.jar");
+ if(!reqLib.exists() && !(reqLib.length() > 0))
+ {
+ try{
+ URL reqLibURL = new URL(jasperreportsAbsolutePath);
+ InputStream in = reqLibURL.openStream();
+
+ FileOutputStream fout = new FileOutputStream(reqLib);
+
+ byte buf[] = new byte[1024];
+ int s = 0;
+ long tl = 0;
+
+ while((s = in.read(buf, 0, 1024)) > 0)
+ fout.write(buf, 0, s);
+
+ in.close();
+ fout.flush();
+ fout.close();
+ } catch (FileNotFoundException e) {
+ log.warning("Required library not found "+ e.getMessage());
+ reqLib.delete();
+ reqLib = null;
+ } catch (IOException e) {
+ log.severe("I/O error downloading required library from server "+ e.getMessage());
+ reqLib.delete();
+ reqLib = null;
+ }
+ }
+
+ jasperreportsAbsolutePath = reqLib.getAbsolutePath();
+ }
+ else
+ {
+ // Jasper classes are locally available (Local client)
+ jasperreportsAbsolutePath = jasperreportsAbsoluteURL.toString().split("!")[0].split("file:")[1];
+ }
+
+ if(jasperreportsAbsolutePath != null && !jasperreportsAbsolutePath.trim().equals(""))
+ {
+ // Check whether the current CLASSPATH already contains our
+ // jasper libraries and dependencies or not.
+ if(System.getProperty("java.class.path").indexOf(jasperreportsAbsolutePath) < 0)
+ {
+ System.setProperty("java.class.path",
+ System.getProperty("java.class.path") +
+ System.getProperty("path.separator") +
+ jasperreportsAbsolutePath);
+ log.info("Classpath has been corrected to " + System.getProperty("java.class.path"));
+ }
+ }
+ }
+
+ /**
+ * @author rlemeill
+ * @param reportFile
+ * @param jasperFile
+ * @return compiled JasperReport
+ */
+ private JasperReport compileReport( File reportFile, File jasperFile) {
+ JWScorrectClassPath();
+ JasperReport compiledJasperReport = null;
+ try {
+ JasperCompileManager.compileReportToFile ( reportFile.getAbsolutePath(), jasperFile.getAbsolutePath() );
+ jasperFile.setLastModified( reportFile.lastModified()); //Synchronize Dates
+ compiledJasperReport = (JasperReport)JRLoader.loadObject(jasperFile);
+ } catch (JRException e) {
+ log.severe("JRException; e.getMessage()= "+ e.getMessage());
+ }
+ return compiledJasperReport;
+ }
+
+ /**
+ * @author rlemeill
+ * @param ProcessInfo
+ * @return ReportData
+ */
+ public ReportData getReportData( ProcessInfo pi, String trxName) {
+ log.info("");
+ String sql = "SELECT pr.JasperReport, pr.IsDirectPrint "
+ + "FROM AD_Process pr, AD_PInstance pi "
+ + "WHERE pr.AD_Process_ID = pi.AD_Process_ID "
+ + " AND pi.AD_PInstance_ID=?";
+ PreparedStatement pstmt = null;
+ ResultSet rs = null;
+ try {
+ pstmt = DB.prepareStatement(sql, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY, trxName);
+ pstmt.setInt(1, pi.getAD_PInstance_ID());
+ rs = pstmt.executeQuery();
+ String path = null;
+ boolean directPrint = false;
+ boolean isPrintPreview = pi.isPrintPreview();
+ if (rs.next()) {
+ path = rs.getString(1);
+
+ if ("Y".equalsIgnoreCase(rs.getString(2)) && !Ini.isPropertyBool(Ini.P_PRINTPREVIEW)
+ && !isPrintPreview )
+ directPrint = true;
+ } else {
+ log.severe("data not found; sql = "+sql);
+ return null;
+ }
+
+ return new ReportData( path, directPrint);
+ } catch (SQLException e) {
+ log.severe("sql = "+sql+"; e.getMessage() = "+ e.getMessage());
+ return null;
+ } finally {
+ DBUtils.close( rs);
+ DBUtils.close( pstmt);
+ }
+ }
+
+ /**
+ * Set jasper report viewer provider.
+ * @param provider
+ */
+ public static void setReportViewerProvider(JRViewerProvider provider) {
+ if (provider == null)
+ throw new IllegalArgumentException("Cannot set report viewer provider to null");
+ viewerProvider = provider;
+ }
+
+ /**
+ * Get the current jasper report viewer provider
+ * @return JRViewerProvider
+ */
+ public static JRViewerProvider getReportViewerProvider() {
+ return viewerProvider;
+ }
+
+ class ReportData {
+ private String reportFilePath;
+ private boolean directPrint;
+
+ public ReportData(String reportFilePath, boolean directPrint) {
+ this.reportFilePath = reportFilePath;
+ this.directPrint = directPrint;
+ }
+
+ public String getReportFilePath() {
+ return reportFilePath;
+ }
+
+ public boolean isDirectPrint() {
+ return directPrint;
+ }
+ }
+
+ class JasperData {
+ private JasperReport jasperReport;
+ private File reportDir;
+ private String jasperName;
+ private File jasperFile;
+
+ public JasperData(JasperReport jasperReport, File reportDir, String jasperName, File jasperFile) {
+ this.jasperReport = jasperReport;
+ this.reportDir = reportDir;
+ this.jasperName = jasperName;
+ this.jasperFile = jasperFile;
+ }
+
+ public JasperReport getJasperReport() {
+ return jasperReport;
+ }
+
+ public File getReportDir() {
+ return reportDir;
+ }
+
+ public String getJasperName() {
+ return jasperName;
+ }
+
+ public File getJasperFile() {
+ return jasperFile;
+ }
+ }
+
+ class FileFilter implements FilenameFilter {
+ private String reportStart;
+ private File directory;
+ private String extension;
+
+ public FileFilter(String reportStart, File directory, String extension) {
+ this.reportStart = reportStart;
+ this.directory = directory;
+ this.extension = extension;
+ }
+
+ public boolean accept(File file, String name) {
+ if (file.equals( directory)) {
+ if (name.startsWith( reportStart)) {
+ int pos = name.lastIndexOf( extension);
+ if ( (pos!=-1) && (pos==(name.length()-extension.length()))) return true;
+ }
+ }
+ return false;
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/posterita/posterita/src/main/org/posterita/Constants.java b/posterita/posterita/src/main/org/posterita/Constants.java
new file mode 100644
index 0000000000..9a58bbab99
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/Constants.java
@@ -0,0 +1,825 @@
+/*
+ *
+ * Copyright (c) 2005 UDI Ltd. All Rights Reserved.
+ *
+ * This software is the confidential and proprietary information of
+ * UDI Ltd. ("Confidential Information"). You shall not
+ * disclose such Confidential Information and shall use it only in
+ * accordance with the terms of the license agreement you entered into
+ * with UDI.
+ *
+ * UDI MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE
+ * SUITABILITY OF THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT
+ * NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR
+ * A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. UDI SHALL NOT
+ * BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING,
+ * MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
+ *
+ * Created on Jul 6, 2005 by vishee
+ */
+
+package org.posterita;
+
+import org.compiere.model.MPayment;
+
+public class Constants
+{
+ public static final String ACCESSIBLE_ORGS = "accessibleOrgs";
+ public static final String ACTION = "action";
+ public static final String ADD_ORDERLINE_ID = "addOrderLineId";
+ public static final String ADMIN = "admin";
+ public static final String ADMIN_USER_ID = "adminUserId";
+ public static final String ALL_BANKS = "allBanks";
+ public static final String ALL_CUSTOMERS = "allCustomers";
+ public static final String ALL_ORDERS = "allOrders";
+ public static final String ALL_ORGS = "allOrgs";
+ public static final String ALL_ROLES = "allRoles";
+ public static final String ALL_STOCK_REPORT = "allStockReport";
+ public static final String ALL_USERS = "allUsers";
+ public static final String ALL_WAREHOUSES="allwarehouses";
+ public static final String ALL_WEEKS = "allWeeks";
+ public static final String ALLBUSINESSPARTNERS = "allBp";
+ public static final String ALLOCATION = "allocation";
+ public static final String ALLOCATION_DATE = "allocationDate";
+ public static final String ALLOCATION_ID = "allocationId";
+ public static final String ALLOCATION_LINES="allocationsLines";
+ public static final String ALLOCATION_LIST = "allocationList";
+ public static final String ALLOCATION_ORDERS = "allocationOrders";
+
+
+ public static final String ALLOCATION_REPORT = "allocationReport";
+ public static final String ALLOCATION_STOCK = "Allocation Stock";
+ public static final String ALLWAREHOUSES="allwarehouses";
+
+ public static final String APP_CRM = "crm";
+ public static final String APP_DCS = "dcs";
+ public static final String APP_IMMOBILIER_WEBSTORE = "ImmobilierWebstore";
+ public static final String APP_NAME = "appName";
+ //APPLICATION NAME
+ public static final String APP_POS = "pos";
+ public static final String APP_WEBSTORE = "webstore";
+ public static final String APP_WEBSTORE_ADMIN = "webstoreadmin";
+ public static final String APPROVE = "APPROVE";
+ public static final String ASSIGNED_ROLES = "assignedRoles";
+ public static final String ATTRIBUTE_LIST = "attributeList";
+ public static final String ATTRIBUTE_NAME = "atttributeName";
+ public static final String ATTRIBUTE_SET = "attributeSet";
+ public static final String ATTRIBUTE_SET_ID = "attributeSetId";
+ public static final String ATTRIBUTE_VALUES = "attributeValues";
+ public static final String ATTRIBUTE_VALUES_LIST = "attributeValuesList";
+
+
+ public static final int ATTRIBUTE_YEAR_MIN_VALUE = 2000;
+ public static final String ATTRIBUTESET = "AttributeSet";
+ public static final String ATTRIBUTESETINSTANCE_ID = "attributeSetInstanceId";
+ public static final String AUCTION_MODULE="Auction Module";
+ public static final String AVAILABLE_COLOURS = "availableColours";
+ public static final String AVAILABLE_COLOURS_SIZES = "availableColoursSizes";
+ public static final String AVAILABLE_SIZES = "availableSizes";
+
+
+ public static final String AVAILABLE_VIN = "availableVin";
+ public static final String B_PARTNER_ID = "bPartnerId";
+ public static final String BACK_ORDER = "backOrder";
+ public static final String BANK = "bank";
+ public static final String BANKS = "banks";
+ public static final String BANK_ACCOUNTS = "bankAccounts";
+ public static final String BASIC_DETAILS = "basicDetails";
+ public static final String BARCODE_CART = "barcodeCart";
+ public static final String BARCODE_CART_ITEMS = "barcodeCartItems";
+ public static final String MMOVEMENT_CART = "mmovementCart";
+ public static final String MMOVEMENT_CART_ITEMS = "mmovementCartItems";
+ public static final String BP_LIST = "bpList";
+ public static final String BPARTNER = "bPartner";
+ public static final String BRAND_ATTRIBUTE_VALUES="brandAttributeValues";
+ public static final String BREADCRUMB = "breadcrumb";
+ public static final String BUSINESSPARTNER = "businessPartner";
+ public static final String BUSINESSPARTNER_ORDER_DETAILS ="bPartnerOrderDetails";
+ public static final String BUSINESSPARTNER_TRX_DETAILS = "businessPartnerTrxdetails";
+ public static final String BUSINESSPARTNERSDETAILS = "bPartnerDetails";
+ public static final String CAN_TRADE_IN = "canTradeIn";
+ public static final String CANCEL_DO = "cancelDO";
+ public static final String CANCEL_DT = "cancelDT";
+ public static final String CANCEL_INVOICE = "cancelInvoice";
+ public static final String CANCEL_SCO = "cancelSCO";
+ public static final String CARD = "card";
+ public static final String CASH = "cash";
+ public static final String CASH_BOOK = "cashBook";
+ public static final String CASH_DETAILS = "cashDetails";
+
+ public static final String CASH_LINE_DETAILS = "cashLineDetails";
+ public static final String CASH_SUMMARY = "cashSummary";
+ public static final String CERTIFICATE = "certificate";
+ public static final String CHANGE = "change";
+ public static final String CHECKED_PRODUCTS = "checkedProducts";
+ public static final String CHECKING_ACCOUNT_TYPE = "C";
+ public static final String CHECKOUT_ACTION = "/CheckoutAction";
+ public static final String CHOOSE = "Choose";
+ public static final String CHOOSE_SHIPPING_ADDRESS = "chooseShippingAddress";
+
+ public static final String CHOOSE_USER = "chooseUser";
+ public static final String CHOOSE_VIN = "chooseVin";
+ public static final String CLIENT_ID="client";
+ public static final String CLIENT_NAME="clientName";
+ public static final Integer COGS = Integer.valueOf(51100);
+ public static final String COLOUR_ATTRIBUTE_VALUE_ID = "colourAttributeValueId";
+ public static final String COLOUR_ATTRIBUTE_VALUES = "colourAttributeValues";
+ public static final String COLOURCODE_MATCHING = "colourCodeMatching";
+ public static final String COMPLETED_INVOICE = "completedInvoice";
+ public static final String COMPLETED_POS_ORDER = "completedPOSOrder";
+ public static final String COMPLEX_COMMAND = "complexCommand";
+ public static final String CONTENT = "content";
+ public static final String SUBCLASSIFICATION = "subClassification";
+ public static final String COUNTRY_CLASSIFICATION = "countryClassification";
+ public static final String BRAND_CLASSIFICATION = "brandClassification";
+ public static final String COUNTRIES = "countries";
+ public static final String CREATE = "create";
+ public static final String CREATE_BANKACCOUNT = "createBankAccount";
+ public static final String CREATE_DRAFTED_ORDER = "createDraftedOrder";
+ public static final String CREATE_NEW_CAR = "createNewCar";
+ public static final String CREATE_PRODUCT_ATTRIBUTE_VALUE_ACTION = "/CreateProductAttributeValueAction";
+ public static final String CREATE_PRODUCT_ATTRIBUTE_VALUE_FORM = "CreateProductAttributeValueForm";
+ public static final String CREATE_USED_CAR = "createUsedCar";
+ public static final String CREATE_WEBSTORE_CUSTOMER_ACTION = "/CreateWebstoreCustomerAction";
+ public static final String CREATEPRODUCTS = "createProducts";
+ public static final String CREATING_FROM_ORDER = "creatingFromOrder";
+ public static final String CREDITCARDTYPE_AMEX = "Amex";
+ public static final String CREDITCARDTYPE_DISCOVER = "Discover";
+ public static final String CREDITCARDTYPE_MASTERCARD = "MasterCard";
+ public static final String CREDITCARDTYPE_VISA = "Visa";
+ public static final String CRM_REQUEST_USERS = "crmUsers";
+ public static final String CSV = "csv";
+ public static final String CSV_FILE = "csvFile";
+ public static final String CSV_FILE2 = "csvFile2";
+ public static final String PDF_FILE = "pdfFile";
+
+ public static final String CURRENCIES = "currencies";
+ public static final String CURRENCY_SYMBOLE = "currencySymbole";
+ public static final String CURRENT_PARTIAL_POS_ORDER_ID = "currentPartialPOSOrderId";
+ public static final String CURRENT_POS_ORDER="currentPOSOrder";
+ public static final String CURRENT_POS_ORDER_ID = "currentPOSOrderId";
+ public static final String CURRENT_PRODUCT = "currentProduct";
+ public static final String CURRENT_REQUEST = "currentRequest";
+ public static final String CURRENT_TILL_AMOUNT = "currentTillAmount";
+ public static final String CURRENT_TILL_AMOUNT_POS = "currentTillAmountPOS";
+ public static final String CURRENT_YEAR = "currentYear";
+ public static final String CUSTOM_DATE_RANGE = "customDateRange";
+ public static final String CUSTOMER = "customer";
+ public static final String CUSTOMER_CREATED="CustomerCreated";
+ public static final String CUSTOMER_DETAILS = "customerDetails";
+
+ public static final String CUSTOMER_ID = "customerId";
+ public static final String CUSTOMER_RETURN_ORDER = "customerReturnOrder";
+ public static final String CUSTOMER_RETURN_ORDER_ID = "customerReturnOrderId";
+
+ public static final String CUSTOMER_RETURN_ORDER_LINES = "customerReturnOrderLine";
+ public static final String CUSTOMER_RETURN_ORDER_SHOPPING_CART = "customerReturnOrderShoppingCart";
+ public static final String CUSTOMER_RETURN_ORDER_SHOPPING_CART_ITEMS = "customerReturnOrderShoppingCartItems";
+ public static final String DEALER_COUNTER_REF = "dealerCounterRef";
+ public static final String DEALER_DETAILS = "dealerDetails";
+ public static final String DEALER_REF = "dealerRef";
+
+ public static final String DEALERCODE_LIST = "dealerCodeList";
+ public static final String DEALERS = "dealers";
+ public static final String DEALERS_DETAIL = "dealersDetail";
+
+
+ public static final String DELETE_ORDER_TYPE = "deleteOrderType";
+ public static final String DELIVERY = "Delivery";
+ public static final String DESCRIPTION ="description";
+ public static final String DESIGN_ATTRIBUTE_VALUES="designAttributeValues";
+ public static final String DISPLAY_REPORT = "displayReport";
+ public static final String DMS = "DMS";
+ public static final String DOC_STATUS = "docStatus";
+ public static final String DOC_NO = "docNo";
+
+ public static final String DOCUMENT_HISTORY = "documentHistory";
+ public static final String DOCUMENT_PDF = "documentPDF";
+ public static final String DRAFT_INVOICE = "draftInvoice";
+
+ public static final String EDITWAREHOUSE="editWarehouse";
+ public static final String EMAIL = "email";
+
+ //Email specific
+ public static final String EMAIL_FOOTER= "email.footer";
+ public static final String EMAIL_REGARDS = "emailRegards";
+ public static final String EMAIL_SIGNIN_INFO = "signin.info";
+ public static final String END_OF_THE_DAY_DETAILS = "endOfTheDayDetails";
+ public static final String ERROR_TITLE = "errorTitle";
+ public static final String ERRORS = "errors";
+ public static final String ETA_LIST = "ETAList";
+ //public static final String EURO_SIGN = "€";
+ public static final String EXISTING_BAR_CODE = "existingBarCode";
+ public static final String FILE_FOR_UPDATE = "fileForUpdate";
+ public static final String FINISHED_AL ="finishedAL";
+ public static final String FINISHED_DO = "finishedDO";
+ public static final String FINISHED_DT ="finishedDT";
+
+ public static final String FINISHED_MRO = "finishedMRO";
+
+ public static final String FINISHED_NR = "finishedNR";
+ public static final String FINISHED_SCO = "finishedSCO";
+ public static final String FIXED_DATE_RANGE = "fixedDateRange";
+ public static final String FREE_STOCK = "Free Stock";
+ public static final String FROM_DATE = "fromDate";
+ public static final String FULL_DETAILS = "fullDetails";
+ public static final String FULL_IMAGE = "fullImage";
+ public static final String FULLIMAGE = "fullImage";
+ public static final String GENERATE_INVOICE = "generateInvoice";
+ public static final String GENERATE_INVOICE_ACTION = "Invoice";
+ public static final String GENERATE_INVOICE_PAYMENT_ACTION = "InvoicePayment";
+ public static final String GENERATE_WEBSTORE_INVOICE = "generateWebstoreInvoice";
+ public static final String GET_CREDIT_CARD_DETAILS = "getCreditCardDetails";
+ public static final String GET_LOGO="getLogo";
+
+ public static final String GET_PRODUCT_CATEGORY_ACTION = "/GetProductCategory";
+ public static final String GOING_RATE_REPORT = "goingRateReport";
+ public static final String GOODS_RECEIVE_NOTE = "goodsReceiveNote";
+ public static final String GOODS_RECEIVE_NOTE_ID = "goodsReceiveNoteId";
+ public static final String GOODS_RECEIVE_NOTE_LINES = "goodsReceiveNoteLines";
+ public static final String GOODS_RECEIVE_NOTE_SHOPPING_CART = "goodsReceiveNoteShoppingCart";
+ public static final String GOODS_RECEIVE_NOTE_SHOPPING_CART_ITEMS = "goodsReceiveNoteShoppingCartItems";
+ public static final String GOODS_RETURN_NOTE = "goodsReturnNote";
+ public static final String GOODS_RETURN_NOTE_ID = "goodsReturnNoteId";
+
+ public static final String GOODS_RETURN_NOTE_LINES = "goodsReturnNoteLines";
+ public static final String GOODS_RETURN_NOTE_SHOPPING_CART = "goodsReturnNoteShoppingCart";
+ public static final String GOODS_RETURN_NOTE_SHOPPING_CART_ITEMS = "goodsReturnNoteShoppingCartItems";
+ public static final String GRAND_TOTAL = "grandTotal";
+ public static final String HIDDEN_STOCK = "Hidden Stock";
+ public static final String HOMEPAGE_PRODUCTS = "homePageProducts";
+ public static final String HTML = "html";
+ public static final String IMAGE_NAME = "ImageName";
+ public static final String IMAGES_DIRECTORY = "images/";
+ public static final String IMPORTED_VEHICLES = "importedVehicles";
+ public static final String InitPriceListAction = "/InitPriceListAction";
+ public static final String INSERT_VIN = "insertVin";
+ public static final String INVOICE_ACTION_CANCEL = "Cancel";
+ public static final String INVOICE_ACTION_COMPLETE = "Complete";
+ public static final String INVOICE_ACTION_DELETE = "Delete";
+ public static final String INVOICE_ACTION_PAID = "Paid";
+ public static final String INVOICE_ACTION_PAID_AND_SHIP = "Paid and Ship";
+ public static final String INVOICE_HISTORY = "invoiceHistory";
+ public static final String INVOICE_ID = "invoiceId";
+ public static final String INVENTORY_CART = "inventoryCart";
+ public static final String INVENTORY_CART_ITEMS = "inventoryCartItems";
+
+ public static final String INVOICE_PAID = "Invoice & Pay";
+ public static final String INVOICE_PAID_SHIP = "Inv/Paid/Ship";
+ public static final String INVOICE_TAX = "invoiceTax";
+ public static final String IS_PAID = "isPaid";
+ public static final String KEYWORD1_LINK_LIST = "keyword1LinkList";
+ public static final String KEYWORD2_LINK_LIST = "keyword2LinkList";
+
+ public static final String KIA = "kia";
+ public static final String LEFT_MENUS = "leftMenus";
+ public static final String LICENSING_AREA="licensingAreas";
+ public static final String LICENSING_INFORMATION = "licensingInformation";
+ public static final String APP_LICENSING_INFORMATION = "appLicensingInformation";
+ public static final String LOCATORS = "locators";
+ public static final String LOGIN = "login";
+
+ public static final String LOGIN_LINK = "link";
+ public static final String MAKE_ATTRIBUTE_VALUES = "makeAttributeValues";
+ public static final String MAX_SOLD_ITEMS = "maxSoldItems";
+ public static final String ME = "me";
+ public static final String ME_LOCATION = "meLocation";
+ public static final String MENU = "menu";
+ public static final String MENU_ITEMS = "menuItems";
+
+ public static final String MENU_LIST = "menuList";
+ public static final String MENUS = "menus";
+ public static final String MESSAGE = "message";
+ public static final String MESSAGE_LOG_BEAN = "messageLogBean";
+ public static final String MESSAGE_LOGS = "messageLogs";
+ public static final String MIN_SOLD_ITEMS = "minSoldItems";
+ public static final String MINOUT = "minout";
+ public static final String MINOUT_ACTION_CANCEL = "Cancel";
+ public static final String MINOUT_ACTION_COMPLETE = "Complete";
+ public static final String MINOUT_ACTION_DELETE = "Delete";
+
+ public static final String MINOUT_ACTION_RECEIVE = "Receive";
+ public static final String MINOUT_ACTION_SHIP = "Ship";
+ public static final String MINOUT_LINES_COLLECTION = "minOutLinesCollection";
+ public static final String MINVOICE = "minvoice";
+ public static final String MINVOICE_LINES_COLLECTION = "invoiceLinesCollection";
+ public static final String MMOVEMENT_LOCATOR = "toLocator";
+ public static final String MMOVEMENT_LOCATORS = "organisationLocators";
+
+ public static final String MMOVEMENT_PRODUCT = "materialMovementProduct";
+ public static final String MMOVEMENT_PRODUCTS = "organisationProducts";
+ public static final String MMOVEMENT_WAREHOUSES = "organisationWarehouses";
+
+ public static final String MODEL_ATTRIBUTE_VALUE_ID = "modelAttributeValueId";
+ public static final String MODEL_ATTRIBUTE_VALUES="modelAttributeValues";
+ public static final String MODEL_MATCHING_MODELS = "modelMatchingModels";
+ public static final String MODEL_MATCHING_YEARS = "modelMatchingYears";
+ public static final String MODELCODE_LIST = "modelCodeList";
+ public static final String MODELGROUP_ATTRIBUTE_VALUES = "modelGroupAttributeValues";
+ public static final String MODELMATCH = "modelmatch";
+ public static final String MONTH_SALES = "monthSales";
+ public static final String MORDER = "morder";
+ public static final String MORDER_LINES_COLLECTION = "orderLinesCollection";
+ public static final String MPAYMENT = "payment";
+ public static final String MY_RECEIVED_MESSAGE = "myReceivedMessage";
+ public static final String MY_RECEIVED_MESSAGES = "myReceivedMessages";
+ public static final String MY_SENT_MESSAGES = "mySentMessages";
+ public static final String MY_STOCKS = "myStocks";
+ public static final String NAAMSA_REPORT = "Naamsa Report";
+ public static final String NAAMSAINFO = "naamsaInfo";
+ public static final String NATIS_RELEASE_INFO = "natisReleaseInfo";
+ public static final String NATIS_XML_ENCODING = "ISO-8859-1";
+ public static final String NEW_PRODUCT = "newProduct";
+ public static final String NO_CHAR = "N";
+ public static final String NO_OF_VEHICLES_SOLD = "noOfVehicleSold";
+ public static final String OLD_MODELMATCH = "oldmodelmatch";
+ public static final String OPEN_CASH_BOOK = "openCashBook";
+ public static final String OPENED_CASH_BOOK = "openedCashBook";
+ public static final String ORDER_ACTION_ACCEPT = "Accept";
+ public static final String ORDER_ACTION_ACCEPT_WO="Create";
+ public static final String ORDER_ACTION_CANCEL = "Cancel";
+ public static final String ORDER_ACTION_CLOSE = "Close";
+ public static final String ORDER_ACTION_COMPLETE = "Complete";
+ public static final String ORDER_ACTION_CONFIRM = "Confirm";
+ public static final String ORDER_ACTION_DELETE = "Delete";
+ public static final String ORDER_ACTION_GENERATE_ORDER = "Generate Order";
+ public static final String ORDER_ACTION_PREPARE = "Reserve Stock";
+
+ public static final String ORDER_ACTION_PREPARE_SCO = "Prepare";
+ public static final String ORDER_ACTION_PREPARE_SCO_ORDER="Prepare Order";
+ public static final String ORDER_ACTION_REJECT = "Reject";
+ public static final String ORDER_ACTION_SAVE = "Save";
+ public static final String ORDER_ACTION_SPLIT = "Split";
+
+ public static final String ORDER_ACTION_SUBMIT = "Submit";
+ public static final String ORDER_BEAN = "orderBean";
+ public static final String ORDER_COLLECTION = "orderCollection";
+ public static final String ORDER_DETAILS = "orderDetails";
+ public static final String ORDER_HISTORY = "orderHistory";
+ public static final String ORDER_ID = "orderId";
+ public static final String ORDER_INFO = "orderInfo";
+ public static final String ORDER_LINE_BEAN = "orderLineBean";
+ public static final String ORDER_LINE_ID = "orderLineId";
+ public static final String ORDER_LINES = "orderLines";
+ public static final String ORDER_LINES_FOR_ORDER = "orderLinesForOrder";
+ public static final String ORDER_TAX = "orderTax";
+ public static final String ORDER_TYPE = "orderType";
+ public static final String ORDER_TYPE_BULK = "bulk";
+
+ public static final String ORDER_TYPE_SIMPLE = "simple";
+
+ public static final String ORDER_TYPES = "orderTypes";
+ public static final String ORG_FOR_RESERVED_PRODUCTS="orgForReservedProducts";
+ public static final String ORG_ID = "orgId";
+ public static final String ORG_USERS = "orgUsers";
+ public static final String ORGANISATION = "organisation";
+ public static final String ORGANISATION_VALUES="organisationValues";
+ public static final String ORGS = "orgs";
+ public static final String ORGTYPE = "orgType";
+
+ public static final String PAID_INVOICE = "paidInvoice";
+ public static final String PAIR_VIN_NUMBERS = "pairVinNos";
+
+ public static final String PARTIAL_ORDER_SHOPPING_CART = "partialOrderShoppingCart";
+ public static final String PARTIAL_ORDER_SHOPPING_CART_ITEMS = "partialOrderShoppingCartItems";
+ public static final String PARTIAL_POS_ORDER = "partialPosOrder";
+
+ public static final String PARTIAL_POS_ORDER_LINES = "partialPOSOrderlines";
+ public static final String PASSWORD = "password";
+ public static final String PATH_CREATE_TAMAK_ORDER_ACTION = "/CreateTamakOrderAction";
+ public static final String PATH_VIEW_ORDER_ACTION = "/ViewOrderAction";
+ public static final String PAYMENT_ACTION_CANCEL = "Cancel";
+ public static final String PAYMENT_ACTION_COMPLETE = "Complete";
+ public static final String PAYMENT_BY_CARD = "paymentByCard";
+
+ public static final String PAYMENT_BY_CASH = "paymentByCash";
+ public static final String PAYMENT_BY_CHEQUE = "paymentByCheque";
+
+ public static final String PAYMENT_HISTORY = "paymentHistory";
+ public static final String PAYMENT_RULE_CARD="Card";
+ public static final String PAYMENT_RULE_CASH="Cash";
+ public static final String PAYMENT_RULE_CHEQUE="Cheque";
+ public static final String PAYMENT_RULE_CREDIT="Credit";
+ public static final String PAYMENT_RULE_MIXED="Mixed";
+ public static final String PAYMENT_RULES = "paymentRules";
+ public static final String PAYMENT_TYPE = "paymentType";
+ public static final String PDF = "pdf";
+ public static final String POOL_ORDERLINES = "poolOrderLines";
+ public static final String POS_GENERAL_STOCK = "posGeneralStock";
+ public static final String CARD_AMT_TENDERED = "cardAmtTendered";
+ public static final String CHEQUE_AMT_TENDERED = "chequeAmtTendered";
+
+ public static final String POS_HISTORY = "posHistory";
+
+ public static final String POS_INFO = "posInfo";
+
+ public static final String POS_ORDER = "posOrder";
+ public static final String POS_ORDER_CUSTOMER_COMPULSORY = "posOrderCustomerCompulsory";
+ public static final String POS_ORDER_DOC_NUMBER = "POSOrderDocumentNumber";
+ public static final String POS_ORDER_ID = "posOrderId";
+ public static final String POS_ORDER_LINES = "posOrderLines";
+ public static final String POS_ORDER_WITHOUT_ADVANCED = "posOrderWithoutAdvanced";
+ public static final String POS_PRODUCTS_FOR_UPDATE = "posProductsForUpdate";
+ public static final String POS_SALES_PRICE_LIST = "posSalesPriceList";
+
+ public static final String POS_STOCK = "posStock";
+ public static final String POSTERMINAL = "POSTerminal";
+ public static final String POSTERMINALS = "POSTerminals";
+ public static final String PRICE = "price";
+
+ public static final String PRICE_LIST = "priceList";
+ public static final String PRICE_LIST_VERSION = "priceListVersion";
+ public static final String PRICE_LIST_VERSION_ID = "priceListVersionId";
+ public static final String PriceListForm = "PriceListForm";
+
+ public static final String PRICEQTY_FILTER = "priceQtyFilter";
+ public static final String PROCESS_CLASS = "process.class";
+ public static final String PROCESS_NAME = "process.name";
+
+ public static final String PRODUCT = "product";
+ public static final String PRODUCT_ATTRIBUTE_LIST = "productAttributeList";
+ public static final String PRODUCT_ATTRIBUTE_SET = "productAttributeSet";
+ public static final String PRODUCT_BRANDS = "productBrands";
+ public static final String PRODUCT_CART = "productCart";
+ public static final String PRODUCT_CART_ITEMS = "productCartItems";
+ public static final String PRODUCT_CATEGORY_ID = "productCategoryId";
+ //public static final String WEBSTORE_SHIPPING_ADDR = "webstoreShippingAddr";
+ //public static final String WEBSTORE_BILLING_ADDR = "webstoreBillingAddr";
+ public static final String PRODUCT_CLASSIFICATION ="productClassification";
+ public static final String PRODUCT_CREATED = "productsCreated";
+ public static final String PRODUCT_DETAIL_INFO = "productDetailInfo";
+ public static final String PRODUCT_DETAILS = "productDetails";
+
+ public static final String PRODUCT_FILTER_BEAN = "productFilterBean";
+
+ public static final String PRODUCT_ID = "productId";
+
+ public static final String PRODUCT_IDS = "productIds";
+ public static final String PRODUCT_IMAGE = "productImage";
+ public static final String PRODUCT_IMAGE_BEAN = "productImageBean";
+ public static final String PRODUCT_INFO = "productInfo";
+ public static final String PRODUCT_KEYWORDS = "productKeywords";
+
+ public static final String PRODUCT_LINES = "productLines";
+ public static final String PRODUCT_LIST = "productList";
+ public static final String PRODUCT_SALES_DETAILS = "productSalesDetails";
+ public static final String PRODUCT_SALES_SUMMARY = "productSalesSummary";
+ public static final String PRODUCTS = "products";
+ public static final String PRODUCTS_IN_STOCK = "productsInStock";
+ public static final Integer PROFIT_MARGIN = Integer.valueOf(99999);
+ public static final String PROGRESS_DO = "progressDO";
+ public static final String PROGRESS_DT = "progressDT";
+ public static final String PROGRESS_NR = "progressNR";
+ public static final String PROGRESS_SCO = "progressSCO";
+ public static final String PROGRESS_TI = "progressTI";
+ public static final String PROJECT_NAME = "project.name";
+ public static final String PURCHASE_PRICELISTS = "purchase.pricelists";
+ public static final String QUANTITY = "quantity";
+ public static final String QUICK_POS_ORDER = "quickPosOrder";
+ public static final String RECEIPT_HISTORY = "receiptHistory";
+ public static final String RECEIVED_MESSAGE = "receivedMessage";
+ public static final String REGION_VALUES = "regionValues";
+ public static final String REGIONS = "regions";
+
+ public static final String RELATED_PRODUCT_IMAGES = "relatedProductImages";
+ public static final String REPORT_URL = "reportURL";
+ public static final String REPRICE_ORDER_TYPE ="repriceOrderType";
+
+ public static final String REQUEST_PRIORITIES = "requestPriorities";
+ public static final String REQUEST_STATUS = "requestStatus";
+ // --> CRM
+ public static final String REQUESTS_SUMMARY = "requestsSummary";
+ public static final String RESERVE_STATUS_VALUES = "reserveStatusValues";
+ public static final String RETAIL_REPORT = "retailReport";
+ public static final String REVENUE_RECOGNITION = "Revenue Recognition";
+ public static final String ROLE = "role";
+ public static final String ROLE_MENUS = "roleMenus";
+ public static final String ROLES = "roles";
+
+ public static final String SALES_ANALYSIS = "salesAnalysis";
+ public static final String SALES_REP = "salesRep";
+ public static final String SALES_REPORT = "salesReport";
+ public static final String SALESGROUP_LIST = "salesGroupList";
+ public static final String SALES_PRICELISTS = "sales.pricelists";
+ public static final String SAVING_ACCOUNT_TYPE = "S";
+ public static final String SCO_FILTER_BEAN = "SCOFilterBean";
+ public static final String SCO_PRODUCT_LIST = "SCO Product List";
+ public static final String SEARCH_VIN_NUMBERS="searchVinNumbers";
+ public static final String SEARCH_VIN_NUMBERS_INQUIRY="searchVinNumberForInquiry";
+ public static final String SELECTED_PRODUCTS_FOR_BULK_ORDER = "selectedProductsForBulkOrder";
+ public static final String SELECTED_PRODUCTS_FOR_SIMPLE_ORDER = "selectedProductsForSimpleOrder";
+ public static final String SENT_MESSAGE = "sentMessage";
+ public static final String SHIPMENT_HISTORY = "shipmentHistory";
+ public static final String SHIPPER_LIST = "shipperList";
+ public static final String SHOPPING_CART = "shoppingCart";
+ public static final String SHOPPING_CART_ITEMS = "shoppingCartItems";
+ public static final String CHECKOUT_BEAN = "checkoutBean";
+ public static final String SHOPPING_GRN_CART = "shoppingGRNCart";
+ public static final String SHOPPING_GRN_CART_ITEMS = "shoppingGRNCartItems";
+ public static final String SHOPPING_ORDER_CART = "shoppingOrderCart";
+ public static final String SHOPPING_ORDER_CART_ITEMS = "shoppingOrderCartItems";
+ public static final String SIMPLE_COMMAND = "simpleCommand";
+
+ public static final String SIMPLE_PRODUCT_CART = "simpleProductCart";
+ public static final String SIZE_ATTRIBUTE_VALUES="sizeAttributeValues";
+ public static final String SPLIT_ORDER_PROCESS = "splitOrderProcess";
+ public static final String STATUS = "status";
+ public static final String STATUS_OFF = "OFF";
+
+ public static final String STATUS_ON = "ON";
+ public static final String STATUS_VALUES = "statusValues";
+ public static final String STOCK_HISTORY_REPORT = "stockHistoryReport";
+
+ public static final String STOCK_MOVEMENT = "stockMovement";
+ public static final String SUB_MENU_ITEMS = "subMenuItems";
+ public static final String SUB_MENU_NAME = "subMenuName";
+ public static final String SUBJECT = "subject";
+ public static final String SUB_TOTAL = "subTotal";
+ public static final String SUCCESS = "success";
+ public static final String SUCCESS_CREATE_CUSTOMER = "successCreateCustomer";
+ public static final String SUPERUSER = "superUser";
+ public static final String SWAP_PRODUCT_ID = "swapProductId";
+ public static final String SWAP_VIN = "swapVin";
+ public static final String SWAP_VIN_NOS_ACTION = "Save";
+ public static final String SWAP_VIN_NUMBER_BEAN = "swapVinNumberBean";
+ public static final String TABULAR_REPORT_DATA = "tabularReportData";
+
+ public static final String TABULAR_REPORT_DATA2 = "tabularReport2";
+ public static final String TABULAR_REPORT_SUBTITLE = "tabularReportSubtitle";
+ public static final String TABULAR_REPORT_TITLE = "tabularReportTitle";
+ public static final String TARGET_SALES = "targetSales";
+ public static final String TAX_CATEGORY_ID = "taxCategoryId";
+
+ public static final Integer TAX_CREDIT = Integer.valueOf(12610);
+ public static final Integer TAX_DUE = Integer.valueOf(21610);
+ public static final String THUMBNAIL = "thumbnail";
+ public static final String TIME_REMAINING = "timeRemaining";
+ public static final String TO_DATE = "toDate";
+ public static final String TOP_MENUS = "topMenus";
+ public static final String MAIN_MENUS = "mainMenus";
+ public static final String TOTAL_LINES = "totalLines";
+ public static final String TRADE_IN_LIST = "tradeInList";
+ public static final String TRADE_IN_PRODUCT_ID = "tradeInProductId";
+ public static final Integer TRADE_REVENUE = Integer.valueOf(41000);
+ public static final String TRAFFIC_LIST = "trafficList";
+ public static final String TRX_ATTRIBUTE_VALUE_ID = "trxAttributeValueId";
+ public static final String TRX_ATTRIBUTE_VALUES="trxAttributeValues";
+ public static final String [] TSHIRT_SIZE={"S","M","XL"};
+ public static final String UDIADMIN = "udiadmin";
+ public static final String UDIADMINAUTO = "udiadminauto";
+ public static final String UDIADMINBIKE = "udiadminbike";
+ public static final String UNFINISHED_AL = "unfinishedAL";
+
+ public static final String UNFINISHED_DO = "unfinishedDO";
+ public static final String UNFINISHED_DT = "unfinishedDT";
+ public static final String UNFINISHED_INV = "unfinishedInvoice";
+ public static final String UNFINISHED_NR = "unfinishedNR";
+ public static final String UNFINISHED_SCO = "unfinishedSCO";
+ public static final String UNFINISHED_WO = "unfinishedWO";
+ public static final String UNIMPORTED_VEHICLES = "unimportedVehicles";
+ public static final String UNPAID_INVOICE = "unPaidInvoice";
+ public static final String UPDATE_PRODUCT_DETAILS = "updateProductDetails";
+ public static final String USED_CAR_PURCHASE_ORDER = "usedCarPurchaseOrder";
+ public static final String USER_DETAILS = "userDetails";
+ public static final String VEHICLE_DETAILS = "vehicleDetails";
+ public static final String VEHICLES = "vehicles";
+ public static final String VENDOR_DETAILS = "vendorDetails";
+ public static final String BLACKLISTED_DETAILS = "blackListedDetails";
+ public static final String BLACKLISTED_LISTS="blackListedList";
+
+
+ public static final String VENDOR_LIST = "vendorList";
+ public static final String VIEW_ALL_ALLOCATIONS = "viewAllAllocations";
+ public static final String VIEW_INVOICE_DETAILS="view.invoice.detail";
+ public static final String VIEW_MINOUT = "viewMinOut";
+ public static final String VIEW_MY_SENT_MESSAGES="viewMySentMessages";
+ public static final String VIEW_PAYMENT = "viewPayment";
+ public static final String VIEW_POS_ORDER_ACTION = "/ViewPOSOrderAction";
+
+ public static final String VIEW_POS_PRODUCTS = "viewPOSProducts";
+
+ public static final String VIEW_SHOPPING_CART = "viewShoppingCart";
+ public static final String VIEW_VIN_NUMBER_DETAILS = "viewVinNumberDetails";
+ public static final String VIN_NOS = "vinNos";
+
+ public static final String VIN_NUMBER_FROM = "vinNumberFrom";
+ public static final String WAREHOUSE="warehouse";
+ public static final String WAREHOUSE_NAMES = "warehouseNames";
+ public static final String WAREHOUSE_TYPES = "warehouseTypes";
+ public static final String WAREHOUSEDETAILS="warehouseDetails";
+
+ public static final String WAREHOUSES = "warehouses";
+ public static final String WEB_APPLICATIONS = "WebApplications";
+ public static final String WEB_DOCUMENT_HEADER_BEAN = "webDocumentHeaderBean";
+ public static final String WEB_INVOICE_BEAN = "webInvoiceBean";
+
+
+
+ public static final String WEB_MINOUT_BEAN = "webMinOutBean";
+ public static final String WEB_ORDER_BEAN = "webOrderBean";
+ public static final String WEB_ORDER_LINE_BEAN = "webOrderLineBean";
+ public static final String WEB_PAYMENT_BEAN = "webPaymentBean";
+
+
+ public static final String WEBSTORE_CREATE_CUSTOMER = "webstoreCreateCustomer";
+ public static final String WEBSTORE_CREDITCARD_BEAN = "creditCardBean";
+ public static final String WEBSTORE_CUSTOMER = "Webstore Customer";
+ public static final String WEBSTORE_INVOICE = "webstoreInvoice";
+ /*public static final String WEBSTORE_LINK = UDIFilePropertiesManager.getProperty().get(new Properties(), "webstore.url");*/
+ public static final String WEBSTORE_LOGIN_ACTION = "/WebstoreLoginAction";
+ public static final String WEBSTORE_PROGRESS_DO = "webstoreProgressDO";
+ /*public static final String WEBSTORE_SHIPPING_PROMOTION_PRICE = UDIFilePropertiesManager.getProperty().get(new Properties(), "webstore.shipping.promotion.price");
+ public static final String WEBSTORE_SHIPPING_PROMOTION_STATUS = UDIFilePropertiesManager.getProperty().get(new Properties(), "webstore.shipping.promotion.status");
+*/
+ public static final String WEBSTORE_USER_BEAN = "webstoreUserBean";
+ public static final String WEBSTORE_USER_DETAILS = "webstoreUserDetails";
+ public static final String WESBANK = "wesbank";
+ public static final String WESBANK_RESPONSE = "WesbankResponse";
+ public static final String WESBANK_STATUS = "wesbank.status";
+ public static final String WHOLESALE_REPORT = "wholesaleReport";
+ public static final String YEAR_ATTRIBUTE_VALUE_ID = "yearAttributeValueId";
+ public static final String YEAR_ATTRIBUTE_VALUES="yearAttribueValues";
+
+
+ public static final String YES_CHAR = "Y";
+ public static final String YOU = "you";
+ public static final String YOU_BP_LOCATION = "youbpLocation";
+ public static final String YOU_LOCATION = "youLocation";
+ public static final String CURRENCY_SYMBOLE_PURCHASE = "currencySymbolePurchase";
+ public static final String CREDIT_ORDER = "creditOrder";
+ public static final String CREDIT_ORDER_SHOPPING_CART = "creditOrderShoppingCart";
+ public static final String CREDIT_ORDER_SHOPPING_CART_ITEMS = "creditOrderShoppingCartItems";
+ public static final String OPEN_ITEMS = "openItems";
+ public static final String AGING_ITEMS = "agingItems";
+ public static final String CREDIT_INVOICE_INFO = "creditInvoiceInfo";
+ public static final String DISCOUNT_ALLOWED = "discountAllowed";
+ public static final String PRODUCT_SALES_BUCKET = "productSalesBucket";
+ public static final String BPARTNERS = "bPartners";
+ public static final String CASH_PAYMENT_MADE = "cashPaymentMade";
+ public static final String CASH_PAYMENT_LIST = "cashPaymentList";
+ public static final String CARD_CHQ_PAYMENT_LIST = "cardChqPaymentList";
+ public static final String INVOICE_GRAND_TOTAL = "invoiceGrandTotal";
+ public static final String NO_IMAGE_CSV_REPORT = "noImageCSVReport";
+ public static final String MCASHLINE = "cashLine";
+ public static final String DEBTORS = "debtors";
+ public static final String PAYMENT_ALLOCATIONS = "paymentAllocations";
+ public static final String PAYMENT_TERM = "paymentTerm";
+ public static final String PAYMENT_TERM_ID = "paymentTermId";
+ public static final String ALL_PAYMENT_TERMS = "allPaymentsTerms";
+ public static final String EDIT_PAYMENT_TERM = "editPaymentTerm";
+ public static final String NO_CREDIT_CHECK="No Credit Check";
+ public static final String CREDIT_OK="Credit OK";
+ public static final String CREDIT_STOP="Credit Stop";
+ public static final String BUSINESSPARTNERINFO = "bPartnerInfo";
+ public static final String ORDER_NAME = "orderName";
+ public static final String COMMISSION_AMT = "commissionAmt";
+ public static final String COMMISSION_AMT_DETAILS = "commissionAmtDetails";
+ public static final String CREDIT_HOLD = "creditHold";
+ public static final String CREDIT_WATCH = "creditWatch";
+ public static final String CREDIT_PAYMENT_TERM_ID = "creditPaymentTermId";
+ public static final String PRESENT_POS_ORDER = "presentPOSOrder";
+ public static final String PRESENT_CREDIT_ORDER = "presentCreditOrder";
+ public static final String PRESENT_POS_ORDER_ID = "presentPOSOrderId";
+ public static final String PRESENT_GRN_ORDER_ID = "presentGRNOrderId";
+ public static final String PRESENT_GRN_ORDER = "presentGRNOrder";
+ public static final String PRESENT_GOODS_RET_ORDER = "presentGoodsReturnOrder";
+ public static final String PRESENT_GOODS_RET_ORDER_ID = "presentGoodsReturnOrderId";
+ public static final String PRESENT_CREDIT_ORDER_ID ="presentCreditOrderId";
+ public static final String PRESENT_CUSTOMER_RET_ORDER = "presentCustomerReturnOrder";
+ public static final String PRESENT_CUSTOMER_RET_ORDER_ID = "presentCustomerReturnOrderId";
+ public static final String CUSTOMER_CART = "customerCart";
+ public static final String ALL_CART_CUSTOMERS = "allCartCustomers";
+ public static final String ALL_TAX_RATE ="allTaxRates";
+ public static final String EDIT_TAX = "editTax";
+ public static final String INVENTORY_LINE_LIST = "inventoryLineList";
+ public static final String CREDITORDER_BPARTNER = "creditOrderBPartner";
+ public static final String ORDER_TITLE = "orderTitle";
+ public static final String UNALLOCATED_PAYMENTS = "unallocatedPayments";
+ public static final String COMPLETED_INVENTORY_LINE_LIST = "completedInventoryLineList";
+ public static final String INVENTORY_HISTORY_LIST = "inventoryHistoryList";
+ public static final String WHOLE_INVENTORY_LINE_LIST = "wholeInventoryLineList";
+ public static final String SHIPMENT_REQUIRED = "shipmentRequired";
+ public static final String INVOICE_FOR_ALLOCATION = "invoiceForAllocation";
+ public static final String TO_BE_SHIPPED = "toBeShipped";
+ public static final String POS_HISTORY_ORDER_TYPE = "posHistoryOrderType";
+ public static final String GROUP1 = "group1";
+ public static final String GROUP2 = "group2";
+ public static final Object CREATE_PAYMENT = "createPayment";
+ public static final String INVENTORY_ID = "inventoryId";
+ public static final String PAID="Paid";
+ public static final String UNPAID="UnPaid";
+ public static final String PARTIALLY_PAID="Partially Paid";
+ public static final String OVER_PAID = "overPaid";
+ public static final String INVENTORY_DESCRIPTION ="inventoryDescription";
+ public static final String PARTIAL_POS_OREDR = "partialPOSOrder";
+ public static final String ALL_ORDER_HISTORY = "allOrderHistory";
+
+ public static final String CLOSE_TILL_PRINT_DATA="closeTillPrintData";
+ public static final String SHOPPING_CART_NAME = "shoppingCartName";
+
+ public static final String PREFERENCE_PRINTER_TYPE = "preference.printerType";
+ public static final String UOM_LIST = "uomList";
+ public static final String USER_ORGS = "userOrgs";
+ public static final String ALL_ORGANISATIONS = "*";
+ public static final String ROLE_ORG_ACCESS_LIST = "roleOrgAccessList";
+ public static final String DETAILED_SALES_REPORT = "detailedSalesReport";
+ // Constants related to Material Movement
+ public static final String ORG_FROM_ID = "orgFromId";
+ public static final String ORG_TO_ID = "orgToId";
+ public static final String USER_ORGS_STOCK = "userOrgsStockMovement";
+
+ public static final String STOCK_LIST = "stockList";
+ public static final String MOVE_CONFIRM = "moveConfirm";
+ public static final String MATERIAL_MOVEMENT_ITEMS = "materialMovementItems";
+ public static final String MATERIAL_MOVEMENT = "materialMovement";
+ public static final String MATERIAL_MOVEMENT_LIST = "materialMovementList";
+ public static final String MATERIAL_MOVEMENT_LINES = "materialMovementLines";
+ public static final String MATERIAL_MOVEMENT_DETAILS = "materialMovementDetails";
+ public static final String MATERIAL_MOVEMENT_ID = "materialMovementId";
+ public static final String MOVE_CONFIRM_LINES = "moveConfirmLines";
+ public static final String MMOVEMENT = "movement";
+ public static final String MMOVEMENT_ID = "movementId";
+
+ public static final String PAYMENT_RULE_CASH_MSG = "payment.rule.cash";
+ public static final String PAYMENT_RULE_CARD_MSG = "payment.rule.card";
+ public static final String PAYMENT_RULE_CHEQUE_MSG = "payment.rule.cheque";
+ public static final String PAYMENT_RULE_MIXED_MSG = "payment.rule.mixed";
+ public static final String PAYMENT_RULE_CREDIT_MSG = "payment.rule.credit";
+
+
+ public static final String DOC_STATUS_DRAFTED = "document.status.drafted";
+ public static final String DOC_STATUS_INPROGRESS = "document.status.inprogress";
+ public static final String DOC_STATUS_COMPLETED = "document.status.completed";
+ public static final String DOC_STATUS_INVALID = "document.status.invalid";
+ public static final String DOC_STATUS_VOID = "document.status.void";
+ public static final String DOC_STATUS_CLOSED = "document.status.closed";
+ public static final String STOCK_SALES_REPORT_LIST = "stock.sales.report.list";
+ public static final String STOCK_SALES_REPORT_DATA = "stockSalesReportData";
+ public static final String SALES_REPORT_LIST = "salesReportList";
+ public static final String STOCK_REPORT_LIST = "stockReportList";
+ public static final String SALES_REPORT_LIST_COMPLETE = "salesReportListComplete";
+ public static final String STOCK_REPORT_LIST_COMPLETE = "stockReportListComplete";
+ public static final String PRODUCT_SALES_COMPLETE_SET = "productSalesCompleteSet";
+ public static final String PRODUCT_STOCK_COMPLETE_SET = "productStockCompleteSet";
+ public static final String PRODUCT_ORG_STOCK_MAP = "productOrgStockMap";
+ public static final String PRODUCT_ORG_SALES_MAP = "productOrgSalesMap";
+ public static final String STOCK_PRODUCT_LIST = "stockProductList";
+ public static final String MMOVEMENT_LINES = "movementLines";
+ public static final String STOCKMOVEMENT_MAP = "stockMovementMap";
+ public static final String PRE_ORG_FROM_ID = "preOrgFromId";
+ public static final int SALES_TYPE = 1;
+ public static final int STOCK_TYPE = 2;
+ public static final String STOCK_SALES_REPORT_ORGS = "stockSalesReportOrgs";
+ public static final String MONTHLY_SALES_REPORT_DATA = "monthlySalesReportData";
+ public static final String DETAILED_SALES_REPORT_PER_PRODUCT = "detailedSalesReportPerProduct";
+ public static final String DETAILED_GRN_REPORT_PER_PRODUCT = "detailedGRNReportPerProduct";
+ public static final String STOCK_ADJUSTMENTS_REPORT_DATA = "stockAdjustmentsReportData";
+ public static final String INVENTORY_MOVE_HISTORY = "viewInventoryMoveHistory";
+ public static final String LIST_PRICE_LISTS = "list.price.lists";
+ public static final String CREATE_PRICE_LIST = "create.price.list";
+ public static final String PRODUCT_PRICE_LISTS = "product.price.lists";
+ public static final String PRICE_LIST_HEADERS = "price.list.headers";
+ public static final String USER_PRICE_LISTS = "user.price.lists";
+ public static final String REGISTER_USERS = "RegisterUser";
+ public static final String USER_BEAN = "userBean";
+ public static final String USER_PURCHASE_PRICE_LISTS = "user.purchase.price.lists";
+ public static final String USER_SALES_PRICE_LISTS = "user.sales.price.lists";
+ public static final String CONFIGURATION = "configuration";
+ public static final String WEB_COMPONENTS = "web.components";
+ public static final String REPORT_DESCRIPTION = "report.description";
+ public static final String PROCESS_ID = "process.id";
+ public static final String IMPORT_FAIL_CSV_FILE = "import.fail.csv.file";
+
+ public static final String CURRENCY_LIST = "currencyList";
+ public static final String CURRENCY = "currency";
+ public static final String IS_FROM_DELETE_PRODUCT_PRICE = "is.from.delete.product.price";
+ public static final String REPORT_COMMENT = "report.comment";
+ public static final String SHOPPING_CART_TOTAL = "shoppingcartTotal";
+ public static final String SHOPPING_CART_DISCOUNTED_TOTAL = "shoppingcartDiscountedTotal";
+ public static final String SHOPPING_CART_DISCOUNT_PERCENTAGE = "shoppingcartDiscountPercentage";
+ public static final String BPARTNER_ID = "bpartner.id";
+ public static final String BPARTNER_NAME = "bpartner.name";
+ public static final String BPARTNER_CREDIT = "bpartner.credit";
+ public static final String ORDER_PRICE_LIST = "order.price.list";
+ public static final String IS_SOTRX = "isSOTrx";
+
+ public static final String ACCESSIBLE_BANKACCOUNTS = "accessible.bankaccounts";
+ public static final String ACCESSIBLE_CASHBOOKS = "accessible.cashbooks";
+ public static final String CASHBOOKS = "cashbooks";
+ public static final String TERMINALS = "terminals";
+ public static final String TERMINAL_TRANSFER_TYPE = "terminalTransferType";
+ public static final String DISPLAYTAG_TABLE_ID = "displayTagTableId";
+ public static final String ORDER_PAYMENT = "orderPayment";
+ public static final String ORDER_WRITE_OFF = "orderWriteOff";
+ public static final String ORDER_DICOUNT = "orderDiscount";
+ public static final String ORDER_CARD_AMOUNT = MPayment.TENDERTYPE_CreditCard;
+ public static final String ORDER_CHECK_AMOUNT = MPayment.TENDERTYPE_Check;
+ public static final String ORDER_CASH_AMOUNT = "cashAmount";
+ public static final String DISCOUNT_ON_ORDER_TOTAL = "discountOnOrderTotal";
+ public static final String DISCOUNT_ON_ORDER_TOTAL_PERCENT = "discountOnOrderTotalPercent";
+
+ public static final String CREDITORS = "creditors";
+ //public static final String DEBTORS = "";
+ public static final String CREDITOR_HISTORY = "creditorHistory";
+ public static final String DEBTOR_HISTORY = "debtorHistory";
+}
\ No newline at end of file
diff --git a/posterita/posterita/src/main/org/posterita/TangoColors.java b/posterita/posterita/src/main/org/posterita/TangoColors.java
new file mode 100644
index 0000000000..fbf1dbc018
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/TangoColors.java
@@ -0,0 +1,37 @@
+/******************************************************************************
+ * Product: Posterita Web-Based POS and Adempiere Plugin *
+ * Copyright (C) 2008 Posterita Ltd *
+ * This file is part of POSterita *
+ * *
+ * POSterita is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License along *
+ * with this program; if not, write to the Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *
+ *****************************************************************************/
+package org.posterita;
+
+/**
+ * @author servansingh
+ * May 29, 2008
+ */
+public class TangoColors
+{
+ public static final String ALUMINIUM_1 = "#EEEEEC";
+ public static final String ALUMINIUM_2 = "#D3D7CF";
+ public static final String BLUE_1 = "#D1E0EF";
+ public static final String BLUE_2 = "#98B9DC";
+ public static final String GREEN_1 = "#DAF5BC";
+ public static final String GREEN_2 = "#ABEA6C";
+ public static final String PLUM_1 = "#E9DDE8";
+ public static final String PLUM_2 = "#CBAEC9";
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/AddressBean.java b/posterita/posterita/src/main/org/posterita/beans/AddressBean.java
new file mode 100644
index 0000000000..d552782ef7
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/AddressBean.java
@@ -0,0 +1,157 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ **/
+package org.posterita.beans;
+
+import org.posterita.beans.UDIBean;
+
+public class AddressBean extends UDIBean
+{
+
+ public Integer getBpartnerId()
+ {
+ return bpartnerId;
+ }
+
+ public void setBpartnerId(Integer bpartnerId)
+ {
+ this.bpartnerId = bpartnerId;
+ }
+
+ public String getAddress1()
+ {
+ return address1;
+ }
+
+ public void setAddress1(String address1)
+ {
+ this.address1 = address1;
+ }
+
+ public String getAddress2()
+ {
+ return address2;
+ }
+ public void setAddress2(String address2)
+ {
+ this.address2 = address2;
+ }
+
+ public Boolean getBillTo()
+ {
+ return billTo;
+ }
+
+ public void setBillTo(Boolean billTo)
+ {
+ this.billTo = billTo;
+ }
+ public String getCity()
+ {
+ return city;
+ }
+
+ public void setCity(String city)
+ {
+ this.city = city;
+ }
+
+ public Integer getCountryId()
+ {
+ return countryId;
+ }
+ public void setCountryId(Integer countryId)
+ {
+ this.countryId = countryId;
+ }
+
+ public String getPostalAddress()
+ {
+ return postalAddress;
+ }
+
+ public void setPostalAddress(String postalAddress)
+ {
+ this.postalAddress = postalAddress;
+ }
+
+ public Boolean getShipTo()
+ {
+ return shipTo;
+ }
+
+ public void setShipTo(Boolean shipTo)
+ {
+ this.shipTo = shipTo;
+ }
+
+ public String getCountryName()
+ {
+ return countryName;
+ }
+
+ public void setCountryName(String countryName)
+ {
+ this.countryName = countryName;
+ }
+
+ public String getUserSurname()
+ {
+ return userSurname;
+ }
+
+ public void setUserSurname(String userSurname)
+ {
+ this.userSurname = userSurname;
+ }
+
+ public String getUsername()
+ {
+ return username;
+ }
+
+ public void setUsername(String username)
+ {
+ this.username = username;
+ }
+
+
+ public String getCountryCode()
+ {
+ return countryCode;
+ }
+
+ public void setCountryCode(String countryCode)
+ {
+ this.countryCode = countryCode;
+ }
+
+ public Integer getRegionId()
+ {
+ return regionId;
+ }
+
+ public void setRegionId(Integer regionId)
+ {
+ this.regionId = regionId;
+ }
+
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/AgingBean.java b/posterita/posterita/src/main/org/posterita/beans/AgingBean.java
new file mode 100644
index 0000000000..637a2e95ea
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/AgingBean.java
@@ -0,0 +1,232 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on Oct 17, 2006
+ */
+
+
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+import java.sql.Timestamp;
+
+
+public class AgingBean extends UDIBean
+{
+
+ public Integer getCurrencyId()
+ {
+ return currencyId;
+ }
+
+ public void setCurrencyId(Integer currencyId)
+ {
+ this.currencyId = currencyId;
+ }
+
+ public BigDecimal getDue0()
+ {
+ return due0;
+ }
+
+ public void setDue0(BigDecimal due0)
+ {
+ this.due0 = due0;
+ }
+
+ public BigDecimal getDue0_30()
+ {
+ return due0_30;
+ }
+
+ public void setDue0_30(BigDecimal due0_30)
+ {
+ this.due0_30 = due0_30;
+ }
+
+ public BigDecimal getDue1_7()
+ {
+ return due1_7;
+ }
+
+ public void setDue1_7(BigDecimal due1_7)
+ {
+ this.due1_7 = due1_7;
+ }
+
+ public BigDecimal getDue31_60()
+ {
+ return due31_60;
+ }
+
+ public void setDue31_60(BigDecimal due31_60)
+ {
+ this.due31_60 = due31_60;
+ }
+
+ public BigDecimal getDue61_90()
+ {
+ return due61_90;
+ }
+
+ public void setDue61_90(BigDecimal due61_90)
+ {
+ this.due61_90 = due61_90;
+ }
+
+ public BigDecimal getDue8_30()
+ {
+ return due8_30;
+ }
+
+ public void setDue8_30(BigDecimal due8_30)
+ {
+ this.due8_30 = due8_30;
+ }
+
+ public BigDecimal getDue91_PLUS()
+ {
+ return due91_PLUS;
+ }
+
+ public void setDue91_PLUS(BigDecimal due91_PLUS)
+ {
+ this.due91_PLUS = due91_PLUS;
+ }
+
+ public BigDecimal getDueAmt()
+ {
+ return dueAmt;
+ }
+
+ public void setDueAmt(BigDecimal dueAmt)
+ {
+ this.dueAmt = dueAmt;
+ }
+
+ public Timestamp getDueDate()
+ {
+ return dueDate;
+ }
+
+ public void setDueDate(Timestamp dueDate)
+ {
+ this.dueDate = dueDate;
+ }
+
+ public BigDecimal getInvoicedAmt()
+ {
+ return invoicedAmt;
+ }
+
+ public void setInvoicedAmt(BigDecimal invoicedAmt)
+ {
+ this.invoicedAmt = invoicedAmt;
+ }
+
+ public Integer getInvoiceId()
+ {
+ return invoiceId;
+ }
+
+ public void setInvoiceId(Integer invoiceId)
+ {
+ this.invoiceId = invoiceId;
+ }
+
+ public BigDecimal getOpenAmt()
+ {
+ return openAmt;
+ }
+
+ public void setOpenAmt(BigDecimal openAmt)
+ {
+ this.openAmt = openAmt;
+ }
+
+ public BigDecimal getPastDue1_30()
+ {
+ return pastDue1_30;
+ }
+
+ public void setPastDue1_30(BigDecimal pastDue1_30)
+ {
+ this.pastDue1_30 = pastDue1_30;
+ }
+
+ public BigDecimal getPastDue1_7()
+ {
+ return pastDue1_7;
+ }
+
+ public void setPastDue1_7(BigDecimal pastDue1_7)
+ {
+ this.pastDue1_7 = pastDue1_7;
+ }
+
+ public BigDecimal getPastDue31_60()
+ {
+ return pastDue31_60;
+ }
+
+ public void setPastDue31_60(BigDecimal pastDue31_60)
+ {
+ this.pastDue31_60 = pastDue31_60;
+ }
+
+ public BigDecimal getPastDue61_90()
+ {
+ return pastDue61_90;
+ }
+
+ public void setPastDue61_90(BigDecimal pastDue61_90)
+ {
+ this.pastDue61_90 = pastDue61_90;
+ }
+
+ public BigDecimal getPastDue8_30()
+ {
+ return pastDue8_30;
+ }
+
+ public void setPastDue8_30(BigDecimal pastDue8_30)
+ {
+ this.pastDue8_30 = pastDue8_30;
+ }
+
+ public BigDecimal getPastDue91_plus()
+ {
+ return pastDue91_plus;
+ }
+
+ public void setPastDue91_plus(BigDecimal pastDue91_plus)
+ {
+ this.pastDue91_plus = pastDue91_plus;
+ }
+
+ public BigDecimal getPastDueAmt()
+ {
+ return pastDueAmt;
+ }
+
+ public void setPastDueAmt(BigDecimal pastDueAmt)
+ {
+ this.pastDueAmt = pastDueAmt;
+ }
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/ApplicationParametersBean.java b/posterita/posterita/src/main/org/posterita/beans/ApplicationParametersBean.java
new file mode 100644
index 0000000000..5951222de0
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/ApplicationParametersBean.java
@@ -0,0 +1,54 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * */
+package org.posterita.beans;
+
+
+public class ApplicationParametersBean extends UDIBean
+{
+ public String getApplicationName()
+ {
+ return applicationName;
+ }
+
+ public void setApplicationName(String applicationName)
+ {
+ this.applicationName = applicationName;
+ }
+
+ public String getApplicationWebContext()
+ {
+ return applicationWebContext;
+ }
+
+ public void setApplicationWebContext(String applicationWebContext)
+ {
+ this.applicationWebContext = applicationWebContext;
+ }
+
+ public Integer getStoreId()
+ {
+ return storeId;
+ }
+
+ public void setStoreId(Integer storeId)
+ {
+ this.storeId = storeId;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/AttachmentBean.java b/posterita/posterita/src/main/org/posterita/beans/AttachmentBean.java
new file mode 100644
index 0000000000..e888a7b19e
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/AttachmentBean.java
@@ -0,0 +1,35 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on 26-Aug-2005 by alok
+ *
+ */
+package org.posterita.beans;
+
+
+public class AttachmentBean extends UDIBean
+{
+ public String getLogoName()
+ {
+ return logoName;
+ }
+ public void setLogoName(String logoName)
+ {
+ this.logoName = logoName;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/AttributeBean.java b/posterita/posterita/src/main/org/posterita/beans/AttributeBean.java
new file mode 100644
index 0000000000..ee17bc3ac9
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/AttributeBean.java
@@ -0,0 +1,227 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on Jun 15, 2006
+ */
+
+
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+
+
+public class AttributeBean extends UDIBean
+{
+ public BigDecimal getUnitPrice()
+ {
+ return unitPrice;
+ }
+
+ public void setUnitPrice(BigDecimal unitPrice)
+ {
+ this.unitPrice = unitPrice;
+ }
+
+ public BigDecimal getPrice()
+ {
+ return price;
+ }
+
+ public void setPrice(BigDecimal price)
+ {
+ this.price = price;
+ }
+
+ public String getBarCode()
+ {
+ return barCode;
+ }
+
+ public void setBarCode(String barCode)
+ {
+ this.barCode = barCode;
+ }
+
+ public Integer[] getProductIds()
+ {
+ return productIds;
+ }
+
+ public void setProductIds(Integer[] productIds)
+ {
+ this.productIds = productIds;
+ }
+
+ public String getQtyNumberFilter()
+ {
+ return qtyNumberFilter;
+ }
+
+ public void setQtyNumberFilter(String qtyNumberFilter)
+ {
+ this.qtyNumberFilter = qtyNumberFilter;
+ }
+
+ public String getQtyFilter()
+ {
+ return qtyFilter;
+ }
+
+ public void setQtyFilter(String qtyFilter)
+ {
+ this.qtyFilter = qtyFilter;
+ }
+
+ public Integer getAttributeSetInstanceId()
+ {
+ return attributeSetInstanceId;
+ }
+
+ public void setAttributeSetInstanceId(Integer attributeSetInstanceId)
+ {
+ this.attributeSetInstanceId = attributeSetInstanceId;
+ }
+
+ public Integer getProductId()
+ {
+ return productId;
+ }
+ public void setProductId(Integer productId) {
+ this.productId = productId;
+ }
+
+ public String getProductName()
+ {
+ return productName;
+ }
+
+ public void setProductName(String productName)
+ {
+ this.productName = productName;
+ }
+
+ public BigDecimal getQuantity()
+ {
+ return quantity;
+ }
+
+ public void setQuantity(BigDecimal quantity)
+ {
+ this.quantity = quantity;
+ }
+
+ public Integer getAttributeValueId()
+ {
+ return attributeValueId;
+ }
+
+ public void setAttributeValueId(Integer attributeValueId)
+ {
+ this.attributeValueId = attributeValueId;
+ }
+
+ public String getAttributeValue()
+ {
+ return attributeValue;
+ }
+
+ public void setAttributeValue(String attributeValue)
+ {
+ this.attributeValue = attributeValue;
+ }
+
+ public String getAttributeName()
+ {
+ return attributeName;
+ }
+
+ public void setAttributeName(String attributeName)
+ {
+ this.attributeName = attributeName;
+ }
+
+ public Integer getAttributeId()
+ {
+ return attributeId;
+ }
+
+ public void setAttributeId(Integer attributeId)
+ {
+ this.attributeId = attributeId;
+ }
+
+ public Integer getAttributeSetId()
+ {
+ return attributeSetId;
+ }
+
+ public void setAttributeSetId(Integer attributeSetId)
+ {
+ this.attributeSetId = attributeSetId;
+ }
+
+ public String getAttributeSetName()
+ {
+ return attributeSetName;
+ }
+
+ public void setAttributeSetName(String attributeSetName)
+ {
+ this.attributeSetName = attributeSetName;
+ }
+
+ public ArrayList getAttributeValueList()
+ {
+ return attributeValueList;
+ }
+
+ public void setAttributeValueList(ArrayList attributeValueList)
+ {
+ this.attributeValueList = attributeValueList;
+ }
+
+ public String[] getAttributeValueIds()
+ {
+ return attributeValueIds;
+ }
+
+ public void setAttributeValueIds(String[] attributeValueIds)
+ {
+ this.attributeValueIds = attributeValueIds;
+ }
+ public void setUom(String uom)
+ {
+ this.uom = uom;
+ }
+ public String getUom()
+ {
+ return this.uom;
+ }
+
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public void setDescription(String description)
+ {
+ this.description = description;
+ }
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/AttributeInstanceBean.java b/posterita/posterita/src/main/org/posterita/beans/AttributeInstanceBean.java
new file mode 100644
index 0000000000..5e435055a3
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/AttributeInstanceBean.java
@@ -0,0 +1,93 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
+package org.posterita.beans;
+
+
+public class AttributeInstanceBean
+{
+ private int attributeSetInstanceId;
+ private int attributeId;
+ private String attributeValue;
+ private String attribute;
+ private int attributeValueId;
+
+
+ public int getAttributeId()
+ {
+
+ return attributeId;
+ }
+
+ public void setAttributeId(int attributeId)
+ {
+ this.attributeId = attributeId;
+ }
+
+ public int getAttributeSetInstanceId()
+ {
+ return attributeSetInstanceId;
+ }
+
+ public void setAttributeSetInstanceId(int attributeSetInstanceId)
+ {
+ this.attributeSetInstanceId = attributeSetInstanceId;
+ }
+
+ public String getAttribute()
+ {
+ return attribute;
+ }
+
+ public void setAttribute(String attribute)
+ {
+ this.attribute = attribute;
+ }
+
+ public String getAttributeValue()
+ {
+ return attributeValue;
+ }
+ public void setAttributeValue(String attributeValue)
+ {
+ this.attributeValue = attributeValue;
+ }
+ public int getAttributeValueId()
+ {
+ return attributeValueId;
+ }
+
+ public void setAttributeValueId(int attributeValueId)
+ {
+ this.attributeValueId = attributeValueId;
+ }
+
+ public boolean equals(Object o)
+ {
+ if (o == null)
+ return false;
+
+ AttributeInstanceBean bean = (AttributeInstanceBean) o;
+
+ if (bean.getAttributeSetInstanceId() == this.getAttributeSetInstanceId())
+ return true;
+
+ return false;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/AttributeValueDetailBean.java b/posterita/posterita/src/main/org/posterita/beans/AttributeValueDetailBean.java
new file mode 100644
index 0000000000..b3286e7663
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/AttributeValueDetailBean.java
@@ -0,0 +1,95 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on Feb 3, 2006 by praveen
+ *
+ */
+package org.posterita.beans;
+
+public class AttributeValueDetailBean extends UDIBean
+{
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public void setDescription(String description)
+ {
+ this.description = description;
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(Integer id)
+ {
+ this.id = id;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public Boolean getIsActive()
+ {
+ return isActive;
+ }
+
+ public void setActive(Boolean isActive)
+ {
+ this.isActive = isActive;
+ }
+
+ public Integer getAttributeId()
+ {
+ return attributeId;
+ }
+
+ public void setAttributeId(Integer attributeId)
+ {
+ this.attributeId = attributeId;
+ }
+
+ public Integer getAttributeValueId()
+ {
+ return attributeValueId;
+ }
+
+ public void setAttributeValueId(Integer attributeValueId)
+ {
+ this.attributeValueId = attributeValueId;
+ }
+
+ public String getNewName()
+ {
+ return newName;
+ }
+
+ public void setNewName(String newName)
+ {
+ this.newName = newName;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/AttributeValuesBean.java b/posterita/posterita/src/main/org/posterita/beans/AttributeValuesBean.java
new file mode 100644
index 0000000000..82293a4373
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/AttributeValuesBean.java
@@ -0,0 +1,155 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
+package org.posterita.beans;
+
+
+import java.util.ArrayList;
+
+import org.compiere.util.KeyNamePair;
+
+public class AttributeValuesBean extends UDIBean
+{
+ private ArrayList brand = new ArrayList();
+ private ArrayList model = new ArrayList();
+ private ArrayList design = new ArrayList();
+ private ArrayList colour = new ArrayList();
+ private ArrayList size = new ArrayList();
+ private ArrayList trx = new ArrayList();
+ private ArrayList years = new ArrayList();
+ private ArrayList ETAList = new ArrayList();
+ private ArrayList make = new ArrayList();
+ private ArrayList modelGroup = new ArrayList();
+
+ public void setAttributeId(Integer attributeId)
+ {
+ this.attributeId = attributeId;
+ }
+
+ public Integer getAttributeSetId()
+ {
+ return attributeSetId;
+ }
+
+ public ArrayList getAttributeSet()
+ {
+ return attributeSet;
+ }
+ public void setAttributeSet(ArrayList attributeSet)
+ {
+ this.attributeSet = attributeSet;
+ }
+ private ArrayList attributeSet;
+
+ public ArrayList getColour()
+ {
+ return colour;
+ }
+
+ public void setColour(ArrayList colour)
+ {
+ this.colour = colour;
+ }
+
+ public ArrayList getModel()
+ {
+ return model;
+ }
+
+ public void setModel(ArrayList model)
+ {
+ this.model = model;
+ }
+
+ public ArrayList getTrx()
+ {
+ return trx;
+ }
+
+ public void setTrx(ArrayList trx)
+ {
+ this.trx = trx;
+ }
+
+ public ArrayList getYears()
+ {
+ return years;
+ }
+
+ public void setYears(ArrayList years)
+ {
+ this.years = years;
+ }
+
+ public ArrayList getMake()
+ {
+ return make;
+ }
+
+ public void setMake(ArrayList make)
+ {
+ this.make = make;
+ }
+
+ public ArrayList getModelGroup()
+ {
+ return modelGroup;
+ }
+
+ public void setModelGroup(ArrayList modelGroup)
+ {
+ this.modelGroup = modelGroup;
+ }
+
+ public ArrayList getETAList()
+ {
+ return ETAList;
+ }
+
+ public void setETAList(ArrayList list)
+ {
+ ETAList = list;
+ }
+
+ public ArrayList getBrand() {
+ return brand;
+ }
+
+ public void setBrand(ArrayList brand) {
+ this.brand = brand;
+ }
+
+ public ArrayList getDesign() {
+ return design;
+ }
+
+ public void setDesign(ArrayList design) {
+ this.design = design;
+ }
+
+ public ArrayList getSize() {
+ return size;
+ }
+
+ public void setSize(ArrayList size) {
+ this.size = size;
+ }
+
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/AttributeValuesPair.java b/posterita/posterita/src/main/org/posterita/beans/AttributeValuesPair.java
new file mode 100644
index 0000000000..5af78d5c87
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/AttributeValuesPair.java
@@ -0,0 +1,139 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
+package org.posterita.beans;
+
+import org.compiere.util.KeyNamePair;
+
+
+public class AttributeValuesPair
+{
+ private KeyNamePair makeAttributeValue;
+ private KeyNamePair modelAttributeValue;
+ private KeyNamePair modelGroupAttributeValue;
+ private KeyNamePair colourAttributeValue;
+ private KeyNamePair transmissionAttributeValue;
+ private KeyNamePair yearAttributeValue;
+ private KeyNamePair styleAttributeValue;
+ private KeyNamePair sizeAttributeValue;
+ private KeyNamePair designAttributeValue;
+ private KeyNamePair brandAttributeValue;
+
+
+ public KeyNamePair getBrandAttributeValue()
+ {
+ return brandAttributeValue;
+ }
+
+ public void setBrandAttributeValue(KeyNamePair brandAttributeValue)
+ {
+ this.brandAttributeValue = brandAttributeValue;
+ }
+
+ public KeyNamePair getColourAttributeValue()
+ {
+ return colourAttributeValue;
+ }
+
+ public void setColourAttributeValue(KeyNamePair colourAttributeValue)
+ {
+ this.colourAttributeValue = colourAttributeValue;
+ }
+
+ public KeyNamePair getModelAttributeValue()
+ {
+ return modelAttributeValue;
+ }
+
+ public void setModelAttributeValue(KeyNamePair modelAttributeValue)
+ {
+ this.modelAttributeValue = modelAttributeValue;
+ }
+
+
+ public KeyNamePair getTransmissionAttributeValue()
+ {
+ return transmissionAttributeValue;
+ }
+
+ public void setTransmissionAttributeValue(KeyNamePair transmissionAttributeValue)
+ {
+ this.transmissionAttributeValue = transmissionAttributeValue;
+ }
+
+ public KeyNamePair getYearAttributeValue()
+ {
+ return yearAttributeValue;
+ }
+
+ public void setYearAttributeValue(KeyNamePair yearAttributeValue)
+ {
+ this.yearAttributeValue = yearAttributeValue;
+ }
+
+ public KeyNamePair getMakeAttributeValue()
+ {
+ return makeAttributeValue;
+ }
+
+ public void setMakeAttributeValue(KeyNamePair makeAttributeValue)
+ {
+ this.makeAttributeValue = makeAttributeValue;
+ }
+
+ public KeyNamePair getModelGroupAttributeValue()
+ {
+ return modelGroupAttributeValue;
+ }
+
+ public void setModelGroupAttributeValue(KeyNamePair modelGroupAttributeValue)
+ {
+ this.modelGroupAttributeValue = modelGroupAttributeValue;
+ }
+
+ public KeyNamePair getDesignAttributeValue()
+ {
+ return designAttributeValue;
+ }
+
+ public void setDesignAttributeValue(KeyNamePair designAttributeValue)
+ {
+ this.designAttributeValue = designAttributeValue;
+ }
+
+ public KeyNamePair getSizeAttributeValue()
+ {
+ return sizeAttributeValue;
+ }
+
+ public void setSizeAttributeValue(KeyNamePair sizeAttributeValue)
+ {
+ this.sizeAttributeValue = sizeAttributeValue;
+ }
+
+ public KeyNamePair getStyleAttributeValue()
+ {
+ return styleAttributeValue;
+ }
+
+ public void setStyleAttributeValue(KeyNamePair styleAttributeValue)
+ {
+ this.styleAttributeValue = styleAttributeValue;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/AvailableProductSizeBean.java b/posterita/posterita/src/main/org/posterita/beans/AvailableProductSizeBean.java
new file mode 100644
index 0000000000..812291f8bd
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/AvailableProductSizeBean.java
@@ -0,0 +1,69 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ **/
+package org.posterita.beans;
+
+
+public class AvailableProductSizeBean extends UDIBean
+{
+ private Boolean existsInSmall = Boolean.valueOf(false);
+ private Boolean existsInMedium = Boolean.valueOf(false);
+ private Boolean existsInLarge = Boolean.valueOf(false);
+ private Boolean existsInXLarge = Boolean.valueOf(false);
+
+ public Boolean getExistsInLarge()
+ {
+ return existsInLarge;
+ }
+
+ public void setExistsInLarge(Boolean existsInLarge)
+ {
+ this.existsInLarge = existsInLarge;
+ }
+
+ public Boolean getExistsInMedium()
+ {
+ return existsInMedium;
+ }
+
+ public void setExistsInMedium(Boolean existsInMedium)
+ {
+ this.existsInMedium = existsInMedium;
+ }
+
+ public Boolean getExistsInSmall()
+ {
+ return existsInSmall;
+ }
+
+ public void setExistsInSmall(Boolean existsInSmall)
+ {
+ this.existsInSmall = existsInSmall;
+ }
+
+ public Boolean getExistsInXLarge()
+ {
+ return existsInXLarge;
+ }
+
+ public void setExistsInXLarge(Boolean existsInXLarge)
+ {
+ this.existsInXLarge = existsInXLarge;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/BPartnerBean.java b/posterita/posterita/src/main/org/posterita/beans/BPartnerBean.java
new file mode 100644
index 0000000000..5a9fcc9542
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/BPartnerBean.java
@@ -0,0 +1,256 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on 25-Jul-2005 by alok
+ *
+ */
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+
+public class BPartnerBean
+{
+ protected String postalCode;
+ protected Integer orgId;
+ protected String countryName;
+ protected Integer countryId;
+ protected String name2;
+ protected Integer bpartnerId;
+ protected String partnerName;
+ protected Boolean isCustomer;
+ protected Boolean isEmployee;
+ protected Boolean isSalesRep;
+ protected Boolean isVendor;
+ protected String phone;
+ protected String address1;
+ protected String city;
+ protected String postalAddress;
+ protected Integer regionId;
+ protected Boolean isActive;
+ protected Integer locationId;
+ protected String address2;
+ protected String fax;
+ protected BigDecimal openBalance;
+ protected BigDecimal actualLifetimeValue;
+ protected BigDecimal creditLimit;
+ protected BigDecimal creditUsed;
+
+ public String getPostalCode()
+ {
+ return postalCode;
+ }
+
+ public void setPostalCode(String postalCode)
+ {
+ this.postalCode = postalCode;
+ }
+
+ public Integer getOrgId() {
+ return orgId;
+ }
+
+ public void setOrgId(Integer orgId) {
+ this.orgId = orgId;
+ }
+
+ public String getCountryName()
+ {
+ return countryName;
+ }
+
+ public void setCountryName(String countryName)
+ {
+ this.countryName = countryName;
+ }
+
+ public Integer getCountryId()
+ {
+ return countryId;
+ }
+
+ public void setCountryId(Integer countryId)
+ {
+ this.countryId = countryId;
+ }
+
+ public String getName2()
+ {
+ return name2;
+ }
+ public void setName2(String name2)
+ {
+ this.name2 = name2;
+ }
+ public Integer getBpartnerId()
+ {
+ return bpartnerId;
+ }
+ public void setBpartnerId(Integer bpartnerId)
+ {
+ this.bpartnerId = bpartnerId;
+ }
+
+ public String getPartnerName()
+ {
+ return partnerName;
+ }
+ public void setPartnerName(String partnerName)
+ {
+ this.partnerName = partnerName;
+ }
+ public Boolean getIsCustomer()
+ {
+ return isCustomer;
+ }
+ public void setIsCustomer(Boolean isCustomer)
+ {
+ this.isCustomer = isCustomer;
+ }
+ public Boolean getIsEmployee()
+ {
+ return isEmployee;
+ }
+ public void setIsEmployee(Boolean isEmployee)
+ {
+ this.isEmployee = isEmployee;
+ }
+ public Boolean getIsSalesRep()
+ {
+ return isSalesRep;
+ }
+ public void setIsSalesRep(Boolean isSalesRep)
+ {
+ this.isSalesRep = isSalesRep;
+ }
+ public Boolean getIsVendor()
+ {
+ return isVendor;
+ }
+ public void setIsVendor(Boolean isVendor)
+ {
+ this.isVendor = isVendor;
+ }
+ public String getPhone()
+ {
+ return phone;
+ }
+ public void setPhone(String phone)
+ {
+ this.phone = phone;
+ }
+
+ public String getAddress1()
+ {
+ return address1;
+ }
+ public void setAddress1(String address1)
+ {
+ this.address1 = address1;
+ }
+ public String getCity()
+ {
+ return city;
+ }
+ public void setCity(String city)
+ {
+ this.city = city;
+ }
+
+ public String getPostalAddress()
+ {
+ return postalAddress;
+ }
+ public void setPostalAddress(String postalAddress)
+ {
+ this.postalAddress = postalAddress;
+ }
+
+ public Integer getRegionId()
+ {
+ return regionId;
+ }
+ public void setRegionId(Integer regionId)
+ {
+ this.regionId = regionId;
+ }
+
+ public Boolean getIsActive()
+ {
+ return isActive;
+ }
+ public void setIsActive(Boolean isActive)
+ {
+ this.isActive = isActive;
+ }
+ public Integer getLocationId()
+ {
+ return locationId;
+ }
+ public void setLocationId(Integer locationId)
+ {
+ this.locationId = locationId;
+ }
+ public String getAddress2()
+ {
+ return address2;
+ }
+ public void setAddress2(String address2)
+ {
+ this.address2 = address2;
+ }
+ public String getFax()
+ {
+ return fax;
+ }
+ public void setFax(String fax)
+ {
+ this.fax = fax;
+ }
+
+ public BigDecimal getOpenBalance() {
+ return openBalance;
+ }
+
+ public void setOpenBalance(BigDecimal openBalance) {
+ this.openBalance = openBalance;
+ }
+
+ public BigDecimal getActualLifetimeValue() {
+ return actualLifetimeValue;
+ }
+
+ public void setActualLifetimeValue(BigDecimal actualLifetimeValue) {
+ this.actualLifetimeValue = actualLifetimeValue;
+ }
+
+ public BigDecimal getCreditLimit() {
+ return creditLimit;
+ }
+
+ public void setCreditLimit(BigDecimal creditLimit) {
+ this.creditLimit = creditLimit;
+ }
+
+ public BigDecimal getCreditUsed() {
+ return creditUsed;
+ }
+
+ public void setCreditUsed(BigDecimal creditUsed) {
+ this.creditUsed = creditUsed;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/BPartnerInfoBean.java b/posterita/posterita/src/main/org/posterita/beans/BPartnerInfoBean.java
new file mode 100644
index 0000000000..3cdc47da78
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/BPartnerInfoBean.java
@@ -0,0 +1,264 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on Jul 26, 2006
+ */
+
+
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+
+
+public class BPartnerInfoBean extends UDIBean
+{
+
+ protected String soCreditStatus;
+ protected String forward;
+
+ public String getForward()
+ {
+ return forward;
+ }
+
+ public void setForward(String forward)
+ {
+ this.forward = forward;
+ }
+
+ public String getBpfirstSale()
+ {
+ return bpfirstSale;
+ }
+
+ public void setBpfirstSale(String bpfirstSale)
+ {
+ this.bpfirstSale = bpfirstSale;
+ }
+
+ public String getSoCreditStatus()
+ {
+ return soCreditStatus;
+ }
+
+ public void setSoCreditStatus(String soCreditStatus)
+ {
+ this.soCreditStatus = soCreditStatus;
+ }
+
+ public Integer getDunningId()
+ {
+ return dunningId;
+ }
+
+ public void setDunningId(Integer dunningId)
+ {
+ this.dunningId = dunningId;
+ }
+
+ public Integer[] getBpartnerIds()
+ {
+ return bpartnerIds;
+ }
+
+ public void setBpartnerIds(Integer[] bpartnerIds)
+ {
+ this.bpartnerIds = bpartnerIds;
+ }
+
+ public BigDecimal getCreditLimit()
+ {
+ return creditLimit;
+ }
+
+ public void setCreditLimit(BigDecimal creditLimit)
+ {
+ this.creditLimit = creditLimit;
+ }
+
+ public BigDecimal getCreditUsed()
+ {
+ return creditUsed;
+ }
+
+ public void setCreditUsed(BigDecimal creditUsed)
+ {
+ this.creditUsed = creditUsed;
+ }
+
+ public BigDecimal getOpenAmt()
+ {
+ return openAmt;
+ }
+
+ public void setOpenAmt(BigDecimal openAmt)
+ {
+ this.openAmt = openAmt;
+ }
+
+ public BigDecimal getRevenue()
+ {
+ return revenue;
+ }
+
+ public void setRevenue(BigDecimal revenue)
+ {
+ this.revenue = revenue;
+ }
+
+ public BigDecimal getAmount()
+ {
+ return amount;
+ }
+
+ public void setAmount(BigDecimal amount)
+ {
+ this.amount = amount;
+ }
+
+ public Integer getProductId()
+ {
+ return productId;
+ }
+
+ public void setProductId(Integer productId)
+ {
+ this.productId = productId;
+ }
+
+ public String getProductName()
+ {
+ return productName;
+ }
+
+ public void setProductName(String productName)
+ {
+ this.productName = productName;
+ }
+
+ public String getAddress1()
+ {
+ return address1;
+ }
+
+ public void setAddress1(String address1)
+ {
+ this.address1 = address1;
+ }
+
+ public String getAddress2()
+ {
+ return address2;
+ }
+
+ public void setAddress2(String address2)
+ {
+ this.address2 = address2;
+ }
+
+ public String getCity()
+ {
+ return city;
+ }
+
+ public void setCity(String city)
+ {
+ this.city = city;
+ }
+
+ public Boolean getIsCustomer()
+ {
+ return isCustomer;
+ }
+
+ public void setIsCustomer(Boolean isCustomer)
+ {
+ this.isCustomer = isCustomer;
+ }
+
+ public Integer getBpartnerId()
+ {
+ return bpartnerId;
+ }
+
+ public void setBpartnerId(Integer bpartnerId)
+ {
+ this.bpartnerId = bpartnerId;
+ }
+
+ public String getEmail()
+ {
+ return email;
+ }
+
+ public void setEmail(String email)
+ {
+ this.email = email;
+ }
+
+ public String getFax()
+ {
+ return fax;
+ }
+
+ public void setFax(String fax)
+ {
+ this.fax = fax;
+ }
+
+ public String getPartnerName()
+ {
+ return partnerName;
+ }
+
+ public void setPartnerName(String partnerName)
+ {
+ this.partnerName = partnerName;
+ }
+
+ public String getPhone2()
+ {
+ return phone2;
+ }
+
+ public void setPhone2(String phone2)
+ {
+ this.phone2 = phone2;
+ }
+
+ public String getPhone()
+ {
+ return phone;
+ }
+
+ public void setPhone(String phone)
+ {
+ this.phone = phone;
+ }
+
+ public BigDecimal getQuantity()
+ {
+ return quantity;
+ }
+
+ public void setQuantity(BigDecimal quantity)
+ {
+ this.quantity = quantity;
+ }
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/BankAccountBean.java b/posterita/posterita/src/main/org/posterita/beans/BankAccountBean.java
new file mode 100644
index 0000000000..30d004557e
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/BankAccountBean.java
@@ -0,0 +1,96 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on Jul 26, 2005 by praveen
+ *
+ */
+package org.posterita.beans;
+
+public class BankAccountBean extends UDIBean
+{
+ public String getAccountNo()
+ {
+ return accountNo;
+ }
+
+ public void setAccountNo(String accountNo)
+ {
+ this.accountNo = accountNo;
+ }
+
+ public String getAccountType()
+ {
+ return accountType;
+ }
+
+ public void setAccountType(String accountType)
+ {
+ this.accountType = accountType;
+ }
+
+ public Integer getBankId()
+ {
+ return bankId;
+ }
+
+ public void setBankId(Integer bankId)
+ {
+ this.bankId = bankId;
+ }
+
+ public Double getCurrentBalance()
+ {
+ return currentBalance;
+ }
+
+ public void setCurrentBalance(Double currentBalance)
+ {
+ this.currentBalance = currentBalance;
+ }
+
+ public String getBankName()
+ {
+ return bankName;
+ }
+
+ public void setBankName(String bankName)
+ {
+ this.bankName = bankName;
+ }
+
+ public String getSummary()
+ {
+ return bankName + " - " + accountNo;
+ }
+
+ /**
+ * @return the bankAccountId
+ */
+ public Integer getBankAccountId()
+ {
+ return bankAccountId;
+ }
+
+ /**
+ * @param bankAccountId the bankAccountId to set
+ */
+ public void setBankAccountId(Integer bankAccountId)
+ {
+ this.bankAccountId = bankAccountId;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/BankBean.java b/posterita/posterita/src/main/org/posterita/beans/BankBean.java
new file mode 100644
index 0000000000..127791ac04
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/BankBean.java
@@ -0,0 +1,84 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on 26-Jul-2005 by alok
+ *
+ */
+package org.posterita.beans;
+
+
+public class BankBean extends UDIBean
+{
+ public String getAddress1()
+ {
+ return address1;
+ }
+ public void setAddress1(String address1)
+ {
+ this.address1 = address1;
+ }
+
+ public Integer getBankId()
+ {
+ return bankId;
+ }
+ public void setBankId(Integer bankId)
+ {
+ this.bankId = bankId;
+ }
+ public String getBankName()
+ {
+ return bankName;
+ }
+ public void setBankName(String bankName)
+ {
+ this.bankName = bankName;
+ }
+ public String getCity()
+ {
+ return city;
+ }
+ public void setCity(String city)
+ {
+ this.city = city;
+ }
+ public String getPostalAddress()
+ {
+ return postalAddress;
+ }
+ public void setPostalAddress(String postalAddress)
+ {
+ this.postalAddress = postalAddress;
+ }
+ public String getRoutingNumber()
+ {
+ return routingNumber;
+ }
+ public void setRoutingNumber(String routingNumber)
+ {
+ this.routingNumber = routingNumber;
+ }
+ public Integer getLocationId()
+ {
+ return locationId;
+ }
+ public void setLocationId(Integer locationId)
+ {
+ this.locationId = locationId;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/BankStatementLineBean.java b/posterita/posterita/src/main/org/posterita/beans/BankStatementLineBean.java
new file mode 100644
index 0000000000..11b0769599
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/BankStatementLineBean.java
@@ -0,0 +1,114 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+import java.sql.Timestamp;
+
+
+public class BankStatementLineBean
+{
+ private Timestamp dateTrx;
+ private String documentNo;
+ private int paymentId;
+ private int currencyId;
+ private String isoCode;
+ private BigDecimal payAmt;
+ private BigDecimal currencyConvert;
+ private String bpName;
+
+
+ public String getBpName()
+ {
+ return bpName;
+ }
+
+ public void setBpName(String bpName)
+ {
+ this.bpName = bpName;
+ }
+
+ public BigDecimal getCurrencyConvert()
+ {
+ return currencyConvert;
+ }
+
+ public void setCurrencyConvert(BigDecimal currencyConvert)
+ {
+ this.currencyConvert = currencyConvert;
+ }
+
+ public int getCurrencyId()
+ {
+ return currencyId;
+ }
+
+ public void setCurrencyId(int currencyId)
+ {
+ this.currencyId = currencyId;
+ }
+ public Timestamp getDateTrx()
+ {
+ return dateTrx;
+ }
+
+ public void setDateTrx(Timestamp dateTrx)
+ {
+ this.dateTrx = dateTrx;
+ }
+
+ public String getDocumentNo()
+ {
+ return documentNo;
+ }
+
+ public void setDocumentNo(String documentNo) {
+ this.documentNo = documentNo;
+ }
+
+ public String getIsoCode()
+ {
+ return isoCode;
+ }
+
+
+ public void setIsoCode(String isoCode)
+ {
+ this.isoCode = isoCode;
+ }
+ public BigDecimal getPayAmt() {
+ return payAmt;
+ }
+
+ public void setPayAmt(BigDecimal payAmt)
+ {
+ this.payAmt = payAmt;
+ }
+
+ public int getPaymentId()
+ {
+ return paymentId;
+ }
+
+ public void setPaymentId(int paymentId)
+ {
+ this.paymentId = paymentId;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/BlackListedBean.java b/posterita/posterita/src/main/org/posterita/beans/BlackListedBean.java
new file mode 100644
index 0000000000..71a2b0c169
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/BlackListedBean.java
@@ -0,0 +1,53 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ **/
+package org.posterita.beans;
+
+public class BlackListedBean extends UDIBean
+{
+
+ public String getBlackListedBankName()
+ {
+ return blackListedBankName;
+ }
+ public void setBlackListedBankName(String blackListedBankName)
+ {
+ this.blackListedBankName = blackListedBankName;
+ }
+ public String getBlackListedChequeNo()
+ {
+ return blackListedChequeNo;
+ }
+ public void setBlackListedChequeNo(String blackListedChequeNo)
+ {
+ this.blackListedChequeNo = blackListedChequeNo;
+ }
+ public Integer getBlackListedId()
+ {
+ return blackListedId;
+ }
+ public void setBlackListedId(Integer blackListedId)
+ {
+ this.blackListedId = blackListedId;
+ }
+
+
+
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/CashBean.java b/posterita/posterita/src/main/org/posterita/beans/CashBean.java
new file mode 100644
index 0000000000..f1cd43f794
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/CashBean.java
@@ -0,0 +1,141 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Created on May 3, 2006
+ */
+
+
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+import java.sql.Timestamp;
+
+
+public class CashBean extends UDIBean
+{
+
+ public Integer getCashId()
+ {
+ return cashId;
+ }
+ public void setCashId(Integer cashId)
+ {
+ this.cashId = cashId;
+ }
+ public Timestamp getDateAcct()
+ {
+ return dateAcct;
+ }
+ public void setDateAcct(Timestamp dateAcct)
+ {
+ this.dateAcct = dateAcct;
+ }
+ public Timestamp getDateCreated()
+ {
+ return dateCreated;
+ }
+ public void setDateCreated(Timestamp dateCreated)
+ {
+ this.dateCreated = dateCreated;
+ }
+ public Timestamp getDateUpdated()
+ {
+ return dateUpdated;
+ }
+ public void setDateUpdated(Timestamp dateUpdated)
+ {
+ this.dateUpdated = dateUpdated;
+ }
+ public String getName()
+ {
+ return name;
+ }
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+ public String getStatmentDate()
+ {
+ return statmentDate;
+ }
+ public void setStatmentDate(String statmentDate)
+ {
+ this.statmentDate = statmentDate;
+ }
+ public String getCashJournalDisc()
+ {
+ return cashJournalDisc;
+ }
+ public void setCashJournalDisc(String cashJournalDisc)
+ {
+ this.cashJournalDisc = cashJournalDisc;
+ }
+ public Integer getCashJournalId()
+ {
+ return cashJournalId;
+ }
+ public void setCashJournalId(Integer cashJournalId)
+ {
+ this.cashJournalId = cashJournalId;
+ }
+ public String getCashJournalName()
+ {
+ return cashJournalName;
+ }
+ public void setCashJournalName(String cashJournalName)
+ {
+ this.cashJournalName = cashJournalName;
+ }
+ public BigDecimal getBeginingBalance()
+ {
+ return beginingBalance;
+ }
+
+ public void setBeginingBalance(BigDecimal beginingBalance)
+ {
+ this.beginingBalance = beginingBalance;
+ }
+
+ public BigDecimal getEndingBalance()
+ {
+ return endingBalance;
+ }
+
+ public void setEndingBalance(BigDecimal endingBalance)
+ {
+ this.endingBalance = endingBalance;
+ }
+ public String getDocStatus()
+ {
+ return docStatus;
+ }
+ public void setDocStatus(String docStatus)
+ {
+ this.docStatus = docStatus;
+ }
+ public String toString()
+ {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("\n The Begining Balance = "+getBeginingBalance());
+ buffer.append("\n The Ending Balance = "+getEndingBalance());
+
+ return buffer.toString();
+ }
+}
+
diff --git a/posterita/posterita/src/main/org/posterita/beans/CashBookBean.java b/posterita/posterita/src/main/org/posterita/beans/CashBookBean.java
new file mode 100644
index 0000000000..09034c35fe
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/CashBookBean.java
@@ -0,0 +1,155 @@
+/******************************************************************************
+ * Product: Posterita Web-Based POS and Adempiere Plugin *
+ * Copyright (C) 2008 Posterita Ltd *
+ * This file is part of POSterita *
+ * *
+ * POSterita is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License along *
+ * with this program; if not, write to the Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *
+ *****************************************************************************/
+package org.posterita.beans;
+
+/**
+ * @author Ashley G Ramdass
+ * May 2, 2008
+ */
+public class CashBookBean extends UDIBean
+{
+ /**
+ * @return the cashBookId
+ */
+ public Integer getCashBookId()
+ {
+ return (cashBookId == null ? 0 : cashBookId);
+ }
+
+ /**
+ * @param cashBookId the cashBookId to set
+ */
+ public void setCashBookId(Integer cashBookId)
+ {
+ this.cashBookId = cashBookId;
+ }
+
+ /**
+ * @return the cashBookName
+ */
+ public String getCashBookName()
+ {
+ return cashBookName;
+ }
+
+ /**
+ * @param cashBookName the cashBookName to set
+ */
+ public void setCashBookName(String cashBookName)
+ {
+ this.cashBookName = cashBookName;
+ }
+
+ /**
+ * @return the description
+ */
+ public String getDescription()
+ {
+ return description;
+ }
+
+ /**
+ * @param description the description to set
+ */
+ public void setDescription(String description)
+ {
+ this.description = description;
+ }
+
+ /**
+ * @return the isActive
+ */
+ public Boolean getIsActive()
+ {
+ return isActive;
+ }
+
+ /**
+ * @param isActive the isActive to set
+ */
+ public void setIsActive(Boolean isActive)
+ {
+ this.isActive = isActive;
+ }
+
+ /**
+ * @return the isDefault
+ */
+ public Boolean getIsDefault()
+ {
+ return isDefault;
+ }
+
+ /**
+ * @param isDefault the isDefault to set
+ */
+ public void setIsDefault(Boolean isDefault)
+ {
+ this.isDefault = isDefault;
+ }
+
+ /**
+ * @return the orgId
+ */
+ public Integer getOrgId()
+ {
+ return orgId;
+ }
+
+ /**
+ * @param orgId the orgId to set
+ */
+ public void setOrgId(Integer orgId)
+ {
+ this.orgId = orgId;
+ }
+
+ /**
+ * @return The currencyId
+ */
+ public Integer getCurrencyId()
+ {
+ return (currencyId == null ? 0 : currencyId);
+ }
+
+ /**
+ * @param currencyId The currencyId to set
+ */
+ public void setCurrencyId(Integer currencyId)
+ {
+ this.currencyId = currencyId;
+ }
+
+ /**
+ * @return The currency
+ */
+ public String getCurrency()
+ {
+ return currency;
+ }
+
+ /**
+ * @param currency The currency to set
+ */
+ public void setCurrency(String currency)
+ {
+ this.currency = currency;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/CashBookDetailBean.java b/posterita/posterita/src/main/org/posterita/beans/CashBookDetailBean.java
new file mode 100644
index 0000000000..cf4b10ccce
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/CashBookDetailBean.java
@@ -0,0 +1,247 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Created on May 3, 2006
+ */
+
+
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+import java.sql.Timestamp;
+
+
+public class CashBookDetailBean extends UDIBean
+{
+ public String getTransferType()
+ {
+ return transferType;
+ }
+
+ public void setTransferType(String transferType)
+ {
+ this.transferType = transferType;
+ }
+
+ public BigDecimal getDifferenceAmt()
+ {
+ return differenceAmt;
+ }
+
+ public void setDifferenceAmt(BigDecimal differenceAmt)
+ {
+ this.differenceAmt = differenceAmt;
+ }
+
+ public BigDecimal getAdjustmentAmount()
+ {
+ return adjustmentAmount;
+ }
+
+ public void setAdjustmentAmount(BigDecimal adjustmentAmount)
+ {
+ this.adjustmentAmount = adjustmentAmount;
+ }
+
+ public Boolean getTransferAllAmount()
+ {
+ return transferAllAmount;
+ }
+ public void setTransferAllAmount(Boolean transferAllAmount)
+ {
+ this.transferAllAmount = transferAllAmount;
+ }
+ public String getBeginingBalanceAsString()
+ {
+ return beginingBalanceAsString;
+ }
+ public void setBeginingBalanceAsString(String beginingBalanceAsString)
+ {
+ this.beginingBalanceAsString = beginingBalanceAsString;
+ }
+ public String getEndingBalanceAsString()
+ {
+ return endingBalanceAsString;
+ }
+ public void setEndingBalanceAsString(String endingBalanceAsString)
+ {
+ this.endingBalanceAsString = endingBalanceAsString;
+ }
+ public BigDecimal getTransferAmount()
+ {
+ return transferAmount;
+ }
+ public void setTransferAmount(BigDecimal transferAmount)
+ {
+ this.transferAmount = transferAmount;
+ }
+ public Integer getCashJournalId()
+ {
+ return cashJournalId;
+ }
+ public void setCashJournalId(Integer cashJournalId)
+ {
+ this.cashJournalId = cashJournalId;
+ }
+ public Integer getCashBookId()
+ {
+ return cashBookId;
+ }
+
+ public void setCashBookId(Integer cashBookId)
+ {
+ this.cashBookId = cashBookId;
+ }
+ public String getCashJournalName()
+ {
+ return cashJournalName;
+ }
+ public void setCashJournalName(String cashJournalName)
+ {
+ this.cashJournalName = cashJournalName;
+ }
+ public String getCashJournalDisc()
+ {
+ return cashJournalDisc;
+ }
+ public void setCashJournalDisc(String cashJournalDisc)
+ {
+ this.cashJournalDisc = cashJournalDisc;
+ }
+ public void setDateAcct(Timestamp dateAcct)
+ {
+ this.dateAcct = dateAcct;
+ }
+ public BigDecimal getBeginingBalance()
+ {
+ return beginingBalance;
+ }
+
+ public void setBeginingBalance(BigDecimal beginingBalance)
+ {
+ this.beginingBalance = beginingBalance;
+ }
+ public BigDecimal getEndingBalance()
+ {
+ return endingBalance;
+ }
+
+ public void setEndingBalance(BigDecimal endingBalance)
+ {
+ this.endingBalance = endingBalance;
+ }
+ public BigDecimal getStatementDifference()
+ {
+ return statementDifference;
+ }
+
+ public void setStatementDifference(BigDecimal statementDifference)
+ {
+ this.statementDifference = statementDifference;
+ }
+ public String getDocStatus() {
+ return docStatus;
+ }
+ public void setDocStatus(String docStatus) {
+ this.docStatus = docStatus;
+ }
+ public String getCashBookName()
+ {
+ return cashBookName;
+ }
+
+ public void setCashBookName(String cashBookName)
+ {
+ this.cashBookName = cashBookName;
+ }
+
+ public BigDecimal getCardTotal()
+ {
+ return cardTotal;
+ }
+
+ public void setCardTotal(BigDecimal cardTotal)
+ {
+ this.cardTotal=cardTotal;
+ }
+
+ public BigDecimal getChequeTotal()
+ {
+ return chequeTotal;
+ }
+
+ public void setChequeTotal(BigDecimal chequeTotal)
+ {
+ this.chequeTotal=chequeTotal;
+ }
+
+ public BigDecimal getCardDifference()
+ {
+ return cardDifference;
+ }
+ public void setCardDifference(BigDecimal cardDifference)
+ {
+ this.cardDifference = cardDifference;
+ }
+ public BigDecimal getChequeDifference()
+ {
+ return chequeDifference;
+ }
+ public void setChequeDifference(BigDecimal chequeDifference)
+ {
+ this.chequeDifference = chequeDifference;
+ }
+ public String toString()
+ {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("\n The Begining Balance = "+getBeginingBalance());
+ buffer.append("\n The Ending Balance = "+getEndingBalance());
+
+ return buffer.toString();
+
+ }
+
+ /**
+ * @return The description
+ */
+ public String getDescription()
+ {
+ return description;
+ }
+
+ /**
+ * @param description
+ * The description to set
+ */
+ public void setDescription(String description)
+ {
+ this.description = description;
+ }
+
+ private int cash_id;
+
+ public int getCash_id() {
+ return cash_id;
+ }
+
+ public void setCash_id(int cash_id) {
+ this.cash_id = cash_id;
+ }
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/CashLineBean.java b/posterita/posterita/src/main/org/posterita/beans/CashLineBean.java
new file mode 100644
index 0000000000..21c41d9ced
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/CashLineBean.java
@@ -0,0 +1,130 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*
+* Created on Sep 11, 2006 by ashley
+*
+*/
+
+/**
+ @author ashley
+ */
+
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+import java.sql.Timestamp;
+
+public class CashLineBean extends UDIBean
+{
+ public Integer getCashId()
+ {
+ return cashId;
+ }
+
+ public void setCashId(Integer cashId)
+ {
+ this.cashId = cashId;
+ }
+
+ public BigDecimal getAmount()
+ {
+ return amount;
+ }
+
+ public void setAmount(BigDecimal amount)
+ {
+ this.amount = amount;
+ }
+
+ public Integer getCashLineId()
+ {
+ return cashLineId;
+ }
+
+ public void setCashLineId(Integer cashLineId)
+ {
+ this.cashLineId = cashLineId;
+ }
+
+ public String getCashType()
+ {
+ return cashType;
+ }
+
+ public void setCashType(String cashType)
+ {
+ this.cashType = cashType;
+ }
+
+ public String getCurrency()
+ {
+ return currency;
+ }
+
+ public void setCurrency(String currency)
+ {
+ this.currency = currency;
+ }
+
+ public Timestamp getDateCreated()
+ {
+ return dateCreated;
+ }
+
+ public void setDateCreated(Timestamp dateCreated)
+ {
+ this.dateCreated = dateCreated;
+ }
+
+ public Integer getInvoiceId()
+ {
+ return invoiceId;
+ }
+
+ public void setInvoiceId(Integer invoiceId)
+ {
+ this.invoiceId = invoiceId;
+ }
+
+ public String getCashTypeName()
+ {
+ return cashTypeName;
+ }
+
+ public void setCashTypeName(String cashTypeName)
+ {
+ this.cashTypeName = cashTypeName;
+ }
+
+ /**
+ * @return The description
+ */
+ public String getDescription()
+ {
+ return description;
+ }
+
+ /**
+ * @param description The description to set
+ */
+ public void setDescription(String description)
+ {
+ this.description = description;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/CashSummaryBean.java b/posterita/posterita/src/main/org/posterita/beans/CashSummaryBean.java
new file mode 100644
index 0000000000..1384866487
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/CashSummaryBean.java
@@ -0,0 +1,148 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*
+* Created on Sep 11, 2006 by ashley
+*
+*/
+
+/**
+ @author ashley
+ */
+
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+
+import org.compiere.util.Env;
+
+public class CashSummaryBean extends UDIBean
+{
+ public CashSummaryBean()
+ {
+ this.setBankAcctTransferAmount(Env.ZERO);
+ this.setChargeAmount(Env.ZERO);
+ this.setDifferenceAmount(Env.ZERO);
+ this.setGeneralExpenseAmount(Env.ZERO);
+ this.setGeneralReceiptsAmount(Env.ZERO);
+ this.setInvoiceAmount(Env.ZERO);
+ }
+
+ public Integer getCashId()
+ {
+ return cashId;
+ }
+
+ public void setCashId(Integer cashId)
+ {
+ this.cashId = cashId;
+ }
+
+ public BigDecimal getBankAcctTransferAmount()
+ {
+ return bankAcctTransferAmount;
+ }
+
+ public void setBankAcctTransferAmount(BigDecimal bankAcctTransferAmount)
+ {
+ this.bankAcctTransferAmount = bankAcctTransferAmount;
+ }
+
+ public BigDecimal getChargeAmount()
+ {
+ return chargeAmount;
+ }
+
+ public void setChargeAmount(BigDecimal chargeAmount)
+ {
+ this.chargeAmount = chargeAmount;
+ }
+
+ public BigDecimal getDifferenceAmount()
+ {
+ return differenceAmount;
+ }
+
+ public void setDifferenceAmount(BigDecimal differenceAmount)
+ {
+ this.differenceAmount = differenceAmount;
+ }
+
+ public BigDecimal getGeneralExpenseAmount()
+ {
+ return generalExpenseAmount;
+ }
+
+ public void setGeneralExpenseAmount(BigDecimal generalExpenseAmount)
+ {
+ this.generalExpenseAmount = generalExpenseAmount;
+ }
+
+ public BigDecimal getGeneralReceiptsAmount()
+ {
+ return generalReceiptsAmount;
+ }
+
+ public void setGeneralReceiptsAmount(BigDecimal generalReceiptsAmount)
+ {
+ this.generalReceiptsAmount = generalReceiptsAmount;
+ }
+
+ public BigDecimal getInvoiceAmount()
+ {
+ return invoiceAmount;
+ }
+
+ public void setInvoiceAmount(BigDecimal invoiceAmount)
+ {
+ this.invoiceAmount = invoiceAmount;
+ }
+
+ /**
+ * @return The beginingBalance
+ */
+ public BigDecimal getBeginingBalance()
+ {
+ return beginingBalance;
+ }
+
+ /**
+ * @param beginingBalance The beginingBalance to set
+ */
+ public void setBeginingBalance(BigDecimal beginingBalance)
+ {
+ this.beginingBalance = beginingBalance;
+ }
+
+ /**
+ * @return The endingBalance
+ */
+ public BigDecimal getEndingBalance()
+ {
+ return endingBalance;
+ }
+
+ /**
+ * @param endingBalance The endingBalance to set
+ */
+ public void setEndingBalance(BigDecimal endingBalance)
+ {
+ this.endingBalance = endingBalance;
+ }
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/ChangeDocumentStatusBean.java b/posterita/posterita/src/main/org/posterita/beans/ChangeDocumentStatusBean.java
new file mode 100644
index 0000000000..1d049fbf32
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/ChangeDocumentStatusBean.java
@@ -0,0 +1,83 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
+package org.posterita.beans;
+
+
+public class ChangeDocumentStatusBean extends DocumentBean
+{
+
+ public String getTrackingNo()
+ {
+ return trackingNo;
+ }
+ public void setTrackingNo(String trackingNo)
+ {
+ this.trackingNo = trackingNo;
+ }
+ public Integer getAllocationId()
+ {
+ return allocationId;
+ }
+ public void setAllocationId(Integer allocationId)
+ {
+ this.allocationId = allocationId;
+ }
+ public String getPoReference()
+ {
+ return poReference;
+ }
+
+ public void setPoReference(String poReference)
+ {
+ this.poReference = poReference;
+ }
+
+ public void setAgreement(Boolean agreement)
+ {
+ this.agreement = agreement;
+ }
+
+ public Boolean getAgreement()
+ {
+ return agreement;
+ }
+
+ public String getSubmit()
+ {
+ return submit;
+ }
+
+ public void setSubmit(String submit)
+ {
+ this.submit = submit;
+ }
+
+ public Integer getTradeInOrderlineId()
+ {
+ return tradeInOrderlineId;
+ }
+
+ public void setTradeInOrderlineId(Integer tradeInOrderlineId)
+ {
+ this.tradeInOrderlineId = tradeInOrderlineId;
+ }
+
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/ChangePasswordBean.java b/posterita/posterita/src/main/org/posterita/beans/ChangePasswordBean.java
new file mode 100644
index 0000000000..747ae4b146
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/ChangePasswordBean.java
@@ -0,0 +1,64 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on Aug 29, 2005 by din
+ */
+
+package org.posterita.beans;
+
+public class ChangePasswordBean extends UDIBean
+{
+
+ public String getPassword()
+ {
+ return password;
+ }
+ public void setPassword(String password)
+ {
+ this.password = password;
+ }
+
+ public String getNewPassword()
+ {
+ return newPassword;
+ }
+ public void setNewPassword(String newPassword)
+ {
+ this.newPassword = newPassword;
+ }
+
+ public String getConfirmPassword()
+ {
+ return confirmPassword;
+ }
+
+ public void setConfirmPassword(String confirmPassword)
+ {
+ this.confirmPassword = confirmPassword;
+ }
+
+ public String getOldPassword()
+ {
+ return oldPassword;
+ }
+ public void setOldPassword(String oldPassword)
+ {
+ this.oldPassword = oldPassword;
+ }
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/CheckoutBean.java b/posterita/posterita/src/main/org/posterita/beans/CheckoutBean.java
new file mode 100644
index 0000000000..4c27dbb4ed
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/CheckoutBean.java
@@ -0,0 +1,375 @@
+/**
+ *
+ * Copyright (c) 2008 Posterita. All Rights Reserved.
+ *
+ * This software is the confidential and proprietary information of
+ * Posterita. ("Confidential Information"). You shall not
+ * disclose such Confidential Information and shall use it only in
+ * accordance with the terms of the license agreement you entered into
+ * with Posterita.
+ *
+ * POSTERITA MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE
+ * SUITABILITY OF THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT
+ * NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR
+ * A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. TAMAK ICT SHALL NOT
+ * BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING,
+ * MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
+ *
+ * Mar 21, 2008 10:31:54 AM by praveen
+ *
+ */
+
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+
+import org.compiere.model.MOrder;
+import org.posterita.Constants;
+import org.posterita.exceptions.OperationException;
+import org.posterita.lib.UdiConstants;
+
+public class CheckoutBean
+{
+ private BigDecimal amountTendered;
+ private BigDecimal amountRefunded;
+ private String cardType;
+ private String cardNo;
+ private String chequeNo;
+ private BigDecimal cashAmt;
+ private BigDecimal chequeAmt;
+ private BigDecimal cardAmt;
+ private Integer bpartnerId;
+ private String tenderType;
+ private String paymentRule;
+ private BigDecimal discount[];
+ private BigDecimal discountedPrice[];
+ private Boolean[] isDiscOnInclUnitPrice;
+ private BigDecimal[] discInclUnitPrice;
+ private String orderType;
+ private BigDecimal discountLimit;
+ private Integer priceListId;
+ private Integer m_productId;
+ private Boolean toBeShipped;
+ private BigDecimal discountedTotal;
+ private Boolean discountOnTotal;
+ private Boolean discountOnTotalPercent;
+ private Boolean overridePriceLimit;
+ private Boolean isDiscountUptoLimitPrice;
+ private BigDecimal totalDiscount;
+ private BigDecimal writeOffAmt;
+ private BigDecimal discountAmt;
+ private BigDecimal totalAmount;
+ private Boolean isOverridePinOk;
+ private Boolean[] isDiscOnPerc;
+ private Boolean[] isDiscOnTotal;
+ private BigDecimal[] qtyPerLine;
+ private BigDecimal grandTotal;
+ protected Integer roleId;
+
+ public BigDecimal[] getQtyPerLine()
+ {
+ return qtyPerLine;
+ }
+ public void setQtyPerLine(BigDecimal[] qtyPerLine)
+ {
+ this.qtyPerLine = qtyPerLine;
+ }
+ public Boolean[] getIsDiscOnPerc()
+ {
+ return isDiscOnPerc;
+ }
+ public void setIsDiscOnPerc(Boolean[] isDiscOnPerc)
+ {
+ this.isDiscOnPerc = isDiscOnPerc;
+ }
+ public Boolean[] getIsDiscOnTotal()
+ {
+ return isDiscOnTotal;
+ }
+ public void setIsDiscOnTotal(Boolean[] isDiscOnTotal)
+ {
+ this.isDiscOnTotal = isDiscOnTotal;
+ }
+ public Boolean getIsOverridePinOk() {
+ return isOverridePinOk;
+ }
+ public void setIsOverridePinOk(Boolean isOverridePinOk) {
+ this.isOverridePinOk = isOverridePinOk;
+ }
+ public BigDecimal getAmountTendered() {
+ return amountTendered;
+ }
+ public void setAmountTendered(BigDecimal amountTendered) {
+ this.amountTendered = amountTendered;
+ }
+ public String getCardNo() {
+ return cardNo;
+ }
+ public void setCardNo(String cardNo) {
+ this.cardNo = cardNo;
+ }
+ public String getChequeNo() {
+ return chequeNo;
+ }
+ public void setChequeNo(String chequeNo) {
+ this.chequeNo = chequeNo;
+ }
+ public BigDecimal getCashAmt() {
+ return cashAmt;
+ }
+ public void setCashAmt(BigDecimal cashAmt) {
+ this.cashAmt = cashAmt;
+ }
+ public BigDecimal getChequeAmt() {
+ return chequeAmt;
+ }
+ public void setChequeAmt(BigDecimal chequeAmt) {
+ this.chequeAmt = chequeAmt;
+ }
+ public Integer getBpartnerId() {
+ return bpartnerId;
+ }
+ public void setBpartnerId(Integer bpartnerId) {
+ this.bpartnerId = bpartnerId;
+ }
+ public String getTenderType() {
+ return tenderType;
+ }
+ public void setTenderType(String tenderType) throws OperationException {
+ this.tenderType = tenderType;
+
+ //set payment rule
+ if(tenderType == null) return;
+
+ if (Constants.PAYMENT_RULE_CASH.equalsIgnoreCase(tenderType))
+ {
+ paymentRule=MOrder.PAYMENTRULE_Cash;
+ }
+ else if(Constants.PAYMENT_RULE_CARD.equalsIgnoreCase(tenderType))
+ {
+ paymentRule=MOrder.PAYMENTRULE_CreditCard;
+ }
+ else if(Constants.PAYMENT_RULE_CHEQUE.equalsIgnoreCase(tenderType))
+ {
+ paymentRule=MOrder.PAYMENTRULE_Check;
+ }
+ else if(Constants.PAYMENT_RULE_MIXED.equalsIgnoreCase(tenderType))
+ {
+ paymentRule=UdiConstants.PAYMENTRULE_MIXED;
+ }
+ else if(Constants.PAYMENT_RULE_CREDIT.equalsIgnoreCase(tenderType))
+ {
+ paymentRule=MOrder.PAYMENTRULE_OnCredit;
+ }
+ else
+ {
+ throw new OperationException("Invalid Payment Rule :" + tenderType);
+ }
+ }
+ public BigDecimal[] getDiscount() {
+ return discount;
+ }
+ public void setDiscount(BigDecimal[] discount) {
+ this.discount = discount;
+ }
+ public String getOrderType() {
+ return orderType;
+ }
+ public void setOrderType(String orderType) {
+ this.orderType = orderType;
+ }
+ public BigDecimal getDiscountLimit() {
+ return discountLimit;
+ }
+ public void setDiscountLimit(BigDecimal discountLimit) {
+ this.discountLimit = discountLimit;
+ }
+ public BigDecimal getAmountRefunded() {
+ return amountRefunded;
+ }
+ public void setAmountRefunded(BigDecimal amountRefunded) {
+ this.amountRefunded = amountRefunded;
+ }
+ public BigDecimal getCardAmt() {
+ return cardAmt;
+ }
+ public void setCardAmt(BigDecimal cardAmt) {
+ this.cardAmt = cardAmt;
+ }
+ public BigDecimal[] getDiscountedPrice() {
+ return discountedPrice;
+ }
+ public void setDiscountedPrice(BigDecimal[] discountedPrice) {
+ this.discountedPrice = discountedPrice;
+ }
+ public Integer getPriceListId() {
+ return priceListId;
+ }
+ public void setPriceListId(Integer priceListId) {
+ this.priceListId = priceListId;
+ }
+ public Boolean getToBeShipped() {
+ return toBeShipped;
+ }
+ public void setToBeShipped(Boolean toBeShipped) {
+ this.toBeShipped = toBeShipped;
+ }
+ public BigDecimal getDiscountedTotal() {
+ return discountedTotal;
+ }
+ public void setDiscountedTotal(BigDecimal discountedTotal) {
+ this.discountedTotal = discountedTotal;
+ }
+ public Boolean getDiscountOnTotal() {
+ return discountOnTotal;
+ }
+ public void setDiscountOnTotal(Boolean discountOnTotal) {
+ this.discountOnTotal = discountOnTotal;
+ }
+ public Boolean getOverridePriceLimit() {
+ return overridePriceLimit;
+ }
+ public void setOverridePriceLimit(Boolean overridePriceLimit) {
+ this.overridePriceLimit = overridePriceLimit;
+ }
+ public BigDecimal getTotalDiscount() {
+ return totalDiscount;
+ }
+ public void setTotalDiscount(BigDecimal totalDiscount) {
+ this.totalDiscount = totalDiscount;
+ }
+ /**
+ * @return the cardType
+ */
+ public String getCardType()
+ {
+ return cardType;
+ }
+ /**
+ * @param cardType the cardType to set
+ */
+ public void setCardType(String cardType)
+ {
+ this.cardType = cardType;
+ }
+ /**
+ * @return the writeOffAmt
+ */
+ public BigDecimal getWriteOffAmt()
+ {
+ return writeOffAmt;
+ }
+ /**
+ * @param writeOffAmt the writeOffAmt to set
+ */
+ public void setWriteOffAmt(BigDecimal writeOffAmt)
+ {
+ this.writeOffAmt = writeOffAmt;
+ }
+ /**
+ * @return the discountAmt
+ */
+ public BigDecimal getDiscountAmt()
+ {
+ return discountAmt;
+ }
+ /**
+ * @param discountAmt the discountAmt to set
+ */
+ public void setDiscountAmt(BigDecimal discountAmt)
+ {
+ this.discountAmt = discountAmt;
+ }
+ public Boolean[] getIsDiscOnInclUnitPrice() {
+ return isDiscOnInclUnitPrice;
+ }
+ public void setIsDiscOnInclUnitPrice(Boolean[] isDiscOnInclUnitPrice) {
+ this.isDiscOnInclUnitPrice = isDiscOnInclUnitPrice;
+ }
+ public BigDecimal[] getDiscInclUnitPrice() {
+ return discInclUnitPrice;
+ }
+ public void setDiscInclUnitPrice(BigDecimal[] discInclUnitPrice) {
+ this.discInclUnitPrice = discInclUnitPrice;
+ }
+ public Boolean getDiscountOnTotalPercent() {
+ return discountOnTotalPercent;
+ }
+ public void setDiscountOnTotalPercent(Boolean discountOnTotalPercent) {
+ this.discountOnTotalPercent = discountOnTotalPercent;
+ }
+ public String getPaymentRule() {
+ return paymentRule;
+ }
+ public void setPaymentRule(String paymentRule) {
+ this.paymentRule = paymentRule;
+ }
+
+ public String getPaymentRuleFromTenderType()
+ {
+ if (Constants.PAYMENT_RULE_CASH.equalsIgnoreCase(tenderType))
+ {
+ paymentRule=MOrder.PAYMENTRULE_Cash;
+ }
+ else if(Constants.PAYMENT_RULE_CARD.equalsIgnoreCase(tenderType))
+ {
+ paymentRule=MOrder.PAYMENTRULE_CreditCard;
+ }
+ else if(Constants.PAYMENT_RULE_CHEQUE.equalsIgnoreCase(tenderType))
+ {
+ paymentRule=MOrder.PAYMENTRULE_Check;
+ }
+ else if(Constants.PAYMENT_RULE_MIXED.equalsIgnoreCase(tenderType))
+ {
+ paymentRule=UdiConstants.PAYMENTRULE_MIXED;
+ }
+ else if(Constants.PAYMENT_RULE_CREDIT.equalsIgnoreCase(tenderType))
+ {
+ paymentRule=MOrder.PAYMENTRULE_OnCredit;
+ }
+
+ return paymentRule;
+
+ }
+ public BigDecimal getTotalAmount()
+ {
+ return totalAmount;
+ }
+ public void setTotalAmount(BigDecimal totalAmount)
+ {
+ this.totalAmount = totalAmount;
+ }
+ public Integer getM_productId()
+ {
+ return m_productId;
+ }
+ public void setM_productId(Integer id)
+ {
+ m_productId = id;
+ }
+ public Boolean getIsDiscountUptoLimitPrice()
+ {
+ return isDiscountUptoLimitPrice;
+ }
+ public void setIsDiscountUptoLimitPrice(Boolean isDiscountUptoLimitPrice)
+ {
+ this.isDiscountUptoLimitPrice = isDiscountUptoLimitPrice;
+ }
+ public BigDecimal getGrandTotal()
+ {
+ return grandTotal;
+ }
+ public void setGrandTotal(BigDecimal grandTotal)
+ {
+ this.grandTotal = grandTotal;
+ }
+ public Integer getRoleId()
+ {
+ return roleId;
+ }
+ public void setRoleId(Integer roleId)
+ {
+ this.roleId = roleId;
+ }
+
+}
\ No newline at end of file
diff --git a/posterita/posterita/src/main/org/posterita/beans/CloseTillBean.java b/posterita/posterita/src/main/org/posterita/beans/CloseTillBean.java
new file mode 100644
index 0000000000..738213682e
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/CloseTillBean.java
@@ -0,0 +1,142 @@
+/**
+ *
+ * Copyright (c) 2008 Posterita. All Rights Reserved.
+ *
+ * This software is the confidential and proprietary information of
+ * Posterita. ("Confidential Information"). You shall not
+ * disclose such Confidential Information and shall use it only in
+ * accordance with the terms of the license agreement you entered into
+ * with Posterita.
+ *
+ * POSTERITA MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE
+ * SUITABILITY OF THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT
+ * NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR
+ * A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. TAMAK ICT SHALL NOT
+ * BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING,
+ * MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
+ *
+ * Aug 4, 2008 3:02:32 AM by praveen
+ *
+ */
+
+package org.posterita.beans;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+public class CloseTillBean implements Serializable
+{
+ private String currency;
+ private String tillNo;
+ private String tillName;
+ private BigDecimal beginningBalance;
+ private BigDecimal netCashTrx;
+ private BigDecimal balanceEntered;
+ private BigDecimal difference;
+ private BigDecimal endingBalance;
+ private BigDecimal cashTotal;
+ private BigDecimal cardTotal;
+ private BigDecimal chequeTotal;
+ private BigDecimal grandTotal;
+ private BigDecimal cardAmtEntered;
+ private BigDecimal cardDifference;
+ private BigDecimal chequeAmtEntered;
+ private BigDecimal chequeDifference;
+
+ public String getTillNo() {
+ return tillNo;
+ }
+ public void setTillNo(String tillNo) {
+ this.tillNo = tillNo;
+ }
+ public String getTillName() {
+ return tillName;
+ }
+ public void setTillName(String tillName) {
+ this.tillName = tillName;
+ }
+ public BigDecimal getBeginningBalance() {
+ return beginningBalance;
+ }
+ public void setBeginningBalance(BigDecimal beginningBalance) {
+ this.beginningBalance = beginningBalance;
+ }
+ public BigDecimal getNetCashTrx() {
+ return netCashTrx;
+ }
+ public void setNetCashTrx(BigDecimal netCashTrx) {
+ this.netCashTrx = netCashTrx;
+ }
+ public BigDecimal getBalanceEntered() {
+ return balanceEntered;
+ }
+ public void setBalanceEntered(BigDecimal balanceEntered) {
+ this.balanceEntered = balanceEntered;
+ }
+ public BigDecimal getDifference() {
+ return difference;
+ }
+ public void setDifference(BigDecimal difference) {
+ this.difference = difference;
+ }
+ public BigDecimal getEndingBalance() {
+ return endingBalance;
+ }
+ public void setEndingBalance(BigDecimal endingBalance) {
+ this.endingBalance = endingBalance;
+ }
+ public BigDecimal getCashTotal() {
+ return cashTotal;
+ }
+ public void setCashTotal(BigDecimal cashTotal) {
+ this.cashTotal = cashTotal;
+ }
+ public BigDecimal getCardTotal() {
+ return cardTotal;
+ }
+ public void setCardTotal(BigDecimal cardTotal) {
+ this.cardTotal = cardTotal;
+ }
+ public BigDecimal getChequeTotal() {
+ return chequeTotal;
+ }
+ public void setChequeTotal(BigDecimal chequeTotal) {
+ this.chequeTotal = chequeTotal;
+ }
+ public BigDecimal getGrandTotal() {
+ return grandTotal;
+ }
+ public void setGrandTotal(BigDecimal grandTotal) {
+ this.grandTotal = grandTotal;
+ }
+ public BigDecimal getCardAmtEntered() {
+ return cardAmtEntered;
+ }
+ public void setCardAmtEntered(BigDecimal cardAmtEntered) {
+ this.cardAmtEntered = cardAmtEntered;
+ }
+ public BigDecimal getCardDifference() {
+ return cardDifference;
+ }
+ public void setCardDifference(BigDecimal cardDifference) {
+ this.cardDifference = cardDifference;
+ }
+ public BigDecimal getChequeAmtEntered() {
+ return chequeAmtEntered;
+ }
+ public void setChequeAmtEntered(BigDecimal chequeAmtEntered) {
+ this.chequeAmtEntered = chequeAmtEntered;
+ }
+ public BigDecimal getChequeDifference() {
+ return chequeDifference;
+ }
+ public void setChequeDifference(BigDecimal chequeDifference) {
+ this.chequeDifference = chequeDifference;
+ }
+ public String getCurrency() {
+ return currency;
+ }
+ public void setCurrency(String currency) {
+ this.currency = currency;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/CommandBean.java b/posterita/posterita/src/main/org/posterita/beans/CommandBean.java
new file mode 100644
index 0000000000..c2c6826385
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/CommandBean.java
@@ -0,0 +1,53 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on 26-Jul-2005 by alok
+ *
+ */
+package org.posterita.beans;
+
+
+public class CommandBean extends UDIBean
+{
+
+ private String[] simpleCommand;
+ private String[] complexCommand;
+
+
+ public void setSimpleCommand(String[] simpleCommand)
+ {
+ this.simpleCommand = simpleCommand;
+ }
+
+ public String[] getSimpleCommand()
+ {
+ return simpleCommand;
+ }
+
+
+ public void setComplexCommand(String[] complexCommand)
+ {
+ this.complexCommand = complexCommand;
+ }
+
+ public String[] getComplexCommand()
+ {
+ return complexCommand;
+ }
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/CommissionBean.java b/posterita/posterita/src/main/org/posterita/beans/CommissionBean.java
new file mode 100644
index 0000000000..b40d206c83
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/CommissionBean.java
@@ -0,0 +1,160 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on Nov 6, 2006
+ */
+
+
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+
+
+
+public class CommissionBean extends UDIBean
+{
+
+ public BigDecimal getSubtractAmt() {
+ return subtractAmt;
+ }
+ public void setSubtractAmt(BigDecimal subtractAmt) {
+ this.subtractAmt = subtractAmt;
+ }
+ public Integer getInvoiceId() {
+ return invoiceId;
+ }
+ public void setInvoiceId(Integer invoiceId) {
+ this.invoiceId = invoiceId;
+ }
+ public Integer getOrderId() {
+ return orderId;
+ }
+ public void setOrderId(Integer orderId) {
+ this.orderId = orderId;
+ }
+ public String getPeriodAndCurrencyDesc() {
+ return periodAndCurrencyDesc;
+ }
+ public void setPeriodAndCurrencyDesc(String periodAndCurrencyDesc) {
+ this.periodAndCurrencyDesc = periodAndCurrencyDesc;
+ }
+ public BigDecimal getAmtMultiplier() {
+ return amtMultiplier;
+ }
+ public void setAmtMultiplier(BigDecimal amtMultiplier) {
+ this.amtMultiplier = amtMultiplier;
+ }
+ public String getDocBasisType() {
+ return docBasisType;
+ }
+ public void setDocBasisType(String docBasisType) {
+ this.docBasisType = docBasisType;
+ }
+ public String getFrequencyType() {
+ return frequencyType;
+ }
+ public void setFrequencyType(String frequencyType) {
+ this.frequencyType = frequencyType;
+ }
+ public BigDecimal getActualAmt() {
+ return actualAmt;
+ }
+ public void setActualAmt(BigDecimal actualAmt) {
+ this.actualAmt = actualAmt;
+ }
+ public BigDecimal getActualQty() {
+ return actualQty;
+ }
+ public void setActualQty(BigDecimal actualQty) {
+ this.actualQty = actualQty;
+ }
+ public BigDecimal getCommissionAmt() {
+ return commissionAmt;
+ }
+ public void setCommissionAmt(BigDecimal commissionAmt) {
+ this.commissionAmt = commissionAmt;
+ }
+ public Integer getCommissionAmtId() {
+ return commissionAmtId;
+ }
+ public void setCommissionAmtId(Integer commissionAmtId) {
+ this.commissionAmtId = commissionAmtId;
+ }
+ public Integer getCommissionDetailId() {
+ return commissionDetailId;
+ }
+ public void setCommissionDetailId(Integer commissionDetailId) {
+ this.commissionDetailId = commissionDetailId;
+ }
+ public Integer getCommissionLineId() {
+ return commissionLineId;
+ }
+ public void setCommissionLineId(Integer commissionLineId) {
+ this.commissionLineId = commissionLineId;
+ }
+ public String getCommissionLineName() {
+ return commissionLineName;
+ }
+ public void setCommissionLineName(String commissionLineName) {
+ this.commissionLineName = commissionLineName;
+ }
+ public Integer getCommissionRunId() {
+ return commissionRunId;
+ }
+ public void setCommissionRunId(Integer commissionRunId) {
+ this.commissionRunId = commissionRunId;
+ }
+ public BigDecimal getConvertedAmt() {
+ return convertedAmt;
+ }
+ public void setConvertedAmt(BigDecimal convertedAmt) {
+ this.convertedAmt = convertedAmt;
+ }
+ public Integer getCurrencyId() {
+ return currencyId;
+ }
+ public void setCurrencyId(Integer currencyId) {
+ this.currencyId = currencyId;
+ }
+ public String getInfo() {
+ return info;
+ }
+ public void setInfo(String info) {
+ this.info = info;
+ }
+ public Integer getInvoiceLineId() {
+ return invoiceLineId;
+ }
+ public void setInvoiceLineId(Integer invoiceLineId) {
+ this.invoiceLineId = invoiceLineId;
+ }
+ public Integer getOrderLineId() {
+ return orderLineId;
+ }
+ public void setOrderLineId(Integer orderLineId) {
+ this.orderLineId = orderLineId;
+ }
+ public String getReference() {
+ return reference;
+ }
+ public void setReference(String reference) {
+ this.reference = reference;
+ }
+
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/CreditCardBean.java b/posterita/posterita/src/main/org/posterita/beans/CreditCardBean.java
new file mode 100644
index 0000000000..7a4a2fe9a3
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/CreditCardBean.java
@@ -0,0 +1,108 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ **/
+package org.posterita.beans;
+
+public class CreditCardBean extends UDIBean
+{
+
+
+ public String getPaymentMethod()
+ {
+ return paymentMethod;
+ }
+ public void setPaymentMethod(String paymentMethod)
+ {
+ this.paymentMethod = paymentMethod;
+ }
+ public String getCreditCardNumberEncrypted()
+ {
+ return creditCardNumberEncrypted;
+ }
+ public void setCreditCardNumberEncrypted(String creditCardNumberEncrypted)
+ {
+ this.creditCardNumberEncrypted = creditCardNumberEncrypted;
+ }
+ public String getCreditCardExpMonthName()
+ {
+ return creditCardExpMonthName;
+ }
+ public void setCreditCardExpMonthName(String creditCardExpMonthName)
+ {
+ this.creditCardExpMonthName = creditCardExpMonthName;
+ }
+ public String getAccountName()
+ {
+ return accountName;
+ }
+ public void setAccountName(String accountName)
+ {
+ this.accountName = accountName;
+ }
+ public String getCreditCardNumber()
+ {
+ return creditCardNumber;
+ }
+
+ public void setCreditCardNumber(String creditCardNumber)
+ {
+ this.creditCardNumber = creditCardNumber;
+ }
+
+ public String getCvv()
+ {
+ return cvv;
+ }
+
+ public void setCvv(String cvv)
+ {
+ this.cvv = cvv;
+ }
+
+ public Integer getCreditCardExpMonth()
+ {
+ return creditCardExpMonth;
+ }
+
+ public void setCreditCardExpMonth(Integer creditCardExpMonth)
+ {
+ this.creditCardExpMonth = creditCardExpMonth;
+ }
+
+ public Integer getCreditCardExpYear()
+ {
+ return creditCardExpYear;
+ }
+
+ public void setCreditCardExpYear(Integer creditCardExpYear)
+ {
+ this.creditCardExpYear = creditCardExpYear;
+ }
+ public String getCreditCardType()
+ {
+ return creditCardType;
+ }
+ public void setCreditCardType(String creditCardType)
+ {
+ this.creditCardType = creditCardType;
+ }
+
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/CreditCheckBean.java b/posterita/posterita/src/main/org/posterita/beans/CreditCheckBean.java
new file mode 100644
index 0000000000..5ae045eaf2
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/CreditCheckBean.java
@@ -0,0 +1,53 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on Nov 1, 2006
+ */
+
+
+package org.posterita.beans;
+
+
+
+
+public class CreditCheckBean
+{
+ protected String msg;
+ protected Boolean valid;
+
+ public String getMsg() {
+ return msg;
+ }
+ public void setMsg(String msg) {
+ this.msg = msg;
+ }
+ public Boolean getValid() {
+ return valid;
+ }
+ public void setValid(Boolean valid) {
+ this.valid = valid;
+ }
+
+
+
+
+
+
+
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/CreditPaymentDetailsBean.java b/posterita/posterita/src/main/org/posterita/beans/CreditPaymentDetailsBean.java
new file mode 100644
index 0000000000..d48ead320c
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/CreditPaymentDetailsBean.java
@@ -0,0 +1,160 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on Oct 25, 2006
+ */
+
+
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+import java.sql.Timestamp;
+
+
+public class CreditPaymentDetailsBean extends UDIBean
+{
+
+
+ public Integer getCurrencyId() {
+ return currencyId;
+ }
+ public void setCurrencyId(Integer currencyId) {
+ this.currencyId = currencyId;
+ }
+ public String getCashBookName() {
+ return cashBookName;
+ }
+ public void setCashBookName(String cashBookName) {
+ this.cashBookName = cashBookName;
+ }
+ public Integer getCashId() {
+ return cashId;
+ }
+ public void setCashId(Integer cashId) {
+ this.cashId = cashId;
+ }
+ public Integer getCashLineId() {
+ return cashLineId;
+ }
+ public void setCashLineId(Integer cashLineId) {
+ this.cashLineId = cashLineId;
+ }
+ public String getCashType() {
+ return cashType;
+ }
+ public void setCashType(String cashType) {
+ this.cashType = cashType;
+ }
+ public String getCashTypeName() {
+ return cashTypeName;
+ }
+ public void setCashTypeName(String cashTypeName) {
+ this.cashTypeName = cashTypeName;
+ }
+ public String getChequeNo() {
+ return chequeNo;
+ }
+ public void setChequeNo(String chequeNo) {
+ this.chequeNo = chequeNo;
+ }
+ public String getCreditCardNumber() {
+ return creditCardNumber;
+ }
+ public void setCreditCardNumber(String creditCardNumber) {
+ this.creditCardNumber = creditCardNumber;
+ }
+ public Timestamp getDateCreated() {
+ return dateCreated;
+ }
+ public void setDateCreated(Timestamp dateCreated) {
+ this.dateCreated = dateCreated;
+ }
+ public String getDescription() {
+ return description;
+ }
+ public void setDescription(String description) {
+ this.description = description;
+ }
+ public BigDecimal getDiscountAmt() {
+ return discountAmt;
+ }
+ public void setDiscountAmt(BigDecimal discountAmt) {
+ this.discountAmt = discountAmt;
+ }
+ public String getDocumentNo() {
+ return documentNo;
+ }
+ public void setDocumentNo(String documentNo) {
+ this.documentNo = documentNo;
+ }
+ public BigDecimal getInvoiceGrandTotal() {
+ return invoiceGrandTotal;
+ }
+ public void setInvoiceGrandTotal(BigDecimal invoiceGrandTotal) {
+ this.invoiceGrandTotal = invoiceGrandTotal;
+ }
+ public Integer getInvoiceId() {
+ return invoiceId;
+ }
+ public void setInvoiceId(Integer invoiceId) {
+ this.invoiceId = invoiceId;
+ }
+ public BigDecimal getPaidAmt() {
+ return paidAmt;
+ }
+ public void setPaidAmt(BigDecimal paidAmt) {
+ this.paidAmt = paidAmt;
+ }
+ public Integer getPaymentId() {
+ return paymentId;
+ }
+ public void setPaymentId(Integer paymentId) {
+ this.paymentId = paymentId;
+ }
+ public String getTenderType() {
+ return tenderType;
+ }
+ public void setTenderType(String tenderType) {
+ this.tenderType = tenderType;
+ }
+ public Integer getUserID() {
+ return userID;
+ }
+ public void setUserID(Integer userID) {
+ this.userID = userID;
+ }
+ public String getUsername() {
+ return username;
+ }
+ public void setUsername(String username) {
+ this.username = username;
+ }
+ public BigDecimal getWriteOffAmt() {
+ return writeOffAmt;
+ }
+ public void setWriteOffAmt(BigDecimal writeOffAmt) {
+ this.writeOffAmt = writeOffAmt;
+ }
+
+
+
+
+
+
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/CurrencyBean.java b/posterita/posterita/src/main/org/posterita/beans/CurrencyBean.java
new file mode 100644
index 0000000000..c12ab4aa36
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/CurrencyBean.java
@@ -0,0 +1,66 @@
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+
+public class CurrencyBean extends UDIBean
+{
+ private Integer currencyId;
+ private BigDecimal roundOffFactor;
+ private Integer stdPrecision;
+ private String isoCode;
+ private String curSymbol;
+ private String description;
+ private boolean isActive;
+
+
+ public String getDescription()
+ {
+ return description;
+ }
+ public void setDescription(String description)
+ {
+ this.description = description;
+ }
+ public String getIsoCode()
+ {
+ return isoCode;
+ }
+ public void setIsoCode(String isoCode)
+ {
+ this.isoCode = isoCode;
+ }
+ public Integer getStdPrecision()
+ {
+ return stdPrecision;
+ }
+ public void setStdPrecision(Integer stdPrecision)
+ {
+ this.stdPrecision = stdPrecision;
+ }
+ public Integer getCurrencyId()
+ {
+ return currencyId;
+ }
+ public void setCurrencyId(Integer currencyId)
+ {
+ this.currencyId = currencyId;
+ }
+
+ public BigDecimal getRoundOffFactor()
+ {
+ return roundOffFactor;
+ }
+
+ public void setRoundOffFactor(BigDecimal roundOffFactor)
+ {
+ this.roundOffFactor = roundOffFactor;
+ }
+ public String getCurSymbol()
+ {
+ return curSymbol;
+ }
+ public void setCurSymbol(String curSymbol)
+ {
+ this.curSymbol = curSymbol;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/CurrentTillAmountBean.java b/posterita/posterita/src/main/org/posterita/beans/CurrentTillAmountBean.java
new file mode 100644
index 0000000000..46c8fe3087
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/CurrentTillAmountBean.java
@@ -0,0 +1,88 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Created on May 5, 2006
+ */
+
+
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+
+
+public class CurrentTillAmountBean extends UDIBean
+{
+
+
+
+ public BigDecimal getBeginingBalance() {
+ return beginingBalance;
+ }
+ public void setBeginingBalance(BigDecimal beginingBalance) {
+ this.beginingBalance = beginingBalance;
+ }
+ public BigDecimal getStatementDifference() {
+ return statementDifference;
+ }
+ public void setStatementDifference(BigDecimal statementDifference) {
+ this.statementDifference = statementDifference;
+ }
+ public BigDecimal getTillGrandTotal()
+ {
+ return tillGrandTotal;
+ }
+ public void setTillGrandTotal(BigDecimal tillGrandTotal)
+ {
+ this.tillGrandTotal = tillGrandTotal;
+ }
+ public BigDecimal getCashTotal()
+ {
+ return cashTotal;
+ }
+
+ public void setCashTotal(BigDecimal cashTotal)
+ {
+ this.cashTotal = cashTotal;
+ }
+
+ public BigDecimal getCardTotal()
+ {
+ return cardTotal;
+ }
+ public void setCardTotal(BigDecimal cardTotal)
+ {
+ this.cardTotal = cardTotal;
+ }
+ public BigDecimal getChequeTotal()
+ {
+ return chequeTotal;
+ }
+ public void setChequeTotal(BigDecimal chequeTotal)
+ {
+ this.chequeTotal = chequeTotal;
+ }
+
+
+ public String getPosName() {
+ return posName;
+ }
+ public void setPosName(String posName) {
+ this.posName = posName;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/CustomerBean.java b/posterita/posterita/src/main/org/posterita/beans/CustomerBean.java
new file mode 100644
index 0000000000..0e5f885f61
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/CustomerBean.java
@@ -0,0 +1,584 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Created on 02-Sep-2005
+ */
+
+
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+
+public class CustomerBean extends DocumentBean
+{
+ public Boolean isEditable;
+
+
+
+ public Boolean getIsEditable() {
+ return isEditable;
+ }
+
+ public void setIsEditable(Boolean isEditable) {
+ this.isEditable = isEditable;
+ }
+
+ public Integer getOrgId()
+ {
+ return orgId;
+ }
+
+ public void setOrgId(Integer orgId)
+ {
+ this.orgId = orgId;
+ }
+
+ public String getPaymentTermName() {
+ return paymentTermName;
+ }
+ public void setPaymentTermName(String paymentTermName) {
+ this.paymentTermName = paymentTermName;
+ }
+ public Integer getPaymentTermId() {
+ return paymentTermId;
+ }
+ public void setPaymentTermId(Integer paymentTermId) {
+ this.paymentTermId = paymentTermId;
+ }
+ public String getCreditStatus() {
+ return creditStatus;
+ }
+ public void setCreditStatus(String creditStatus) {
+ this.creditStatus = creditStatus;
+ }
+ public BigDecimal getCreditLimit() {
+ return creditLimit;
+ }
+ public void setCreditLimit(BigDecimal creditLimit) {
+ this.creditLimit = creditLimit;
+ }
+ public Integer getDunningId() {
+ return dunningId;
+ }
+ public void setDunningId(Integer dunningId) {
+ this.dunningId = dunningId;
+ }
+ public Boolean getCreatingFromOrder() {
+ return creatingFromOrder;
+ }
+ public void setCreatingFromOrder(Boolean creatingFromOrder) {
+ this.creatingFromOrder = creatingFromOrder;
+ }
+ public Integer getAttributeSetInstanceId()
+ {
+ return attributeSetInstanceId;
+ }
+ public void setAttributeSetInstanceId(Integer attributeSetInstanceId)
+ {
+ this.attributeSetInstanceId = attributeSetInstanceId;
+ }
+ public Integer getProductId()
+ {
+ return productId;
+ }
+ public void setProductId(Integer productId)
+ {
+ this.productId = productId;
+ }
+ public Integer getLicensingDistrictId() {
+ return licensingDistrictId;
+ }
+ public void setLicensingDistrictId(Integer licensingDistrictId) {
+ this.licensingDistrictId = licensingDistrictId;
+ }
+ public String getSurname() {
+ return surname;
+ }
+ public void setSurname(String surname) {
+ this.surname = surname;
+ }
+ public String getAaCardnumber() {
+ return aaCardnumber;
+ }
+ public String getAddress1() {
+ return address1;
+ }
+ public String getAddress2() {
+ return address2;
+ }
+ public String getCity() {
+ return city;
+ }
+
+ public String getCustIdNumber() {
+ return custIdNumber;
+ }
+
+ public String getMaintenanceContractNumber() {
+ return maintenanceContractNumber;
+ }
+ public String getMobile() {
+ return mobile;
+ }
+ public String getPartnerName() {
+ return partnerName;
+ }
+
+ public String getPhone2() {
+ return phone2;
+ }
+ public String getPhone() {
+ return phone;
+ }
+ public String getPostalAddress1() {
+ return postalAddress1;
+ }
+ public String getPostalCity() {
+ return postalCity;
+ }
+ public String getPostalCode() {
+ return postalCode;
+ }
+ public String getPostalPostalCode() {
+ return postalPostalCode;
+ }
+
+
+ public Integer getRegionId() {
+ return regionId;
+ }
+
+ public void setAaCardnumber(String aaCardnumber) {
+ this.aaCardnumber = aaCardnumber;
+ }
+ public void setAddress1(String address1) {
+ this.address1 = address1;
+ }
+ public void setAddress2(String address2) {
+ this.address2 = address2;
+ }
+ public void setCity(String city) {
+ this.city = city;
+ }
+ public void setCustIdNumber(String custIdNumber) {
+ this.custIdNumber = custIdNumber;
+ }
+ public void setMaintenanceContractNumber(String maintenanceContractNumber) {
+ this.maintenanceContractNumber = maintenanceContractNumber;
+ }
+ public void setMobile(String mobile) {
+ this.mobile = mobile;
+ }
+ public void setPartnerName(String partnerName) {
+ this.partnerName = partnerName;
+ }
+ public void setPhone2(String phone2) {
+ this.phone2 = phone2;
+ }
+ public void setPhone(String phone) {
+ this.phone = phone;
+ }
+ public void setPostalAddress1(String postalAddress1) {
+ this.postalAddress1 = postalAddress1;
+ }
+ public void setPostalCity(String postalCity) {
+ this.postalCity = postalCity;
+ }
+ public void setPostalCode(String postalCode) {
+ this.postalCode = postalCode;
+ }
+ public void setPostalPostalCode(String postalPostalCode) {
+ this.postalPostalCode = postalPostalCode;
+ }
+ public void setRegionId(Integer regionId) {
+ this.regionId = regionId;
+ }
+
+ public Integer getBpartnerId()
+ {
+ return bpartnerId;
+ }
+
+ public void setBpartnerId(Integer bpartnerId)
+ {
+ this.bpartnerId = bpartnerId;
+ }
+
+ public String getLicensingDistrict()
+ {
+ return licensingDistrict;
+ }
+
+ public void setLicensingDistrict(String licensingDistrict)
+ {
+ this.licensingDistrict = licensingDistrict;
+ }
+
+ public String getRegion()
+ {
+ return region;
+ }
+
+ public void setRegion(String region)
+ {
+ this.region = region;
+ }
+
+ public String getCompanyRegNo()
+ {
+ return companyRegNo;
+ }
+
+ public void setCompanyRegNo(String companyRegNo)
+ {
+ this.companyRegNo = companyRegNo;
+ }
+
+ public String getPassportNo()
+ {
+ return passportNo;
+ }
+
+ public void setPassportNo(String passportNo)
+ {
+ this.passportNo = passportNo;
+ }
+
+ public String getEmail()
+ {
+ return email;
+ }
+
+ public void setEmail(String email)
+ {
+ this.email = email;
+ }
+
+ public Integer getSalesRepId()
+ {
+ return salesRepId;
+ }
+
+ public void setSalesRepId(Integer salesRepId)
+ {
+ this.salesRepId = salesRepId;
+ }
+
+ public String getMakeName()
+ {
+ return makeName;
+ }
+
+ public void setMakeName(String makeName)
+ {
+ this.makeName = makeName;
+ }
+
+ public String getModelName()
+ {
+ return modelName;
+ }
+
+ public void setModelName(String modelName)
+ {
+ this.modelName = modelName;
+ }
+
+ public String getYearName()
+ {
+ return yearName;
+ }
+
+ public void setYearName(String yearName)
+ {
+ this.yearName = yearName;
+ }
+
+ public Integer getCreditCardExpMonth()
+ {
+ return creditCardExpMonth;
+ }
+
+ public void setCreditCardExpMonth(Integer creditCardExpMonth)
+ {
+ this.creditCardExpMonth = creditCardExpMonth;
+ }
+
+ public Integer getCreditCardExpYear()
+ {
+ return creditCardExpYear;
+ }
+
+ public void setCreditCardExpYear(Integer creditCardExpYear)
+ {
+ this.creditCardExpYear = creditCardExpYear;
+ }
+
+ public String getCreditCardNumber()
+ {
+ return creditCardNumber;
+ }
+
+ public void setCreditCardNumber(String creditCardNumber)
+ {
+ this.creditCardNumber = creditCardNumber;
+ }
+
+ public String getPassword()
+ {
+ return password;
+ }
+
+ public void setPassword(String password)
+ {
+ this.password = password;
+ }
+
+ public String getConfirmPassword()
+ {
+ return confirmPassword;
+ }
+
+ public void setConfirmPassword(String confirmPassword)
+ {
+ this.confirmPassword = confirmPassword;
+ }
+
+ public String getCountryName()
+ {
+ return countryName;
+ }
+
+ public void setCountryName(String countryName)
+ {
+ this.countryName = countryName;
+ }
+
+ public String getPostalAddress()
+ {
+ return postalAddress;
+ }
+
+ public void setPostalAddress(String postalAddress)
+ {
+ this.postalAddress = postalAddress;
+ }
+
+ public String getUsername()
+ {
+ return username;
+ }
+ public void setUsername(String username)
+ {
+ this.username = username;
+ }
+
+ public String getUserSurname()
+ {
+ return userSurname;
+ }
+
+ public void setUserSurname(String userSurname)
+ {
+ this.userSurname = userSurname;
+ }
+
+ public String getFax()
+ {
+ return fax;
+ }
+
+ public void setFax(String fax)
+ {
+ this.fax = fax;
+ }
+
+ public Integer getCountryId()
+ {
+ return countryId;
+ }
+
+ public void setCountryId(Integer countryId)
+ {
+ this.countryId = countryId;
+ }
+
+/* public Integer getCvv()
+ {
+ return cvv;
+ }
+
+ public void setCvv(Integer cvv)
+ {
+ this.cvv = cvv;
+ }
+*/
+ public String getCreditCardPayment()
+ {
+ return creditCardPayment;
+ }
+
+ public void setCreditCardPayment(String creditCardPayment)
+ {
+ this.creditCardPayment = creditCardPayment;
+ }
+
+ public String getShipmentMethod()
+ {
+ return shipmentMethod;
+ }
+
+ public void setShipmentMethod(String shipmentMethod)
+ {
+ this.shipmentMethod = shipmentMethod;
+ }
+
+ public String getBirthdate()
+ {
+ return birthdate;
+ }
+ public void setBirthdate(String birthdate)
+ {
+ this.birthdate = birthdate;
+ }
+ public String getStartDay() {
+ return startDay;
+ }
+ public void setStartDay(String startDay) {
+ this.startDay = startDay;
+ }
+ public String getStartMonth() {
+ return startMonth;
+ }
+ public void setStartMonth(String startMonth) {
+ this.startMonth = startMonth;
+ }
+ public String getStartYear() {
+ return startYear;
+ }
+ public void setStartYear(String startYear) {
+ this.startYear = startYear;
+ }
+ public Integer getUserId() {
+ return userId;
+ }
+ public void setUserId(Integer userId) {
+ this.userId = userId;
+ }
+ public Integer getPriceListId()
+ {
+ return priceListId;
+ }
+
+ public void setPriceListId(Integer priceListId)
+ {
+ this.priceListId = priceListId;
+ }
+
+ //----------------------------------------------
+ private BigDecimal totalOpenBalance;
+ private BigDecimal creditLimit;
+ private BigDecimal creditUsed;
+ private BigDecimal creditAvailable;
+
+ public BigDecimal getTotalOpenBalance() {
+ return totalOpenBalance;
+ }
+
+ public void setTotalOpenBalance(BigDecimal totalOpenBalance) {
+ this.totalOpenBalance = totalOpenBalance;
+ }
+
+ public BigDecimal getCreditUsed() {
+ return creditUsed;
+ }
+
+ public void setCreditUsed(BigDecimal creditUsed) {
+ this.creditUsed = creditUsed;
+ }
+
+ public BigDecimal getCreditAvailable() {
+ return creditAvailable;
+ }
+
+ public void setCreditAvailable(BigDecimal creditAvailable) {
+ this.creditAvailable = creditAvailable;
+ }
+
+ public String getBankName()
+ {
+ return bankName;
+ }
+
+ public void setBankName(String bankName)
+ {
+ this.bankName = bankName;
+ }
+
+ public String getAccountNo()
+ {
+ return accountNo;
+ }
+
+ public void setAccountNo(String accountNo)
+ {
+ this.accountNo = accountNo;
+ }
+
+ public String getBranch()
+ {
+ return branch;
+ }
+
+ public void setBranch(String branch)
+ {
+ this.branch = branch;
+ }
+
+ public String getPriceListName()
+ {
+ return priceListName;
+ }
+
+ public void setPriceListName(String priceListName)
+ {
+ this.priceListName = priceListName;
+ }
+
+ public String getSaleRepName()
+ {
+ return saleRepName;
+ }
+
+ public void setSaleRepName(String saleRepName)
+ {
+ this.saleRepName = saleRepName;
+ }
+
+ public String getTaxNo()
+ {
+ return taxNo;
+ }
+
+ public void setTaxNo(String taxNo)
+ {
+ this.taxNo = taxNo;
+ }
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/DateFilterBean.java b/posterita/posterita/src/main/org/posterita/beans/DateFilterBean.java
new file mode 100644
index 0000000000..94ab651d80
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/DateFilterBean.java
@@ -0,0 +1,151 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*
+* Created on Sep 11, 2006 by ashley
+*
+*/
+
+/**
+ @author ashley
+ */
+
+package org.posterita.beans;
+
+public class DateFilterBean extends UDIBean
+{
+ public String getFromDate()
+ {
+ return fromDate;
+ }
+
+ public void setFromDate(String fromDate)
+ {
+ this.fromDate = fromDate;
+ }
+
+ public String getToDate()
+ {
+ return toDate;
+ }
+
+ public void setToDate(String toDate)
+ {
+ this.toDate = toDate;
+ }
+
+ public String getStartDay()
+ {
+ return startDay;
+ }
+
+ public void setStartDay(String startDay)
+ {
+ this.startDay = startDay;
+ }
+
+ public String getStartMonth()
+ {
+ return startMonth;
+ }
+
+ public void setStartMonth(String startMonth)
+ {
+ this.startMonth = startMonth;
+ }
+
+ public String getStartYear()
+ {
+ return startYear;
+ }
+
+ public void setStartYear(String startYear)
+ {
+ this.startYear = startYear;
+ }
+
+ public String getEndDay()
+ {
+ return endDay;
+ }
+
+ public void setEndDay(String endDay)
+ {
+ this.endDay = endDay;
+ }
+
+ public String getEndMonth()
+ {
+ return endMonth;
+ }
+
+ public void setEndMonth(String endMonth)
+ {
+ this.endMonth = endMonth;
+ }
+
+ public String getEndYear()
+ {
+ return endYear;
+ }
+
+ public void setEndYear(String endYear)
+ {
+ this.endYear = endYear;
+ }
+
+ public String getStartHour()
+ {
+ return startHour;
+ }
+
+ public void setStartHour(String startHour)
+ {
+ this.startHour = startHour;
+ }
+
+ public String getStartMinute()
+ {
+ return startMinute;
+ }
+
+ public void setStartMinute(String startMinute)
+ {
+ this.startMinute = startMinute;
+ }
+
+ public String getEndHour()
+ {
+ return endHour;
+ }
+
+ public void setEndHour(String endHour)
+ {
+ this.endHour = endHour;
+ }
+
+ public String getEndMinute()
+ {
+ return endMinute;
+ }
+
+ public void setEndMinute(String endMinute)
+ {
+ this.endMinute = endMinute;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/DisplayMessageLogBean.java b/posterita/posterita/src/main/org/posterita/beans/DisplayMessageLogBean.java
new file mode 100644
index 0000000000..ce4c6afc89
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/DisplayMessageLogBean.java
@@ -0,0 +1,115 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
+package org.posterita.beans;
+
+import java.sql.Timestamp;
+
+
+public class DisplayMessageLogBean
+{
+ private String input;
+ private String output;
+ private String status;
+ private String type;
+ private String documentType;
+ private Timestamp date;
+ private Integer documentId;
+ private String reasonDescription;
+
+ public Timestamp getDate()
+ {
+ return date;
+ }
+
+ public void setDate(Timestamp date)
+ {
+ this.date = date;
+ }
+
+ public String getDocumentType()
+ {
+ return documentType;
+ }
+
+ public void setDocumentType(String documentType)
+ {
+ this.documentType = documentType;
+ }
+
+ public String getInput()
+ {
+ return input;
+ }
+
+ public void setInput(String input)
+ {
+ this.input = input;
+ }
+
+ public String getOutput()
+ {
+ return output;
+ }
+
+ public void setOutput(String output)
+ {
+ this.output = output;
+ }
+
+ public String getStatus()
+ {
+ return status;
+ }
+
+ public void setStatus(String status)
+ {
+ this.status = status;
+ }
+
+ public String getType()
+ {
+ return type;
+ }
+
+ public void setType(String type)
+ {
+ this.type = type;
+ }
+
+ public Integer getDocumentId()
+ {
+ return documentId;
+ }
+
+ public void setDocumentId(Integer documentId)
+ {
+ this.documentId = documentId;
+ }
+
+ public String getReasonDescription()
+ {
+ return reasonDescription;
+ }
+
+ public void setReasonDescription(String reasonDescription)
+ {
+ this.reasonDescription = reasonDescription;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/DocumentBean.java b/posterita/posterita/src/main/org/posterita/beans/DocumentBean.java
new file mode 100644
index 0000000000..ff146ccc8c
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/DocumentBean.java
@@ -0,0 +1,84 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
+package org.posterita.beans;
+
+
+
+public class DocumentBean extends UDIBean
+{
+ public Integer getDocumentId()
+ {
+ return documentId;
+ }
+
+ public void setDocumentId(Integer documentId)
+ {
+ this.documentId = documentId;
+ }
+
+
+ public String getDocumentType()
+ {
+ return documentType;
+ }
+
+ public void setDocumentType(String documentType)
+ {
+ this.documentType = documentType;
+ }
+
+ public Integer[] getCheckBox()
+ {
+ return checkBox;
+ }
+
+ public void setCheckBox(Integer[] checkBox)
+ {
+ this.checkBox = checkBox;
+ }
+
+ public Integer getBpartnerId()
+ {
+ return bpartnerId;
+ }
+
+ public void setBpartnerId(Integer bpartnerId)
+ {
+ this.bpartnerId = bpartnerId;
+ }
+
+ public String getSubmit()
+ {
+ return submit;
+ }
+
+ public void setSubmit(String submit)
+ {
+ this.submit = submit;
+ }
+
+ public String getOrderType() {
+ return orderType;
+ }
+
+ public void setOrderType(String orderType) {
+ this.orderType = orderType;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/DocumentHistortFilterBean.java b/posterita/posterita/src/main/org/posterita/beans/DocumentHistortFilterBean.java
new file mode 100644
index 0000000000..b870d5e162
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/DocumentHistortFilterBean.java
@@ -0,0 +1,80 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ */
+package org.posterita.beans;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.TreeSet;
+
+
+
+/**
+ * @author alok
+ */
+
+public class DocumentHistortFilterBean
+{
+
+ private TreeSet bPartnerList = new TreeSet();
+ private TreeSet docStatusList = new TreeSet();
+
+ public DocumentHistortFilterBean(ArrayList beans)
+ {
+
+ if(beans!=null)
+ {
+ Iterator iter = beans.iterator();
+
+ while(iter.hasNext())
+ {
+ DocumentHistoryBean bean = (DocumentHistoryBean) iter.next();
+
+ if(bean.getBpartnerId()!=null)
+ {
+ UDIPair pair = new UDIPair(bean.getBpartnerId(),bean.getPartnerName());
+ bPartnerList.add(pair);
+ }
+
+ if(bean.getDocStatus()!= null)
+ {
+ UDIPair docStatusPair = new UDIPair(bean.getDocStatusCode(), bean.getDocStatus());
+ docStatusList.add(docStatusPair);
+ }
+ }
+ }
+
+ }
+
+
+ public TreeSet getBPartnerList()
+ {
+ return bPartnerList;
+ }
+
+ public TreeSet getDocStatusList()
+ {
+ return docStatusList;
+ }
+
+
+
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/DocumentHistoryBean.java b/posterita/posterita/src/main/org/posterita/beans/DocumentHistoryBean.java
new file mode 100644
index 0000000000..84af7801b2
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/DocumentHistoryBean.java
@@ -0,0 +1,248 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ **/
+package org.posterita.beans;
+
+import java.sql.Timestamp;
+import java.util.ArrayList;
+
+import org.posterita.beans.UDIBean;
+
+public class DocumentHistoryBean extends UDIBean
+{
+/*
+ protected Integer orderId;
+ protected Integer paymentId;
+ protected Integer invoiceId;
+ protected Integer minOutId;
+ protected String docStatus; //Shipment DocStatus
+ protected Integer month;
+ protected Integer year;
+ protected Integer bpartnerId;
+ protected String partnerName;
+ protected Timestamp dateOrdered;
+ protected String docStatusCode;
+*/
+ protected String paymentStatus;
+ protected String shipmentStatus;
+
+ protected String invoiceNo;
+ protected String paymentNo;
+ protected String shipmentNo;
+ protected ArrayList documentHistoryList;
+
+
+
+
+
+
+
+
+ public ArrayList getDocumentHistoryList() {
+ return documentHistoryList;
+ }
+
+ public void setDocumentHistoryList(ArrayList documentHistoryList) {
+ this.documentHistoryList = documentHistoryList;
+ }
+
+ public Integer getCashLineId() {
+ return cashLineId;
+ }
+
+ public void setCashLineId(Integer cashLineId) {
+ this.cashLineId = cashLineId;
+ }
+
+ public String getDocumentNo()
+ {
+ return documentNo;
+ }
+
+ public void setDocumentNo(String documentNo)
+ {
+ this.documentNo=documentNo;
+ }
+ public String getOrderType()
+ {
+ return orderType;
+ }
+
+ public void setOrderType(String orderType)
+ {
+ this.orderType=orderType;
+ }
+
+
+ public String getDocStatus()
+ {
+ return docStatus;
+ }
+ public void setDocStatus(String docStatus)
+ {
+ this.docStatus = docStatus;
+ }
+ public Integer getInvoiceId()
+ {
+ return invoiceId;
+ }
+ public void setInvoiceId(Integer invoiceId)
+ {
+ this.invoiceId = invoiceId;
+ }
+ public Integer getMinOutId()
+ {
+ return minOutId;
+ }
+ public void setMinOutId(Integer minOutId)
+ {
+ this.minOutId = minOutId;
+ }
+ public Integer getMonth()
+ {
+ return month;
+ }
+ public void setMonth(Integer month)
+ {
+ this.month = month;
+ }
+ public Integer getOrderId()
+ {
+ return orderId;
+ }
+ public void setOrderId(Integer orderId)
+ {
+ this.orderId = orderId;
+ }
+ public Integer getPaymentId()
+ {
+ return paymentId;
+ }
+ public void setPaymentId(Integer paymentId)
+ {
+ this.paymentId = paymentId;
+ }
+ public Integer getYear()
+ {
+ return year;
+ }
+ public void setYear(Integer year)
+ {
+ this.year = year;
+ }
+ public Integer getBpartnerId()
+ {
+ return bpartnerId;
+ }
+ public void setBpartnerId(Integer bpartnerId)
+ {
+ this.bpartnerId = bpartnerId;
+ }
+ public String getPartnerName()
+ {
+ return partnerName;
+ }
+ public void setPartnerName(String partnerName)
+ {
+ this.partnerName = partnerName;
+ }
+ public Timestamp getDateOrdered()
+ {
+ return dateOrdered;
+ }
+ public void setDateOrdered(Timestamp dateOrdered)
+ {
+ this.dateOrdered = dateOrdered;
+ }
+ public String getDocStatusCode()
+ {
+ return docStatusCode;
+ }
+ public void setDocStatusCode(String docStatusCode)
+ {
+ this.docStatusCode = docStatusCode;
+ }
+ public String getPaymentStatus()
+ {
+ return paymentStatus;
+ }
+ public void setPaymentStatus(String paymentStatus)
+ {
+ this.paymentStatus = paymentStatus;
+ }
+ public String getShipmentStatus()
+ {
+ return shipmentStatus;
+ }
+ public void setShipmentStatus(String shipmentStatus)
+ {
+ this.shipmentStatus = shipmentStatus;
+ }
+
+ public String getInvoiceNo()
+ {
+ return invoiceNo;
+ }
+
+ public void setInvoiceNo(String invoiceNo)
+ {
+ this.invoiceNo = invoiceNo;
+ }
+
+ public String getPaymentNo()
+ {
+ return paymentNo;
+ }
+
+ public void setPaymentNo(String paymentNo)
+ {
+ this.paymentNo = paymentNo;
+ }
+
+ public String getShipmentNo()
+ {
+ return shipmentNo;
+ }
+
+ public void setShipmentNo(String shipmentNo)
+ {
+ this.shipmentNo = shipmentNo;
+ }
+
+ public Boolean getIsCustomer() {
+ return isCustomer;
+ }
+
+ public void setIsCustomer(Boolean isCustomer) {
+ this.isCustomer = isCustomer;
+ }
+
+ public Boolean getIsVendor() {
+ return isVendor;
+ }
+
+ public void setIsVendor(Boolean isVendor) {
+ this.isVendor = isVendor;
+ }
+
+
+
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/DunningBean.java b/posterita/posterita/src/main/org/posterita/beans/DunningBean.java
new file mode 100644
index 0000000000..c3f0660196
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/DunningBean.java
@@ -0,0 +1,105 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on Oct 27, 2006
+ */
+
+
+package org.posterita.beans;
+
+
+public class DunningBean extends UDIBean
+{
+
+
+
+
+ public String getDescription() {
+ return description;
+ }
+ public void setDescription(String description) {
+ this.description = description;
+ }
+ public Integer getDunningId() {
+ return dunningId;
+ }
+ public void setDunningId(Integer dunningId) {
+ this.dunningId = dunningId;
+ }
+ public String getDunningLevelName() {
+ return dunningLevelName;
+ }
+ public void setDunningLevelName(String dunningLevelName) {
+ this.dunningLevelName = dunningLevelName;
+ }
+ public String getDunningName() {
+ return dunningName;
+ }
+ public void setDunningName(String dunningName) {
+ this.dunningName = dunningName;
+ }
+ public Integer getDunningLevelId() {
+ return dunningLevelId;
+ }
+ public void setDunningLevelId(Integer dunningLevelId) {
+ this.dunningLevelId = dunningLevelId;
+ }
+ public String getDunningPrintNote() {
+ return dunningPrintNote;
+ }
+ public void setDunningPrintNote(String dunningPrintNote) {
+ this.dunningPrintNote = dunningPrintNote;
+ }
+ public String getDunningPrintText() {
+ return dunningPrintText;
+ }
+ public void setDunningPrintText(String dunningPrintText) {
+ this.dunningPrintText = dunningPrintText;
+ }
+ public Integer getBP_Group_ID() {
+ return BP_Group_ID;
+ }
+ public void setBP_Group_ID(Integer group_ID) {
+ BP_Group_ID = group_ID;
+ }
+ public Integer getBpartnerId() {
+ return bpartnerId;
+ }
+ public void setBpartnerId(Integer bpartnerId) {
+ this.bpartnerId = bpartnerId;
+ }
+ public Integer getCurrencyId() {
+ return currencyId;
+ }
+ public void setCurrencyId(Integer currencyId) {
+ this.currencyId = currencyId;
+ }
+
+
+
+
+ public Integer[] getBpartnerIds() {
+ return bpartnerIds;
+ }
+ public void setBpartnerIds(Integer[] bpartnerIds) {
+ this.bpartnerIds = bpartnerIds;
+ }
+
+
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/EditPriceBean.java b/posterita/posterita/src/main/org/posterita/beans/EditPriceBean.java
new file mode 100644
index 0000000000..5d76d0d0db
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/EditPriceBean.java
@@ -0,0 +1,62 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on Oct 20, 2005 by praveen
+ *
+ */
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+
+
+public class EditPriceBean extends UDIBean
+{
+ public BigDecimal getPrice()
+ {
+ return price;
+ }
+
+ public void setPrice(BigDecimal price)
+ {
+ this.price = price;
+ }
+
+ public Integer getPriceListVersionId()
+ {
+ return priceListVersionId;
+ }
+
+ public void setPriceListVersionId(Integer priceListVersionId)
+ {
+ this.priceListVersionId = priceListVersionId;
+ }
+
+ public Integer getProductId()
+ {
+ return productId;
+ }
+
+ public void setProductId(Integer productId)
+ {
+ this.productId = productId;
+ }
+
+
+
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/FilterBean.java b/posterita/posterita/src/main/org/posterita/beans/FilterBean.java
new file mode 100644
index 0000000000..e9bab97232
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/FilterBean.java
@@ -0,0 +1,137 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on Aug 19, 2005 by praveen
+ *
+ */
+package org.posterita.beans;
+
+import java.util.ArrayList;
+
+public class FilterBean extends UDIBean
+{
+ private ArrayList bpList;
+ private ArrayList docStatusList;
+ public Integer getRefToQuote()
+ {
+ return refToQuote;
+ }
+ public void setRefToQuote(Integer refToQuote)
+ {
+ this.refToQuote = refToQuote;
+ }
+
+ public String getOrderType()
+ {
+ return orderType;
+ }
+ public void setOrderType(String orderType)
+ {
+ this.orderType = orderType;
+ }
+
+ public String getDocStatus()
+ {
+ return docStatus;
+ }
+
+ public String getDocStatusCode()
+ {
+ return docStatusCode;
+ }
+
+ public String getDocumentNo()
+ {
+ return documentNo;
+ }
+
+ public Integer getMonth()
+ {
+ return month;
+ }
+
+
+ public Integer getPartnerId()
+ {
+ return this.partnerId;
+ }
+
+ public String getPartnerName()
+ {
+ return partnerName;
+ }
+
+ public Integer getYear()
+ {
+ return year;
+ }
+ public void setDocStatus(String docStatus)
+ {
+ this.docStatus = docStatus;
+ }
+
+ public void setDocStatusCode(String docStatusCode)
+ {
+ this.docStatusCode = docStatusCode;
+ }
+
+ public void setDocumentNo(String documentNo)
+ {
+ this.documentNo = documentNo;
+ }
+
+ public void setMonth(Integer month)
+ {
+ this.month = month;
+ }
+
+ public void setPartnerId(Integer partnerId)
+ {
+ this.partnerId = partnerId;
+ }
+ public void setPartnerName(String partnerName)
+ {
+ this.partnerName = partnerName;
+ }
+
+ public void setYear(Integer year)
+ {
+ this.year = year;
+ }
+
+ public ArrayList getBpList()
+ {
+ return bpList;
+ }
+
+ public void setBpList(ArrayList bpList)
+ {
+ this.bpList = bpList;
+ }
+
+ public ArrayList getDocStatusList()
+ {
+ return docStatusList;
+ }
+
+ public void setDocStatusList(ArrayList docStatusList)
+ {
+ this.docStatusList = docStatusList;
+ }
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/GenericProductBean.java b/posterita/posterita/src/main/org/posterita/beans/GenericProductBean.java
new file mode 100644
index 0000000000..af28427bb5
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/GenericProductBean.java
@@ -0,0 +1,167 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+package org.posterita.beans;
+
+
+public class GenericProductBean
+{
+ private String name;
+ private Integer qtyOnHand;
+ private Integer productId;
+ private String description;
+ private ProductImageInfo imageInfo;
+ private Boolean isSmall;
+ private Boolean isMedium;
+ private Boolean isLarge;
+ private Boolean isXLarge;
+ private Integer qtySmall;
+ private Integer qtyMedium;
+ private Integer qtyLarge;
+ private Integer qtyXLarge;
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public Integer getQtyOnHand()
+ {
+ return qtyOnHand;
+ }
+
+ public void setQtyOnHand(Integer qtyOnHand)
+ {
+ this.qtyOnHand = qtyOnHand;
+ }
+
+
+ public Integer getProductId()
+ {
+ return productId;
+ }
+ public void setProductId(Integer productId)
+ {
+ this.productId = productId;
+ }
+
+
+ public String getDescription()
+ {
+ return description;
+ }
+ public void setDescription(String description)
+ {
+ this.description = description;
+ }
+
+ public ProductImageInfo getImageInfo()
+ {
+ return imageInfo;
+ }
+ public void setImageInfo(ProductImageInfo imageInfo)
+ {
+ this.imageInfo = imageInfo;
+ }
+
+ public Boolean getIsLarge()
+ {
+ return isLarge;
+ }
+
+ public void setIsLarge(Boolean isLarge)
+ {
+ this.isLarge = isLarge;
+ }
+
+ public Boolean getIsMedium()
+ {
+ return isMedium;
+ }
+
+ public void setIsMedium(Boolean isMedium)
+ {
+ this.isMedium = isMedium;
+ }
+
+ public Boolean getIsSmall()
+ {
+ return isSmall;
+ }
+
+ public void setIsSmall(Boolean isSmall)
+ {
+ this.isSmall = isSmall;
+ }
+
+ public Boolean getIsXLarge()
+ {
+ return isXLarge;
+ }
+
+ public void setIsXLarge(Boolean isXLarge)
+ {
+ this.isXLarge = isXLarge;
+ }
+
+ public Integer getQtyLarge()
+ {
+ return qtyLarge;
+ }
+
+ public void setQtyLarge(Integer qtyLarge)
+ {
+ this.qtyLarge = qtyLarge;
+ }
+
+ public Integer getQtyMedium()
+ {
+ return qtyMedium;
+ }
+
+ public void setQtyMedium(Integer qtyMedium)
+ {
+ this.qtyMedium = qtyMedium;
+ }
+
+ public Integer getQtySmall()
+ {
+ return qtySmall;
+ }
+
+ public void setQtySmall(Integer qtySmall)
+ {
+ this.qtySmall = qtySmall;
+ }
+
+ public Integer getQtyXLarge()
+ {
+ return qtyXLarge;
+ }
+
+ public void setQtyXLarge(Integer qtyXLarge)
+ {
+ this.qtyXLarge = qtyXLarge;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/InOutHistoryBean.java b/posterita/posterita/src/main/org/posterita/beans/InOutHistoryBean.java
new file mode 100644
index 0000000000..84b1f1da54
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/InOutHistoryBean.java
@@ -0,0 +1,113 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on 08-Aug-2005 by alok
+ *
+ */
+package org.posterita.beans;
+
+import java.sql.Timestamp;
+
+
+public class InOutHistoryBean extends FilterBean
+{
+
+ public String getPartnerName()
+ {
+ return partnerName;
+ }
+ public void setPartnerName(String partnerName)
+ {
+ this.partnerName = partnerName;
+ }
+
+ public Integer getInOutId()
+ {
+ return inOutId;
+ }
+
+ public void setInOutId(Integer inOutId)
+ {
+ this.inOutId = inOutId;
+ }
+
+ public Timestamp getDateMovement()
+ {
+ return dateMovement;
+ }
+ public void setDateMovement(Timestamp dateMovement)
+ {
+ this.dateMovement = dateMovement;
+ }
+ public Timestamp getDateOrdered()
+ {
+ return dateOrdered;
+ }
+ public void setDateOrdered(Timestamp dateOrdered)
+ {
+ this.dateOrdered = dateOrdered;
+ }
+ public Integer getInvoiceId()
+ {
+ return invoiceId;
+ }
+ public void setInvoiceId(Integer invoiceId)
+ {
+ this.invoiceId = invoiceId;
+ }
+ public Boolean getIsSotrx()
+ {
+ return isSoTrx;
+ }
+ public void setIsSotrx(Boolean isSotrx)
+ {
+ this.isSoTrx = isSotrx;
+ }
+ public Integer getOrderId()
+ {
+ return orderId;
+ }
+ public void setOrderId(Integer orderId)
+ {
+ this.orderId = orderId;
+ }
+ public String getPoReference()
+ {
+ return poReference;
+ }
+ public void setPoReference(String poReference)
+ {
+ this.poReference = poReference;
+ }
+ public Integer getRefInOutId()
+ {
+ return refInOutId;
+ }
+ public void setRefInOutId(Integer refInOutId)
+ {
+ this.refInOutId = refInOutId;
+ }
+ public Integer getWarehouseId()
+ {
+ return warehouseId;
+ }
+ public void setWarehouseId(Integer warehouseId)
+ {
+ this.warehouseId = warehouseId;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/InventoryBean.java b/posterita/posterita/src/main/org/posterita/beans/InventoryBean.java
new file mode 100644
index 0000000000..5be1d7280c
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/InventoryBean.java
@@ -0,0 +1,166 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on Dec 4, 2006
+ */
+
+
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+
+
+public class InventoryBean extends UDIBean
+{
+
+ public Integer[] getInventoryIds()
+ {
+ return inventoryIds;
+ }
+ public void setInventoryIds(Integer[] inventoryIds)
+ {
+ this.inventoryIds = inventoryIds;
+ }
+ public BigDecimal getBookQtyValue() {
+ return bookQtyValue;
+ }
+ public void setBookQtyValue(BigDecimal bookQtyValue) {
+ this.bookQtyValue = bookQtyValue;
+ }
+ public BigDecimal getCountQtyValue() {
+ return countQtyValue;
+ }
+ public void setCountQtyValue(BigDecimal countQtyValue) {
+ this.countQtyValue = countQtyValue;
+ }
+ public String getBarCode() {
+ return barCode;
+ }
+ public void setBarCode(String barCode) {
+ this.barCode = barCode;
+ }
+ public String getDocStatus() {
+ return docStatus;
+ }
+ public void setDocStatus(String docStatus) {
+ this.docStatus = docStatus;
+ }
+ public String getInventoryNo() {
+ return inventoryNo;
+ }
+ public void setInventoryNo(String inventoryNo) {
+ this.inventoryNo = inventoryNo;
+ }
+ public String getMovementDate() {
+ return movementDate;
+ }
+ public void setMovementDate(String movementDate) {
+ this.movementDate = movementDate;
+ }
+ public String getProductName() {
+ return productName;
+ }
+ public void setProductName(String productName) {
+ this.productName = productName;
+ }
+ public Integer getProductId() {
+ return productId;
+ }
+ public void setProductId(Integer productId) {
+ this.productId = productId;
+ }
+ public String getDescription() {
+ return description;
+ }
+ public void setDescription(String description) {
+ this.description = description;
+ }
+ public Integer getInventoryId() {
+ return inventoryId;
+ }
+ public void setInventoryId(Integer inventoryId) {
+ this.inventoryId = inventoryId;
+ }
+ public Integer getInventoryLineId() {
+ return inventoryLineId;
+ }
+ public void setInventoryLineId(Integer inventoryLineId) {
+ this.inventoryLineId = inventoryLineId;
+ }
+ public BigDecimal getQtyBook() {
+ return qtyBook;
+ }
+ public void setQtyBook(BigDecimal qtyBook) {
+ this.qtyBook = qtyBook;
+ }
+ public BigDecimal getQtyCount() {
+ return qtyCount;
+ }
+ public void setQtyCount(BigDecimal qtyCount) {
+ this.qtyCount = qtyCount;
+ }
+ public void setUom(String uom)
+ {
+ this.uom = uom;
+ }
+ public String getUom()
+ {
+ return this.uom;
+ }
+
+ public String getIfAdd() {
+ return ifAdd;
+ }
+ public void setIfAdd(String ifAdd) {
+ this.ifAdd = ifAdd;
+ }
+
+ public Integer getPriceListId() {
+ return priceListId;
+ }
+ public void setPriceListId(Integer priceListId) {
+ this.priceListId = priceListId;
+ }
+
+ public BigDecimal getQtyCsv()
+ {
+ return qtyCsv;
+ }
+ public void setQtyCsv(BigDecimal qtyCsv)
+ {
+ this.qtyCsv = qtyCsv;
+ }
+
+ public Integer getMonth()
+ {
+ return month;
+ }
+ public void setMonth(Integer month)
+ {
+ this.month = month;
+ }
+ public Integer getYear()
+ {
+ return year;
+ }
+ public void setYear(Integer year)
+ {
+ this.year = year;
+ }
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/InventoryCartBean.java b/posterita/posterita/src/main/org/posterita/beans/InventoryCartBean.java
new file mode 100644
index 0000000000..c9afd2d08a
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/InventoryCartBean.java
@@ -0,0 +1,177 @@
+/**
+ *
+ * Copyright (c) 2008 Posterita. All Rights Reserved.
+ *
+ * This software is the confidential and proprietary information of
+ * Posterita. ("Confidential Information"). You shall not
+ * disclose such Confidential Information and shall use it only in
+ * accordance with the terms of the license agreement you entered into
+ * with Posterita.
+ *
+ * POSTERITA MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE
+ * SUITABILITY OF THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT
+ * NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR
+ * A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. TAMAK ICT SHALL NOT
+ * BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING,
+ * MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
+ *
+ * 27 May 2008 12:27:14 by shameem
+ *
+ */
+
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+
+import org.compiere.util.Env;
+
+public class InventoryCartBean extends UDIBean
+{
+ private ArrayList items;
+ private String currency;
+ private BigDecimal totalPrice;
+ private int pricelistId;
+
+ public String getCurrency()
+ {
+ return currency;
+ }
+
+ public void setCurrency(String currency)
+ {
+ this.currency = currency;
+ }
+
+ public ArrayList getItems()
+ {
+ return items;
+ }
+
+ public void setItems(ArrayList items)
+ {
+ this.items = items;
+ }
+
+ public BigDecimal getTotalPrice()
+ {
+ return totalPrice;
+ }
+
+ public void setTotalPrice(BigDecimal totalPrice)
+ {
+ this.totalPrice = totalPrice;
+ }
+
+ public int getPricelistId() {
+ return pricelistId;
+ }
+
+ public void setPricelistId(int pricelistId) {
+ this.pricelistId = pricelistId;
+ }
+
+ public BigDecimal getQtyCount() {
+ return qtyCount;
+ }
+ public void setQtyCount(BigDecimal qtyCount) {
+ this.qtyCount = qtyCount;
+ }
+
+ public String getBarCode() {
+ return barCode;
+ }
+
+ public void setBarCode(String barCode) {
+ this.barCode = barCode;
+ }
+
+ public Integer getPriceListId() {
+ return priceListId;
+ }
+
+ public void setPriceListId(Integer priceListId) {
+ this.priceListId = priceListId;
+ }
+
+ public BigDecimal getQtyBook() {
+ return qtyBook;
+ }
+ public void setQtyBook(BigDecimal qtyBook) {
+ this.qtyBook = qtyBook;
+ }
+
+ public BigDecimal getQtyCsv()
+ {
+ return qtyCsv;
+ }
+
+ public void setQtyCsv(BigDecimal qtyCsv)
+ {
+ this.qtyCsv = qtyCsv;
+ }
+
+ public void setInventoryId(Integer inventoryId)
+ {
+ this.inventoryId = inventoryId;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+ public void setDescription(String description) {
+ this.description = description;
+ }
+ public Integer getInventoryId()
+ {
+ return inventoryId;
+ }
+ public String getUom()
+ {
+ return uom;
+ }
+ public void setUom(String uom)
+ {
+ this.uom = uom;
+ }
+ public Integer getInventoryLineId()
+ {
+ return inventoryLineId;
+ }
+ public void setInventoryLineId(Integer inventoryLineId)
+ {
+ this.inventoryLineId = inventoryLineId;
+ }
+
+ public BigDecimal getCountQtyValue()
+ {
+ return countQtyValue;
+ }
+ public void setCountQtyValue(BigDecimal countQtyValue)
+ {
+ this.countQtyValue = countQtyValue;
+ }
+
+ public Integer getProductId()
+ {
+ return productId;
+ }
+ public void setProductId(Integer productId)
+ {
+ this.productId = productId;
+ }
+ public String getProductName()
+ {
+ return productName;
+ }
+ public void setProductName(String productName)
+ {
+ this.productName = productName;
+ }
+ public BigDecimal getBookQtyValue() {
+ return bookQtyValue;
+ }
+ public void setBookQtyValue(BigDecimal bookQtyValue) {
+ this.bookQtyValue = bookQtyValue;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/InventoryLineBean.java b/posterita/posterita/src/main/org/posterita/beans/InventoryLineBean.java
new file mode 100644
index 0000000000..4825ceedf6
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/InventoryLineBean.java
@@ -0,0 +1,475 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+
+
+public class InventoryLineBean extends DocumentBean implements Comparable
+{
+ public String getDescription() {
+ return description;
+ }
+ public void setDescription(String description) {
+ this.description = description;
+ }
+ public Double getTotalActualPrice() {
+ return totalActualPrice;
+ }
+ public void setTotalActualPrice(Double totalActualPrice) {
+ this.totalActualPrice = totalActualPrice;
+ }
+ public Double getPaymentByCard() {
+ return paymentByCard;
+ }
+ public void setPaymentByCard(Double paymentByCard) {
+ this.paymentByCard = paymentByCard;
+ }
+ public Double getPaymentByCash() {
+ return paymentByCash;
+ }
+ public void setPaymentByCash(Double paymentByCash) {
+ this.paymentByCash = paymentByCash;
+ }
+ public Double getPaymentByChq() {
+ return paymentByChq;
+ }
+ public void setPaymentByChq(Double paymentByChq) {
+ this.paymentByChq = paymentByChq;
+ }
+ public String[] getActualPrice() {
+ return actualPrice;
+ }
+ public void setActualPrice(String[] actualPrice) {
+ this.actualPrice = actualPrice;
+ }
+
+ public String[] getDiscountPercent() {
+ return discountPercent;
+ }
+ public void setDiscountPercent(String[] discountPercent) {
+ this.discountPercent = discountPercent;
+ }
+ public String getQtyAndItem() {
+ return qtyAndItem;
+ }
+ public void setQtyAndItem(String qtyAndItem) {
+ this.qtyAndItem = qtyAndItem;
+ }
+ public String getBarCode() {
+ return barCode;
+ }
+ public void setBarCode(String barCode) {
+ this.barCode = barCode;
+ }
+
+ public String getPartnerName() {
+ return partnerName;
+ }
+ public void setPartnerName(String partnerName) {
+ this.partnerName = partnerName;
+ }
+ public Integer[] getInventoryLineIds()
+ {
+ return inventoryLineIds;
+ }
+ public void setInventoryLineIds(Integer[] inventoryLineIds)
+ {
+ this.inventoryLineIds = inventoryLineIds;
+ }
+ public String getChequeNo()
+ {
+ return chequeNo;
+ }
+
+ public void setChequeNo(String chequeNo)
+ {
+ this.chequeNo = chequeNo;
+ }
+
+ public Integer getCreditCardExpMonth()
+ {
+ return creditCardExpMonth;
+ }
+
+ public void setCreditCardExpMonth(Integer creditCardExpMonth)
+ {
+ this.creditCardExpMonth = creditCardExpMonth;
+ }
+
+ public Integer getCreditCardExpYear()
+ {
+ return creditCardExpYear;
+ }
+
+ public void setCreditCardExpYear(Integer creditCardExpYear)
+ {
+ this.creditCardExpYear = creditCardExpYear;
+ }
+
+ public String getCreditCardNumber()
+ {
+ return creditCardNumber;
+ }
+
+ public void setCreditCardNumber(String creditCardNumber)
+ {
+ this.creditCardNumber = creditCardNumber;
+ }
+
+ public String getCreditCardType()
+ {
+ return creditCardType;
+ }
+
+ public void setCreditCardType(String creditCardType)
+ {
+ this.creditCardType = creditCardType;
+ }
+ public Integer getInventoryId()
+ {
+ return inventoryId;
+ }
+ public void setInventoryId(Integer inventoryId)
+ {
+ this.inventoryId = inventoryId;
+ }
+ public String getSurname() {
+ return surname;
+ }
+ public void setSurname(String surname) {
+ this.surname = surname;
+ }
+
+ public Integer getBpartnerId()
+ {
+ return bpartnerId;
+ }
+
+ public void setBpartnerId(Integer bpartnerId)
+ {
+ this.bpartnerId = bpartnerId;
+ }
+ public Boolean getIsQtyReserved()
+ {
+ return isQtyReserved;
+ }
+
+ public void setIsQtyReserved(Boolean isQtyReserved)
+ {
+ this.isQtyReserved = isQtyReserved;
+ }
+ public String getEngineNo() {
+ return engineNo;
+ }
+ public void setEngineNo(String engineNo) {
+ this.engineNo = engineNo;
+ }
+ public BigDecimal getQuantity()
+ {
+ return quantity;
+ }
+
+ public void setQuantity(BigDecimal quantity)
+ {
+ this.quantity = quantity;
+ }
+
+ public Integer getProductId()
+ {
+ return productId;
+ }
+
+ public void setProductId(Integer productId)
+ {
+ this.productId = productId;
+ }
+
+
+ public Integer[] getCheckBox()
+ {
+ return checkBox;
+ }
+ public void setCheckBox(Integer [] checkBox)
+ {
+ this.checkBox = checkBox;
+ }
+
+ public Integer getAttributeSetInstanceId()
+ {
+ return attributeSetInstanceId;
+ }
+
+ public void setAttributeSetInstanceId(Integer attributeSetInstanceId)
+ {
+ this.attributeSetInstanceId = attributeSetInstanceId;
+ }
+
+ public ArrayList getInventoryLineList()
+ {
+ return InventoryLineList;
+ }
+ public void setInventoryLineList(ArrayList inventoryLineList)
+ {
+ InventoryLineList = inventoryLineList;
+ }
+
+ public Integer getInventoryLineId()
+ {
+ return inventoryLineId;
+ }
+ public void setInventoryLineId(Integer inventoryLineId)
+ {
+ this.inventoryLineId = inventoryLineId;
+ }
+
+ public Integer getOrgId()
+ {
+ return orgId;
+ }
+
+ public void setOrgId(Integer orgId)
+ {
+ this.orgId = orgId;
+ }
+
+ public Integer getAllocationId()
+ {
+ return allocationId;
+ }
+
+ public void setAllocationId(Integer allocationId)
+ {
+ this.allocationId = allocationId;
+ }
+
+ public boolean equals(Object obj)
+ {
+ OrderLineBean target = (OrderLineBean) obj;
+
+ if ( obj == null)
+ return false;
+
+ if (this.getAttributeSetInstanceId().equals(target.getAttributeSetInstanceId()))
+ return true;
+
+ return false;
+ }
+
+ public String getSubmit()
+ {
+ return submit;
+ }
+
+ public void setSubmit(String submit)
+ {
+ this.submit = submit;
+ }
+
+
+ public int compareTo(Object o)
+ {
+ InventoryLineBean src = (InventoryLineBean) o;
+
+ if (src.getAttributeSetInstanceId().intValue() == this.getAttributeSetInstanceId().intValue())
+ return 0;
+
+
+ return -1;
+ }
+
+
+
+
+
+
+ public BigDecimal getAmountGiven()
+ {
+ return amountGiven;
+ }
+
+ public void setAmountGiven(BigDecimal amountGiven)
+ {
+ this.amountGiven = amountGiven;
+ }
+
+ public BigDecimal getAmountRefunded()
+ {
+ return amountRefunded;
+ }
+
+ public void setAmountRefunded(BigDecimal amountRefunded)
+ {
+ this.amountRefunded = amountRefunded;
+ }
+ public String getTrxType()
+ {
+ return trxType;
+ }
+
+ public void setTrxType(String trxType)
+ {
+ this.trxType = trxType;
+ }
+
+ public BigDecimal getTransferAmount() {
+ return transferAmount;
+ }
+ public void setTransferAmount(BigDecimal transferAmount) {
+ this.transferAmount = transferAmount;
+ }
+
+ public Integer getCashBookIds() {
+ return cashBookIds;
+ }
+ public void setCashBookIds(Integer cashBookIds) {
+ this.cashBookIds = cashBookIds;
+ }
+ public String getIsSales() {
+ return isSales;
+ }
+ public void setIsSales(String isSales) {
+ this.isSales = isSales;
+ }
+ public String getIfAdd() {
+ return ifAdd;
+ }
+ public void setIfAdd(String ifAdd) {
+ this.ifAdd = ifAdd;
+ }
+
+ public String getVendorName() {
+ return vendorName;
+ }
+ public void setVendorName(String vendorName) {
+ this.vendorName = vendorName;
+ }
+
+ public String getDocumentNo() {
+ return documentNo;
+ }
+ public void setDocumentNo(String documentNo) {
+ this.documentNo = documentNo;
+ }
+
+ public BigDecimal getUserDiscount() {
+ return userDiscount;
+ }
+ public void setUserDiscount(BigDecimal userDiscount) {
+ this.userDiscount = userDiscount;
+ }
+
+ public Integer getPaymentTermId() {
+ return paymentTermId;
+ }
+ public void setPaymentTermId(Integer paymentTermId) {
+ this.paymentTermId = paymentTermId;
+ }
+
+ public String getPaymentTermName() {
+ return paymentTermName;
+ }
+ public void setPaymentTermName(String paymentTermName) {
+ this.paymentTermName = paymentTermName;
+ }
+ public String getToBeShipped() {
+ return toBeShipped;
+ }
+ public void setToBeShipped(String toBeShipped) {
+ this.toBeShipped = toBeShipped;
+ }
+
+ public Boolean getOpenDrawer() {
+ return openDrawer;
+ }
+ public void setOpenDrawer(Boolean openDrawer) {
+ this.openDrawer = openDrawer;
+ }
+
+ public void setUom(String uom)
+ {
+ this.uom = uom;
+ }
+
+ public String getUom()
+ {
+ return this.uom;
+ }
+ public Integer getPriceListId() {
+ return priceListId;
+ }
+ public void setPriceListId(Integer priceListId) {
+ this.priceListId = priceListId;
+ }
+
+ public BigDecimal getQtyBook()
+ {
+ return qtyBook;
+ }
+ public void setQtyBook(BigDecimal qtyBook)
+ {
+ this.qtyBook = qtyBook;
+ }
+ public BigDecimal getQtyCount()
+ {
+ return qtyCount;
+ }
+ public void setQtyCount(BigDecimal qtyCount)
+ {
+ this.qtyCount = qtyCount;
+ }
+ public BigDecimal getQtyCsv()
+ {
+ return qtyCsv;
+ }
+ public void setQtyCsv(BigDecimal qtyCsv)
+ {
+ this.qtyCsv = qtyCsv;
+ }
+ public String getProductName()
+ {
+ return productName;
+ }
+ public void setProductName(String productName)
+ {
+ this.productName = productName;
+ }
+ public BigDecimal getBookQtyValue() {
+ return bookQtyValue;
+ }
+ public void setBookQtyValue(BigDecimal bookQtyValue) {
+ this.bookQtyValue = bookQtyValue;
+ }
+ public BigDecimal getCountQtyValue()
+ {
+ return countQtyValue;
+ }
+ public void setCountQtyValue(BigDecimal countQtyValue)
+ {
+ this.countQtyValue = countQtyValue;
+ }
+ public String getDocStatus() {
+ return docStatus;
+ }
+ public void setDocStatus(String docStatus) {
+ this.docStatus = docStatus;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/InvoiceHistoryBean.java b/posterita/posterita/src/main/org/posterita/beans/InvoiceHistoryBean.java
new file mode 100644
index 0000000000..4114b182d1
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/InvoiceHistoryBean.java
@@ -0,0 +1,101 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on 04-Aug-2005 by alok
+ *
+ */
+package org.posterita.beans;
+
+import java.sql.Timestamp;
+
+
+public class InvoiceHistoryBean extends FilterBean
+{
+ private PaymentHistoryBean paymentHistoryBean;
+
+ public PaymentHistoryBean getPaymentHistoryBean()
+ {
+ return paymentHistoryBean;
+ }
+
+ public void setPaymentHistoryBean(PaymentHistoryBean paymentHistoryBean)
+ {
+ this.paymentHistoryBean = paymentHistoryBean;
+ }
+
+ public Integer getInvoiceId()
+ {
+ return invoiceId;
+ }
+ public void setInvoiceId(Integer invoiceId)
+ {
+ this.invoiceId = invoiceId;
+ }
+ public Timestamp getDateInvoiced()
+ {
+ return dateInvoiced;
+ }
+ public void setDateInvoiced(Timestamp dateInvoiced)
+ {
+ this.dateInvoiced = dateInvoiced;
+ }
+
+ public Integer getGrandTotal()
+ {
+ return grandTotal;
+ }
+ public void setGrandTotal(Integer grandTotal)
+ {
+ this.grandTotal = grandTotal;
+ }
+ public String getIsPaid()
+ {
+ return isPaid;
+ }
+ public void setIsPaid(String isPaid)
+ {
+ this.isPaid = isPaid;
+ }
+ public Boolean getIsSotrx()
+ {
+ return isSoTrx;
+ }
+ public void setIsSotrx(Boolean isSotrx)
+ {
+ this.isSoTrx = isSotrx;
+ }
+ public Integer getOrderId()
+ {
+ return orderId;
+ }
+ public void setOrderId(Integer orderId)
+ {
+ this.orderId = orderId;
+ }
+
+ public Integer[] getCheckBox()
+ {
+ return checkBox;
+ }
+
+ public void setCheckBox(Integer[] checkBox)
+ {
+ this.checkBox = checkBox;
+ }
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/ItemBean.java b/posterita/posterita/src/main/org/posterita/beans/ItemBean.java
new file mode 100644
index 0000000000..7ad2e2cb7d
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/ItemBean.java
@@ -0,0 +1,531 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+
+import org.compiere.util.Env;
+
+
+public class ItemBean
+{
+
+ private Integer productId;
+ private Integer priceListId;
+ private Integer inventoryId;
+ private Integer inventoryLineId;
+ private String description;
+ private String barCode;
+ private BigDecimal price;
+ private BigDecimal qty = Env.ONE;
+ private BigDecimal grandTotal = Env.ZERO;
+ private BigDecimal discountPercent = Env.ZERO;
+ private BigDecimal actualPrice;
+ private BigDecimal taxAmt;
+ private BigDecimal standardPrice;
+ private BigDecimal priceLimit;
+ private BigDecimal priceLimitTotal;
+ private BigDecimal priceTotal;
+ private BigDecimal taxTotal;
+ private BigDecimal qtyTotal = Env.ZERO;
+ private BigDecimal unitPrice;
+ private String productName;
+ private BigDecimal inclPrice;
+ private BigDecimal taxRate;
+ private String uom;
+ private String backOrder;
+ private BigDecimal discountedLinePrice;
+ private BigDecimal discountedInclUnitPrice;
+ private Boolean isDiscountOnInclUnitPrice;
+ private BigDecimal qtyCsv;
+ private BigDecimal qtyBook;
+ private BigDecimal qtyCount;
+ private BigDecimal bookQtyValue;
+ private BigDecimal countQtyValue;
+ private BigDecimal listPrice;
+
+ private Boolean isDiscountOnPercentage;
+ private Boolean isDiscountOnTotal;
+ private Boolean isTaxIncluded;
+
+ private BigDecimal stockValue;
+ private BigDecimal qtyToMove;
+ private BigDecimal qtyOnHand;
+ private Integer unitsPerPack;
+ private Integer noOfPack;
+
+ public Boolean getIsTaxIncluded() {
+ return isTaxIncluded;
+ }
+
+ public void setIsTaxIncluded(Boolean isTaxIncluded) {
+ this.isTaxIncluded = isTaxIncluded;
+ }
+
+ public Boolean getIsDiscountOnInclUnitPrice() {
+ return isDiscountOnInclUnitPrice;
+ }
+
+ public void setIsDiscountOnInclUnitPrice(Boolean isDiscountOnInclUnitPrice) {
+ this.isDiscountOnInclUnitPrice = isDiscountOnInclUnitPrice;
+ }
+
+ public BigDecimal getDiscountedLinePrice() {
+ return discountedLinePrice;
+ }
+
+ public void setDiscountedLinePrice(BigDecimal discountedLinePrice) {
+ this.discountedLinePrice = discountedLinePrice;
+ }
+
+ public BigDecimal getTaxRate() {
+ return taxRate;
+ }
+
+ public void setTaxRate(BigDecimal taxRate) {
+ this.taxRate = taxRate;
+ }
+
+ public BigDecimal getInclPrice() {
+ return inclPrice;
+ }
+
+ public void setInclPrice(BigDecimal inclPrice) {
+ this.inclPrice = inclPrice;
+ }
+
+ public String getProductName()
+ {
+ return productName;
+ }
+
+ public void setProductName(String productName)
+ {
+ this.productName = productName;
+ }
+
+ public String getUom() {
+ return uom;
+ }
+
+ public void setUom(String uom) {
+ this.uom = uom;
+ }
+
+ public BigDecimal getUnitPrice() {
+ return unitPrice;
+ }
+
+ public void setUnitPrice(BigDecimal unitPrice) {
+ this.unitPrice = unitPrice;
+ }
+
+ public BigDecimal getQtyTotal() {
+ return qtyTotal;
+ }
+
+ public void setQtyTotal(BigDecimal qtyTotal) {
+ this.qtyTotal = qtyTotal;
+ }
+
+ public BigDecimal getPriceTotal() {
+ return priceTotal;
+ }
+
+ public void setPriceTotal(BigDecimal priceTotal) {
+ this.priceTotal = priceTotal;
+ }
+
+ public BigDecimal getTaxTotal() {
+ return taxTotal;
+ }
+
+ public void setTaxTotal(BigDecimal taxTotal) {
+ this.taxTotal = taxTotal;
+ }
+
+ public BigDecimal getStandardPrice() {
+ return standardPrice;
+ }
+
+ public void setStandardPrice(BigDecimal standardPrice) {
+ this.standardPrice = standardPrice;
+ }
+
+ public BigDecimal getTaxAmt() {
+ return taxAmt;
+ }
+
+ public void setTaxAmt(BigDecimal taxAmt) {
+ this.taxAmt = taxAmt;
+ }
+
+ public void setGrandTotal(BigDecimal grandTotal) {
+ this.grandTotal = grandTotal;
+ }
+
+ public String getBackOrder()
+ {
+ return backOrder;
+ }
+
+ public void setBackOrder(String backOrder)
+ {
+ this.backOrder = backOrder;
+ }
+
+ public BigDecimal getActualPrice() {
+ return actualPrice;
+ }
+
+ public void setActualPrice(BigDecimal actualPrice) {
+ this.actualPrice = actualPrice;
+ }
+ public BigDecimal getDiscountPercent() {
+ return discountPercent;
+ }
+ public void setDiscountPercent(BigDecimal discountPercent) {
+ this.discountPercent = discountPercent;
+ }
+ public void setgrandTotal(BigDecimal grandTotal)
+ {
+ this.grandTotal=grandTotal;
+ }
+
+ public BigDecimal getGrandTotal()
+ {
+ return grandTotal;
+ }
+
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public void setDescription(String description)
+ {
+ this.description = description;
+ }
+
+ public BigDecimal getPrice()
+ {
+ return price;
+ }
+
+ public void setPrice(BigDecimal price)
+ {
+ this.price = price;
+ }
+
+ public Integer getProductId()
+ {
+ return productId;
+ }
+
+ public void setProductId(Integer productId)
+ {
+ this.productId = productId;
+ }
+
+ public BigDecimal getQty()
+ {
+ return qty;
+ }
+
+ public void setQty(BigDecimal qty)
+ {
+ this.qty = qty;
+ }
+
+ /**
+ * Update Quantity in order
+ * @param original
+ * @param itemToAdd
+ * @param add
+ */
+ public void updateQuantity(ItemBean original, ItemBean itemToAdd,boolean add)
+ {
+ BigDecimal originalQuantity = original.getQty();
+
+ BigDecimal quantityToAdd = itemToAdd.getQty();
+
+ BigDecimal finalQuantity = null;
+
+ if(!add)
+ finalQuantity= originalQuantity.subtract(quantityToAdd);
+ else
+ finalQuantity= originalQuantity.add(quantityToAdd);
+
+
+ original.setQty(finalQuantity);
+ }
+
+ /**
+ * Update Quantity count in inventory
+ * @param original
+ * @param itemToAdd
+ * @param add
+ */
+ public void updateQuantityCount(ItemBean original, ItemBean itemToAdd,boolean add)
+ {
+ BigDecimal originalQuantity = original.getQtyCount();
+
+ BigDecimal quantityToAdd = itemToAdd.getQtyCount();
+
+ BigDecimal finalQuantity = null;
+
+ if(!add)
+ finalQuantity= originalQuantity.subtract(quantityToAdd);
+ else
+ finalQuantity= originalQuantity.add(quantityToAdd);
+
+
+ original.setQtyCount(finalQuantity);
+ }
+
+ /**
+ * Update Quantity CSV in inventory
+ * @param original
+ * @param itemToAdd
+ * @param add
+ */
+ public void updateQuantityCsv(ItemBean original, ItemBean itemToAdd,boolean add)
+ {
+ BigDecimal originalQuantity = original.getQtyCsv();
+
+ BigDecimal quantityToAdd = itemToAdd.getQtyCsv();
+
+ BigDecimal finalQuantity = null;
+
+ if(!add)
+ finalQuantity= originalQuantity.subtract(quantityToAdd);
+ else
+ finalQuantity= originalQuantity.add(quantityToAdd);
+
+
+ original.setQtyCsv(finalQuantity);
+ }
+
+ /**
+ * Update Quantity to move in Stock Transfer
+ * @param original
+ * @param itemToAdd
+ * @param add
+ */
+ public void updateQuantityToMove(ItemBean original, ItemBean itemToAdd,boolean add)
+ {
+ BigDecimal originalQuantity = original.getQtyToMove();
+
+ BigDecimal quantityToAdd = itemToAdd.getQtyToMove();
+
+ BigDecimal finalQuantity = null;
+
+ if(!add)
+ finalQuantity= originalQuantity.subtract(quantityToAdd);
+ else
+ finalQuantity= originalQuantity.add(quantityToAdd);
+
+ original.setQtyToMove(finalQuantity);
+ }
+
+ public boolean equals(Object o)
+ {
+ if (o == null)
+ return false;
+
+ ItemBean bean1 = (ItemBean) o;
+ if (bean1.getProductId().intValue() == this.getProductId().intValue())
+ return true;
+
+ return false;
+
+ }
+ public String getBarCode() {
+ return barCode;
+ }
+ public void setBarCode(String barCode) {
+ this.barCode = barCode;
+ }
+
+ public Integer getPriceListId() {
+ return priceListId;
+ }
+
+ public void setPriceListId(Integer priceListId) {
+ this.priceListId = priceListId;
+ }
+
+ public BigDecimal getPriceLimit() {
+ return priceLimit;
+ }
+
+ public void setPriceLimit(BigDecimal priceLimit) {
+ this.priceLimit = priceLimit;
+ }
+
+ public BigDecimal getPriceLimitTotal() {
+ return priceLimitTotal;
+ }
+
+ public void setPriceLimitTotal(BigDecimal priceLimitTotal) {
+ this.priceLimitTotal = priceLimitTotal;
+ }
+
+ public BigDecimal getDiscountedInclUnitPrice() {
+ return discountedInclUnitPrice;
+ }
+
+ public void setDiscountedInclUnitPrice(BigDecimal discountedInclUnitPrice) {
+ this.discountedInclUnitPrice = discountedInclUnitPrice;
+ }
+
+ public Boolean getIsDiscountOnPercentage()
+ {
+ return isDiscountOnPercentage;
+ }
+
+ public void setIsDiscountOnPercentage(Boolean isDiscountOnPercentage)
+ {
+ this.isDiscountOnPercentage = isDiscountOnPercentage;
+ }
+
+ public BigDecimal getQtyBook()
+ {
+ return qtyBook;
+ }
+ public void setQtyBook(BigDecimal qtyBook)
+ {
+ this.qtyBook = qtyBook;
+ }
+ public BigDecimal getQtyCount()
+ {
+ return qtyCount;
+ }
+ public void setQtyCount(BigDecimal qtyCount)
+ {
+ this.qtyCount = qtyCount;
+ }
+ public BigDecimal getQtyCsv()
+ {
+ return qtyCsv;
+ }
+ public void setQtyCsv(BigDecimal qtyCsv)
+ {
+ this.qtyCsv = qtyCsv;
+ }
+ public BigDecimal getBookQtyValue() {
+ return bookQtyValue;
+ }
+ public void setBookQtyValue(BigDecimal bookQtyValue) {
+ this.bookQtyValue = bookQtyValue;
+ }
+ public Integer getInventoryLineId()
+ {
+ return inventoryLineId;
+ }
+ public void setInventoryLineId(Integer inventoryLineId)
+ {
+ this.inventoryLineId = inventoryLineId;
+ }
+ public Boolean getIsDiscountOnTotal()
+ {
+ return isDiscountOnTotal;
+ }
+
+ public BigDecimal getCountQtyValue()
+ {
+ return countQtyValue;
+ }
+ public void setCountQtyValue(BigDecimal countQtyValue)
+ {
+ this.countQtyValue = countQtyValue;
+ }
+ public Integer getInventoryId()
+ {
+ return inventoryId;
+ }
+ public void setInventoryId(Integer inventoryId)
+ {
+ this.inventoryId = inventoryId;
+ }
+
+ public void setIsDiscountOnTotal(Boolean isDiscountOnTotal)
+ {
+ this.isDiscountOnTotal = isDiscountOnTotal;
+ }
+
+ public BigDecimal getListPrice() {
+ return listPrice;
+ }
+
+ public void setListPrice(BigDecimal listPrice) {
+ this.listPrice = listPrice;
+ }
+
+ public BigDecimal getStockValue()
+ {
+ return stockValue;
+ }
+
+ public void setStockValue(BigDecimal stockValue)
+ {
+ this.stockValue = stockValue;
+ }
+
+ public BigDecimal getQtyToMove()
+ {
+ return qtyToMove;
+ }
+
+ public void setQtyToMove(BigDecimal qtyToMove)
+ {
+ this.qtyToMove = qtyToMove;
+ }
+
+ public BigDecimal getQtyOnHand()
+ {
+ return qtyOnHand;
+ }
+
+ public void setQtyOnHand(BigDecimal qtyOnHand)
+ {
+ this.qtyOnHand = qtyOnHand;
+ }
+
+ public Integer getUnitsPerPack()
+ {
+ return unitsPerPack;
+ }
+
+ public void setUnitsPerPack(Integer unitsPerPack)
+ {
+ this.unitsPerPack = unitsPerPack;
+ }
+
+ public Integer getNoOfPack()
+ {
+ return noOfPack;
+ }
+
+ public void setNoOfPack(Integer noOfPack)
+ {
+ this.noOfPack = noOfPack;
+ }
+}
\ No newline at end of file
diff --git a/posterita/posterita/src/main/org/posterita/beans/LocatorBean.java b/posterita/posterita/src/main/org/posterita/beans/LocatorBean.java
new file mode 100644
index 0000000000..bf65c7f46e
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/LocatorBean.java
@@ -0,0 +1,116 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on 26-Jul-2005 by alok
+ *
+ */
+package org.posterita.beans;
+
+
+public class LocatorBean extends UDIBean
+{
+
+ public String getAisle()
+ {
+ return aisle;
+ }
+ public void setAisle(String aisle)
+ {
+ this.aisle = aisle;
+ }
+ public String getBin()
+ {
+ return bin;
+ }
+ public void setBin(String bin)
+ {
+ this.bin = bin;
+ }
+ public Boolean getIsDefault()
+ {
+ return isDefault;
+ }
+ public void setIsDefault(Boolean isDefault)
+ {
+ this.isDefault = isDefault;
+ }
+ public String getLevel()
+ {
+ return level;
+ }
+ public void setLevel(String level)
+ {
+ this.level = level;
+ }
+ public Integer getWarehouseId()
+ {
+ return warehouseId;
+ }
+ public void setWarehouseId(Integer warehouseId)
+ {
+ this.warehouseId = warehouseId;
+ }
+
+ public String getWarehouseName()
+ {
+ return warehouseName;
+ }
+
+ public void setWarehouseName(String warehouseName)
+ {
+ this.warehouseName = warehouseName;
+ }
+
+
+
+ public Integer getAttributeSetInstance()
+ {
+ return attributeSetInstance;
+ }
+ public void setAttributeSetInstance(Integer attributeSetInstance)
+ {
+ this.attributeSetInstance = attributeSetInstance;
+ }
+ public String getSernoAttributeSetInstance()
+ {
+ return sernoAttributeSetInstance;
+ }
+ public void setSernoAttributeSetInstance(String sernoAttributeSetInstance)
+ {
+ this.sernoAttributeSetInstance = sernoAttributeSetInstance;
+ }
+
+
+ public Integer getAttributeSetInstanceId()
+ {
+ return attributeSetInstanceId;
+ }
+ public void setAttributeSetInstanceId(Integer attributeSetInstanceId)
+ {
+ this.attributeSetInstanceId = attributeSetInstanceId;
+ }
+
+ public Integer getLocatorId()
+ {
+ return locatorId;
+ }
+ public void setLocatorId(Integer locatorId)
+ {
+ this.locatorId = locatorId;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/LoginBean.java b/posterita/posterita/src/main/org/posterita/beans/LoginBean.java
new file mode 100644
index 0000000000..d010de9612
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/LoginBean.java
@@ -0,0 +1,76 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on 25-Jul-2005 by alok
+ *
+ */
+package org.posterita.beans;
+
+
+public class LoginBean extends UDIBean
+{
+
+ public Integer getRoleId() {
+ return roleId;
+ }
+ public void setRoleId(Integer roleId) {
+ this.roleId = roleId;
+ }
+ public String getUserPIN()
+ {
+ return userPIN;
+ }
+ public void setUserPIN(String userPIN)
+ {
+ this.userPIN = userPIN;
+ }
+ public String getPassword()
+ {
+ return password;
+ }
+ public void setPassword(String password)
+ {
+ this.password = password;
+ }
+ public String getUsername()
+ {
+ return username;
+ }
+ public void setUsername(String username)
+ {
+ this.username = username;
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+ public void setId(Integer id)
+ {
+ this.id = id;
+ }
+
+ public Integer getUserId()
+ {
+ return userId;
+ }
+ public void setUserId(Integer userId)
+ {
+ this.userId = userId;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/MMovementCartBean.java b/posterita/posterita/src/main/org/posterita/beans/MMovementCartBean.java
new file mode 100644
index 0000000000..2c4b9b2240
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/MMovementCartBean.java
@@ -0,0 +1,84 @@
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+
+public class MMovementCartBean extends UDIBean
+{
+ private ArrayList items;
+ private String currency;
+ private BigDecimal totalPrice;
+ private int pricelistId;
+ private BigDecimal stockValue;
+ private BigDecimal qtyToMove;
+ private BigDecimal qtyOnHand;
+
+ public String getCurrency()
+ {
+ return currency;
+ }
+
+ public void setCurrency(String currency)
+ {
+ this.currency = currency;
+ }
+
+ public ArrayList getItems()
+ {
+ return items;
+ }
+
+ public void setItems(ArrayList items)
+ {
+ this.items = items;
+ }
+
+ public BigDecimal getTotalPrice()
+ {
+ return totalPrice;
+ }
+
+ public void setTotalPrice(BigDecimal totalPrice)
+ {
+ this.totalPrice = totalPrice;
+ }
+
+ public int getPricelistId() {
+ return pricelistId;
+ }
+
+ public void setPricelistId(int pricelistId) {
+ this.pricelistId = pricelistId;
+ }
+
+ public BigDecimal getStockValue()
+ {
+ return stockValue;
+ }
+
+ public void setStockValue(BigDecimal stockValue)
+ {
+ this.stockValue = stockValue;
+ }
+
+ public BigDecimal getQtyToMove()
+ {
+ return qtyToMove;
+ }
+
+ public void setQtyToMove(BigDecimal qtyToMove)
+ {
+ this.qtyToMove = qtyToMove;
+ }
+
+ public BigDecimal getQtyOnHand()
+ {
+ return qtyOnHand;
+ }
+
+ public void setQtyOnHand(BigDecimal qtyOnHand)
+ {
+ this.qtyOnHand = qtyOnHand;
+ }
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/MenuItemBean.java b/posterita/posterita/src/main/org/posterita/beans/MenuItemBean.java
new file mode 100644
index 0000000000..19a8c57bd5
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/MenuItemBean.java
@@ -0,0 +1,102 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+package org.posterita.beans;
+
+
+public class MenuItemBean extends UDIBean
+{
+
+
+ public Integer getMenuId()
+ {
+ return menuId;
+ }
+ public void setMenuId(Integer menuId)
+ {
+ this.menuId = menuId;
+ }
+ public String getMenuItemName()
+ {
+ return menuItemName;
+ }
+ public void setMenuItemName(String menuItemName)
+ {
+ this.menuItemName = menuItemName;
+ }
+ public String getMenuLink()
+ {
+ return menuLink;
+ }
+ public void setMenuLink(String menuLink)
+ {
+ this.menuLink = menuLink;
+ }
+ public Integer getParentMenuId()
+ {
+ return parentMenuId;
+ }
+ public void setParentMenuId(Integer parentMenuId)
+ {
+ this.parentMenuId = parentMenuId;
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+ public void setId(Integer id)
+ {
+ this.id = id;
+ }
+
+ public Boolean getIsActive()
+ {
+ return isActive;
+ }
+ public void setIsActive(Boolean isActive)
+ {
+ this.isActive = isActive;
+ }
+ public String getName()
+ {
+ return name;
+ }
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+ public Boolean getIsClosable()
+ {
+ return isClosable;
+ }
+ public void setIsClosable(Boolean isClosable)
+ {
+ this.isClosable = isClosable;
+ }
+
+ public String getDescription()
+ {
+ return description;
+ }
+ public void setDescription(String description)
+ {
+ this.description = description;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/MessageBean.java b/posterita/posterita/src/main/org/posterita/beans/MessageBean.java
new file mode 100644
index 0000000000..4850a2d410
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/MessageBean.java
@@ -0,0 +1,126 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on Aug 1, 2005 by din
+ */
+
+package org.posterita.beans;
+
+import java.sql.Timestamp;
+
+public class MessageBean extends UDIBean
+{
+ public String getMessage()
+ {
+ return message;
+ }
+ public void setMessage(String message)
+ {
+ this.message = message;
+ }
+ public Integer getMessageID()
+ {
+ return messageID;
+ }
+ public void setMessageID(Integer messageID)
+ {
+ this.messageID = messageID;
+ }
+ public String getSubject()
+ {
+ return subject;
+ }
+ public void setSubject(String subject)
+ {
+ this.subject = subject;
+ }
+ public Integer getCounterOrgID()
+ {
+ return counterOrgID;
+ }
+ public void setCounterOrgID(Integer counterOrgID)
+ {
+ this.counterOrgID = counterOrgID;
+ }
+ public String getCounterOrgName()
+ {
+ return counterOrgName;
+ }
+ public void setCounterOrgName(String counterOrgName)
+ {
+ this.counterOrgName = counterOrgName;
+ }
+ public Integer getOrgId()
+ {
+ return orgId;
+ }
+ public void setOrgID(Integer orgId)
+ {
+ this.orgId = orgId;
+ }
+ public String getRead()
+ {
+ return read;
+ }
+ public void setRead(String read)
+ {
+ this.read = read;
+ }
+ public Timestamp getDateCreated()
+ {
+ return dateCreated;
+ }
+ public void setDateCreated(Timestamp dateCreated)
+ {
+ this.dateCreated = dateCreated;
+ }
+ public String getCounterOrderStatusInfo()
+ {
+ return counterOrderStatusInfo;
+ }
+ public void setCounterOrderStatusInfo(String counterOrderStatusInfo)
+ {
+ this.counterOrderStatusInfo = counterOrderStatusInfo;
+ }
+ public String getOrderStatusInfo()
+ {
+ return orderStatusInfo;
+ }
+ public void setOrderStatusInfo(String orderStatusInfo)
+ {
+ this.orderStatusInfo = orderStatusInfo;
+ }
+ public Boolean getIsActive()
+ {
+ return isActive;
+ }
+ public void setIsActive(Boolean isActive)
+ {
+ this.isActive = isActive;
+ }
+
+ public Integer[] getCheckBox()
+ {
+ return checkBox;
+ }
+
+ public void setCheckBox(Integer[] checkBox)
+ {
+ this.checkBox = checkBox;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/MessageLoggerBean.java b/posterita/posterita/src/main/org/posterita/beans/MessageLoggerBean.java
new file mode 100644
index 0000000000..fa0eebe47c
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/MessageLoggerBean.java
@@ -0,0 +1,58 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * */
+package org.posterita.beans;
+
+
+public class MessageLoggerBean
+{
+ private String cause;
+ private String error;
+ private String description;
+
+ public String getCause()
+ {
+ return cause;
+ }
+
+ public void setCause(String cause)
+ {
+ this.cause = cause;
+ }
+
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public void setDescription(String description)
+ {
+ this.description = description;
+ }
+
+ public String getError()
+ {
+ return error;
+ }
+
+ public void setError(String error)
+ {
+ this.error = error;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/MinOutHistoryBean.java b/posterita/posterita/src/main/org/posterita/beans/MinOutHistoryBean.java
new file mode 100644
index 0000000000..7790d84f93
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/MinOutHistoryBean.java
@@ -0,0 +1,44 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
+package org.posterita.beans;
+
+
+public class MinOutHistoryBean extends UDIBean
+{
+ public Integer getMinOutId()
+ {
+ return minOutId;
+ }
+
+ public void setMinOutId(Integer minOutId)
+ {
+ this.minOutId = minOutId;
+ }
+
+ public Integer getInvoiceId()
+ {
+ return invoiceId;
+ }
+
+ public void setInvoiceId(Integer invoiceId)
+ {
+ this.invoiceId = invoiceId;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/OpenItemBean.java b/posterita/posterita/src/main/org/posterita/beans/OpenItemBean.java
new file mode 100644
index 0000000000..db1f697866
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/OpenItemBean.java
@@ -0,0 +1,284 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on Oct 17, 2006
+ */
+
+
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+import java.sql.Timestamp;
+
+
+public class OpenItemBean extends UDIBean
+{
+
+
+ public BigDecimal getAvailableAmt()
+ {
+ return AvailableAmt;
+ }
+ public void setAvailableAmt(BigDecimal availableAmt)
+ {
+ AvailableAmt = availableAmt;
+ }
+ public BigDecimal getPaymentAllocatedAmt()
+ {
+ return paymentAllocatedAmt;
+ }
+ public void setPaymentAllocatedAmt(BigDecimal paymentAllocatedAmt)
+ {
+ this.paymentAllocatedAmt = paymentAllocatedAmt;
+ }
+ public String getAllocationStatus()
+ {
+ return allocationStatus;
+ }
+ public void setAllocationStatus(String allocationStatus)
+ {
+ this.allocationStatus = allocationStatus;
+ }
+ public BigDecimal getAllocatedAmount() {
+ return allocatedAmount;
+ }
+ public void setAllocatedAmount(BigDecimal allocatedAmount) {
+ this.allocatedAmount = allocatedAmount;
+ }
+
+ public Integer[] getPaymentIds() {
+ return paymentIds;
+ }
+ public void setPaymentIds(Integer[] paymentIds) {
+ this.paymentIds = paymentIds;
+ }
+ public String getTrxDate() {
+ return trxDate;
+ }
+ public void setTrxDate(String trxDate) {
+ this.trxDate = trxDate;
+ }
+ public BigDecimal getTaxedAmt() {
+ return taxedAmt;
+ }
+ public void setTaxedAmt(BigDecimal taxedAmt) {
+ this.taxedAmt = taxedAmt;
+ }
+ public Integer getPaymentId() {
+ return paymentId;
+ }
+ public void setPaymentId(Integer paymentId) {
+ this.paymentId = paymentId;
+ }
+ public String getPaymentNo() {
+ return paymentNo;
+ }
+ public void setPaymentNo(String paymentNo) {
+ this.paymentNo = paymentNo;
+ }
+
+
+ public String getTenderType() {
+ return tenderType;
+ }
+ public void setTenderType(String tenderType) {
+ this.tenderType = tenderType;
+ }
+ public String getForward() {
+ return forward;
+ }
+ public void setForward(String forward) {
+ this.forward = forward;
+ }
+ public String getPartnerName() {
+ return partnerName;
+ }
+ public void setPartnerName(String partnerName) {
+ this.partnerName = partnerName;
+ }
+ public String getPaymentTermName() {
+ return paymentTermName;
+ }
+ public void setPaymentTermName(String paymentTermName) {
+ this.paymentTermName = paymentTermName;
+ }
+ public String getInvoiceNo() {
+ return invoiceNo;
+ }
+ public void setInvoiceNo(String invoiceNo) {
+ this.invoiceNo = invoiceNo;
+ }
+ public String getChequeNo() {
+ return chequeNo;
+ }
+ public void setChequeNo(String chequeNo) {
+ this.chequeNo = chequeNo;
+ }
+ public String getCreditCardNumber() {
+ return creditCardNumber;
+ }
+ public void setCreditCardNumber(String creditCardNumber) {
+ this.creditCardNumber = creditCardNumber;
+ }
+ public String getInvoiceDate() {
+ return invoiceDate;
+ }
+ public void setInvoiceDate(String invoiceDate) {
+ this.invoiceDate = invoiceDate;
+ }
+ public Integer getBpartnerId() {
+ return bpartnerId;
+ }
+ public void setBpartnerId(Integer bpartnerId) {
+ this.bpartnerId = bpartnerId;
+ }
+ public Integer getPaymentTermId() {
+ return paymentTermId;
+ }
+ public Integer getCurrencyId() {
+ return currencyId;
+ }
+ public void setCurrencyId(Integer currencyId) {
+ this.currencyId = currencyId;
+ }
+
+ public Integer getDaysDue() {
+ return daysDue;
+ }
+ public void setDaysDue(Integer daysDue) {
+ this.daysDue = daysDue;
+ }
+ public BigDecimal getDiscountAmt() {
+ return discountAmt;
+ }
+ public void setDiscountAmt(BigDecimal discountAmt) {
+ this.discountAmt = discountAmt;
+ }
+ public String getDiscountDate() {
+ return discountDate;
+ }
+ public void setDiscountDate(String discountDate) {
+ this.discountDate = discountDate;
+ }
+ public String getDocumentNo() {
+ return documentNo;
+ }
+ public void setDocumentNo(String documentNo) {
+ this.documentNo = documentNo;
+ }
+ public Timestamp getDueDate() {
+ return dueDate;
+ }
+ public void setDueDate(Timestamp dueDate) {
+ this.dueDate = dueDate;
+ }
+
+ public Integer getInvoiceId() {
+ return invoiceId;
+ }
+ public void setInvoiceId(Integer invoiceId) {
+ this.invoiceId = invoiceId;
+ }
+ public Integer getInvoiceScheduleId() {
+ return invoiceScheduleId;
+ }
+ public void setInvoiceScheduleId(Integer invoiceScheduleId) {
+ this.invoiceScheduleId = invoiceScheduleId;
+ }
+ public Boolean getIsSoTrx() {
+ return isSoTrx;
+ }
+ public void setIsSoTrx(Boolean isSoTrx) {
+ this.isSoTrx = isSoTrx;
+ }
+ public Integer getNetDays() {
+ return netDays;
+ }
+ public void setNetDays(Integer netDays) {
+ this.netDays = netDays;
+ }
+ public BigDecimal getOpenAmt() {
+ return openAmt;
+ }
+ public void setOpenAmt(BigDecimal openAmt) {
+ this.openAmt = openAmt;
+ }
+ public Integer getOrderId() {
+ return orderId;
+ }
+ public void setOrderId(Integer orderId) {
+ this.orderId = orderId;
+ }
+ public BigDecimal getPaidAmt() {
+ return paidAmt;
+ }
+ public void setPaidAmt(BigDecimal paidAmt) {
+ this.paidAmt = paidAmt;
+ }
+ public Integer getPaumentTermId() {
+ return paymentTermId;
+ }
+ public void setPaymentTermId(Integer paymentTermId) {
+ this.paymentTermId = paymentTermId;
+ }
+ public BigDecimal getInvoiceGrandTotal() {
+ return invoiceGrandTotal;
+ }
+ public void setInvoiceGrandTotal(BigDecimal invoiceGrandTotal) {
+ this.invoiceGrandTotal = invoiceGrandTotal;
+ }
+
+ public BigDecimal getOverUnderPayment() {
+ return overUnderPayment;
+ }
+ public void setOverUnderPayment(BigDecimal overUnderPayment) {
+ this.overUnderPayment = overUnderPayment;
+ }
+
+ public BigDecimal getPaymentAmt() {
+ return paymentAmt;
+ }
+ public void setPaymentAmt(BigDecimal paymentAmt) {
+ this.paymentAmt = paymentAmt;
+ }
+ public String getTrxType() {
+ return trxType;
+ }
+ public void setTrxType(String trxType) {
+ this.trxType = trxType;
+ }
+ public BigDecimal getWriteOffAmt() {
+ return writeOffAmt;
+ }
+ public void setWriteOffAmt(BigDecimal writeOffAmt) {
+ this.writeOffAmt = writeOffAmt;
+ }
+ public String getCurrencySymbole() {
+ return currencySymbole;
+ }
+ public void setCurrencySymbole(String currencySymbole) {
+ this.currencySymbole = currencySymbole;
+ }
+ public Integer[] getInvoiceIds() {
+ return invoiceIds;
+ }
+ public void setInvoiceIds(Integer[] invoiceIds) {
+ this.invoiceIds = invoiceIds;
+ }
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/OrderBean.java b/posterita/posterita/src/main/org/posterita/beans/OrderBean.java
new file mode 100644
index 0000000000..3ea7d69e09
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/OrderBean.java
@@ -0,0 +1,172 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ **/
+
+/**
+ @author ashley
+ */
+
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+
+public class OrderBean
+{
+ private String orderType;
+ private String docStatus;
+ private String paymentRule;
+ private Integer orderId;
+ private Integer paymentTermId;
+ private Integer bpartnerId;
+ private Integer salesRepId;
+ private Integer priceListId;
+ private Integer warehouseId;
+
+ //payment details
+ private BigDecimal amountTendered;
+ private BigDecimal amountRefunded;
+ private String cardType;
+ private String cardNo;
+ private String chequeNo;
+ private BigDecimal cashAmt;
+ private BigDecimal chequeAmt;
+ private BigDecimal cardAmt;
+
+ private BigDecimal writeOffAmt;
+ private BigDecimal discountAmt;
+
+ //getters and setters
+
+ public String getOrderType() {
+ return orderType;
+ }
+ public void setOrderType(String orderType) {
+ this.orderType = orderType;
+ }
+ public String getDocStatus() {
+ return docStatus;
+ }
+ public void setDocStatus(String docStatus) {
+ this.docStatus = docStatus;
+ }
+ public String getPaymentRule() {
+ return paymentRule;
+ }
+ public void setPaymentRule(String paymentRule) {
+ this.paymentRule = paymentRule;
+ }
+ public Integer getOrderId() {
+ return orderId;
+ }
+ public void setOrderId(Integer orderId) {
+ this.orderId = orderId;
+ }
+ public Integer getPaymentTermId() {
+ return paymentTermId;
+ }
+ public void setPaymentTermId(Integer paymentTermId) {
+ this.paymentTermId = paymentTermId;
+ }
+ public Integer getBpartnerId() {
+ return bpartnerId;
+ }
+ public void setBpartnerId(Integer bpartnerId) {
+ this.bpartnerId = bpartnerId;
+ }
+ public Integer getSalesRepId() {
+ return salesRepId;
+ }
+ public void setSalesRepId(Integer salesRepId) {
+ this.salesRepId = salesRepId;
+ }
+ public Integer getPriceListId() {
+ return priceListId;
+ }
+ public void setPriceListId(Integer priceListId) {
+ this.priceListId = priceListId;
+ }
+ public Integer getWarehouseId() {
+ return warehouseId;
+ }
+ public void setWarehouseId(Integer warehouseId) {
+ this.warehouseId = warehouseId;
+ }
+ public BigDecimal getAmountTendered() {
+ return amountTendered;
+ }
+ public void setAmountTendered(BigDecimal amountTendered) {
+ this.amountTendered = amountTendered;
+ }
+ public BigDecimal getAmountRefunded() {
+ return amountRefunded;
+ }
+ public void setAmountRefunded(BigDecimal amountRefunded) {
+ this.amountRefunded = amountRefunded;
+ }
+ public String getCardType() {
+ return cardType;
+ }
+ public void setCardType(String cardType) {
+ this.cardType = cardType;
+ }
+ public String getCardNo() {
+ return cardNo;
+ }
+ public void setCardNo(String cardNo) {
+ this.cardNo = cardNo;
+ }
+ public String getChequeNo() {
+ return chequeNo;
+ }
+ public void setChequeNo(String chequeNo) {
+ this.chequeNo = chequeNo;
+ }
+ public BigDecimal getCashAmt() {
+ return cashAmt;
+ }
+ public void setCashAmt(BigDecimal cashAmt) {
+ this.cashAmt = cashAmt;
+ }
+ public BigDecimal getChequeAmt() {
+ return chequeAmt;
+ }
+ public void setChequeAmt(BigDecimal chequeAmt) {
+ this.chequeAmt = chequeAmt;
+ }
+ public BigDecimal getCardAmt() {
+ return cardAmt;
+ }
+ public void setCardAmt(BigDecimal cardAmt) {
+ this.cardAmt = cardAmt;
+ }
+ public BigDecimal getWriteOffAmt() {
+ return writeOffAmt;
+ }
+ public void setWriteOffAmt(BigDecimal writeOffAmt) {
+ this.writeOffAmt = writeOffAmt;
+ }
+ public BigDecimal getDiscountAmt() {
+ return discountAmt;
+ }
+ public void setDiscountAmt(BigDecimal discountAmt) {
+ this.discountAmt = discountAmt;
+ }
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/OrderHistoryBean.java b/posterita/posterita/src/main/org/posterita/beans/OrderHistoryBean.java
new file mode 100644
index 0000000000..e67ff4799d
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/OrderHistoryBean.java
@@ -0,0 +1,339 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on 04-Aug-2005 by alok
+ *
+ */
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+import java.sql.Timestamp;
+import java.util.ArrayList;
+
+
+public class OrderHistoryBean extends FilterBean
+{
+ public ArrayList orderHistoryBean;
+ private ArrayList invoiceHistoryList;
+ private ArrayList orderHistoryList;
+
+ protected Integer refOrderId;
+ private FilterBean filterBean;
+ private String serno;
+
+
+
+
+
+ public Integer getDocumentId() {
+ return documentId;
+ }
+ public void setDocumentId(Integer documentId) {
+ this.documentId = documentId;
+ }
+ public Integer[] getOrderIds() {
+ return orderIds;
+ }
+ public void setOrderIds(Integer[] orderIds) {
+ this.orderIds = orderIds;
+ }
+ public String getSerno() {
+ return serno;
+ }
+
+ public void setSerno(String serno) {
+ this.serno = serno;
+ }
+
+ public Integer getRefOrderId()
+ {
+ return refOrderId;
+ }
+
+ public void setRefOrderId(Integer refOrderId)
+ {
+ this.refOrderId = refOrderId;
+ }
+
+ public Integer getRefToQuote()
+ {
+ return refToQuote;
+ }
+ public void setRefToQuote(Integer refToQuote)
+ {
+ this.refToQuote = refToQuote;
+ }
+ public String getOrderType()
+ {
+ return orderType;
+ }
+ public void setOrderType(String orderType)
+ {
+ this.orderType = orderType;
+ }
+ public ArrayList getOrderHistoryBean()
+ {
+ return orderHistoryBean;
+ }
+
+ public void setOrderHistoryBean(ArrayList orderHistoryBean)
+ {
+ this.orderHistoryBean = orderHistoryBean;
+ }
+
+ public Integer getInOutId()
+ {
+ return inOutId;
+ }
+
+ public void setInOutId(Integer inOutId)
+ {
+ this.inOutId = inOutId;
+ }
+
+ public Integer getInvoiceId()
+ {
+ return invoiceId;
+ }
+
+ public void setInvoiceId(Integer invoiceId)
+ {
+ this.invoiceId = invoiceId;
+ }
+
+ public Integer getPaymentId()
+ {
+ return paymentId;
+ }
+
+ public void setPaymentId(Integer paymentId)
+ {
+ this.paymentId = paymentId;
+ }
+
+ public String getPartnerName()
+ {
+ return partnerName;
+ }
+
+ public void setPartnerName(String partnerName)
+ {
+ this.partnerName = partnerName;
+ }
+ public Integer getBpartnerId()
+ {
+ return bpartnerId;
+ }
+ public void setBpartnerId(Integer bpartnerId)
+ {
+ this.bpartnerId = bpartnerId;
+ }
+
+ public Timestamp getDateOrdered()
+ {
+ return dateOrdered;
+ }
+ public void setDateOrdered(Timestamp dateOrdered)
+ {
+ this.dateOrdered = dateOrdered;
+ }
+ public String getDatePromised()
+ {
+ return datePromised;
+ }
+ public void setDatePromised(String datePromised)
+ {
+ this.datePromised = datePromised;
+ }
+ public BigDecimal getOrderGrandTotal()
+ {
+ return orderGrandTotal;
+ }
+ public void setOrderGrandTotal(BigDecimal orderGrandTotal)
+ {
+ this.orderGrandTotal = orderGrandTotal;
+ }
+ public String getIsApproved()
+ {
+ return isApproved;
+ }
+ public void setIsApproved(String isApproved)
+ {
+ this.isApproved = isApproved;
+ }
+ public String getIsDelivered()
+ {
+ return isDelivered;
+ }
+ public void setIsDelivered(String isDelivered)
+ {
+ this.isDelivered = isDelivered;
+ }
+ public String getIsInvoiced()
+ {
+ return isInvoiced;
+ }
+ public void setIsInvoiced(String isInvoiced)
+ {
+ this.isInvoiced = isInvoiced;
+ }
+ public Boolean getIsSotrx()
+ {
+ return isSoTrx;
+ }
+ public void setIsSotrx(Boolean isSotrx)
+ {
+ this.isSoTrx = isSotrx;
+ }
+ public Integer getOrderId()
+ {
+ return orderId;
+ }
+ public void setOrderId(Integer orderId)
+ {
+ this.orderId = orderId;
+ }
+ public String getPoReference()
+ {
+ return poReference;
+ }
+ public void setPoReference(String poReference)
+ {
+ this.poReference = poReference;
+ }
+
+ public Boolean getIsSoTrx()
+ {
+ return isSoTrx;
+ }
+
+ public void setIsSoTrx(Boolean isSoTrx)
+ {
+ this.isSoTrx = isSoTrx;
+ }
+
+ public ArrayList getInvoiceHistoryList()
+ {
+ return invoiceHistoryList;
+ }
+
+ public void setInvoiceHistoryList(ArrayList list)
+ {
+ this.invoiceHistoryList = list;
+ }
+
+ public String getSotrxFlag()
+ {
+ return sotrxFlag;
+ }
+
+ public void setSotrxFlag(String sotrxFlag)
+ {
+ this.sotrxFlag = sotrxFlag;
+ }
+
+ public FilterBean getFilterBean()
+ {
+ return filterBean;
+ }
+
+ public void setFilterBean(FilterBean filterBean)
+ {
+ this.filterBean = filterBean;
+ }
+
+ public String getBpName()
+ {
+ return bpName;
+ }
+
+ public void setBpName(String bpName)
+ {
+ this.bpName = bpName;
+ }
+
+ public String getDocStatus()
+ {
+ return docStatus;
+ }
+
+ public void setDocStatus(String docStatus)
+ {
+ this.docStatus = docStatus;
+ }
+
+ public ArrayList getOrderHistoryList()
+ {
+ return orderHistoryList;
+ }
+
+ public void setOrderHistoryList(ArrayList orderHistoryList)
+ {
+ this.orderHistoryList = orderHistoryList;
+ }
+
+ public String getCompiereDocStatus()
+ {
+ return compiereDocStatus;
+ }
+
+ public void setCompiereDocStatus(String compiereDocStatus)
+ {
+ this.compiereDocStatus = compiereDocStatus;
+ }
+
+ public Integer getOrderlineCount()
+ {
+ return orderlineCount;
+ }
+
+ public void setOrderlineCount(Integer orderlineCount)
+ {
+ this.orderlineCount = orderlineCount;
+ }
+
+ public Integer getOrderlineInvoicedCount()
+ {
+ return orderlineInvoicedCount;
+ }
+
+ public void setOrderlineInvoicedCount(Integer orderlineInvoicedCount)
+ {
+ this.orderlineInvoicedCount = orderlineInvoicedCount;
+ }
+
+ public Integer getAttributeSetInstanceId()
+ {
+ return attributeSetInstanceId;
+ }
+
+ public void setAttributeSetInstanceId(Integer attributeSetInstanceId)
+ {
+ this.attributeSetInstanceId = attributeSetInstanceId;
+ }
+
+ public Timestamp getDateInvoiced()
+ {
+ return dateInvoiced;
+ }
+
+ public void setDateInvoiced(Timestamp dateInvoiced)
+ {
+ this.dateInvoiced = dateInvoiced;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/OrderInfoBean.java b/posterita/posterita/src/main/org/posterita/beans/OrderInfoBean.java
new file mode 100644
index 0000000000..14c2ebd399
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/OrderInfoBean.java
@@ -0,0 +1,149 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on Nov 8, 2005 by praveen
+ *
+ */
+package org.posterita.beans;
+
+import java.sql.Timestamp;
+
+public class OrderInfoBean
+{
+ private Integer orderId;
+ private Integer poReference;
+ private Timestamp dateOrdered;
+ private String docStatus;
+ private String orderedFrom;
+ private String vinNumber;
+ private String reserved;
+ private String assetStatus;
+ private String orderBy;
+ private String docType;
+ private Integer attributeSetInstanceId;
+
+ public Timestamp getDateOrdered()
+ {
+ return dateOrdered;
+ }
+
+ public void setDateOrdered(Timestamp dateOrdered)
+ {
+ this.dateOrdered = dateOrdered;
+ }
+
+ public String getDocStatus()
+ {
+ return docStatus;
+ }
+
+ public void setDocStatus(String docStatus)
+ {
+ this.docStatus = docStatus;
+ }
+
+ public String getOrderedFrom()
+ {
+ return orderedFrom;
+ }
+
+ public void setOrderedFrom(String orderedFrom)
+ {
+ this.orderedFrom = orderedFrom;
+ }
+
+ public Integer getPoReference()
+ {
+ return poReference;
+ }
+
+ public void setPoReference(Integer poReference)
+ {
+ this.poReference = poReference;
+ }
+
+ public Integer getOrderId()
+ {
+ return orderId;
+ }
+
+ public void setOrderId(Integer orderId)
+ {
+ this.orderId = orderId;
+ }
+
+ public String getAssetStatus()
+ {
+ return assetStatus;
+ }
+
+ public void setAssetStatus(String assetStatus)
+ {
+ this.assetStatus = assetStatus;
+ }
+
+ public String getDocType()
+ {
+ return docType;
+ }
+
+ public void setDocType(String docType)
+ {
+ this.docType = docType;
+ }
+
+ public String getOrderBy()
+ {
+ return orderBy;
+ }
+
+ public void setOrderBy(String orderBy)
+ {
+ this.orderBy = orderBy;
+ }
+
+ public String getReserved()
+ {
+ return reserved;
+ }
+
+ public void setReserved(String reserved)
+ {
+ this.reserved = reserved;
+ }
+
+ public String getVinNumber()
+ {
+ return vinNumber;
+ }
+
+ public void setVinNumber(String vinNumber)
+ {
+ this.vinNumber = vinNumber;
+ }
+
+ public Integer getAttributeSetInstanceId()
+ {
+ return attributeSetInstanceId;
+ }
+
+ public void setAttributeSetInstanceId(Integer attributeSetInstanceId)
+ {
+ this.attributeSetInstanceId = attributeSetInstanceId;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/OrderLineAttributeSetInstanceBean.java b/posterita/posterita/src/main/org/posterita/beans/OrderLineAttributeSetInstanceBean.java
new file mode 100644
index 0000000000..0bea792765
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/OrderLineAttributeSetInstanceBean.java
@@ -0,0 +1,47 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
+package org.posterita.beans;
+
+
+public class OrderLineAttributeSetInstanceBean
+{
+ private int orderLineId;
+ private int attributeSetInstanceId;
+
+ public int getOrderLineId()
+ {
+ return orderLineId;
+ }
+
+ public void setOrderLineId(int orderLineId)
+ {
+ this.orderLineId = orderLineId;
+ }
+
+ public int getAttributeSetInstanceId()
+ {
+ return attributeSetInstanceId;
+ }
+
+ public void setAttributeSetInstanceId(int attributeSetInstanceId)
+ {
+ this.attributeSetInstanceId = attributeSetInstanceId;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/OrderLineBean.java b/posterita/posterita/src/main/org/posterita/beans/OrderLineBean.java
new file mode 100644
index 0000000000..d9edbe6f86
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/OrderLineBean.java
@@ -0,0 +1,476 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on 09-Aug-2005 by alok
+ *
+ */
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+
+public class OrderLineBean extends DocumentBean implements Comparable
+{
+ public String getDescription() {
+ return description;
+ }
+ public void setDescription(String description) {
+ this.description = description;
+ }
+ public Double getTotalActualPrice() {
+ return totalActualPrice;
+ }
+ public void setTotalActualPrice(Double totalActualPrice) {
+ this.totalActualPrice = totalActualPrice;
+ }
+ public Double getPaymentByCard() {
+ return paymentByCard;
+ }
+ public void setPaymentByCard(Double paymentByCard) {
+ this.paymentByCard = paymentByCard;
+ }
+ public Double getPaymentByCash() {
+ return paymentByCash;
+ }
+ public void setPaymentByCash(Double paymentByCash) {
+ this.paymentByCash = paymentByCash;
+ }
+ public Double getPaymentByChq() {
+ return paymentByChq;
+ }
+ public void setPaymentByChq(Double paymentByChq) {
+ this.paymentByChq = paymentByChq;
+ }
+ public String[] getActualPrice() {
+ return actualPrice;
+ }
+ public void setActualPrice(String[] actualPrice) {
+ this.actualPrice = actualPrice;
+ }
+
+ public String[] getDiscountPercent() {
+ return discountPercent;
+ }
+ public void setDiscountPercent(String[] discountPercent) {
+ this.discountPercent = discountPercent;
+ }
+ public String getQtyAndItem() {
+ return qtyAndItem;
+ }
+ public void setQtyAndItem(String qtyAndItem) {
+ this.qtyAndItem = qtyAndItem;
+ }
+ public String getBarCode() {
+ return barCode;
+ }
+ public void setBarCode(String barCode) {
+ this.barCode = barCode;
+ }
+
+ public String getPartnerName() {
+ return partnerName;
+ }
+ public void setPartnerName(String partnerName) {
+ this.partnerName = partnerName;
+ }
+ public Integer[] getPosOrderLineIds()
+ {
+ return posOrderLineIds;
+ }
+
+ public void setPosOrderLineIds(Integer[] posOrderLineIds)
+ {
+ this.posOrderLineIds = posOrderLineIds;
+ }
+ public String getChequeNo()
+ {
+ return chequeNo;
+ }
+
+ public void setChequeNo(String chequeNo)
+ {
+ this.chequeNo = chequeNo;
+ }
+
+ public Integer getCreditCardExpMonth()
+ {
+ return creditCardExpMonth;
+ }
+
+ public void setCreditCardExpMonth(Integer creditCardExpMonth)
+ {
+ this.creditCardExpMonth = creditCardExpMonth;
+ }
+
+ public Integer getCreditCardExpYear()
+ {
+ return creditCardExpYear;
+ }
+
+ public void setCreditCardExpYear(Integer creditCardExpYear)
+ {
+ this.creditCardExpYear = creditCardExpYear;
+ }
+
+ public String getCreditCardNumber()
+ {
+ return creditCardNumber;
+ }
+
+ public void setCreditCardNumber(String creditCardNumber)
+ {
+ this.creditCardNumber = creditCardNumber;
+ }
+
+ public String getCreditCardType()
+ {
+ return creditCardType;
+ }
+
+ public void setCreditCardType(String creditCardType)
+ {
+ this.creditCardType = creditCardType;
+ }
+ public Integer getOrderId()
+ {
+ return orderId;
+ }
+
+ public void setOrderId(Integer orderId)
+ {
+ this.orderId = orderId;
+ }
+ public String getSurname() {
+ return surname;
+ }
+ public void setSurname(String surname) {
+ this.surname = surname;
+ }
+
+ public Integer getBpartnerId()
+ {
+ return bpartnerId;
+ }
+
+ public void setBpartnerId(Integer bpartnerId)
+ {
+ this.bpartnerId = bpartnerId;
+ }
+ public Boolean getIsQtyReserved()
+ {
+ return isQtyReserved;
+ }
+
+ public void setIsQtyReserved(Boolean isQtyReserved)
+ {
+ this.isQtyReserved = isQtyReserved;
+ }
+ public String getEngineNo() {
+ return engineNo;
+ }
+ public void setEngineNo(String engineNo) {
+ this.engineNo = engineNo;
+ }
+ public BigDecimal getQuantity()
+ {
+ return quantity;
+ }
+
+ public void setQuantity(BigDecimal quantity)
+ {
+ this.quantity = quantity;
+ }
+
+ public Integer getProductId()
+ {
+ return productId;
+ }
+
+ public void setProductId(Integer productId)
+ {
+ this.productId = productId;
+ }
+
+
+ public Integer[] getCheckBox()
+ {
+ return checkBox;
+ }
+ public void setCheckBox(Integer [] checkBox)
+ {
+ this.checkBox = checkBox;
+ }
+
+ public Integer getAttributeSetInstanceId()
+ {
+ return attributeSetInstanceId;
+ }
+
+ public void setAttributeSetInstanceId(Integer attributeSetInstanceId)
+ {
+ this.attributeSetInstanceId = attributeSetInstanceId;
+ }
+
+ public ArrayList getOrderLineList()
+ {
+ return orderLineList;
+ }
+ public void setOrderLineList(ArrayList orderLineList)
+ {
+ this.orderLineList = orderLineList;
+ }
+
+ public Integer getOrderLineId()
+ {
+ return orderLineId;
+ }
+
+ public void setOrderLineId(Integer orderLineId)
+ {
+ this.orderLineId = orderLineId;
+ }
+
+ public Integer getOrgId()
+ {
+ return orgId;
+ }
+
+ public void setOrgId(Integer orgId)
+ {
+ this.orgId = orgId;
+ }
+
+ public Integer getAllocationId()
+ {
+ return allocationId;
+ }
+
+ public void setAllocationId(Integer allocationId)
+ {
+ this.allocationId = allocationId;
+ }
+
+ public boolean equals(Object obj)
+ {
+ OrderLineBean target = (OrderLineBean) obj;
+
+ if ( obj == null)
+ return false;
+
+ if (this.getAttributeSetInstanceId().equals(target.getAttributeSetInstanceId()))
+ return true;
+
+ return false;
+ }
+
+ public String getSubmit()
+ {
+ return submit;
+ }
+
+ public void setSubmit(String submit)
+ {
+ this.submit = submit;
+ }
+
+
+ public int compareTo(Object o)
+ {
+ OrderLineBean src = (OrderLineBean) o;
+
+ if (src.getAttributeSetInstanceId().intValue() == this.getAttributeSetInstanceId().intValue())
+ return 0;
+
+
+ return -1;
+ }
+
+
+
+
+
+
+ public BigDecimal getAmountGiven()
+ {
+ return amountGiven;
+ }
+
+ public void setAmountGiven(BigDecimal amountGiven)
+ {
+ this.amountGiven = amountGiven;
+ }
+
+ public BigDecimal getAmountRefunded()
+ {
+ return amountRefunded;
+ }
+
+ public void setAmountRefunded(BigDecimal amountRefunded)
+ {
+ this.amountRefunded = amountRefunded;
+ }
+ public String getTrxType()
+ {
+ return trxType;
+ }
+
+ public void setTrxType(String trxType)
+ {
+ this.trxType = trxType;
+ }
+
+ public BigDecimal getTransferAmount() {
+ return transferAmount;
+ }
+ public void setTransferAmount(BigDecimal transferAmount) {
+ this.transferAmount = transferAmount;
+ }
+
+ public Integer getCashBookIds() {
+ return cashBookIds;
+ }
+ public void setCashBookIds(Integer cashBookIds) {
+ this.cashBookIds = cashBookIds;
+ }
+ public String getIsSales() {
+ return isSales;
+ }
+ public void setIsSales(String isSales) {
+ this.isSales = isSales;
+ }
+ public String getIfAdd() {
+ return ifAdd;
+ }
+ public void setIfAdd(String ifAdd) {
+ this.ifAdd = ifAdd;
+ }
+
+ public String getVendorName() {
+ return vendorName;
+ }
+ public void setVendorName(String vendorName) {
+ this.vendorName = vendorName;
+ }
+
+ public String getDocumentNo() {
+ return documentNo;
+ }
+ public void setDocumentNo(String documentNo) {
+ this.documentNo = documentNo;
+ }
+
+ public BigDecimal getUserDiscount() {
+ return userDiscount;
+ }
+ public void setUserDiscount(BigDecimal userDiscount) {
+ this.userDiscount = userDiscount;
+ }
+
+ public Integer getPaymentTermId() {
+ return paymentTermId;
+ }
+ public void setPaymentTermId(Integer paymentTermId) {
+ this.paymentTermId = paymentTermId;
+ }
+
+ public String getPaymentTermName() {
+ return paymentTermName;
+ }
+ public void setPaymentTermName(String paymentTermName) {
+ this.paymentTermName = paymentTermName;
+ }
+ public String getToBeShipped() {
+ return toBeShipped;
+ }
+ public void setToBeShipped(String toBeShipped) {
+ this.toBeShipped = toBeShipped;
+ }
+
+ public Boolean getOpenDrawer() {
+ return openDrawer;
+ }
+ public void setOpenDrawer(Boolean openDrawer) {
+ this.openDrawer = openDrawer;
+ }
+
+ public void setUom(String uom)
+ {
+ this.uom = uom;
+ }
+
+ public String getUom()
+ {
+ return this.uom;
+ }
+ public Integer getPriceListId() {
+ return priceListId;
+ }
+ public void setPriceListId(Integer priceListId) {
+ this.priceListId = priceListId;
+ }
+
+ public BigDecimal getUnitPurchasePrice()
+ {
+ return unitPurchasePrice;
+ }
+
+ public void setUnitPurchasePrice(BigDecimal unitPurchasePrice)
+ {
+ this.unitPurchasePrice = unitPurchasePrice;
+ }
+
+ public BigDecimal getGrossProfit()
+ {
+ return grossProfit;
+ }
+
+ public void setGrossProfit(BigDecimal grossProfit)
+ {
+ this.grossProfit = grossProfit;
+ }
+
+ public BigDecimal getTotalGrossProfit()
+ {
+ return totalGrossProfit;
+ }
+
+ public void setTotalGrossProfit(BigDecimal totalGrossProfit)
+ {
+ this.totalGrossProfit = totalGrossProfit;
+ }
+
+ protected String paymentRule;
+
+ public String getPaymentRule() {
+ return paymentRule;
+ }
+
+ public void setPaymentRule(String paymentRule) {
+ this.paymentRule = paymentRule;
+ }
+ public Integer getRoleId()
+ {
+ return roleId;
+ }
+ public void setRoleId(Integer roleId)
+ {
+ this.roleId = roleId;
+ }
+
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/OrderLineImporterBean.java b/posterita/posterita/src/main/org/posterita/beans/OrderLineImporterBean.java
new file mode 100644
index 0000000000..c7643bab34
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/OrderLineImporterBean.java
@@ -0,0 +1,28 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+* Created on Nov 4, 2005 by ashley
+*
+*/
+
+package org.posterita.beans;
+
+public class OrderLineImporterBean extends UDIBean
+{
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/OrgBean.java b/posterita/posterita/src/main/org/posterita/beans/OrgBean.java
new file mode 100644
index 0000000000..85002ae5f7
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/OrgBean.java
@@ -0,0 +1,170 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+package org.posterita.beans;
+
+public class OrgBean extends UDIBean
+{
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public void setDescription(String description)
+ {
+ this.description = description;
+ }
+
+ public String getAddress2() {
+ return address2;
+ }
+
+ public void setAddress2(String address2) {
+ this.address2 = address2;
+ }
+
+ public Integer getOrgId()
+ {
+ return orgId;
+ }
+
+ public void setOrgId(Integer orgId)
+ {
+ this.orgId = orgId;
+ }
+ public String getAddress1()
+ {
+ return address1;
+ }
+ public void setAddress1(String address1)
+ {
+ this.address1 = address1;
+ }
+
+ public String getCity()
+ {
+ return city;
+ }
+
+ public void setCity(String city)
+ {
+ this.city = city;
+ }
+
+ public String getOrgName()
+ {
+ return orgName;
+ }
+
+ public void setOrgName(String orgName)
+ {
+ this.orgName = orgName;
+ }
+
+ public String getPostalAddress()
+ {
+ return postalAddress;
+ }
+
+ public void setPostalAddress(String postalAddress1)
+ {
+ this.postalAddress = postalAddress1;
+ }
+
+ public Integer getRegionId()
+ {
+ return regionId;
+ }
+
+ public void setRegionId(Integer regionId)
+ {
+ this.regionId = regionId;
+ }
+
+ public String getRegion()
+ {
+ return region;
+ }
+
+ public void setRegion(String region)
+ {
+ this.region = region;
+ }
+
+
+ public String getFax()
+ {
+ return fax;
+ }
+
+ public void setFax(String fax)
+ {
+ this.fax = fax;
+ }
+
+ public String getPhone()
+ {
+ return phone;
+ }
+
+ public void setPhone(String phone)
+ {
+ this.phone = phone;
+ }
+
+ public Boolean getIsActive()
+ {
+ return isActive;
+ }
+
+ public void setIsActive(Boolean isActive)
+ {
+ this.isActive = isActive;
+ }
+
+ public String getActive()
+ {
+ return active;
+ }
+
+ public void setActive(String active)
+ {
+ this.active = active;
+ }
+
+ public void setCountryId(Integer countryId)
+ {
+ this.countryId = countryId;
+ }
+
+ public Integer getCountryId()
+ {
+ return this.countryId;
+ }
+
+ public String getReceiptFooterMsg()
+ {
+ return receiptFooterMsg;
+ }
+
+ public void setReceiptFooterMsg(String receiptFooterMsg)
+ {
+ this.receiptFooterMsg = receiptFooterMsg;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/OrgUsersBean.java b/posterita/posterita/src/main/org/posterita/beans/OrgUsersBean.java
new file mode 100644
index 0000000000..073d4e3375
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/OrgUsersBean.java
@@ -0,0 +1,60 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on Aug 2, 2005 by din
+ */
+
+package org.posterita.beans;
+
+import java.util.Vector;
+
+
+
+
+public class OrgUsersBean extends UDIBean
+{
+
+
+ public String getOrgName()
+ {
+ return orgName;
+ }
+
+ public void setOrgName(String orgName)
+ {
+ this.orgName = orgName;
+ }
+
+ public Integer getOrgId()
+ {
+ return orgId;
+ }
+ public void setOrgId(Integer orgId)
+ {
+ this.orgId = orgId;
+ }
+
+ public Vector getOrgUsers()
+ {
+ return orgUsers;
+ }
+ public void setOrgUsers(Vector orgUsers)
+ {
+ this.orgUsers = orgUsers;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/POSBean.java b/posterita/posterita/src/main/org/posterita/beans/POSBean.java
new file mode 100644
index 0000000000..2db5f71783
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/POSBean.java
@@ -0,0 +1,234 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Created on 17-Mar-2006
+ */
+
+
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+import java.sql.Timestamp;
+
+
+public class POSBean extends OrderLineBean
+{
+ public Timestamp getDateCreated() {
+ return dateCreated;
+ }
+ public void setDateCreated(Timestamp dateCreated) {
+ this.dateCreated = dateCreated;
+ }
+ public String getCashJournalDisc() {
+ return cashJournalDisc;
+ }
+ public void setCashJournalDisc(String cashJournalDisc) {
+ this.cashJournalDisc = cashJournalDisc;
+ }
+ public Integer getCashJournalId() {
+ return cashJournalId;
+ }
+ public void setCashJournalId(Integer cashJournalId) {
+ this.cashJournalId = cashJournalId;
+ }
+ public String getCashJournalName() {
+ return cashJournalName;
+ }
+ public void setCashJournalName(String cashJournalName) {
+ this.cashJournalName = cashJournalName;
+ }
+ public Timestamp getDateAcct() {
+ return dateAcct;
+ }
+ public void setDateAcct(Timestamp dateAcct) {
+ this.dateAcct = dateAcct;
+ }
+ public String getDocStatus() {
+ return docStatus;
+ }
+ public void setDocStatus(String docStatus) {
+ this.docStatus = docStatus;
+ }
+ public Integer getGrandTotal() {
+ return grandTotal;
+ }
+ public void setGrandTotal(Integer grandTotal) {
+ this.grandTotal = grandTotal;
+ }
+ public String getPaymentRule() {
+ return paymentRule;
+ }
+ public void setPaymentRule(String paymentRule) {
+ this.paymentRule = paymentRule;
+ }
+ public Integer getPriceListId() {
+ return priceListId;
+ }
+ public void setPriceListId(Integer priceListId) {
+ this.priceListId = priceListId;
+ }
+ public String getPriceListName() {
+ return priceListName;
+ }
+ public void setPriceListName(String priceListName) {
+ this.priceListName = priceListName;
+ }
+ public String getWarehouseName() {
+ return warehouseName;
+ }
+ public void setWarehouseName(String warehouseName) {
+ this.warehouseName = warehouseName;
+ }
+ public String getPosDesc()
+ {
+ return posDesc;
+ }
+ public void setPosDesc(String posDesc)
+ {
+ this.posDesc = posDesc;
+ }
+ public Integer getPosId()
+ {
+ return posId;
+ }
+ public void setPosId(Integer posId)
+ {
+ this.posId = posId;
+ }
+ public String getPosName()
+ {
+ return posName;
+ }
+ public void setPosName(String posName)
+ {
+ this.posName = posName;
+ }
+ public String getSaleRepName()
+ {
+ return saleRepName;
+ }
+ public void setSaleRepName(String saleRepName)
+ {
+ this.saleRepName = saleRepName;
+ }
+ public Integer getSalesRepId()
+ {
+ return salesRepId;
+ }
+ public void setSalesRepId(Integer salesRepId)
+ {
+ this.salesRepId = salesRepId;
+ }
+ public Integer getWarehouseId()
+ {
+ return warehouseId;
+ }
+ public void setWarehouseId(Integer warehouseId)
+ {
+ this.warehouseId = warehouseId;
+ }
+ public Integer getCashBookId()
+ {
+ return cashBookId;
+ }
+
+ public void setCashBookId(Integer cashBookId)
+ {
+ this.cashBookId = cashBookId;
+ }
+
+ public String getCashBookName()
+ {
+ return cashBookName;
+ }
+
+ public void setCashBookName(String cashBookName)
+ {
+ this.cashBookName = cashBookName;
+ }
+ public String getTrxType()
+ {
+ return trxType;
+ }
+
+
+ public void setTrxType(String trxType)
+ {
+ this.trxType = trxType;
+ }
+ public BigDecimal getAmount()
+ {
+ return amount;
+ }
+
+ public void setAmount(BigDecimal amount) {
+ this.amount = amount;
+ }
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public void setDescription(String description)
+ {
+ this.description = description;
+ }
+ public BigDecimal getBeginingBalance()
+ {
+ return beginingBalance;
+ }
+
+ public void setBeginingBalance(BigDecimal beginingBalance)
+ {
+ this.beginingBalance = beginingBalance;
+ }
+
+ public BigDecimal getEndingBalance()
+ {
+ return endingBalance;
+ }
+
+ public void setEndingBalance(BigDecimal endingBalance)
+ {
+ this.endingBalance = endingBalance;
+ }
+
+ public BigDecimal getStatementDifference()
+ {
+ return statementDifference;
+ }
+
+ public void setStatementDifference(BigDecimal statementDifference)
+ {
+ this.statementDifference = statementDifference;
+ }
+
+ public String toString()
+ {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("\n POS NAME= "+ getPosName());
+ buffer.append("\n PAYMENT RULE = " + getPaymentRule());
+ buffer.append("\n TOTAL = "+getGrandTotal());
+ buffer.append("\n The Begining Balance = "+getBeginingBalance());
+ buffer.append("\n The Ending Balance = "+getEndingBalance());
+
+ return buffer.toString();
+
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/POSDescriptionBean.java b/posterita/posterita/src/main/org/posterita/beans/POSDescriptionBean.java
new file mode 100644
index 0000000000..adff505990
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/POSDescriptionBean.java
@@ -0,0 +1,55 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Created on May 4, 2006
+ */
+
+
+package org.posterita.beans;
+
+
+public class POSDescriptionBean extends UDIBean
+{
+
+
+ public String getPosName() {
+ return posName;
+ }
+ public void setPosName(String posName) {
+ this.posName = posName;
+ }
+ public Integer getPosId() {
+ return posId;
+ }
+ public void setPosId(Integer posId) {
+ this.posId = posId;
+ }
+ public Integer getWareHouseId() {
+ return wareHouseId;
+ }
+ public void setWareHouseId(Integer wareHouseId) {
+ this.wareHouseId = wareHouseId;
+ }
+ public String getWarehouseName() {
+ return warehouseName;
+ }
+ public void setWarehouseName(String warehouseName) {
+ this.warehouseName = warehouseName;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/POSHelpBean.java b/posterita/posterita/src/main/org/posterita/beans/POSHelpBean.java
new file mode 100644
index 0000000000..95f3c7a22d
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/POSHelpBean.java
@@ -0,0 +1,51 @@
+/**
+ *
+ * Copyright (c) 2008 Posterita. All Rights Reserved.
+ *
+ * This software is the confidential and proprietary information of
+ * Posterita. ("Confidential Information"). You shall not
+ * disclose such Confidential Information and shall use it only in
+ * accordance with the terms of the license agreement you entered into
+ * with Posterita.
+ *
+ * POSTERITA MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE
+ * SUITABILITY OF THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT
+ * NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR
+ * A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. TAMAK ICT SHALL NOT
+ * BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING,
+ * MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
+ *
+ * 6 Feb 2008 18:03:33 by shameem
+ *
+ */
+
+package org.posterita.beans;
+
+public class POSHelpBean extends UDIBean
+{
+ public String getSubject() {
+ return subject;
+ }
+ public void setSubject(String subject) {
+ this.subject = subject;
+ }
+ public String getFromAddress() {
+ return fromAddress;
+ }
+ public void setFromAddress(String fromAddress) {
+ this.fromAddress = fromAddress;
+ }
+ public String getToAddresses() {
+ return toAddresses;
+ }
+ public void setToAddresses(String toAddresses) {
+ this.toAddresses = toAddresses;
+ }
+ public String getTextMessage() {
+ return textMessage;
+ }
+ public void setTextMessage(String textMessage) {
+ this.textMessage = textMessage;
+ }
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/POSHistoryBean.java b/posterita/posterita/src/main/org/posterita/beans/POSHistoryBean.java
new file mode 100644
index 0000000000..3727a209a5
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/POSHistoryBean.java
@@ -0,0 +1,214 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on May 15, 2006
+ */
+
+
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+import java.sql.Timestamp;
+
+
+public class POSHistoryBean extends UDIBean
+{
+ public Boolean isCustomer;
+ private Integer invoiceRefNo;
+ private String invoiceDocumentNo;
+ private BigDecimal amountPaid;
+
+ public BigDecimal getGrossProfit()
+ {
+ return grossProfit;
+ }
+ public void setGrossProfit(BigDecimal grossProfit)
+ {
+ this.grossProfit = grossProfit;
+ }
+ public String getHistoryType()
+ {
+ return historyType;
+ }
+ public void setHistoryType(String historyType)
+ {
+ this.historyType = historyType;
+ }
+ public Integer getBpartnerId()
+ {
+ return bpartnerId;
+ }
+ public void setBpartnerId(Integer bpartnerId)
+ {
+ this.bpartnerId = bpartnerId;
+ }
+ public String getPaymentRule() {
+ return paymentRule;
+ }
+ public void setPaymentRule(String paymentRule) {
+ this.paymentRule = paymentRule;
+ }
+ public String getOrderType() {
+ return orderType;
+ }
+ public void setOrderType(String orderType) {
+ this.orderType = orderType;
+ }
+ public Integer getMonth() {
+ return month;
+ }
+ public void setMonth(Integer month) {
+ this.month = month;
+ }
+ public Integer getYear() {
+ return year;
+ }
+ public void setYear(Integer year) {
+ this.year = year;
+ }
+ public Timestamp getDateAcct() {
+ return dateAcct;
+ }
+ public void setDateAcct(Timestamp dateAcct) {
+ this.dateAcct = dateAcct;
+ }
+ public String getDocumentNo() {
+ return documentNo;
+ }
+ public void setDocumentNo(String documentNo) {
+ this.documentNo = documentNo;
+ }
+ public BigDecimal getOrderGrandTotal() {
+ return orderGrandTotal;
+ }
+ public void setOrderGrandTotal(BigDecimal orderGrandTotal) {
+ this.orderGrandTotal = orderGrandTotal;
+ }
+ public Integer getInvoiceId() {
+ return invoiceId;
+ }
+ public void setInvoiceId(Integer invoiceId) {
+ this.invoiceId = invoiceId;
+ }
+ public Integer getOrderId() {
+ return orderId;
+ }
+ public void setOrderId(Integer orderId) {
+ this.orderId = orderId;
+ }
+ public String getPartnerName() {
+ return partnerName;
+ }
+ public void setPartnerName(String partnerName) {
+ this.partnerName = partnerName;
+ }
+ public String getDocStatus()
+ {
+ return docStatus;
+ }
+ public void setDocStatus(String docStatus)
+ {
+ this.docStatus = docStatus;
+ }
+ public Boolean getIsCustomer()
+ {
+ return isCustomer;
+ }
+ public void setIsCustomer(Boolean isCustomer)
+ {
+ this.isCustomer = isCustomer;
+ }
+
+ public Integer getInvoiceRefNo()
+ {
+ return invoiceRefNo;
+ }
+
+ public void setInvoiceRefNo(Integer invoiceRefNo)
+ {
+ this.invoiceRefNo = invoiceRefNo;
+ }
+ public Integer getOrgId() {
+ return orgId;
+ }
+ public void setOrgId(Integer orgId) {
+ this.orgId = orgId;
+ }
+
+ /**
+ * @return The cashBookId
+ */
+ public Integer getCashBookId()
+ {
+ return cashBookId;
+ }
+
+ /**
+ * @param cashBookId The cashBookId to set
+ */
+ public void setCashBookId(Integer cashBookId)
+ {
+ this.cashBookId = cashBookId;
+ }
+
+ /**
+ * @return The invoiceDocumentNo
+ */
+ public String getInvoiceDocumentNo()
+ {
+ return invoiceDocumentNo;
+ }
+
+ /**
+ * @param invoiceDocumentNo The invoiceDocumentNo to set
+ */
+ public void setInvoiceDocumentNo(String invoiceDocumentNo)
+ {
+ this.invoiceDocumentNo = invoiceDocumentNo;
+ }
+
+ /**
+ * @return The amountPaid
+ */
+ public BigDecimal getAmountPaid()
+ {
+ return amountPaid;
+ }
+
+ /**
+ * @param amountPaid The amountPaid to set
+ */
+ public void setAmountPaid(BigDecimal amountPaid)
+ {
+ this.amountPaid = amountPaid;
+ }
+ /**
+ * @return The dateOrdered
+ */
+ public Timestamp getDateOrdered()
+ {
+ return dateOrdered;
+ }
+ /**
+ * @param dateOrdered The dateOrdered to set
+ */
+ public void setDateOrdered(Timestamp dateOrdered)
+ {
+ this.dateOrdered = dateOrdered;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/POSInfoBean.java b/posterita/posterita/src/main/org/posterita/beans/POSInfoBean.java
new file mode 100644
index 0000000000..04a878b9f2
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/POSInfoBean.java
@@ -0,0 +1,107 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Created on May 3, 2006
+ */
+
+
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+
+
+public class POSInfoBean extends UDIBean
+{
+ public String getOrgName()
+ {
+ return orgName;
+ }
+ public void setOrgName(String orgName)
+ {
+ this.orgName = orgName;
+ }
+ public String getPosName()
+ {
+ return posName;
+ }
+ public void setPosName(String posName)
+ {
+ this.posName = posName;
+ }
+
+ public String getPaymentRule() {
+ return paymentRule;
+ }
+ public void setPaymentRule(String paymentRule) {
+ this.paymentRule = paymentRule;
+ }
+ public BigDecimal getOrderGrandTotal() {
+ return orderGrandTotal;
+ }
+ public void setOrderGrandTotal(BigDecimal orderGrandTotal) {
+ this.orderGrandTotal = orderGrandTotal;
+ }
+
+ public BigDecimal getTillGrandTotal()
+ {
+ return tillGrandTotal;
+ }
+ public void setTillGrandTotal(BigDecimal tillGrandTotal)
+ {
+ this.tillGrandTotal = tillGrandTotal;
+ }
+ public BigDecimal getCashTotal()
+ {
+ return cashTotal;
+ }
+
+ public void setCashTotal(BigDecimal cashTotal)
+ {
+ this.cashTotal = cashTotal;
+ }
+
+ public BigDecimal getCardTotal()
+ {
+ return cardTotal;
+ }
+ public void setCardTotal(BigDecimal cardTotal)
+ {
+ this.cardTotal = cardTotal;
+ }
+ public BigDecimal getChequeTotal()
+ {
+ return chequeTotal;
+ }
+ public void setChequeTotal(BigDecimal chequeTotal)
+ {
+ this.chequeTotal = chequeTotal;
+ }
+ public String toString()
+ {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("\n POS NAME= "+ getPosName());
+ buffer.append("\n PAYMENT RULE = " + getPaymentRule());
+ buffer.append("\n TOTAL = "+getOrderGrandTotal());
+
+
+ return buffer.toString();
+
+ }
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/POSReportBean.java b/posterita/posterita/src/main/org/posterita/beans/POSReportBean.java
new file mode 100644
index 0000000000..c9f2918795
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/POSReportBean.java
@@ -0,0 +1,163 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Created on May 11, 2006
+ */
+
+
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+
+
+public class POSReportBean extends UDIBean
+{
+
+
+
+
+
+
+
+ public Integer getProductId() {
+ return productId;
+ }
+ public void setProductId(Integer productId) {
+ this.productId = productId;
+ }
+ public BigDecimal getQtyInventoryIn() {
+ return qtyInventoryIn;
+ }
+ public void setQtyInventoryIn(BigDecimal qtyInventoryIn) {
+ this.qtyInventoryIn = qtyInventoryIn;
+ }
+ public BigDecimal getQtyInventoryOut() {
+ return qtyInventoryOut;
+ }
+ public void setQtyInventoryOut(BigDecimal qtyInventoryOut) {
+ this.qtyInventoryOut = qtyInventoryOut;
+ }
+ public String getProductCategory() {
+ return productCategory;
+ }
+ public void setProductCategory(String productCategory) {
+ this.productCategory = productCategory;
+ }
+ public String getBrandName() {
+ return brandName;
+ }
+ public void setBrandName(String brandName) {
+ this.brandName = brandName;
+ }
+ public String getColourName() {
+ return colourName;
+ }
+ public void setColourName(String colourName) {
+ this.colourName = colourName;
+ }
+ public String getDesignName() {
+ return designName;
+ }
+ public void setDesignName(String designName) {
+ this.designName = designName;
+ }
+ public BigDecimal getEndingBalance()
+ {
+ return endingBalance;
+ }
+
+ public void setEndingBalance(BigDecimal endingBalance)
+ {
+ this.endingBalance = endingBalance;
+ }
+ public String getModelName() {
+ return modelName;
+ }
+ public void setModelName(String modelName) {
+ this.modelName = modelName;
+ }
+ public String getPartnerName() {
+ return partnerName;
+ }
+ public void setPartnerName(String partnerName) {
+ this.partnerName = partnerName;
+ }
+ public BigDecimal getQuantity() {
+ return quantity;
+ }
+ public void setQuantity(BigDecimal quantity) {
+ this.quantity= quantity;
+ }
+ public String getSizeName() {
+ return sizeName;
+ }
+ public void setSizeName(String sizeName) {
+ this.sizeName = sizeName;
+ }
+ public BigDecimal getCloseingBalanceQty() {
+ return closeingBalanceQty;
+ }
+ public void setCloseingBalanceQty(BigDecimal closeingBalanceQty) {
+ this.closeingBalanceQty = closeingBalanceQty;
+ }
+ public String getProductName() {
+ return productName;
+ }
+ public void setProductName(String productName) {
+ this.productName = productName;
+ }
+ public BigDecimal getOpeningBalanceQty() {
+ return openingBalanceQty;
+ }
+ public void setOpeningBalanceQty(BigDecimal openingBalanceQty) {
+ this.openingBalanceQty = openingBalanceQty;
+ }
+ public BigDecimal getQtyOfGoodsReceived() {
+ return qtyOfGoodsReceived;
+ }
+ public void setQtyOfGoodsReceived(BigDecimal qtyOfGoodsReceived) {
+ this.qtyOfGoodsReceived = qtyOfGoodsReceived;
+ }
+ public BigDecimal getQtyOfGoodsReturned() {
+ return qtyOfGoodsReturned;
+ }
+ public void setQtyOfGoodsReturned(BigDecimal qtyOfGoodsReturned) {
+ this.qtyOfGoodsReturned = qtyOfGoodsReturned;
+ }
+ public BigDecimal getQtyOfGoodsSold() {
+ return qtyOfGoodsSold;
+ }
+ public void setQtyOfGoodsSold(BigDecimal qtyOfGoodsSold) {
+ this.qtyOfGoodsSold = qtyOfGoodsSold;
+ }
+ public BigDecimal getQtyReturnedByCustomer() {
+ return qtyReturnedByCustomer;
+ }
+ public void setQtyReturnedByCustomer(BigDecimal qtyReturnedByCustomer) {
+ this.qtyReturnedByCustomer = qtyReturnedByCustomer;
+ }
+ public void setUom(String uom)
+ {
+ this.uom = uom;
+ }
+ public String getUom()
+ {
+ return this.uom;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/POSStockBean.java b/posterita/posterita/src/main/org/posterita/beans/POSStockBean.java
new file mode 100644
index 0000000000..de9546a608
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/POSStockBean.java
@@ -0,0 +1,154 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Created on May 8, 2006
+ */
+
+
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+import java.util.HashMap;
+
+
+public class POSStockBean extends UDIBean
+{
+
+ public Integer getOrgId()
+ {
+ return orgId;
+ }
+
+ public void setOrgId(Integer orgId)
+ {
+ this.orgId = orgId;
+ }
+
+ public String getUom()
+ {
+ return uom;
+ }
+
+ public void setUom(String uom)
+ {
+ this.uom = uom;
+ }
+
+
+ public String getQtyFilter() {
+ return qtyFilter;
+ }
+
+ public void setQtyFilter(String qtyFilter) {
+ this.qtyFilter = qtyFilter;
+ }
+
+ public Boolean getIsTextileProduct() {
+ return isTextileProduct;
+ }
+
+ public void setIsTextileProduct(Boolean isTextileProduct) {
+ this.isTextileProduct = isTextileProduct;
+ }
+
+ public Integer getAttributeSetInstanceId()
+ {
+ return attributeSetInstanceId;
+ }
+
+ public void setAttributeSetInstanceId(Integer attributeSetInstanceId)
+ {
+ this.attributeSetInstanceId = attributeSetInstanceId;
+ }
+
+ public HashMap getAttributeValuesMap() {
+ return attributeValuesMap;
+ }
+ public void setAttributeValuesMap(HashMap attributeValuesMap) {
+ this.attributeValuesMap = attributeValuesMap;
+ }
+ public Integer getProductId() {
+ return productId;
+ }
+ public void setProductId(Integer productId) {
+ this.productId = productId;
+ }
+ public String getProductName() {
+ return productName;
+ }
+ public void setProductName(String productName) {
+ this.productName = productName;
+ }
+ public BigDecimal getQuantity() {
+ return quantity;
+ }
+ public void setQuantity(BigDecimal quantity) {
+ this.quantity = quantity;
+ }
+ public String getBrandName() {
+ return brandName;
+ }
+ public void setBrandName(String brandName) {
+ this.brandName = brandName;
+ }
+ public String getColourName() {
+ return colourName;
+ }
+ public void setColourName(String colourName) {
+ this.colourName = colourName;
+ }
+ public String getDesignName() {
+ return designName;
+ }
+ public void setDesignName(String designName) {
+ this.designName = designName;
+ }
+ public String getModelName() {
+ return modelName;
+ }
+ public void setModelName(String modelName) {
+ this.modelName = modelName;
+ }
+ public String getSizeName() {
+ return sizeName;
+ }
+ public void setSizeName(String sizeName) {
+ this.sizeName = sizeName;
+ }
+
+ public AttributeValuesPair getAttributeValuesPair()
+ {
+ return attributeValuesPair;
+ }
+
+ public void setAttributeValuesPair(AttributeValuesPair attributeValuesPair)
+ {
+ this.attributeValuesPair = attributeValuesPair;
+ }
+
+ public void setQtyOnHand(BigDecimal qtyAvailable)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+
+
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/POSSupplierBean.java b/posterita/posterita/src/main/org/posterita/beans/POSSupplierBean.java
new file mode 100644
index 0000000000..1e926e7f31
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/POSSupplierBean.java
@@ -0,0 +1,43 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Created on May 8, 2006
+ */
+
+
+package org.posterita.beans;
+
+
+public class POSSupplierBean extends UDIBean
+{
+
+
+ public Integer getBpartnerId() {
+ return bpartnerId;
+ }
+ public void setBpartnerId(Integer bpartnerId) {
+ this.bpartnerId = bpartnerId;
+ }
+ public String getPartnerName() {
+ return partnerName;
+ }
+ public void setPartnerName(String partnerName) {
+ this.partnerName = partnerName;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/PaymentAllocationBean.java b/posterita/posterita/src/main/org/posterita/beans/PaymentAllocationBean.java
new file mode 100644
index 0000000000..b1741aee47
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/PaymentAllocationBean.java
@@ -0,0 +1,156 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on Oct 30, 2006
+ */
+
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+
+public class PaymentAllocationBean extends UDIBean {
+
+ public Integer getCreditMemoId() {
+ return creditMemoId;
+ }
+
+ public void setCreditMemoId(Integer creditMemoId) {
+ this.creditMemoId = creditMemoId;
+ }
+
+ public String getCreditMemoNumber() {
+ return creditMemoNumber;
+ }
+
+ public void setCreditMemoNumber(String creditMemoNumber) {
+ this.creditMemoNumber = creditMemoNumber;
+ }
+
+ public BigDecimal getAmount() {
+ return amount;
+ }
+
+ public void setAmount(BigDecimal amount) {
+ this.amount = amount;
+ }
+
+ public Integer getBpartnerId() {
+ return bpartnerId;
+ }
+
+ public void setBpartnerId(Integer bpartnerId) {
+ this.bpartnerId = bpartnerId;
+ }
+
+ public Integer getCashLineId() {
+ return cashLineId;
+ }
+
+ public void setCashLineId(Integer cashLineId) {
+ this.cashLineId = cashLineId;
+ }
+
+ public BigDecimal getDiscountAmt() {
+ return discountAmt;
+ }
+
+ public void setDiscountAmt(BigDecimal discountAmt) {
+ this.discountAmt = discountAmt;
+ }
+
+ public String getDocumentNo() {
+ return documentNo;
+ }
+
+ public void setDocumentNo(String documentNo) {
+ this.documentNo = documentNo;
+ }
+
+ public Integer getInvoiceId() {
+ return invoiceId;
+ }
+
+ public void setInvoiceId(Integer invoiceId) {
+ this.invoiceId = invoiceId;
+ }
+
+ public String getInvoiceNo() {
+ return invoiceNo;
+ }
+
+ public void setInvoiceNo(String invoiceNo) {
+ this.invoiceNo = invoiceNo;
+ }
+
+ public Integer getOrderId() {
+ return orderId;
+ }
+
+ public void setOrderId(Integer orderId) {
+ this.orderId = orderId;
+ }
+
+ public BigDecimal getOverUnderPayment() {
+ return overUnderPayment;
+ }
+
+ public void setOverUnderPayment(BigDecimal overUnderPayment) {
+ this.overUnderPayment = overUnderPayment;
+ }
+
+ public String getPartnerName() {
+ return partnerName;
+ }
+
+ public void setPartnerName(String partnerName) {
+ this.partnerName = partnerName;
+ }
+
+ public Integer getPaymentId() {
+ return paymentId;
+ }
+
+ public void setPaymentId(Integer paymentId) {
+ this.paymentId = paymentId;
+ }
+
+ public BigDecimal getWriteOffAmt() {
+ return writeOffAmt;
+ }
+
+ public void setWriteOffAmt(BigDecimal writeOffAmt) {
+ this.writeOffAmt = writeOffAmt;
+ }
+
+ public Boolean getIsCustomer() {
+ return isCustomer;
+ }
+
+ public void setIsCustomer(Boolean isCustomer) {
+ this.isCustomer = isCustomer;
+ }
+
+ public Boolean getIsVendor() {
+ return isVendor;
+ }
+
+ public void setIsVendor(Boolean isVendor) {
+ this.isVendor = isVendor;
+ }
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/PaymentBean.java b/posterita/posterita/src/main/org/posterita/beans/PaymentBean.java
new file mode 100644
index 0000000000..aeb94b6e41
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/PaymentBean.java
@@ -0,0 +1,117 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+
+public class PaymentBean extends PaymentHistoryBean {
+ private AttributeValuesPair attributeValuesPair;
+ private String serno;
+
+ public Integer[] getInvoiceIds() {
+ return invoiceIds;
+ }
+
+ public void setInvoiceIds(Integer[] invoiceIds) {
+ this.invoiceIds = invoiceIds;
+ }
+
+ public BigDecimal[] getAllocateAmount() {
+ return allocateAmount;
+ }
+
+ public void setAllocateAmount(BigDecimal[] allocateAmount) {
+ this.allocateAmount = allocateAmount;
+ }
+
+
+ public BigDecimal getAllocatedAmount() {
+ return allocatedAmount;
+ }
+
+ public void setAllocatedAmount(BigDecimal allocatedAmount) {
+ this.allocatedAmount = allocatedAmount;
+ }
+
+ public Integer getBpartnerId() {
+ return bpartnerId;
+ }
+
+ public void setBpartnerId(Integer bpartnerId) {
+ this.bpartnerId = bpartnerId;
+ }
+
+ public AttributeValuesPair getAttributeValuesPair() {
+ return attributeValuesPair;
+ }
+
+ public void setAttributeValuesPair(AttributeValuesPair attributeValuesPair) {
+ this.attributeValuesPair = attributeValuesPair;
+ }
+
+ public String getSerno() {
+ return serno;
+ }
+
+ public void setSerno(String serno) {
+ this.serno = serno;
+ }
+
+ public String getTrxType() {
+ return trxType;
+ }
+
+ public void setTrxType(String trxType) {
+ this.trxType = trxType;
+ }
+
+ public String getChequeNo() {
+ return chequeNo;
+ }
+
+ public void setChequeNo(String chequeNo) {
+ this.chequeNo = chequeNo;
+ }
+
+ public String getCreditCardNumber() {
+ return creditCardNumber;
+ }
+
+ public void setCreditCardNumber(String creditCardNumber) {
+ this.creditCardNumber = creditCardNumber;
+ }
+
+ public BigDecimal getAmount() {
+ return amount;
+ }
+
+ public void setAmount(BigDecimal amount) {
+ this.amount = amount;
+ }
+
+ public Boolean getIsSoTrx() {
+ return isSoTrx;
+ }
+
+ public void setIsSoTrx(Boolean isSoTrx) {
+ this.isSoTrx = isSoTrx;
+ }
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/PaymentDetailsBean.java b/posterita/posterita/src/main/org/posterita/beans/PaymentDetailsBean.java
new file mode 100644
index 0000000000..6d5df4bf28
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/PaymentDetailsBean.java
@@ -0,0 +1,87 @@
+/**
+ *
+ * Copyright (c) 2008 Posterita. All Rights Reserved.
+ *
+ * This software is the confidential and proprietary information of
+ * Posterita. ("Confidential Information"). You shall not
+ * disclose such Confidential Information and shall use it only in
+ * accordance with the terms of the license agreement you entered into
+ * with Posterita.
+ *
+ * POSTERITA MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE
+ * SUITABILITY OF THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT
+ * NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR
+ * A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. TAMAK ICT SHALL NOT
+ * BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING,
+ * MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
+ *
+ * May 21, 2008 1:11:53 PM by praveen
+ *
+ */
+
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+
+import org.compiere.util.Env;
+
+public class PaymentDetailsBean
+{
+ private BigDecimal cashAmt = Env.ZERO;
+ private BigDecimal cardAmt = Env.ZERO;
+ private BigDecimal chequeAmt = Env.ZERO;
+ private BigDecimal writeOffAmt = Env.ZERO;
+ private BigDecimal discountAmt = Env.ZERO;
+ private BigDecimal tenderedAmt = Env.ZERO;
+ private BigDecimal refundedAmt = Env.ZERO;
+ private BigDecimal payAmt = Env.ZERO;
+
+ public BigDecimal getCashAmt() {
+ return cashAmt;
+ }
+ public void setCashAmt(BigDecimal cashAmt) {
+ this.cashAmt = cashAmt;
+ }
+ public BigDecimal getCardAmt() {
+ return cardAmt;
+ }
+ public void setCardAmt(BigDecimal cardAmt) {
+ this.cardAmt = cardAmt;
+ }
+ public BigDecimal getChequeAmt() {
+ return chequeAmt;
+ }
+ public void setChequeAmt(BigDecimal chequeAmt) {
+ this.chequeAmt = chequeAmt;
+ }
+ public BigDecimal getWriteOffAmt() {
+ return writeOffAmt;
+ }
+ public void setWriteOffAmt(BigDecimal writeOffAmt) {
+ this.writeOffAmt = writeOffAmt;
+ }
+ public BigDecimal getDiscountAmt() {
+ return discountAmt;
+ }
+ public void setDiscountAmt(BigDecimal discountAmt) {
+ this.discountAmt = discountAmt;
+ }
+ public BigDecimal getTenderedAmt() {
+ return tenderedAmt;
+ }
+ public void setTenderedAmt(BigDecimal tenderedAmt) {
+ this.tenderedAmt = tenderedAmt;
+ }
+ public BigDecimal getRefundedAmt() {
+ return refundedAmt;
+ }
+ public void setRefundedAmt(BigDecimal refundedAmt) {
+ this.refundedAmt = refundedAmt;
+ }
+ public BigDecimal getPayAmt() {
+ return payAmt;
+ }
+ public void setPayAmt(BigDecimal payAmt) {
+ this.payAmt = payAmt;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/PaymentHistoryBean.java b/posterita/posterita/src/main/org/posterita/beans/PaymentHistoryBean.java
new file mode 100644
index 0000000000..46c3e292ad
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/PaymentHistoryBean.java
@@ -0,0 +1,101 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on 05-Aug-2005 by alok
+ *
+ */
+package org.posterita.beans;
+
+import java.sql.Timestamp;
+
+
+public class PaymentHistoryBean extends FilterBean
+{
+ private MinOutHistoryBean minoutHistoryBean;
+
+ public MinOutHistoryBean getMinoutHistoryBean()
+ {
+ return minoutHistoryBean;
+ }
+
+ public void setMinoutHistoryBean(MinOutHistoryBean bean)
+ {
+ this.minoutHistoryBean = bean;
+ }
+
+ public String getCheckNo()
+ {
+ return checkNo;
+ }
+ public void setCheckNo(String checkNo)
+ {
+ this.checkNo = checkNo;
+ }
+ public Timestamp getDateTrx()
+ {
+ return dateTrx;
+ }
+ public void setDateTrx(Timestamp dateTrx)
+ {
+ this.dateTrx = dateTrx;
+ }
+
+ public Integer getInvoiceId()
+ {
+ return invoiceId;
+ }
+ public void setInvoiceId(Integer invoiceId)
+ {
+ this.invoiceId = invoiceId;
+ }
+ public String getIsReceipt()
+ {
+ return isReceipt;
+ }
+ public void setIsReceipt(String isReceipt)
+ {
+ this.isReceipt = isReceipt;
+ }
+ public Integer getOrderId()
+ {
+ return orderId;
+ }
+ public void setOrderId(Integer orderId)
+ {
+ this.orderId = orderId;
+ }
+
+ public Integer getPayAmt()
+ {
+ return payAmt;
+ }
+ public void setPayAmt(Integer payAmt)
+ {
+ this.payAmt = payAmt;
+ }
+ public Integer getPaymentId()
+ {
+ return paymentId;
+ }
+ public void setPaymentId(Integer paymentId)
+ {
+ this.paymentId = paymentId;
+ }
+
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/PaymentTermBean.java b/posterita/posterita/src/main/org/posterita/beans/PaymentTermBean.java
new file mode 100644
index 0000000000..11932bef0f
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/PaymentTermBean.java
@@ -0,0 +1,120 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on Oct 31, 2006
+ */
+
+
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+
+
+public class PaymentTermBean extends UDIBean
+{
+
+
+
+
+
+
+
+
+ public BigDecimal getDiscountAmt1() {
+ return discountAmt1;
+ }
+ public void setDiscountAmt1(BigDecimal discountAmt1) {
+ this.discountAmt1 = discountAmt1;
+ }
+ public BigDecimal getDiscountAmt2() {
+ return discountAmt2;
+ }
+ public void setDiscountAmt2(BigDecimal discountAmt2) {
+ this.discountAmt2 = discountAmt2;
+ }
+ public Integer getDiscountDay1() {
+ return discountDay1;
+ }
+ public void setDiscountDay1(Integer discountDay1) {
+ this.discountDay1 = discountDay1;
+ }
+ public Integer getDiscountDay2() {
+ return discountDay2;
+ }
+ public void setDiscountDay2(Integer discountDay2) {
+ this.discountDay2 = discountDay2;
+ }
+ public Boolean getAfterDelivery() {
+ return afterDelivery;
+ }
+ public void setAfterDelivery(Boolean afterDelivery) {
+ this.afterDelivery = afterDelivery;
+ }
+ public Integer getFiedMonthCutoff() {
+ return fiedMonthCutoff;
+ }
+ public void setFiedMonthCutoff(Integer fiedMonthCutoff) {
+ this.fiedMonthCutoff = fiedMonthCutoff;
+ }
+ public Boolean getFixedDueDate() {
+ return fixedDueDate;
+ }
+ public void setFixedDueDate(Boolean fixedDueDate) {
+ this.fixedDueDate = fixedDueDate;
+ }
+ public Integer getFixedMonthDay() {
+ return fixedMonthDay;
+ }
+ public void setFixedMonthDay(Integer fixedMonthDay) {
+ this.fixedMonthDay = fixedMonthDay;
+ }
+ public Integer getFixedMonthOffset() {
+ return fixedMonthOffset;
+ }
+ public void setFixedMonthOffset(Integer fixedMonthOffset) {
+ this.fixedMonthOffset = fixedMonthOffset;
+ }
+ public Boolean getNextBusinessday() {
+ return nextBusinessday;
+ }
+ public void setNextBusinessday(Boolean nextBusinessday) {
+ this.nextBusinessday = nextBusinessday;
+ }
+ public Integer getPaymentTermId() {
+ return paymentTermId;
+ }
+ public void setPaymentTermId(Integer paymentTermId) {
+ this.paymentTermId = paymentTermId;
+ }
+
+ public String getPaymentTermName() {
+ return paymentTermName;
+ }
+ public void setPaymentTermName(String paymentTermName) {
+ this.paymentTermName = paymentTermName;
+ }
+ public Integer getNetDays() {
+ return netDays;
+ }
+ public void setNetDays(Integer netDays) {
+ this.netDays = netDays;
+ }
+
+
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/PaymentTypeBean.java b/posterita/posterita/src/main/org/posterita/beans/PaymentTypeBean.java
new file mode 100644
index 0000000000..9ed016c96b
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/PaymentTypeBean.java
@@ -0,0 +1,47 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on Oct 25, 2006
+ */
+
+
+package org.posterita.beans;
+
+
+public class PaymentTypeBean
+{
+ protected String paymentType;
+
+ protected Integer id;
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public String getPaymentType() {
+ return paymentType;
+ }
+
+ public void setPaymentType(String paymentType) {
+ this.paymentType = paymentType;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/PopulateHistoryBean.java b/posterita/posterita/src/main/org/posterita/beans/PopulateHistoryBean.java
new file mode 100644
index 0000000000..0aec697136
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/PopulateHistoryBean.java
@@ -0,0 +1,37 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on 09-Aug-2005 by alok
+ *
+ */
+package org.posterita.beans;
+
+
+public class PopulateHistoryBean extends UDIBean
+{
+
+ protected String partnerName;
+ protected String DocStatus;
+ protected String isDelivered;
+ protected String isInvoiced;
+ protected String isPaid;
+ protected String isReceipt;
+ protected String isSotrx;
+
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/PriceListBean.java b/posterita/posterita/src/main/org/posterita/beans/PriceListBean.java
new file mode 100644
index 0000000000..03a7e2506d
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/PriceListBean.java
@@ -0,0 +1,280 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on Aug 19, 2005 by praveen
+ *
+ */
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+
+public class PriceListBean
+{
+ protected Boolean isDeleteOldRecords;
+ protected PriceListBean priceListBean;
+ protected ArrayList priceListBeanList;
+ protected Integer index;
+ protected BigDecimal stdPrice;
+ protected BigDecimal listPrice;
+ protected BigDecimal limitPrice;
+ protected Boolean isDefault;
+ protected Boolean isPresentForProduct;
+ protected Boolean isMandatory;
+ protected String orgName;
+ protected Boolean isSOPriceList;
+ protected Integer priceListVersionId;
+ protected Integer productId;
+ protected BigDecimal priceList;
+ protected Integer[] productIds;
+ protected String name;
+ protected Integer orgId;
+ protected Integer priceListId;
+ protected Boolean isActive;
+ protected Integer basePriceListId;
+ protected Boolean isCreatePriceList;
+ protected Boolean isTaxIncluded;
+
+ public Boolean getIsTaxIncluded()
+ {
+ return isTaxIncluded;
+ }
+
+ public void setIsTaxIncluded(Boolean isTaxIncluded)
+ {
+ this.isTaxIncluded = isTaxIncluded;
+ }
+
+ public Boolean getIsCreatePriceList()
+ {
+ return isCreatePriceList;
+ }
+
+ public void setIsCreatePriceList(Boolean isCreatePriceList)
+ {
+ this.isCreatePriceList = isCreatePriceList;
+ }
+
+ public Boolean getIsDeleteOldRecords()
+ {
+ return isDeleteOldRecords;
+ }
+
+ public void setIsDeleteOldRecords(Boolean isDeleteOldRecords)
+ {
+ this.isDeleteOldRecords = isDeleteOldRecords;
+ }
+
+ public PriceListBean getPriceListBean()
+ {
+ return priceListBean;
+ }
+
+ public void setPriceListBean(PriceListBean priceListBean)
+ {
+ this.priceListBean = priceListBean;
+ }
+
+ public ArrayList getPriceListBeanList()
+ {
+ return priceListBeanList;
+ }
+
+ public void setPriceListBeanList(ArrayList priceListBeanList)
+ {
+ this.priceListBeanList = priceListBeanList;
+ }
+
+ public Integer getIndex()
+ {
+ return index;
+ }
+
+ public void setIndex(Integer index)
+ {
+ this.index = index;
+ }
+
+ public BigDecimal getStdPrice()
+ {
+ return stdPrice;
+ }
+
+ public void setStdPrice(BigDecimal stdPrice)
+ {
+ this.stdPrice = stdPrice;
+ }
+
+ public BigDecimal getListPrice()
+ {
+ return listPrice;
+ }
+
+ public void setListPrice(BigDecimal listPrice)
+ {
+ this.listPrice = listPrice;
+ }
+
+ public BigDecimal getLimitPrice()
+ {
+ return limitPrice;
+ }
+
+ public void setLimitPrice(BigDecimal limitPrice)
+ {
+ this.limitPrice = limitPrice;
+ }
+
+ public Boolean getIsDefault()
+ {
+ return isDefault;
+ }
+
+ public void setIsDefault(Boolean isDefault)
+ {
+ this.isDefault = isDefault;
+ }
+
+ public Boolean getIsPresentForProduct()
+ {
+ return isPresentForProduct;
+ }
+
+ public void setIsPresentForProduct(Boolean isPresentForProduct)
+ {
+ this.isPresentForProduct = isPresentForProduct;
+ }
+
+ public Boolean getIsMandatory()
+ {
+ return isMandatory;
+ }
+
+ public void setIsMandatory(Boolean isMandatory)
+ {
+ this.isMandatory = isMandatory;
+ }
+
+ public String getOrgName()
+ {
+ return orgName;
+ }
+
+ public void setOrgName(String orgName)
+ {
+ this.orgName = orgName;
+ }
+
+ public Boolean getIsSOPriceList()
+ {
+ return isSOPriceList;
+ }
+
+ public void setIsSOPriceList(Boolean isSOPriceList)
+ {
+ this.isSOPriceList = isSOPriceList;
+ }
+
+ public Integer getPriceListVersionId()
+ {
+ return priceListVersionId;
+ }
+
+ public void setPriceListVersionId(Integer priceListVersionId)
+ {
+ this.priceListVersionId = priceListVersionId;
+ }
+
+ public Integer getProductId()
+ {
+ return productId;
+ }
+
+ public void setProductId(Integer productId)
+ {
+ this.productId = productId;
+ }
+
+ public BigDecimal getPriceList()
+ {
+ return priceList;
+ }
+
+ public void setPriceList(BigDecimal priceList)
+ {
+ this.priceList = priceList;
+ }
+
+ public Integer[] getProductIds()
+ {
+ return productIds;
+ }
+ public void setProductIds(Integer[] productIds)
+ {
+ this.productIds = productIds;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public Integer getOrgId()
+ {
+ return orgId;
+ }
+
+ public void setOrgId(Integer orgId)
+ {
+ this.orgId = orgId;
+ }
+
+ public Integer getPriceListId()
+ {
+ return priceListId;
+ }
+
+ public void setPriceListId(Integer priceListId)
+ {
+ this.priceListId = priceListId;
+ }
+
+ public Boolean getIsActive() {
+ return isActive;
+ }
+
+ public void setIsActive(Boolean isActive)
+ {
+ this.isActive = isActive;
+ }
+
+ public Integer getBasePriceListId()
+ {
+ return basePriceListId;
+ }
+
+ public void setBasePriceListId(Integer basePriceListId)
+ {
+ this.basePriceListId = basePriceListId;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/PrintBarcodeBean.java b/posterita/posterita/src/main/org/posterita/beans/PrintBarcodeBean.java
new file mode 100644
index 0000000000..0d77237e72
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/PrintBarcodeBean.java
@@ -0,0 +1,64 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 04-Oct-2006 10:41:05 by praveen
+ *
+ */
+
+package org.posterita.beans;
+
+public class PrintBarcodeBean
+{
+ private int qty;
+ private String title;
+ private String subtitle;
+ private String barcode;
+ private String price;
+
+ public String getBarcode() {
+ return barcode;
+ }
+ public void setBarcode(String barcode) {
+ this.barcode = barcode;
+ }
+ public String getPrice() {
+ return price;
+ }
+ public void setPrice(String price) {
+ this.price = price;
+ }
+ public int getQty() {
+ return qty;
+ }
+ public void setQty(int qty) {
+ this.qty = qty;
+ }
+ public String getSubtitle() {
+ return subtitle;
+ }
+ public void setSubtitle(String subtitle) {
+ this.subtitle = subtitle;
+ }
+ public String getTitle() {
+ return title;
+ }
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/ProductAttributeBean.java b/posterita/posterita/src/main/org/posterita/beans/ProductAttributeBean.java
new file mode 100644
index 0000000000..66f1ede656
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/ProductAttributeBean.java
@@ -0,0 +1,141 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on Jul 28, 2005 by praveen
+ *
+ */
+package org.posterita.beans;
+
+import java.util.ArrayList;
+
+public class ProductAttributeBean extends UDIBean
+{
+ private ArrayList attributeSets;
+ private ArrayList attributes;
+ private ArrayList attributeValues;
+
+ public String getAttribute()
+ {
+ return attribute;
+ }
+
+ public void setAttribute(String attribute)
+ {
+ this.attribute = attribute;
+ }
+
+ public Integer getAttributeId()
+ {
+ return attributeId;
+ }
+
+ public void setAttributeId(Integer attributeId)
+ {
+ this.attributeId = attributeId;
+ }
+
+ public Integer getAttributeSetId()
+ {
+ return attributeSetId;
+ }
+
+ public void setAttributeSetId(Integer attributeSetId)
+ {
+ this.attributeSetId = attributeSetId;
+ }
+
+ public String getAttributeValue()
+ {
+ return attributeValue;
+ }
+
+ public void setAttributeValue(String attributeValue)
+ {
+ this.attributeValue = attributeValue;
+ }
+
+ public ArrayList getAttributes()
+ {
+ return attributes;
+ }
+
+ public void setAttributes(ArrayList attributes)
+ {
+ this.attributes = attributes;
+ }
+
+ public ArrayList getAttributeSets()
+ {
+ return attributeSets;
+ }
+
+ public void setAttributeSets(ArrayList attributeSets)
+ {
+ this.attributeSets = attributeSets;
+ }
+
+ public ArrayList getAttributeValues()
+ {
+ return attributeValues;
+ }
+
+ public void setAttributeValues(ArrayList attributeValues)
+ {
+ this.attributeValues = attributeValues;
+ }
+
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public void setDescription(String description)
+ {
+ this.description = description;
+ }
+
+ public Integer getProductCategoryId()
+ {
+ return productCategoryId;
+ }
+
+ public void setProductCategoryId(Integer productCategoryId)
+ {
+ this.productCategoryId = productCategoryId;
+ }
+
+
+ public Integer getAttributeValueId() {
+ return attributeValueId;
+ }
+ public void setAttributeValueId(Integer attributeValueId) {
+ this.attributeValueId = attributeValueId;
+ }
+ public Boolean getShowActiveOnly() {
+ return showActiveOnly;
+ }
+ public void setShowActiveOnly(Boolean showActiveOnly) {
+ this.showActiveOnly = showActiveOnly;
+ }
+ public Integer getUpdateAttrValueId() {
+ return updateAttrValueId;
+ }
+ public void setUpdateAttrValueId(Integer updateAttrValueId) {
+ this.updateAttrValueId = updateAttrValueId;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/ProductAttributeValueBean.java b/posterita/posterita/src/main/org/posterita/beans/ProductAttributeValueBean.java
new file mode 100644
index 0000000000..3fb1ea95db
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/ProductAttributeValueBean.java
@@ -0,0 +1,69 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on Aug 31, 2005 by praveen
+ *
+ */
+package org.posterita.beans;
+
+public class ProductAttributeValueBean extends UDIBean
+{
+
+ protected String attrColour;
+ protected String attrModel;
+ protected String attrTrx;
+ protected String attrYear;
+
+ public String getAttrColour() {
+ return attrColour;
+ }
+ public void setAttrColour(String attrColour) {
+ this.attrColour = attrColour;
+ }
+ public String getAttrModel() {
+ return attrModel;
+ }
+ public void setAttrModel(String attrModel) {
+ this.attrModel = attrModel;
+ }
+ public String getAttrTrx() {
+ return attrTrx;
+ }
+ public void setAttrTrx(String attrTrx) {
+ this.attrTrx = attrTrx;
+ }
+ public String getAttrYear() {
+ return attrYear;
+ }
+ public void setAttrYear(String attrYear) {
+ this.attrYear = attrYear;
+ }
+ public Integer getProductId() {
+ return productId;
+ }
+ public void setProductId(Integer productId) {
+ this.productId = productId;
+ }
+ public String getProductName() {
+ return productName;
+ }
+ public void setProductName(String productName) {
+ this.productName = productName;
+ }
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/ProductBean.java b/posterita/posterita/src/main/org/posterita/beans/ProductBean.java
new file mode 100644
index 0000000000..f18371ffc7
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/ProductBean.java
@@ -0,0 +1,935 @@
+/*
+ *
+ * Copyright (c) 2005 UDI Ltd. All Rights Reserved.
+ *
+ * This software is the confidential and proprietary information of UDI Ltd.
+ * ("Confidential Information"). You shall not disclose such Confidential
+ * Information and shall use it only in accordance with the terms of the license
+ * agreement you entered into with UDI.
+ *
+ * UDI MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
+ * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
+ * NON-INFRINGEMENT. UDI SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY
+ * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS
+ * DERIVATIVES.
+ *
+ */
+
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.HashMap;
+
+import org.apache.struts.upload.FormFile;
+import org.compiere.util.Env;
+
+public class ProductBean extends UDIBean implements Comparable
+{
+
+ protected Integer attributeSetId;
+ protected Integer mAttrSetInstanceId;
+ protected Boolean isEditable;
+ protected Boolean isTaxIncluded;
+ private String productName;
+ private BigDecimal qtyOnHand = Env.ZERO;
+ private BigDecimal qtyReserved = Env.ZERO;
+ private BigDecimal qtyOrdered = Env.ZERO;
+ private BigDecimal qtyToMove;
+ private Integer productId;
+ private BigDecimal priceList;
+ private BigDecimal priceLimit;
+ private BigDecimal priceStandard;
+ private Integer orgId;
+
+ //this is the attributeSetInstance corresponding to the serial number
+ private Integer sernoAttributeSetInstance;
+
+ //attributeSetInstance for model/colour/transmission/year
+ private Integer attributeSetInstanceId;
+
+ private Integer priceListVersionId;
+
+ private Integer locatorId;
+
+ private String regionName;
+
+ private ArrayList orderLineList;
+
+ private ArrayList productInstances;
+
+ private String priceListName;
+
+ private String orgName;
+
+ private String serno;
+
+ private AttributeValuesPair attributeValuesPair;
+
+ private Integer productCategoryId;
+
+// Y/N
+private String isOwnedByWholesaler;
+
+private String isNatisReleased;
+
+private String reserveStatus;
+
+private String warehouseName;
+
+private String ETA;
+
+private ProductImageInfo imageInfo;
+
+private HashMap attributeValuesMap;
+
+private String description;
+
+private String imageLink;
+private String textLink;
+
+private String customSize;
+
+private String group1;
+
+private String group2;
+
+private Integer uomId;
+
+private String productCategoryName;
+
+private String taxCategoryName;
+
+ public Integer getTaxCategoryId() {
+ return taxCategoryId;
+ }
+ public void setTaxCategoryId(Integer taxCategoryId) {
+ this.taxCategoryId = taxCategoryId;
+ }
+ public String getTaxCategoryName() {
+ return taxCategoryName;
+ }
+ public void setTaxCategoryName(String taxCategoryName) {
+ this.taxCategoryName = taxCategoryName;
+ }
+ public String getPartnerName() {
+ return partnerName;
+ }
+ public void setPartnerName(String partnerName) {
+ this.partnerName = partnerName;
+ }
+ public Integer getBpartnerId() {
+ return bpartnerId;
+ }
+ public void setBpartnerId(Integer bpartnerId) {
+ this.bpartnerId = bpartnerId;
+ }
+ public String getBarCode() {
+ return barCode;
+ }
+ public void setBarCode(String barCode) {
+ this.barCode = barCode;
+ }
+ //TODO refactor this
+ private ArrayList availableColours;
+
+ private ArrayList availableSizes;
+
+
+ public Integer getLicensingDistrictId()
+ {
+ return licensingDistrictId;
+ }
+ public void setLicensingDistrictId(Integer licensingDistrictId) {
+ this.licensingDistrictId = licensingDistrictId;
+ }
+
+ public String getReserveStatus()
+ {
+ return reserveStatus;
+ }
+
+ public void setReserveStatus(String reserveStatus)
+ {
+ this.reserveStatus = reserveStatus;
+ }
+
+ public String getIsOwnedByWholesaler()
+ {
+ return isOwnedByWholesaler;
+ }
+
+ public void setIsOwnedByWholesaler(String isOwnedByWholesaler)
+ {
+ this.isOwnedByWholesaler = isOwnedByWholesaler;
+ }
+
+
+ public BigDecimal getQuantity()
+ {
+ return quantity;
+ }
+ public void setQuantity(BigDecimal quantity)
+ {
+ this.quantity = quantity;
+ }
+ public ArrayList getOrderLineList()
+ {
+ return orderLineList;
+ }
+
+ public void setOrderLineList(ArrayList orderLineList)
+ {
+ this.orderLineList = orderLineList;
+ }
+
+ public String getProductName()
+ {
+ return productName;
+ }
+
+ public void setProductName(String productName)
+ {
+ this.productName = productName;
+ }
+
+ public BigDecimal getQtyOnHand()
+ {
+ return qtyOnHand;
+ }
+
+ public void setQtyOnHand(BigDecimal qtyOnHand)
+ {
+ this.qtyOnHand = qtyOnHand;
+ }
+
+ public Integer getProductId()
+ {
+ return productId;
+ }
+
+ public void setProductId(Integer productId)
+ {
+ this.productId = productId;
+ }
+
+ public BigDecimal getPriceList()
+ {
+ return priceList;
+ }
+
+ public void setPriceList(BigDecimal priceList)
+ {
+ this.priceList = priceList;
+ }
+
+ public BigDecimal getPriceLimit()
+ {
+ return priceLimit;
+ }
+
+ public void setPriceLimit(BigDecimal priceLimit)
+ {
+ this.priceLimit = priceLimit;
+ }
+
+ public BigDecimal getPriceStandard()
+ {
+ return priceStandard;
+ }
+
+ public void setPriceStandard(BigDecimal priceStandard)
+ {
+ this.priceStandard = priceStandard;
+ }
+
+ public ArrayList getProductInstances()
+ {
+ return productInstances;
+ }
+
+ public void setProductInstances(ArrayList productInstances)
+ {
+ this.productInstances = productInstances;
+ }
+
+ public Integer getAttributeSetInstanceId()
+ {
+ return attributeSetInstanceId;
+ }
+
+ public void setAttributeSetInstanceId(Integer attributeSetInstanceId)
+ {
+ this.attributeSetInstanceId = attributeSetInstanceId;
+ }
+
+ public Integer getLocatorId()
+ {
+ return locatorId;
+ }
+
+ public void setLocatorId(Integer locatorId)
+ {
+ this.locatorId = locatorId;
+ }
+
+ public Integer getOrgId()
+ {
+ return orgId;
+ }
+
+ public void setOrgId(Integer orgId)
+ {
+ this.orgId = orgId;
+ }
+
+ public BigDecimal getQtyReserved()
+ {
+ return qtyReserved;
+ }
+
+ public void setQtyReserved(BigDecimal qtyReserved)
+ {
+ this.qtyReserved = qtyReserved;
+ }
+
+ public BigDecimal getQtyOrdered()
+ {
+ return qtyOrdered;
+ }
+
+ public void setQtyOrdered(BigDecimal qtyOrdered)
+ {
+ this.qtyOrdered = qtyOrdered;
+ }
+
+ public String getOrgName()
+ {
+ return orgName;
+ }
+
+ public void setOrgName(String orgName)
+ {
+ this.orgName = orgName;
+ }
+
+
+ public int compareTo(Object o)
+ {
+ if (o == null && this.getProductId() == null)
+ return -1;
+
+ ProductBean bean = (ProductBean) o;
+
+ return (bean.getProductId().compareTo(this.getProductId()));
+ }
+
+ public boolean equals(Object obj)
+ {
+ ProductBean bean = (ProductBean) obj;
+
+ if ( obj == null)
+ return false;
+
+ if (bean.getProductId().intValue() == this.getProductId().intValue())
+ return true;
+
+ return false;
+ }
+
+ public Integer getSernoAttributeSetInstance()
+ {
+ return sernoAttributeSetInstance;
+ }
+
+ public void setSernoAttributeSetInstance(Integer sernoAttributeSetInstance)
+ {
+ this.sernoAttributeSetInstance = sernoAttributeSetInstance;
+ }
+
+ public String getRegionName()
+ {
+ return regionName;
+ }
+
+ public void setRegionName(String regionName)
+ {
+ this.regionName = regionName;
+ }
+
+ public void setSerno(String serno)
+ {
+ this.serno = serno;
+ }
+
+ public String getSerno()
+ {
+ return serno;
+ }
+
+
+ public String getIsNatisReleased()
+ {
+ return isNatisReleased;
+ }
+
+ public void setIsNatisReleased(String isNatisReleased)
+ {
+ this.isNatisReleased = isNatisReleased;
+ }
+
+ public String getPriceListName()
+ {
+ return priceListName;
+ }
+
+ public void setPriceListName(String priceListName)
+ {
+ this.priceListName = priceListName;
+ }
+
+ public Integer getPriceListVersionId()
+ {
+ return priceListVersionId;
+ }
+
+ public void setPriceListVersionId(Integer priceListVersionId)
+ {
+ this.priceListVersionId = priceListVersionId;
+ }
+
+ public Integer[] getCheckBox()
+ {
+ return checkBox;
+ }
+ public void setCheckBox(Integer [] checkBox)
+ {
+ this.checkBox = checkBox;
+ }
+
+
+ public AttributeValuesPair getAttributeValuesPair()
+ {
+ return attributeValuesPair;
+ }
+
+ public void setAttributeValuesPair(AttributeValuesPair attributeValuesPair)
+ {
+ this.attributeValuesPair = attributeValuesPair;
+ }
+
+
+ public String getEngineNo() {
+ return engineNo;
+ }
+ public void setEngineNo(String engineNo) {
+ this.engineNo = engineNo;
+ }
+
+ public Integer getProductCategoryId()
+ {
+ return productCategoryId;
+ }
+
+ public void setProductCategoryId(Integer productCategoryId)
+ {
+ this.productCategoryId = productCategoryId;
+ }
+
+ public String getWarehouseType()
+ {
+ return warehouseType;
+ }
+
+ public void setWarehouseType(String warehouseType)
+ {
+ this.warehouseType = warehouseType;
+ }
+
+ public String toString()
+ {
+ return this.getProductName();
+ }
+
+ public String getWarehouseName()
+ {
+ return warehouseName;
+ }
+
+ public void setWarehouseName(String warehouseName)
+ {
+ this.warehouseName = warehouseName;
+ }
+
+ public Integer getWarehouseId()
+ {
+ return warehouseId;
+ }
+
+ public void setWarehouseId(Integer warehouseId)
+ {
+ this.warehouseId = warehouseId;
+ }
+
+ public String getETA()
+ {
+ return ETA;
+ }
+ public void setETA(String eta)
+ {
+ ETA = eta;
+ }
+
+ public Integer[] getProductIds()
+ {
+ return productIds;
+ }
+
+ public void setProductIds(Integer[] productIds)
+ {
+ this.productIds = productIds;
+ }
+
+ public ProductImageInfo getImageInfo()
+ {
+ return imageInfo;
+ }
+ public void setImageInfo(ProductImageInfo imageInfo)
+ {
+ this.imageInfo = imageInfo;
+ }
+
+ public HashMap getAttributeValuesMap()
+ {
+ return attributeValuesMap;
+ }
+
+ public void setAttributeValuesMap(HashMap attributeValuesMap)
+ {
+ this.attributeValuesMap = attributeValuesMap;
+ }
+
+
+ public String getDescription()
+ {
+ return description;
+ }
+ public void setDescription(String description)
+ {
+ this.description = description;
+ }
+
+ public ArrayList getAvailableColours()
+ {
+ return availableColours;
+ }
+ public void setAvailableColours(ArrayList availableColours)
+ {
+ this.availableColours = availableColours;
+ }
+ public ArrayList getAvailableSizes()
+ {
+ return availableSizes;
+ }
+ public void setAvailableSizes(ArrayList availableSizes)
+ {
+ this.availableSizes = availableSizes;
+ }
+
+ public Integer getAttributeId()
+ {
+ return attributeId;
+ }
+
+ public void setAttributeId(Integer attributeId)
+ {
+ this.attributeId = attributeId;
+ }
+
+
+ public String getImageLink()
+ {
+ return imageLink;
+ }
+
+ public void setImageLink(String imageLink)
+ {
+ this.imageLink = imageLink;
+ }
+
+ public String getTextLink()
+ {
+ return textLink;
+ }
+
+ public void setTextLink(String textLink)
+ {
+ this.textLink = textLink;
+ }
+ public String getCurrency()
+ {
+ return currency;
+ }
+ public void setCurrency(String currency)
+ {
+ this.currency = currency;
+ }
+
+ public String getSalesPriceLimit() {
+ return salesPriceLimit;
+ }
+ public void setSalesPriceLimit(String salesPriceLimit) {
+ this.salesPriceLimit = salesPriceLimit;
+ }
+ public String getSalesPriceList() {
+ return salesPriceList;
+ }
+ public void setSalesPriceList(String salesPriceList) {
+ this.salesPriceList = salesPriceList;
+ }
+ public String getSalesPriceStandard() {
+ return salesPriceStandard;
+ }
+ public void setSalesPriceStandard(String salesPriceStandard) {
+ this.salesPriceStandard = salesPriceStandard;
+ }
+
+
+ public String getBrandName() {
+ return brandName;
+ }
+ public void setBrandName(String brandName) {
+ this.brandName = brandName;
+ }
+ public String getColourName() {
+ return colourName;
+ }
+ public void setColourName(String colourName) {
+ this.colourName = colourName;
+ }
+ public String getDesignName() {
+ return designName;
+ }
+ public void setDesignName(String designName) {
+ this.designName = designName;
+ }
+ public String getSizeName() {
+ return sizeName;
+ }
+ public void setSizeName(String sizeName) {
+ this.sizeName = sizeName;
+ }
+ public String[] getSizes()
+ {
+ return sizes;
+ }
+ public void setSizes(String[] sizes)
+ {
+ this.sizes = sizes;
+ }
+
+
+
+ public String getPurchasePriceLimit() {
+ return purchasePriceLimit;
+ }
+ public void setPurchasePriceLimit(String purchasePriceLimit) {
+ this.purchasePriceLimit = purchasePriceLimit;
+ }
+ public String getPurchasePriceList() {
+ return purchasePriceList;
+ }
+ public void setPurchasePriceList(String purchasePriceList) {
+ this.purchasePriceList = purchasePriceList;
+ }
+ public String getPurchasePriceStandard() {
+ return purchasePriceStandard;
+ }
+ public void setPurchasePriceStandard(String purchasePriceStandard) {
+ this.purchasePriceStandard = purchasePriceStandard;
+ }
+ public String getModelName() {
+ return modelName;
+ }
+ public void setModelName(String modelName) {
+ this.modelName = modelName;
+ }
+ public String getRevenueRecognition() {
+ return revenueRecognition;
+ }
+ public void setRevenueRecognition(String revenueRecognition) {
+ this.revenueRecognition = revenueRecognition;
+ }
+ public Integer getAttributeSetId() {
+ return attributeSetId;
+ }
+ public void setAttributeSetId(Integer attributeSetId) {
+ this.attributeSetId = attributeSetId;
+ }
+ public Integer getMAttrSetInstanceId() {
+ return mAttrSetInstanceId;
+ }
+ public void setMAttrSetInstanceId(Integer attrSetInstanceId) {
+ mAttrSetInstanceId = attrSetInstanceId;
+ }
+ public Integer getRevenueRecoId() {
+ return revenueRecoId;
+ }
+ public void setRevenueRecoId(Integer revenueRecoId) {
+ this.revenueRecoId = revenueRecoId;
+ }
+
+ public String getProductType() {
+ return productType;
+ }
+ public void setProductType(String productType) {
+ this.productType = productType;
+ }
+
+ public Boolean getIsActive() {
+ return isActive;
+ }
+ public void setIsActive(Boolean isActive) {
+ this.isActive = isActive;
+ }
+ public BigDecimal getTaxRate() {
+ return taxRate;
+ }
+ public void setTaxRate(BigDecimal taxRate) {
+ this.taxRate = taxRate;
+ }
+ public String getCustomSize() {
+ return customSize;
+ }
+ public void setCustomSize(String customSize) {
+ this.customSize = customSize;
+ }
+ public String getProductClassification()
+ {
+ return productClassification;
+ }
+ public void setProductClassification(String productClassification)
+ {
+ this.productClassification = productClassification;
+ }
+ public String getKeyword2()
+ {
+ return keyword2;
+ }
+ public void setKeyword2(String keyword2)
+ {
+ this.keyword2 = keyword2;
+ }
+
+ public Boolean getIsSelfService()
+ {
+ return isSelfService;
+ }
+
+ public void setIsSelfService(Boolean isSelfService)
+ {
+ this.isSelfService = isSelfService;
+ }
+
+ public FormFile getFile() {
+ return file;
+ }
+ public void setFile(FormFile file) {
+ this.file = file;
+ }
+ public String getGroup1() {
+ return group1;
+ }
+ public void setGroup1(String group1) {
+ this.group1 = group1;
+ }
+ public String getGroup2() {
+ return group2;
+ }
+ public void setGroup2(String group2) {
+ this.group2 = group2;
+ }
+ public Integer getUomId() {
+ return uomId;
+ }
+ public void setUomId(Integer uomId) {
+ this.uomId = uomId;
+
+ }
+ public Boolean getIsEditable() {
+ return isEditable;
+ }
+ public void setIsEditable(Boolean isEditable) {
+ this.isEditable = isEditable;
+ }
+ public String getUom()
+ {
+ return uom;
+ }
+ public void setUom(String uom)
+ {
+ this.uom = uom;
+ }
+ public BigDecimal getQtyToMove()
+ {
+ return qtyToMove;
+ }
+ public void setQtyToMove(BigDecimal qtyToMove)
+ {
+ this.qtyToMove = qtyToMove;
+ }
+ public Integer getOrgFromId()
+ {
+ return this.orgFromId;
+ }
+ public void setOrgFromId(Integer orgFromId)
+ {
+ this.orgFromId = orgFromId;
+ }
+ public Integer getOrgToId()
+ {
+ return orgToId;
+ }
+ public void setOrgToId(Integer orgToId)
+ {
+ this.orgToId = orgToId;
+ }
+ //
+ public BigDecimal getStdPrice()
+ {
+ return stdPrice;
+ }
+
+ public void setStdPrice(BigDecimal stdPrice)
+ {
+ this.stdPrice = stdPrice;
+ }
+
+ public BigDecimal getListPrice()
+ {
+ return listPrice;
+ }
+
+ public void setListPrice(BigDecimal listPrice)
+ {
+ this.listPrice = listPrice;
+ }
+
+ public BigDecimal getLimitPrice()
+ {
+ return limitPrice;
+ }
+
+ public void setLimitPrice(BigDecimal limitPrice)
+ {
+ this.limitPrice = limitPrice;
+ }
+
+ public Boolean getIsDefault()
+ {
+ return isDefault;
+ }
+
+ public void setIsDefault(Boolean isDefault)
+ {
+ this.isDefault = isDefault;
+ }
+
+ public Boolean getIsPresentForProduct()
+ {
+ return isPresentForProduct;
+ }
+
+ public void setIsPresentForProduct(Boolean isPresentForProduct)
+ {
+ this.isPresentForProduct = isPresentForProduct;
+ }
+
+ public Boolean getIsMandatory()
+ {
+ return isMandatory;
+ }
+
+ public void setIsMandatory(Boolean isMandatory)
+ {
+ this.isMandatory = isMandatory;
+ }
+
+ public Boolean getIsSOPriceList()
+ {
+ return isSOPriceList;
+ }
+
+ public void setIsSOPriceList(Boolean isSOPriceList)
+ {
+ this.isSOPriceList = isSOPriceList;
+ }
+ public Integer getPriceListId()
+ {
+ return priceListId;
+ }
+
+ public void setPriceListId(Integer priceListId)
+ {
+ this.priceListId = priceListId;
+ }
+ public ProductBean getProductBean()
+ {
+ return productBean;
+ }
+
+ public void setProductBean(ProductBean productBean)
+ {
+ this.productBean = productBean;
+ }
+
+ public ArrayList getProductBeanList()
+ {
+ return productBeanList;
+ }
+
+ public void setProductBeanList(ArrayList productBeanList)
+ {
+ this.productBeanList = productBeanList;
+ }
+ public String getProductCategoryName() {
+ return productCategoryName;
+ }
+ public void setProductCategoryName(String productCategoryName) {
+ this.productCategoryName = productCategoryName;
+ }
+ public BigDecimal getListPriceIncl() {
+ return listPriceIncl;
+ }
+ public void setListPriceIncl(BigDecimal listPriceIncl) {
+ this.listPriceIncl = listPriceIncl;
+ }
+ public BigDecimal getStdPriceIncl() {
+ return stdPriceIncl;
+ }
+ public void setStdPriceIncl(BigDecimal stdPriceIncl) {
+ this.stdPriceIncl = stdPriceIncl;
+ }
+ public BigDecimal getLimitPriceIncl() {
+ return limitPriceIncl;
+ }
+ public void setLimitPriceIncl(BigDecimal limitPriceIncl) {
+ this.limitPriceIncl = limitPriceIncl;
+ }
+ public Boolean getIsTaxIncluded() {
+ return isTaxIncluded;
+ }
+ public void setIsTaxIncluded(Boolean isTaxIncluded) {
+ this.isTaxIncluded = isTaxIncluded;
+ }
+ public Integer getUnitsPerPack()
+ {
+ return unitsPerPack;
+ }
+ public void setUnitsPerPack(Integer unitsPerPack)
+ {
+ this.unitsPerPack = unitsPerPack;
+ }
+
+}
\ No newline at end of file
diff --git a/posterita/posterita/src/main/org/posterita/beans/ProductCategoryBean.java b/posterita/posterita/src/main/org/posterita/beans/ProductCategoryBean.java
new file mode 100644
index 0000000000..bd6eed6b3e
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/ProductCategoryBean.java
@@ -0,0 +1,42 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Created on May 9, 2006
+ */
+
+
+package org.posterita.beans;
+
+
+public class ProductCategoryBean extends UDIBean
+{
+
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+ public Integer getProductCategoryId() {
+ return productCategoryId;
+ }
+ public void setProductCategoryId(Integer productCategoryId) {
+ this.productCategoryId = productCategoryId;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/ProductDetailsBean.java b/posterita/posterita/src/main/org/posterita/beans/ProductDetailsBean.java
new file mode 100644
index 0000000000..608caf241d
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/ProductDetailsBean.java
@@ -0,0 +1,130 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ **/
+
+/**
+ @author ashley
+ */
+
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+
+public class ProductDetailsBean extends UDIBean
+{
+
+ public Integer getProductId()
+ {
+ return productId;
+ }
+
+ public void setProductId(Integer productId)
+ {
+ this.productId = productId;
+ }
+
+ public String getBarCode()
+ {
+ return barCode;
+ }
+
+ public void setBarCode(String barCode)
+ {
+ this.barCode = barCode;
+ }
+
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public void setDescription(String description)
+ {
+ this.description = description;
+ }
+
+ public Boolean getHasImage()
+ {
+ return hasImage;
+ }
+
+ public void setHasImage(Boolean hasImage)
+ {
+ this.hasImage = hasImage;
+ }
+
+ public String getProductName()
+ {
+ return productName;
+ }
+
+ public void setProductName(String productName)
+ {
+ this.productName = productName;
+ }
+
+ public String getRevenueRecognition()
+ {
+ return revenueRecognition;
+ }
+
+ public void setRevenueRecognition(String revenueRecognition)
+ {
+ this.revenueRecognition = revenueRecognition;
+ }
+
+ public Double getStdPurchasePrice()
+ {
+ return stdPurchasePrice;
+ }
+
+ public void setStdPurchasePrice(Double stdPurchasePrice)
+ {
+ this.stdPurchasePrice = stdPurchasePrice;
+ }
+
+ public Double getStdSalesPrice()
+ {
+ return stdSalesPrice;
+ }
+
+ public void setStdSalesPrice(Double stdSalesPrice)
+ {
+ this.stdSalesPrice = stdSalesPrice;
+ }
+
+ public String getTaxCategoryName()
+ {
+ return taxCategoryName;
+ }
+
+ public void setTaxCategoryName(String taxCategoryName)
+ {
+ this.taxCategoryName = taxCategoryName;
+ }
+
+ public BigDecimal getQuantity() {
+ return quantity;
+ }
+
+ public void setQuantity(BigDecimal quantity) {
+ this.quantity = quantity;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/ProductImageBean.java b/posterita/posterita/src/main/org/posterita/beans/ProductImageBean.java
new file mode 100644
index 0000000000..ed9c2a1421
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/ProductImageBean.java
@@ -0,0 +1,158 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on Mar 14, 2006 by praveen
+ *
+ */
+package org.posterita.beans;
+
+import java.util.ArrayList;
+
+import org.apache.struts.upload.FormFile;
+
+import org.posterita.businesslogic.administration.ProductManager;
+
+
+public class ProductImageBean extends UDIBean
+{
+ public Integer getProductId() {
+ return productId;
+ }
+ public void setProductId(Integer productId) {
+ this.productId = productId;
+ }
+ public FormFile getFile() {
+ return file;
+ }
+ public void setFile(FormFile file) {
+ this.file = file;
+ }
+ public Integer[] getProductIds() {
+ return productIds;
+ }
+ public void setProductIds(Integer[] productIds) {
+ this.productIds = productIds;
+ }
+ public String getBrandName()
+ {
+ return brandName;
+ }
+ public void setBrandName(String brandName)
+ {
+ this.brandName = brandName;
+ }
+ public String getColourName()
+ {
+ return colourName;
+ }
+ public void setColourName(String colourName)
+ {
+ this.colourName = colourName;
+ }
+ public String getDesignName()
+ {
+ return designName;
+ }
+ public void setDesignName(String designName)
+ {
+ this.designName = designName;
+ }
+ public String getModelName()
+ {
+ return modelName;
+ }
+ public void setModelName(String modelName)
+ {
+ this.modelName = modelName;
+ }
+ public String getKeyword1()
+ {
+ return keyword1;
+ }
+ public void setKeyword1(String keyword1)
+ {
+ this.keyword1 = keyword1;
+ }
+ public String getKeyword2()
+ {
+ return keyword2;
+ }
+ public void setKeyword2(String keyword2)
+ {
+ this.keyword2 = keyword2;
+ }
+ public String[] getSizes()
+ {
+ return sizes;
+ }
+ public void setSizes(String[] sizes)
+ {
+ this.sizes = sizes;
+ }
+
+ public String toString()
+ {
+ StringBuffer productName = new StringBuffer();
+ productName.append(brandName + ProductManager.PRODUCT_ATTRIBUTES_DELIMETER);
+ productName.append(designName + ProductManager.PRODUCT_ATTRIBUTES_DELIMETER);
+ productName.append(modelName + ProductManager.PRODUCT_ATTRIBUTES_DELIMETER);
+ productName.append(colourName + ProductManager.PRODUCT_ATTRIBUTES_DELIMETER);
+
+ return productName.toString();
+ }
+ public String getKeyword3()
+ {
+ return keyword3;
+ }
+ public void setKeyword3(String keyword3)
+ {
+ this.keyword3 = keyword3;
+ }
+ public String getKeyword4()
+ {
+ return keyword4;
+ }
+ public void setKeyword4(String keyword4)
+ {
+ this.keyword4 = keyword4;
+ }
+ public String getImageName()
+ {
+ return imageName;
+ }
+ public void setImageName(String imageName)
+ {
+ this.imageName = imageName;
+ }
+ public ArrayList getProductsList()
+ {
+ return productsList;
+ }
+ public void setProductsList(ArrayList productsList)
+ {
+ this.productsList = productsList;
+ }
+ public String getBarCode()
+ {
+ return barCode;
+ }
+ public void setBarCode(String barCode)
+ {
+ this.barCode = barCode;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/ProductImageInfo.java b/posterita/posterita/src/main/org/posterita/beans/ProductImageInfo.java
new file mode 100644
index 0000000000..1069e34348
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/ProductImageInfo.java
@@ -0,0 +1,59 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on Mar 15, 2006 by praveen
+ *
+ */
+package org.posterita.beans;
+
+public class ProductImageInfo
+{
+ private Integer productId;
+ private Boolean hasAttachment;
+ private String model;
+
+ public Boolean getHasAttachment() {
+ return hasAttachment;
+ }
+ public void setHasAttachment(Boolean hasAttachment) {
+ this.hasAttachment = hasAttachment;
+ }
+ public String getModel() {
+ return model;
+ }
+ public void setModel(String model) {
+ this.model = model;
+ }
+ public Integer getProductId() {
+ return productId;
+ }
+ public void setProductId(Integer productId) {
+ this.productId = productId;
+ }
+ private String productName;
+
+
+ public String getProductName()
+ {
+ return productName;
+ }
+ public void setProductName(String productName)
+ {
+ this.productName = productName;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/ProductInfo.java b/posterita/posterita/src/main/org/posterita/beans/ProductInfo.java
new file mode 100644
index 0000000000..b393f07e28
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/ProductInfo.java
@@ -0,0 +1,131 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
+package org.posterita.beans;
+
+import java.sql.Timestamp;
+import java.util.ArrayList;
+
+
+public class ProductInfo implements Comparable
+{
+ private AttributeValuesBean attributeValuesBean = new AttributeValuesBean();
+ private ArrayList products = new ArrayList();
+ private ArrayList regions = new ArrayList();
+ private ArrayList reservedStatusValues = new ArrayList();
+ private ArrayList warehouseTypes = new ArrayList();
+ private ArrayList organisations = new ArrayList();
+ private ArrayList warehouseNames = new ArrayList();
+ private Integer productCategoryId;
+ private Timestamp ETA;
+
+ public ArrayList getOrganisations()
+ {
+ return organisations;
+ }
+ public void setOrganisations(ArrayList organisations)
+ {
+ this.organisations = organisations;
+ }
+
+
+ public AttributeValuesBean getAttributeValuesBean()
+ {
+ return attributeValuesBean;
+ }
+
+ public void setAttributeValuesBean(AttributeValuesBean attributeValuesBean)
+ {
+ this.attributeValuesBean = attributeValuesBean;
+ }
+
+ public ArrayList getProducts()
+ {
+ return products;
+ }
+
+ public void setProducts(ArrayList products)
+ {
+ this.products = products;
+ }
+
+ public void setRegions(ArrayList regions)
+ {
+ this.regions = regions;
+ }
+
+ public ArrayList getRegions()
+ {
+ return regions;
+ }
+
+ public ArrayList getReservedStatusValues()
+ {
+ return reservedStatusValues;
+ }
+
+ public void setReservedStatusValues(ArrayList reservedStatusValues)
+ {
+ this.reservedStatusValues = reservedStatusValues;
+ }
+
+ public Integer getProductCategoryId()
+ {
+ return productCategoryId;
+ }
+
+ public void setProductCategoryId(Integer productCategoryId)
+ {
+ this.productCategoryId = productCategoryId;
+ }
+
+ public ArrayList getWarehouseTypes()
+ {
+ return warehouseTypes;
+ }
+
+ public void setWarehouseTypes(ArrayList warehouseTypes)
+ {
+ this.warehouseTypes = warehouseTypes;
+ }
+
+ public ArrayList getWarehouseNames()
+ {
+ return warehouseNames;
+ }
+
+ public void setWarehouseNames(ArrayList warehouseNames)
+ {
+ this.warehouseNames = warehouseNames;
+ }
+
+ public int compareTo(Object o)
+ {
+ return 0;
+ }
+
+ public Timestamp getETA()
+ {
+ return ETA;
+ }
+ public void setETA(Timestamp eta)
+ {
+ ETA = eta;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/ProductInfoBean.java b/posterita/posterita/src/main/org/posterita/beans/ProductInfoBean.java
new file mode 100644
index 0000000000..63652fd231
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/ProductInfoBean.java
@@ -0,0 +1,27 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on Aug 31, 2005 by praveen
+ *
+ */
+package org.posterita.beans;
+
+public class ProductInfoBean extends StockBean
+{
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/ProductInstanceBean.java b/posterita/posterita/src/main/org/posterita/beans/ProductInstanceBean.java
new file mode 100644
index 0000000000..1e0c564b4d
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/ProductInstanceBean.java
@@ -0,0 +1,81 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
+package org.posterita.beans;
+
+public class ProductInstanceBean
+{
+ private int attributeSetInstanceId;
+ private int attributeId;
+ private String serNo;
+ private String description;
+ private int qtyOnHand;
+
+ public int getAttributeSetInstanceId()
+ {
+ return attributeSetInstanceId;
+ }
+
+ public void setAttributeSetInstanceId(int attributeSetInstanceId)
+ {
+ this.attributeSetInstanceId = attributeSetInstanceId;
+ }
+
+ public int getAttributeId()
+ {
+ return attributeId;
+ }
+
+ public void setAttributeId(int attributeId)
+ {
+ this.attributeId = attributeId;
+ }
+
+ public String getSerno()
+ {
+ return serNo;
+ }
+
+ public void setSerno(String serno)
+ {
+ this.serNo = serno;
+ }
+
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public void setDescription(String description)
+ {
+ this.description = description;
+ }
+
+ //this should return only on because a serial number(vin number)
+ // must be unique
+ public int getQtyOnHand()
+ {
+ return qtyOnHand;
+ }
+
+ public void setQtyOnHand(int qtyOnHand)
+ {
+ this.qtyOnHand = qtyOnHand;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/ProductKeywordsBean.java b/posterita/posterita/src/main/org/posterita/beans/ProductKeywordsBean.java
new file mode 100644
index 0000000000..2a15fbd891
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/ProductKeywordsBean.java
@@ -0,0 +1,116 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+* Created on May 12, 2006 by ashley
+*
+*/
+
+package org.posterita.beans;
+
+import org.apache.struts.upload.FormFile;
+
+public class ProductKeywordsBean extends UDIBean
+{
+
+ public String getProductClassification()
+ {
+ return productClassification;
+ }
+ public void setProductClassification(String productClassification)
+ {
+ this.productClassification = productClassification;
+ }
+ public String getKeyword1()
+ {
+ return keyword1;
+ }
+ public void setKeyword1(String keyword1)
+ {
+ this.keyword1 = keyword1;
+ }
+ public String getKeyword2()
+ {
+ return keyword2;
+ }
+ public void setKeyword2(String keyword2)
+ {
+ this.keyword2 = keyword2;
+ }
+ public String getKeyword3()
+ {
+ return keyword3;
+ }
+ public void setKeyword3(String keyword3)
+ {
+ this.keyword3 = keyword3;
+ }
+ public String getKeyword4()
+ {
+ return keyword4;
+ }
+ public void setKeyword4(String keyword4)
+ {
+ this.keyword4 = keyword4;
+ }
+ public Integer[] getProductIds()
+ {
+ return productIds;
+ }
+ public void setProductIds(Integer[] productIds)
+ {
+ this.productIds = productIds;
+ }
+
+ public String getImageName()
+ {
+ return imageName;
+ }
+ public void setImageName(String imageName)
+ {
+ this.imageName = imageName;
+ }
+ public FormFile getFile()
+ {
+ return file;
+ }
+ public void setFile(FormFile file)
+ {
+ this.file = file;
+ }
+
+ public Boolean getIsSelfService()
+ {
+ return isSelfService;
+ }
+
+ public void setIsSelfService(Boolean isSelfService)
+ {
+ this.isSelfService = isSelfService;
+ }
+
+ public String getDocumentNote()
+ {
+ return documentNote;
+ }
+ public void setDocumentNote(String documentNote)
+ {
+ this.documentNote = documentNote;
+ }
+
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/ProductPriceBean.java b/posterita/posterita/src/main/org/posterita/beans/ProductPriceBean.java
new file mode 100644
index 0000000000..2ef43bd140
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/ProductPriceBean.java
@@ -0,0 +1,76 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on Aug 30, 2005 by praveen
+ *
+ */
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+
+
+public class ProductPriceBean extends ProductAttributeValueBean
+{
+ protected BigDecimal priceList;
+ protected String priceListName;
+ protected BigDecimal priceStandard;
+
+ public Integer getPriceListVersionId()
+ {
+ return priceListVersionId;
+ }
+
+ public void setPriceListVersionId(Integer priceListVersionId)
+ {
+ this.priceListVersionId = priceListVersionId;
+ }
+
+
+
+ public String getPriceListName()
+ {
+ return priceListName;
+ }
+
+ public void setPriceListName(String priceListName)
+ {
+ this.priceListName = priceListName;
+ }
+
+
+
+ public BigDecimal getPriceList()
+ {
+ return priceList;
+ }
+
+ public void setPriceList(BigDecimal priceList)
+ {
+ this.priceList = priceList;
+ }
+
+ public BigDecimal getPriceStandard()
+ {
+ return priceStandard;
+ }
+
+ public void setPriceStandard(BigDecimal priceStandard)
+ {
+ this.priceStandard = priceStandard;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/ProductQuery.java b/posterita/posterita/src/main/org/posterita/beans/ProductQuery.java
new file mode 100644
index 0000000000..eab21ab4d5
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/ProductQuery.java
@@ -0,0 +1,204 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
+
+package org.posterita.beans;
+
+
+
+public class ProductQuery
+{
+
+ private int locatorId;
+ private int attributeSetId;
+ private int attributeValueIds[];
+ private int productId;
+ private String fromLocatorSQL;
+ private String regionFilterSQL;
+ private int hondaOrgId;
+ private int priceListId;
+ private int priceListVersionId;
+ private int warehouseId;
+ private String reserveStatusFilter;
+ private String availableForBackOrderFilter;
+ private int productCategoryId;
+ private Integer ad_Org_ID;
+ private String ETAFilter;
+ private String backOrder;
+
+
+ public String getAvailableForBackOrderFilter() {
+ return availableForBackOrderFilter;
+ }
+ public void setAvailableForBackOrderFilter(
+ String availableForBackOrderFilter) {
+ this.availableForBackOrderFilter = availableForBackOrderFilter;
+ }
+ public String getReserveStatusFilter()
+ {
+ return reserveStatusFilter;
+ }
+
+ public void setReserveStatusFilter(String reserveStatusFilter)
+ {
+ this.reserveStatusFilter = reserveStatusFilter;
+ }
+
+ public int getWarehouseId()
+ {
+ return warehouseId;
+ }
+
+ public void setWarehouseId(int warehouseId)
+ {
+ this.warehouseId = warehouseId;
+ }
+
+ public int getPriceListVersionId()
+ {
+ return priceListVersionId;
+ }
+
+ public void setPriceListVersionId(int priceListVersionId)
+ {
+ this.priceListVersionId = priceListVersionId;
+ }
+
+ public int getPriceListId()
+ {
+ return priceListId;
+ }
+
+ public void setPriceListId(int priceListId)
+ {
+ this.priceListId = priceListId;
+ }
+
+ public int getHondaOrgId()
+ {
+ return hondaOrgId;
+ }
+ public void setHondaOrgId(int hondaOrgId)
+ {
+ this.hondaOrgId = hondaOrgId;
+ }
+
+ public int getProductId()
+ {
+ return productId;
+ }
+
+ public void setProductId(int productId)
+ {
+ this.productId = productId;
+ }
+
+
+ public int getLocatorId()
+ {
+ return locatorId;
+ }
+
+ public void setLocatorId(int locatorId)
+ {
+ this.locatorId = locatorId;
+ }
+
+
+
+
+ public int[] getAttributeValueIds()
+ {
+ return attributeValueIds;
+ }
+ public void setAttributeValueIds(int[] attributeValueIds)
+ {
+ this.attributeValueIds = attributeValueIds;
+ }
+
+
+ public int getAttributeSetId()
+ {
+ return attributeSetId;
+ }
+
+ public void setAttributeSetId(int attributeSetid)
+ {
+ this.attributeSetId = attributeSetid;
+ }
+
+ public String getFromLocatorSQL()
+ {
+ return fromLocatorSQL;
+ }
+
+ public void setFromLocatorSQL(String fromLocatorSQL)
+ {
+ this.fromLocatorSQL = fromLocatorSQL;
+ }
+
+ public String getRegionFilterSQL()
+ {
+ return regionFilterSQL;
+ }
+
+ public void setRegionFilterSQL(String regionFilterSQL)
+ {
+ this.regionFilterSQL = regionFilterSQL;
+ }
+
+ public int getProductCategoryId()
+ {
+ return productCategoryId;
+ }
+
+ public void setProductCategoryId(int productCategoryId)
+ {
+ this.productCategoryId = productCategoryId;
+ }
+
+ public Integer getAd_Org_ID()
+ {
+ return ad_Org_ID;
+ }
+
+ public void setAd_Org_ID(Integer ad_Org_ID)
+ {
+ this.ad_Org_ID = ad_Org_ID;
+ }
+
+ public String getETAFilter()
+ {
+ return ETAFilter;
+ }
+ public void setETAFilter(String filter)
+ {
+ ETAFilter = filter;
+ }
+
+ public String getBackOrder()
+ {
+ return backOrder;
+ }
+
+ public void setBackOrder(String backOrder)
+ {
+ this.backOrder = backOrder;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/ProductRestrictionBean.java b/posterita/posterita/src/main/org/posterita/beans/ProductRestrictionBean.java
new file mode 100644
index 0000000000..451de68469
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/ProductRestrictionBean.java
@@ -0,0 +1,96 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on Aug 30, 2005 by praveen
+ *
+ */
+package org.posterita.beans;
+
+public class ProductRestrictionBean extends StockBean
+{
+ public Integer getProductCategoryId()
+ {
+ return productCategoryId;
+ }
+
+ public void setProductCategoryId(Integer productCategoryId)
+ {
+ this.productCategoryId = productCategoryId;
+ }
+
+ public Integer[] getCheckBox()
+ {
+ return checkBox;
+ }
+ public Integer getColour()
+ {
+ return colour;
+ }
+
+ public Integer getModel()
+ {
+ return model;
+ }
+
+ public Integer getOrgId()
+ {
+ return orgId;
+ }
+
+ public Integer getTransmission()
+ {
+ return transmission;
+ }
+
+ public Integer getYear()
+ {
+ return year;
+ }
+
+ public void setCheckBox(Integer[] checkBox)
+ {
+ this.checkBox = checkBox;
+ }
+
+ public void setColour(Integer colour)
+ {
+ this.colour = colour;
+ }
+
+ public void setModel(Integer model)
+ {
+ this.model = model;
+ }
+
+ public void setOrgId(Integer orgId)
+ {
+ this.orgId = orgId;
+ }
+
+ public void setTransmission(Integer transmission)
+ {
+ this.transmission = transmission;
+ }
+
+ public void setYear(Integer year)
+ {
+ this.year = year;
+ }
+
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/ProductSalesInfoBean.java b/posterita/posterita/src/main/org/posterita/beans/ProductSalesInfoBean.java
new file mode 100644
index 0000000000..52a9fe7505
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/ProductSalesInfoBean.java
@@ -0,0 +1,82 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 10-Oct-2006 12:34:54 by praveen
+ *
+ */
+
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+public class ProductSalesInfoBean {
+ private String DocumentNo;
+ private Date dateOrdered;
+ private String bpartnerName;
+ private String orderType;
+ private BigDecimal qtyOrderded;
+ private Integer orderId;
+ private BigDecimal lineAmount;
+
+ public String getBpartnerName() {
+ return bpartnerName;
+ }
+ public void setBpartnerName(String bpartnerName) {
+ this.bpartnerName = bpartnerName;
+ }
+ public Date getDateOrdered() {
+ return dateOrdered;
+ }
+ public void setDateOrdered(Date dateOrdered) {
+ this.dateOrdered = dateOrdered;
+ }
+ public String getDocumentNo() {
+ return DocumentNo;
+ }
+ public void setDocumentNo(String documentNo) {
+ DocumentNo = documentNo;
+ }
+ public String getOrderType() {
+ return orderType;
+ }
+ public void setOrderType(String orderType) {
+ this.orderType = orderType;
+ }
+ public BigDecimal getQtyOrderded() {
+ return qtyOrderded;
+ }
+ public void setQtyOrderded(BigDecimal qtyOrderded) {
+ this.qtyOrderded = qtyOrderded;
+ }
+ public Integer getOrderId() {
+ return orderId;
+ }
+ public void setOrderId(Integer orderId) {
+ this.orderId = orderId;
+ }
+ public BigDecimal getLineAmount() {
+ return lineAmount;
+ }
+ public void setLineAmount(BigDecimal lineAmount) {
+ this.lineAmount = lineAmount;
+ }
+
+
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/ProductSalesSummaryBean.java b/posterita/posterita/src/main/org/posterita/beans/ProductSalesSummaryBean.java
new file mode 100644
index 0000000000..80b6870660
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/ProductSalesSummaryBean.java
@@ -0,0 +1,67 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 10-Oct-2006 12:25:01 by praveen
+ *
+ */
+
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+
+public class ProductSalesSummaryBean {
+ private Integer productId;
+ private String productName;
+ private BigDecimal qtySold;
+ private BigDecimal totalAmount;
+ private BigDecimal qtyOnHand;
+
+ public Integer getProductId() {
+ return productId;
+ }
+ public void setProductId(Integer productId) {
+ this.productId = productId;
+ }
+ public String getProductName() {
+ return productName;
+ }
+ public void setProductName(String productName) {
+ this.productName = productName;
+ }
+ public BigDecimal getQtyOnHand() {
+ return qtyOnHand;
+ }
+ public void setQtyOnHand(BigDecimal qtyOnHand) {
+ this.qtyOnHand = qtyOnHand;
+ }
+ public BigDecimal getQtySold() {
+ return qtySold;
+ }
+ public void setQtySold(BigDecimal qtySold) {
+ this.qtySold = qtySold;
+ }
+ public BigDecimal getTotalAmount() {
+ return totalAmount;
+ }
+ public void setTotalAmount(BigDecimal totalAmount) {
+ this.totalAmount = totalAmount;
+ }
+
+
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/ProductSearchBean.java b/posterita/posterita/src/main/org/posterita/beans/ProductSearchBean.java
new file mode 100644
index 0000000000..13889256ff
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/ProductSearchBean.java
@@ -0,0 +1,43 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+* Created on May 17, 2006 by ashley
+*
+*/
+
+package org.posterita.beans;
+
+public class ProductSearchBean extends UDIBean
+{
+ public Boolean getIsActive()
+ {
+ return isActive;
+ }
+ public void setIsActive(Boolean isActive)
+ {
+ this.isActive = isActive;
+ }
+ public Boolean getIsWebstoreFeatured()
+ {
+ return isWebstoreFeatured;
+ }
+ public void setIsWebstoreFeatured(Boolean isWebstoreFeatured)
+ {
+ this.isWebstoreFeatured = isWebstoreFeatured;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/ProductSpecsBean.java b/posterita/posterita/src/main/org/posterita/beans/ProductSpecsBean.java
new file mode 100644
index 0000000000..ca858f8598
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/ProductSpecsBean.java
@@ -0,0 +1,86 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+
+
+public class ProductSpecsBean
+{
+ private String model;
+ private String colour;
+ private String year;
+ private String transmission;
+ private BigDecimal priceStd;
+
+
+ public BigDecimal getPriceStd() {
+ return priceStd;
+ }
+ public void setPriceStd(BigDecimal priceStd) {
+ this.priceStd = priceStd;
+ }
+ public String getColour() {
+ return colour;
+ }
+ public void setColour(String colour) {
+ this.colour = colour;
+ }
+ public String getModel() {
+ return model;
+ }
+ public void setModel(String model) {
+ this.model = model;
+ }
+ public String getTransmission() {
+ return transmission;
+ }
+ public void setTransmission(String transmission) {
+ this.transmission = transmission;
+ }
+ public String getYear() {
+ return year;
+ }
+ public void setYear(String year) {
+ this.year = year;
+ }
+
+ public boolean equals(Object obj)
+ {
+ ProductSpecsBean bean = (ProductSpecsBean) obj;
+
+ if ( obj == null)
+ return false;
+
+ if (this.getModel().equalsIgnoreCase(bean.getModel()) == false)
+ return false;
+
+ if (this.getColour().equalsIgnoreCase(bean.getColour()) == false)
+ return false;
+
+ if (this.getTransmission().equalsIgnoreCase(bean.getTransmission()) == false)
+ return false;
+
+ if (this.getYear().equalsIgnoreCase(bean.getYear()) == false)
+ return false;
+
+ return true;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/ProductStatusBean.java b/posterita/posterita/src/main/org/posterita/beans/ProductStatusBean.java
new file mode 100644
index 0000000000..8597bc9592
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/ProductStatusBean.java
@@ -0,0 +1,253 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on Jan 18, 2006 by praveen
+ *
+ */
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+
+public class ProductStatusBean extends UDIBean
+{
+ private Boolean availability = Boolean.valueOf(true);
+ private ProductImageInfo imageInfo;
+ private Boolean hasAttachment;
+
+ public String getProductClassification()
+ {
+ return productClassification;
+ }
+ public void setProductClassification(String productClassification)
+ {
+ this.productClassification = productClassification;
+ }
+
+ public Integer[] getCheckBox()
+ {
+ return checkBox;
+ }
+
+ public void setCheckBox(Integer[] checkBox)
+ {
+ this.checkBox = checkBox;
+ }
+
+ public Boolean getAvailability()
+ {
+ return availability;
+ }
+
+ public void setAvailability(Boolean availability)
+ {
+ this.availability = availability;
+ }
+
+ private String colour,model,transmission,year;
+
+ public Integer getProductId()
+ {
+ return productId;
+ }
+
+ public void setProductId(Integer productId)
+ {
+ this.productId = productId;
+ }
+
+ public String getColour()
+ {
+ return colour;
+ }
+
+ public void setColour(String colour)
+ {
+ this.colour = colour;
+ }
+
+ public String getModel()
+ {
+ return model;
+ }
+
+ public void setModel(String model)
+ {
+ this.model = model;
+ }
+
+ public String getTransmission()
+ {
+ return transmission;
+ }
+
+ public void setTransmission(String transmission)
+ {
+ this.transmission = transmission;
+ }
+
+ public String getYear()
+ {
+ return year;
+ }
+
+ public void setYear(String year)
+ {
+ this.year = year;
+ }
+
+ public Boolean getIsActive()
+ {
+ return isActive;
+ }
+
+ public void setIsActive(Boolean isActive)
+ {
+ this.isActive = isActive;
+ }
+
+ private String productName;
+
+ public String getProductName()
+ {
+ return productName;
+ }
+ public void setProductName(String productName)
+ {
+ this.productName = productName;
+ }
+
+ public ProductImageInfo getImageInfo()
+ {
+ return imageInfo;
+ }
+
+ public void setImageInfo(ProductImageInfo imageInfo)
+ {
+ this.imageInfo = imageInfo;
+ }
+
+ public Boolean getHasAttachment()
+ {
+ return hasAttachment;
+ }
+ public void setHasAttachment(Boolean hasAttachment)
+ {
+ this.hasAttachment = hasAttachment;
+ }
+ public Boolean getIsWebstoreFeatured()
+ {
+ return isWebstoreFeatured;
+ }
+
+ public void setIsWebstoreFeatured(Boolean isWebstoreFeatured)
+ {
+ this.isWebstoreFeatured = isWebstoreFeatured;
+ }
+
+ public String getProductNameComplete()
+ {
+ String retVal = "";
+ if(productName != null)
+ retVal = productName.replaceAll("_", " ");
+ return retVal;
+ }
+
+ public String getKeyword1()
+ {
+ return keyword1;
+ }
+
+ public void setKeyword1(String keyword1)
+ {
+ this.keyword1 = keyword1;
+ }
+
+ public String getKeyword2()
+ {
+ return keyword2;
+ }
+
+ public void setKeyword2(String keyword2)
+ {
+ this.keyword2 = keyword2;
+ }
+
+ public String getKeyword3()
+ {
+ return keyword3;
+ }
+
+ public void setKeyword3(String keyword3)
+ {
+ this.keyword3 = keyword3;
+ }
+
+ public String getKeyword4()
+ {
+ return keyword4;
+ }
+
+ public void setKeyword4(String keyword4)
+ {
+ this.keyword4 = keyword4;
+ }
+
+ public String getBarCode()
+ {
+ return barCode;
+ }
+
+ public void setBarCode(String barCode)
+ {
+ this.barCode = barCode;
+ }
+
+ public Boolean getIsSelfService()
+ {
+ return isSelfService;
+ }
+
+ public void setIsSelfService(Boolean isSelfService)
+ {
+ this.isSelfService = isSelfService;
+ }
+
+ private String description;
+
+ public String getDescription() {
+ return description;
+ }
+ public void setDescription(String description) {
+ this.description = description;
+ }
+ public BigDecimal getQtyOnHand() {
+ return qtyOnHand;
+ }
+ public void setQtyOnHand(BigDecimal qtyOnHand) {
+ this.qtyOnHand = qtyOnHand;
+ }
+ public BigDecimal getPriceStandard() {
+ return priceStandard;
+ }
+ public void setPriceStandard(BigDecimal priceStandard) {
+ this.priceStandard = priceStandard;
+ }
+
+
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/ProductSupplierBean.java b/posterita/posterita/src/main/org/posterita/beans/ProductSupplierBean.java
new file mode 100644
index 0000000000..6a3733974a
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/ProductSupplierBean.java
@@ -0,0 +1,52 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on Jun 20, 2006
+ */
+
+
+package org.posterita.beans;
+
+
+public class ProductSupplierBean extends UDIBean
+{
+ protected Integer bPartnerId;
+ protected String partnerName;
+ protected Integer quantity;
+
+ public Integer getBPartnerId() {
+ return bPartnerId;
+ }
+ public void setBPartnerId(Integer partnerId) {
+ bPartnerId = partnerId;
+ }
+ public String getPartnerName() {
+ return partnerName;
+ }
+ public void setPartnerName(String partnerName) {
+ this.partnerName = partnerName;
+ }
+ public Integer getQuantity() {
+ return quantity;
+ }
+ public void setQuantity(Integer quantity) {
+ this.quantity = quantity;
+ }
+
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/RemoveSessionBean.java b/posterita/posterita/src/main/org/posterita/beans/RemoveSessionBean.java
new file mode 100644
index 0000000000..3aad81c53a
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/RemoveSessionBean.java
@@ -0,0 +1,39 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on Jan 26, 2007
+ */
+
+
+package org.posterita.beans;
+
+
+public class RemoveSessionBean extends UDIBean
+{
+
+
+ public String getOrderType()
+ {
+ return orderType;
+ }
+
+ public void setOrderType(String orderType)
+ {
+ this.orderType = orderType;
+ }
+}
\ No newline at end of file
diff --git a/posterita/posterita/src/main/org/posterita/beans/ReportBean.java b/posterita/posterita/src/main/org/posterita/beans/ReportBean.java
new file mode 100644
index 0000000000..6fe738904c
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/ReportBean.java
@@ -0,0 +1,293 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+package org.posterita.beans;
+
+import java.util.ArrayList;
+
+
+public class ReportBean extends UDIBean
+{
+
+ public ReportBean getReport()
+ {
+ return report;
+ }
+
+ public void setReport(ReportBean report)
+ {
+ this.report = report;
+ }
+
+ public ArrayList getReportList()
+ {
+ return reportList;
+ }
+
+ public void setStockList(ArrayList reportList)
+ {
+ this.reportList = reportList;
+ }
+
+ public Integer getProductId()
+ {
+ return productId;
+ }
+
+ public void setProductId(Integer productId)
+ {
+ this.productId = productId;
+ }
+
+ public String getProductName()
+ {
+ return productName;
+ }
+
+ public void setProductName(String productName)
+ {
+ this.productName = productName;
+ }
+
+ public String getBarCode()
+ {
+ return barCode;
+ }
+ public void setBarCode(String barCode)
+ {
+ this.barCode = barCode;
+ }
+
+ public String getDescription()
+ {
+ return description;
+ }
+ public void setDescription(String description)
+ {
+ this.description = description;
+ }
+
+ public Integer getOrgId()
+ {
+ return orgId;
+ }
+ public void setOrgId(Integer orgId)
+ {
+ this.orgId = orgId;
+ }
+
+ public Integer getNoOfProductsRequired() {
+ return noOfProductsRequired;
+ }
+ public void setNoOfProductsRequired(Integer noOfProductsRequired) {
+ this.noOfProductsRequired = noOfProductsRequired;
+ }
+ public String getReportType() {
+ return reportType;
+ }
+ public void setReportType(String reportType) {
+ this.reportType = reportType;
+ }
+ public String getFromDate()
+ {
+ return fromDate;
+ }
+
+ public void setFromDate(String fromDate)
+ {
+ this.fromDate = fromDate;
+ }
+
+ public String getToDate()
+ {
+ return toDate;
+ }
+
+ public void setToDate(String toDate)
+ {
+ this.toDate = toDate;
+ }
+
+ public String getStartDay()
+ {
+ return startDay;
+ }
+
+ public void setStartDay(String startDay)
+ {
+ this.startDay = startDay;
+ }
+
+ public String getStartMonth()
+ {
+ return startMonth;
+ }
+
+ public void setStartMonth(String startMonth)
+ {
+ this.startMonth = startMonth;
+ }
+
+ public String getStartYear()
+ {
+ return startYear;
+ }
+
+ public void setStartYear(String startYear)
+ {
+ this.startYear = startYear;
+ }
+
+ public String getEndDay()
+ {
+ return endDay;
+ }
+
+ public void setEndDay(String endDay)
+ {
+ this.endDay = endDay;
+ }
+
+ public String getEndMonth()
+ {
+ return endMonth;
+ }
+
+ public void setEndMonth(String endMonth)
+ {
+ this.endMonth = endMonth;
+ }
+
+ public String getEndYear()
+ {
+ return endYear;
+ }
+
+ public void setEndYear(String endYear)
+ {
+ this.endYear = endYear;
+ }
+
+ public String getStartHour()
+ {
+ return startHour;
+ }
+
+ public void setStartHour(String startHour)
+ {
+ this.startHour = startHour;
+ }
+
+ public String getStartMinute()
+ {
+ return startMinute;
+ }
+
+ public void setStartMinute(String startMinute)
+ {
+ this.startMinute = startMinute;
+ }
+
+ public String getEndHour()
+ {
+ return endHour;
+ }
+
+ public void setEndHour(String endHour)
+ {
+ this.endHour = endHour;
+ }
+
+ public String getEndMinute()
+ {
+ return endMinute;
+ }
+
+ public void setEndMinute(String endMinute)
+ {
+ this.endMinute = endMinute;
+ }
+ public String getAttribute() {
+ return attribute;
+ }
+ public void setAttribute(String attribute) {
+ this.attribute = attribute;
+ }
+
+ public String getTimePeriod() {
+ return timePeriod;
+ }
+ public void setTimePeriod(String timePeriod) {
+ this.timePeriod = timePeriod;
+ }
+
+ public String getChartType() {
+ return chartType;
+ }
+ public void setChartType(String chartType) {
+ this.chartType = chartType;
+ }
+
+ public String getSalesGroup() {
+ return salesGroup;
+ }
+ public void setSalesGroup(String salesGroup) {
+ this.salesGroup = salesGroup;
+ }
+
+ public Integer getAccountId() {
+ return accountId;
+ }
+ public void setAccountId(Integer accountId) {
+ this.accountId = accountId;
+ }
+
+ public String getDateRange() {
+ return dateRange;
+ }
+ public void setDateRange(String dateRange) {
+ this.dateRange = dateRange;
+ }
+
+ public String getPriceQtyFilter() {
+ return priceQtyFilter;
+ }
+ public void setPriceQtyFilter(String priceQtyFilter) {
+ this.priceQtyFilter = priceQtyFilter;
+ }
+
+ public String getFullDetails()
+ {
+ return fullDetails;
+ }
+
+ public void setFullDetails(String fullDetails)
+ {
+ this.fullDetails = fullDetails;
+ }
+ public String getIsSalesReport()
+ {
+ return isSalesReport;
+ }
+ public void setIsSalesReport(String isSalesReport)
+ {
+ this.isSalesReport = isSalesReport;
+ }
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/ReportDataBean.java b/posterita/posterita/src/main/org/posterita/beans/ReportDataBean.java
new file mode 100644
index 0000000000..ac3f3f4350
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/ReportDataBean.java
@@ -0,0 +1,102 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on Nov 21, 2005 by praveen
+ *
+ */
+package org.posterita.beans;
+
+
+public class ReportDataBean
+{
+ private String model;
+ private int count;
+ private int automatic;
+ private int manual;
+ private int sale;
+ private int target;
+
+ public ReportDataBean()
+ {
+ model = "";
+ count = 0;
+ automatic = 0;
+ manual = 0;
+ sale = 0;
+ target = 0;
+ }
+
+ public int getAutomatic()
+ {
+ return automatic;
+ }
+
+ public void setAutomatic(int automatic)
+ {
+ this.automatic = automatic;
+ }
+
+ public int getCount()
+ {
+ return count;
+ }
+
+ public void setCount(int count)
+ {
+ this.count = count;
+ }
+
+ public int getManual()
+ {
+ return manual;
+ }
+
+ public void setManual(int manual)
+ {
+ this.manual = manual;
+ }
+
+ public String getModel()
+ {
+ return model;
+ }
+
+ public void setModel(String model)
+ {
+ this.model = model;
+ }
+
+ public int getSale()
+ {
+ return sale;
+ }
+
+ public void setSale(int sale) {
+ this.sale = sale;
+ }
+
+ public int getTarget()
+ {
+ return target;
+ }
+
+ public void setTarget(int target)
+ {
+ this.target = target;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/ReportImageBean.java b/posterita/posterita/src/main/org/posterita/beans/ReportImageBean.java
new file mode 100644
index 0000000000..ba84e11b8d
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/ReportImageBean.java
@@ -0,0 +1,151 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on Nov 17, 2005 by praveen
+ *
+ */
+package org.posterita.beans;
+
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.GregorianCalendar;
+
+import org.posterita.core.TimestampConvertor;
+
+
+public class ReportImageBean
+{
+ private String imagePath;
+ private String imageTitle;
+ private String altText;
+ private String requestParams;
+ private String dateFrom;
+ private String dateTo;
+
+ public ReportImageBean()
+ {
+ initDateFrom();
+ initDateTo();
+ }
+
+ private void initDateFrom()
+ {
+ SimpleDateFormat df = new SimpleDateFormat(TimestampConvertor.DEFAULT_DATE_PATTERN1);
+
+ Calendar calendar = GregorianCalendar.getInstance();
+
+ if(calendar.get(Calendar.MONTH) == Calendar.JANUARY)
+ {
+ calendar.set(Calendar.DATE,9);
+ }
+ else
+ {
+ calendar.set(Calendar.DATE,1);
+ }
+
+ calendar.set(Calendar.HOUR_OF_DAY,9);
+ calendar.set(Calendar.MINUTE,15);
+ calendar.set(Calendar.SECOND,0);
+ dateFrom = df.format(calendar.getTime());
+ }
+
+ private void initDateTo()
+ {
+ SimpleDateFormat df = new SimpleDateFormat(TimestampConvertor.DEFAULT_DATE_PATTERN1);
+
+ Calendar calendar = GregorianCalendar.getInstance();
+ //int maxNoOfDays = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);
+ //calendar.set(Calendar.DATE,maxNoOfDays);
+ dateTo = df.format(calendar.getTime());
+ }
+
+ public String getAltText()
+ {
+ return altText;
+ }
+
+ public void setAltText(String altText)
+ {
+ this.altText = altText;
+ }
+
+ public String getImagePath()
+ {
+ return imagePath;
+ }
+
+ public void setImagePath(String imagePath)
+ {
+ this.imagePath = imagePath;
+ }
+
+ public String getImageTitle()
+ {
+ return imageTitle;
+ }
+
+ public void setImageTitle(String imageTitle)
+ {
+ this.imageTitle = imageTitle;
+ }
+
+ public void setRequestParams(String requestParams)
+ {
+ this.requestParams = requestParams;
+ }
+
+ public String getDateFrom()
+ {
+ return dateFrom;
+ }
+
+ public void setDateFrom(String dateFrom)
+ {
+ this.dateFrom = dateFrom;
+ }
+
+ public String getDateTo()
+ {
+ return dateTo;
+ }
+
+ public void setDateTo(String dateTo)
+ {
+ this.dateTo = dateTo;
+ }
+
+ public String getRequestParams()
+ {
+ requestParams = null;
+
+ try
+ {
+ requestParams = "dateFrom=" + URLEncoder.encode(dateFrom,"UTF-8") +
+ "&dateTo=" + URLEncoder.encode(dateTo,"UTF-8") +
+ "&imagePath=" + URLEncoder.encode(imagePath,"UTF-8") +
+ "&imageTitle=" + URLEncoder.encode(imageTitle,"UTF-8");
+ }
+ catch (UnsupportedEncodingException e)
+ {
+
+ }
+ return requestParams;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/RoleBean.java b/posterita/posterita/src/main/org/posterita/beans/RoleBean.java
new file mode 100644
index 0000000000..484a1f1166
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/RoleBean.java
@@ -0,0 +1,203 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on Aug 16, 2005 by praveen
+ *
+ */
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+
+public class RoleBean extends UDIBean
+{
+ protected Boolean isDiscountUptoLimitPrice;
+ protected Boolean isDiscountAllowedOnTotal;
+
+
+ public ArrayList getRoleBeanList() {
+ return roleBeanList;
+ }
+
+ public void setRoleBeanList(ArrayList roleBeanList) {
+ this.roleBeanList = roleBeanList;
+ }
+
+ public Boolean getIsChecked() {
+ return isChecked;
+ }
+
+ public void setIsChecked(Boolean isChecked) {
+ this.isChecked = isChecked;
+ }
+
+ public Boolean getIsOverwritePriceLimit() {
+ return isOverwritePriceLimit;
+ }
+
+ public void setIsOverwritePriceLimit(Boolean isOverwritePriceLimit) {
+ this.isOverwritePriceLimit = isOverwritePriceLimit;
+ }
+
+ public BigDecimal getUserDiscount() {
+ return userDiscount;
+ }
+
+ public void setUserDiscount(BigDecimal userDiscount) {
+ this.userDiscount = userDiscount;
+ }
+
+ public Integer[] getCheckBox()
+ {
+ return checkBox;
+ }
+
+ public void setCheckBox(Integer[] checkBox)
+ {
+ this.checkBox = checkBox;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public Boolean getIsActive()
+ {
+ return isActive;
+ }
+
+ public void setIsActive(Boolean isActive)
+ {
+ this.isActive = isActive;
+ }
+
+ public Integer getRoleId()
+ {
+ return roleId;
+ }
+
+ public void setRoleId(Integer roleId)
+ {
+ this.roleId = roleId;
+ }
+
+ public Boolean getIsAccessAllOrgs()
+ {
+ return isAccessAllOrgs;
+
+ }
+
+ public void setIsAccessAllOrgs(Boolean isAccessAllOrgs)
+ {
+ this.isAccessAllOrgs = isAccessAllOrgs;
+ }
+
+
+
+ public Boolean getCanAlterOrder()
+ {
+ return canAlterOrder;
+ }
+
+ public void setCanAlterOrder(Boolean canAlterOrder)
+ {
+ this.canAlterOrder = canAlterOrder;
+ }
+
+ protected Boolean canCreateOrder;
+ protected Boolean canViewOrder;
+
+
+ public Boolean getCanCreateOrder()
+ {
+ return canCreateOrder;
+ }
+
+ public void setCanCreateOrder(Boolean canCreateOrder)
+ {
+ this.canCreateOrder = canCreateOrder;
+ }
+
+ public Boolean getCanViewOrder()
+ {
+ return canViewOrder;
+ }
+
+ public void setCanViewOrder(Boolean canViewOrder)
+ {
+ this.canViewOrder = canViewOrder;
+ }
+
+ public Integer getOrgId()
+ {
+ return orgId;
+ }
+
+ public void setOrgId(Integer orgId)
+ {
+ this.orgId = orgId;
+ }
+
+ public String getOrgName()
+ {
+ return orgName;
+ }
+
+ public void setOrgName(String orgName)
+ {
+ this.orgName = orgName;
+ }
+
+ public Boolean getIsDiscountUptoLimitPrice()
+ {
+ return isDiscountUptoLimitPrice;
+ }
+
+ public void setIsDiscountUptoLimitPrice(Boolean isDiscountUptoLimitPrice)
+ {
+ this.isDiscountUptoLimitPrice = isDiscountUptoLimitPrice;
+ }
+
+ public Boolean getIsDiscountAllowedOnTotal()
+ {
+ return isDiscountAllowedOnTotal;
+ }
+
+ public void setIsDiscountAllowedOnTotal(Boolean isDiscountAllowedOnTotal)
+ {
+ this.isDiscountAllowedOnTotal = isDiscountAllowedOnTotal;
+ }
+
+ public Integer getWebMenuId()
+ {
+ return webMenuId;
+ }
+
+ public void setWebMenuId(Integer webMenuId)
+ {
+ this.webMenuId = webMenuId;
+ }
+
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/SalesAnalysisReportBean.java b/posterita/posterita/src/main/org/posterita/beans/SalesAnalysisReportBean.java
new file mode 100644
index 0000000000..8559560809
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/SalesAnalysisReportBean.java
@@ -0,0 +1,86 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 14-Jul-2006 14:00:21 by praveen
+ *
+ */
+
+package org.posterita.beans;
+
+public class SalesAnalysisReportBean extends ReportBean
+{
+ private String supplier,category,brand,model,design,colour,size;
+
+ public String getBrand() {
+ return brand;
+ }
+
+ public void setBrand(String brand) {
+ this.brand = brand;
+ }
+
+ public String getCategory() {
+ return category;
+ }
+
+ public void setCategory(String category) {
+ this.category = category;
+ }
+
+ public String getColour() {
+ return colour;
+ }
+
+ public void setColour(String colour) {
+ this.colour = colour;
+ }
+
+ public String getDesign() {
+ return design;
+ }
+
+ public void setDesign(String design) {
+ this.design = design;
+ }
+
+ public String getModel() {
+ return model;
+ }
+
+ public void setModel(String model) {
+ this.model = model;
+ }
+
+ public String getSize() {
+ return size;
+ }
+
+ public void setSize(String size) {
+ this.size = size;
+ }
+
+ public String getSupplier() {
+ return supplier;
+ }
+
+ public void setSupplier(String supplier) {
+ this.supplier = supplier;
+ }
+
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/SalesAnalysisReportDataBean.java b/posterita/posterita/src/main/org/posterita/beans/SalesAnalysisReportDataBean.java
new file mode 100644
index 0000000000..573242e971
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/SalesAnalysisReportDataBean.java
@@ -0,0 +1,86 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 05-Jul-2006 12:32:38 by praveen
+ *
+ */
+
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+
+public class SalesAnalysisReportDataBean
+{
+ private String supplier,category,brand,model,design,colour,size;
+ private BigDecimal quantity,amount;
+
+ public BigDecimal getAmount() {
+ return amount;
+ }
+ public void setAmount(BigDecimal amount) {
+ this.amount = amount;
+ }
+ public String getBrand() {
+ return brand;
+ }
+ public void setBrand(String brand) {
+ this.brand = brand;
+ }
+ public String getCategory() {
+ return category;
+ }
+ public void setCategory(String category) {
+ this.category = category;
+ }
+ public String getColour() {
+ return colour;
+ }
+ public void setColour(String colour) {
+ this.colour = colour;
+ }
+ public String getDesign() {
+ return design;
+ }
+ public void setDesign(String design) {
+ this.design = design;
+ }
+ public String getModel() {
+ return model;
+ }
+ public void setModel(String model) {
+ this.model = model;
+ }
+ public BigDecimal getQuantity() {
+ return quantity;
+ }
+ public void setQuantity(BigDecimal quantity) {
+ this.quantity = quantity;
+ }
+ public String getSize() {
+ return size;
+ }
+ public void setSize(String size) {
+ this.size = size;
+ }
+ public String getSupplier() {
+ return supplier;
+ }
+ public void setSupplier(String supplier) {
+ this.supplier = supplier;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/SalesDetailsBean.java b/posterita/posterita/src/main/org/posterita/beans/SalesDetailsBean.java
new file mode 100644
index 0000000000..6ebaafaa03
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/SalesDetailsBean.java
@@ -0,0 +1,209 @@
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+import java.sql.Date;
+import java.sql.Timestamp;
+
+public class SalesDetailsBean
+{
+ private int orderId;
+ private int[] orderLineId;
+ private int[] productId;
+ private int bPartnerId;
+ private BigDecimal linesTotals;
+ private BigDecimal grandTotals;
+ private BigDecimal totalTaxAmount;
+ private BigDecimal cardAmount;
+ private BigDecimal cashAmount;
+ private BigDecimal chequeAmount;
+ private BigDecimal totalCosts;
+ private BigDecimal salesExcVat;
+ private BigDecimal salesExempt;
+ private BigDecimal purchasesExcVat;
+ private BigDecimal purchasesExempt;
+ private BigDecimal creditNoteExcVat;
+ private BigDecimal creditNoteExempt;
+ private BigDecimal debitNoteExcVat;
+ private BigDecimal debitNoteExempt;
+ private BigDecimal total;
+ private String orderType;
+ private Timestamp date;
+
+ public int getOrderId()
+ {
+ return orderId;
+ }
+ public void setOrderId(int orderId)
+ {
+ this.orderId = orderId;
+ }
+ public int[] getOrderLineId()
+ {
+ return orderLineId;
+ }
+ public void setOrderLineId(int[] orderLineId)
+ {
+ this.orderLineId = orderLineId;
+ }
+ public int[] getProductId()
+ {
+ return productId;
+ }
+ public void setProductId(int[] productId)
+ {
+ this.productId = productId;
+ }
+ public int getBPartnerId()
+ {
+ return bPartnerId;
+ }
+ public void setBPartnerId(int partnerId)
+ {
+ bPartnerId = partnerId;
+ }
+ public BigDecimal getLinesTotals()
+ {
+ return linesTotals;
+ }
+ public void setLinesTotals(BigDecimal linesTotals)
+ {
+ this.linesTotals = linesTotals;
+ }
+ public BigDecimal getGrandTotals()
+ {
+ return grandTotals;
+ }
+ public void setGrandTotals(BigDecimal grandTotals)
+ {
+ this.grandTotals = grandTotals;
+ }
+ public BigDecimal getTotalTaxAmount()
+ {
+ return totalTaxAmount;
+ }
+ public void setTotalTaxAmount(BigDecimal totalTaxAmount)
+ {
+ this.totalTaxAmount = totalTaxAmount;
+ }
+ public BigDecimal getCardAmount()
+ {
+ return cardAmount;
+ }
+ public void setCardAmount(BigDecimal cardAmount)
+ {
+ this.cardAmount = cardAmount;
+ }
+ public BigDecimal getCashAmount()
+ {
+ return cashAmount;
+ }
+ public void setCashAmount(BigDecimal cashAmount)
+ {
+ this.cashAmount = cashAmount;
+ }
+ public BigDecimal getChequeAmount()
+ {
+ return chequeAmount;
+ }
+ public void setChequeAmount(BigDecimal chequeAmount)
+ {
+ this.chequeAmount = chequeAmount;
+ }
+ public BigDecimal getTotalCosts()
+ {
+ return totalCosts;
+ }
+ public void setTotalCosts(BigDecimal totalCosts)
+ {
+ this.totalCosts = totalCosts;
+ }
+ public BigDecimal getSalesExcVat()
+ {
+ return salesExcVat;
+ }
+ public void setSalesExcVat(BigDecimal salesExcVat)
+ {
+ this.salesExcVat = salesExcVat;
+ }
+ public BigDecimal getSalesExempt()
+ {
+ return salesExempt;
+ }
+ public void setSalesExempt(BigDecimal salesExempt)
+ {
+ this.salesExempt = salesExempt;
+ }
+ public BigDecimal getCreditNoteExcVat()
+ {
+ return creditNoteExcVat;
+ }
+ public void setCreditNoteExcVat(BigDecimal creditNoteExcVat)
+ {
+ this.creditNoteExcVat = creditNoteExcVat;
+ }
+ public BigDecimal getCreditNoteExempt()
+ {
+ return creditNoteExempt;
+ }
+ public void setCreditNoteExempt(BigDecimal creditNoteExempt)
+ {
+ this.creditNoteExempt = creditNoteExempt;
+ }
+ public BigDecimal getTotal()
+ {
+ return total;
+ }
+ public void setTotal(BigDecimal total)
+ {
+ this.total = total;
+ }
+ public String getOrderType()
+ {
+ return orderType;
+ }
+ public void setOrderType(String orderType)
+ {
+ this.orderType = orderType;
+ }
+ public Timestamp getDate()
+ {
+ return date;
+ }
+ public void setDate(Timestamp date)
+ {
+ this.date = date;
+ }
+ public BigDecimal getDebitNoteExcVat()
+ {
+ return debitNoteExcVat;
+ }
+ public void setDebitNoteExcVat(BigDecimal debitNoteExcVat)
+ {
+ this.debitNoteExcVat = debitNoteExcVat;
+ }
+ public BigDecimal getDebitNoteExempt()
+ {
+ return debitNoteExempt;
+ }
+ public void setDebitNoteExempt(BigDecimal debitNoteExempt)
+ {
+ this.debitNoteExempt = debitNoteExempt;
+ }
+ public BigDecimal getPurchasesExcVat()
+ {
+ return purchasesExcVat;
+ }
+ public void setPurchasesExcVat(BigDecimal purchasesExcVat)
+ {
+ this.purchasesExcVat = purchasesExcVat;
+ }
+ public BigDecimal getPurchasesExempt()
+ {
+ return purchasesExempt;
+ }
+ public void setPurchasesExempt(BigDecimal purchasesExempt)
+ {
+ this.purchasesExempt = purchasesExempt;
+ }
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/SearchBean.java b/posterita/posterita/src/main/org/posterita/beans/SearchBean.java
new file mode 100644
index 0000000000..bc990d6916
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/SearchBean.java
@@ -0,0 +1,82 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+* Created on May 15, 2006 by ashley
+*
+*/
+
+package org.posterita.beans;
+
+import java.util.ArrayList;
+
+public class SearchBean
+{
+
+ protected String searchText;
+ protected ArrayList andCriteriasList;
+ protected ArrayList orCriteriasList;
+ protected ArrayList notCriteriasList;
+
+ public SearchBean(String searchText)
+ {
+ this.searchText = searchText;
+ andCriteriasList = new ArrayList();
+ orCriteriasList = new ArrayList();
+ notCriteriasList = new ArrayList();
+ }
+
+ public ArrayList getAndCriteriasList()
+ {
+ return andCriteriasList;
+ }
+
+ public void setAndCriteriasList(ArrayList andCriteriasList)
+ {
+ this.andCriteriasList = andCriteriasList;
+ }
+
+ public ArrayList getNotCriteriasList()
+ {
+ return notCriteriasList;
+ }
+
+ public void setNotCriteriasList(ArrayList notCriteriasList)
+ {
+ this.notCriteriasList = notCriteriasList;
+ }
+
+ public ArrayList getOrCriteriasList()
+ {
+ return orCriteriasList;
+ }
+
+ public void setOrCriteriasList(ArrayList orCriteriasList)
+ {
+ this.orCriteriasList = orCriteriasList;
+ }
+
+ public String getSearchText()
+ {
+ return searchText;
+ }
+
+ public void setSearchText(String searchText)
+ {
+ this.searchText = searchText;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/SearchOrderBean.java b/posterita/posterita/src/main/org/posterita/beans/SearchOrderBean.java
new file mode 100644
index 0000000000..02a2f4c8a2
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/SearchOrderBean.java
@@ -0,0 +1,51 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on Nov 8, 2005 by praveen
+ *
+ */
+package org.posterita.beans;
+
+public class SearchOrderBean extends UDIBean
+{
+
+ public Integer getOrderId()
+ {
+ return orderId;
+ }
+
+ public void setOrderId(Integer orderId)
+ {
+ this.orderId = orderId;
+ }
+
+ public Integer getFirst()
+ {
+ return first;
+ }
+
+ public void setFirst(Integer first)
+ {
+ this.first = first;
+ }
+
+
+
+
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/ShipperBean.java b/posterita/posterita/src/main/org/posterita/beans/ShipperBean.java
new file mode 100644
index 0000000000..eab92da52f
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/ShipperBean.java
@@ -0,0 +1,45 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+package org.posterita.beans;
+
+
+public class ShipperBean extends UDIBean
+{
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public void setDescription(String description)
+ {
+ this.description = description;
+ }
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/ShoppingCartBean.java b/posterita/posterita/src/main/org/posterita/beans/ShoppingCartBean.java
new file mode 100644
index 0000000000..36fa13aa98
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/ShoppingCartBean.java
@@ -0,0 +1,71 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+
+
+public class ShoppingCartBean extends UDIBean
+{
+ private ArrayList items;
+ private String currency;
+ private BigDecimal totalPrice;
+ private int pricelistId;
+
+ public String getCurrency()
+ {
+ return currency;
+ }
+
+ public void setCurrency(String currency)
+ {
+ this.currency = currency;
+ }
+
+ public ArrayList getItems()
+ {
+ return items;
+ }
+
+ public void setItems(ArrayList items)
+ {
+ this.items = items;
+ }
+
+ public BigDecimal getTotalPrice()
+ {
+ return totalPrice;
+ }
+
+ public void setTotalPrice(BigDecimal totalPrice)
+ {
+ this.totalPrice = totalPrice;
+ }
+
+ public int getPricelistId() {
+ return pricelistId;
+ }
+
+ public void setPricelistId(int pricelistId) {
+ this.pricelistId = pricelistId;
+ }
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/StatementOfAccountBean.java b/posterita/posterita/src/main/org/posterita/beans/StatementOfAccountBean.java
new file mode 100644
index 0000000000..d683a280e5
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/StatementOfAccountBean.java
@@ -0,0 +1,87 @@
+/**
+ *
+ * Copyright (c) 2008 Posterita. All Rights Reserved.
+ *
+ * This software is the confidential and proprietary information of
+ * Posterita. ("Confidential Information"). You shall not
+ * disclose such Confidential Information and shall use it only in
+ * accordance with the terms of the license agreement you entered into
+ * with Posterita.
+ *
+ * POSTERITA MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE
+ * SUITABILITY OF THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT
+ * NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR
+ * A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. POSTERITA SHALL NOT
+ * BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING,
+ * MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
+ *
+ * Aug 12, 2008 10:39:24 PM by praveen
+ *
+ */
+
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+import java.sql.Timestamp;
+
+public class StatementOfAccountBean
+{
+ private Timestamp date;
+ private String reference;
+ private String docType;
+ private int docId;
+ private String details;
+ private BigDecimal credit;
+ private BigDecimal debit;
+ private BigDecimal balance;
+
+ public Timestamp getDate() {
+ return date;
+ }
+ public void setDate(Timestamp date) {
+ this.date = date;
+ }
+ public String getReference() {
+ return reference;
+ }
+ public void setReference(String reference) {
+ this.reference = reference;
+ }
+ public String getDocType() {
+ return docType;
+ }
+ public void setDocType(String docType) {
+ this.docType = docType;
+ }
+ public String getDetails() {
+ return details;
+ }
+ public void setDetails(String details) {
+ this.details = details;
+ }
+ public BigDecimal getCredit() {
+ return credit;
+ }
+ public void setCredit(BigDecimal credit) {
+ this.credit = credit;
+ }
+ public BigDecimal getDebit() {
+ return debit;
+ }
+ public void setDebit(BigDecimal debit) {
+ this.debit = debit;
+ }
+ public BigDecimal getBalance() {
+ return balance;
+ }
+ public void setBalance(BigDecimal balance) {
+ this.balance = balance;
+ }
+ public int getDocId() {
+ return docId;
+ }
+ public void setDocId(int docId) {
+ this.docId = docId;
+ }
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/StockBean.java b/posterita/posterita/src/main/org/posterita/beans/StockBean.java
new file mode 100644
index 0000000000..17fee5e726
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/StockBean.java
@@ -0,0 +1,347 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+package org.posterita.beans;
+
+
+
+public class StockBean extends UDIBean
+{
+ public String getKeyword2()
+ {
+ return keyword2;
+ }
+
+ public void setKeyword2(String keyword2)
+ {
+ this.keyword2 = keyword2;
+ }
+
+ public Integer getProductCategoryId()
+ {
+ return productCategoryId;
+ }
+
+ public void setProductCategoryId(Integer productCategoryId)
+ {
+ this.productCategoryId = productCategoryId;
+ }
+
+ public Integer getMake()
+ {
+ return make;
+ }
+ public void setMake(Integer make)
+ {
+ this.make = make;
+ }
+
+ public String getAvailableForBackOrderFilter() {
+
+ return availableForBackOrderFilter;
+ }
+
+ public void setAvailableForBackOrderFilter(String availableForBackOrderFilter)
+ {
+ this.availableForBackOrderFilter = availableForBackOrderFilter;
+ }
+
+ public Integer getModel()
+ {
+ return model;
+ }
+
+ public void setModel(Integer model)
+ {
+ this.model = model;
+ }
+
+ public Integer getColour()
+ {
+ return colour;
+ }
+
+ public void setColour(Integer colour)
+ {
+ this.colour = colour;
+ }
+
+ public Integer getTransmission()
+ {
+ return transmission;
+ }
+
+ public void setTransmission(Integer transmission)
+ {
+ this.transmission = transmission;
+ }
+
+ public Integer getYear()
+ {
+ return year;
+ }
+
+ public void setYear(Integer year)
+ {
+ this.year = year;
+ }
+
+ public Boolean getIsWholesaler()
+ {
+ return isWholesaler;
+ }
+
+ public void setIsWholesaler(Boolean isWholesaler)
+ {
+ this.isWholesaler = isWholesaler;
+ }
+
+ public Integer getRegionId()
+ {
+ return regionId;
+ }
+
+ public void setRegionId(Integer regionId)
+ {
+ this.regionId = regionId;
+ }
+
+
+
+ public Integer[] getCheckBox()
+ {
+ return checkBox;
+ }
+ public void setCheckBox(Integer [] checkBox)
+ {
+ this.checkBox = checkBox;
+ }
+
+ public Integer getReserveStatus()
+ {
+ return reserveStatus;
+ }
+
+ public void setReserveStatus(Integer reserveStatus)
+ {
+ this.reserveStatus = reserveStatus;
+ }
+
+
+ public Integer getOrgId()
+ {
+ return orgId;
+ }
+
+ public void setOrgId(Integer orgId)
+ {
+ this.orgId = orgId;
+ }
+
+ public Integer getAllocationId()
+ {
+ return allocationId;
+ }
+
+ public void setAllocationId(Integer allocationId)
+ {
+ this.allocationId = allocationId;
+ }
+
+ public String getWarehouseType()
+ {
+ return warehouseType;
+ }
+
+ public void setWarehouseType(String warehouseType)
+ {
+ this.warehouseType = warehouseType;
+ }
+
+ public Integer getFirst()
+ {
+ return first;
+ }
+
+ public void setFirst(Integer first)
+ {
+ this.first = first;
+ }
+
+ public Integer getWarehouseId()
+ {
+ return warehouseId;
+ }
+
+ public void setWarehouseId(Integer warehouseId)
+ {
+ this.warehouseId = warehouseId;
+ }
+ public Integer getDocumentId() {
+ return documentId;
+ }
+ public void setDocumentId(Integer documentId) {
+ this.documentId = documentId;
+ }
+
+ public String getETAFilter()
+ {
+ return ETAFilter;
+ }
+
+ public void setETAFilter(String filter)
+ {
+ ETAFilter = filter;
+ }
+
+ public Integer getDesign()
+ {
+ return design;
+ }
+ public void setDesign(Integer design)
+ {
+ this.design = design;
+ }
+ public Integer getSize()
+ {
+ return size;
+ }
+ public void setSize(Integer size)
+ {
+ this.size = size;
+ }
+ public Integer getStyle()
+ {
+ return style;
+ }
+ public void setStyle(Integer style)
+ {
+ this.style = style;
+ }
+
+ public Integer getColourAttributeValueId()
+ {
+ return colourAttributeValueId;
+ }
+
+ public void setColourAttributeValueId(Integer colourAttributeValueId)
+ {
+ this.colourAttributeValueId = colourAttributeValueId;
+ }
+
+ public Integer getDesignAttributeValueId()
+ {
+ return designAttributeValueId;
+ }
+
+ public void setDesignAttributeValueId(Integer designAttributeValueId)
+ {
+ this.designAttributeValueId = designAttributeValueId;
+ }
+
+ public Integer getModelAttributeValueId()
+ {
+ return modelAttributeValueId;
+ }
+
+ public void setModelAttributeValueId(Integer modelAttributeValueId)
+ {
+ this.modelAttributeValueId = modelAttributeValueId;
+ }
+
+ public Integer getSizeAttributeValueId()
+ {
+ return sizeAttributeValueId;
+ }
+
+ public void setSizeAttributeValueId(Integer sizeAttributeValueId)
+ {
+ this.sizeAttributeValueId = sizeAttributeValueId;
+ }
+
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public void setDescription(String description)
+ {
+ this.description = description;
+ }
+
+ public String getOrderType()
+ {
+ return orderType;
+ }
+
+ public void setOrderType(String orderType)
+ {
+ this.orderType = orderType;
+ }
+
+ public Integer getAttributeId()
+ {
+ return attributeId;
+ }
+
+ public void setAttributeId(Integer attributeId)
+ {
+ this.attributeId = attributeId;
+ }
+
+ public String getKeyword()
+ {
+ return keyword;
+ }
+
+ public void setKeyword(String keyword)
+ {
+ this.keyword = keyword;
+ }
+
+ public String getBackOrder()
+ {
+ return backOrder;
+ }
+
+ public void setBackOrder(String backOrder)
+ {
+ this.backOrder = backOrder;
+ }
+
+ public String getFieldName()
+ {
+ return fieldName;
+ }
+
+ public void setFieldName(String fieldName)
+ {
+ this.fieldName = fieldName;
+ }
+
+ public Integer getProductId()
+ {
+ return productId;
+ }
+
+ public void setProductId(Integer productId)
+ {
+ this.productId = productId;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/StockMovementBean.java b/posterita/posterita/src/main/org/posterita/beans/StockMovementBean.java
new file mode 100644
index 0000000000..4fd1f1dcf3
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/StockMovementBean.java
@@ -0,0 +1,459 @@
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+
+public class StockMovementBean
+{
+ private String isApproved;
+ private String address1;
+ private String address2;
+ private Integer movementLineId;
+ private Integer lineNo;
+ private Integer moveConfirmId;
+ private String orgFromName;
+ private String orgToName;
+ private Integer index;
+ private String movementDate;
+ private String documentNo;
+ private String documentType;
+ private String docStatus;
+ private Integer movementId;
+ private Integer refNo;
+ private StockMovementBean stock;
+ private ArrayList stockList;
+ private Boolean isActive;
+ private Integer orgFromId;
+ private Integer orgToId;
+ private BigDecimal qtyToMove;
+ private BigDecimal qtyOnHand;
+ private Integer orgId;
+ private String uom;
+ private Integer productId;
+ private String productName;
+ private String description;
+ private String barCode;
+ private BigDecimal quantity;
+ private String orgName;
+ private String fromDate;
+ private String toDate;
+ private Integer salesPriceListId;
+ private BigDecimal stockValue;
+ private String ifAdd;
+ private Integer priceListId;
+ private Integer noOfPack;
+ private String reference;
+ private Integer month;
+ private Integer year;
+
+ public BigDecimal getStockValue()
+ {
+ return stockValue;
+ }
+
+ public void setStockValue(BigDecimal stockValue)
+ {
+ this.stockValue = stockValue;
+ }
+
+ public Integer getSalesPriceListId()
+ {
+ return salesPriceListId;
+ }
+
+ public void setSalesPriceListId(Integer salesPriceListId)
+ {
+ this.salesPriceListId = salesPriceListId;
+ }
+
+ public String getIsApproved()
+ {
+ return isApproved;
+ }
+
+ public void setIsApproved(String isApproved)
+ {
+ this.isApproved = isApproved;
+ }
+
+ public String getAddress1()
+ {
+ return address1;
+ }
+
+ public void setAddress1(String address1)
+ {
+ this.address1 = address1;
+ }
+
+ public String getAddress2()
+ {
+ return address2;
+ }
+
+ public void setAddress2(String address2)
+ {
+ this.address2 = address2;
+ }
+
+ public Integer getMovementLineId()
+ {
+ return movementLineId;
+ }
+
+ public void setMovementLineId(Integer movementLineId)
+ {
+ this.movementLineId = movementLineId;
+ }
+
+ public Integer getLineNo()
+ {
+ return lineNo;
+ }
+
+ public void setLineNo(Integer lineNo)
+ {
+ this.lineNo = lineNo;
+ }
+
+ public Integer getMoveConfirmId()
+ {
+ return moveConfirmId;
+ }
+
+ public void setMoveConfirmId(Integer moveConfirmId)
+ {
+ this.moveConfirmId = moveConfirmId;
+ }
+
+ public String getOrgFromName()
+ {
+ return orgFromName;
+ }
+
+ public void setOrgFromName(String orgFromName)
+ {
+ this.orgFromName = orgFromName;
+ }
+
+ public String getOrgToName()
+ {
+ return orgToName;
+ }
+
+ public void setOrgToName(String orgToName)
+ {
+ this.orgToName = orgToName;
+ }
+
+ public Integer getIndex()
+ {
+ return index;
+ }
+
+ public void setIndex(Integer index)
+ {
+ this.index = index;
+ }
+
+ public String getMovementDate()
+ {
+ return movementDate;
+ }
+
+ public void setMovementDate(String movementDate)
+ {
+ this.movementDate = movementDate;
+ }
+
+ public String getDocumentNo()
+ {
+ return documentNo;
+ }
+
+ public void setDocumentNo(String documentNo)
+ {
+ this.documentNo = documentNo;
+ }
+
+ public String getDocumentType()
+ {
+ return documentType;
+ }
+
+ public void setDocumentType(String documentType)
+ {
+ this.documentType = documentType;
+ }
+
+ public String getDocStatus()
+ {
+ return docStatus;
+ }
+
+ public void setDocStatus(String docStatus)
+ {
+ this.docStatus = docStatus;
+ }
+
+ public Integer getMovementId()
+ {
+ return movementId;
+ }
+
+ public void setMovementId(Integer movementId)
+ {
+ this.movementId = movementId;
+ }
+
+ public Integer getRefNo()
+ {
+ return refNo;
+ }
+
+ public void setRefNo(Integer refNo)
+ {
+ this.refNo = refNo;
+ }
+
+ public StockMovementBean getStock()
+ {
+ return stock;
+ }
+
+ public void setStock(StockMovementBean stock)
+ {
+ this.stock = stock;
+ }
+
+ public ArrayList getStockList()
+ {
+ return stockList;
+ }
+
+ public void setStockList(ArrayList stockList)
+ {
+ this.stockList = stockList;
+ }
+
+ public Boolean getIsActive()
+ {
+ return isActive;
+ }
+
+ public void setIsActive(Boolean isActive)
+ {
+ this.isActive = isActive;
+ }
+
+ public Integer getOrgFromId()
+ {
+ return orgFromId;
+ }
+
+ public void setOrgFromId(Integer orgFromId)
+ {
+ this.orgFromId = orgFromId;
+ }
+
+ public Integer getOrgToId()
+ {
+ return orgToId;
+ }
+
+ public void setOrgToId(Integer orgToId)
+ {
+ this.orgToId = orgToId;
+ }
+
+ public BigDecimal getQtyToMove()
+ {
+ return qtyToMove;
+ }
+
+ public void setQtyToMove(BigDecimal qtyToMove)
+ {
+ this.qtyToMove = qtyToMove;
+ }
+
+ public BigDecimal getQtyOnHand()
+ {
+ return qtyOnHand;
+ }
+
+ public void setQtyOnHand(BigDecimal qtyOnHand)
+ {
+ this.qtyOnHand = qtyOnHand;
+ }
+
+ public Integer getOrgId()
+ {
+ return orgId;
+ }
+
+ public void setOrgId(Integer orgId)
+ {
+ this.orgId = orgId;
+ }
+
+ public String getUom()
+ {
+ return uom;
+ }
+
+ public void setUom(String uom)
+ {
+ this.uom = uom;
+ }
+
+ public Integer getProductId()
+ {
+ return productId;
+ }
+
+ public void setProductId(Integer productId)
+ {
+ this.productId = productId;
+ }
+
+ public String getProductName()
+ {
+ return productName;
+ }
+
+ public void setProductName(String productName)
+ {
+ this.productName = productName;
+ }
+
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public void setDescription(String description)
+ {
+ this.description = description;
+ }
+
+ public String getBarCode()
+ {
+ return barCode;
+ }
+
+ public void setBarCode(String barCode)
+ {
+ this.barCode = barCode;
+ }
+
+ public void setQuantity(BigDecimal quantity)
+ {
+ this.quantity = quantity;
+ }
+
+ public BigDecimal getQuantity()
+ {
+ return this.quantity;
+ }
+
+ public String getOrgName()
+ {
+ return orgName;
+ }
+
+ public void setOrgName(String orgName)
+ {
+ this.orgName = orgName;
+ }
+
+ public String getFromDate()
+ {
+ return fromDate;
+ }
+
+ public void setFromDate(String fromDate)
+ {
+ this.fromDate = fromDate;
+ }
+
+ public String getToDate()
+ {
+ return toDate;
+ }
+
+ public void setToDate(String toDate)
+ {
+ this.toDate = toDate;
+ }
+
+ public String getIfAdd() {
+ return ifAdd;
+ }
+ public void setIfAdd(String ifAdd) {
+ this.ifAdd = ifAdd;
+ }
+
+ public void updateQuantity(StockMovementBean original, StockMovementBean itemToAdd, boolean add)
+ {
+ BigDecimal originalQuantity = original.getQtyToMove();
+
+ BigDecimal quantityToAdd = itemToAdd.getQtyToMove();
+
+ BigDecimal finalQuantity = null;
+
+ if(!add)
+ finalQuantity= originalQuantity.subtract(quantityToAdd);
+ else
+ finalQuantity= originalQuantity.add(quantityToAdd);
+
+
+ original.setQtyToMove(finalQuantity);
+ }
+
+ public Integer getPriceListId()
+ {
+ return priceListId;
+ }
+
+ public void setPriceListId(Integer priceListId)
+ {
+ this.priceListId = priceListId;
+ }
+
+ public Integer getNoOfPack()
+ {
+ return noOfPack;
+ }
+
+ public void setNoOfPack(Integer noOfPack)
+ {
+ this.noOfPack = noOfPack;
+ }
+
+ public String getReference()
+ {
+ return reference;
+ }
+
+ public void setReference(String reference)
+ {
+ this.reference = reference;
+ }
+
+ public Integer getMonth()
+ {
+ return month;
+ }
+ public void setMonth(Integer month)
+ {
+ this.month = month;
+ }
+ public Integer getYear()
+ {
+ return year;
+ }
+ public void setYear(Integer year)
+ {
+ this.year = year;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/SynchronizationBean.java b/posterita/posterita/src/main/org/posterita/beans/SynchronizationBean.java
new file mode 100644
index 0000000000..80e22b9ba8
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/SynchronizationBean.java
@@ -0,0 +1,75 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ **/
+
+/**
+ @author ashley
+ */
+
+package org.posterita.beans;
+
+import java.util.ArrayList;
+
+public class SynchronizationBean
+{
+ private ArrayList productNotInactivatedList;
+ private int productsInactivated;
+ private int errorsProductInactivate;
+
+ public SynchronizationBean()
+ {
+ productNotInactivatedList = new ArrayList();
+ }
+
+ public int getErrorsProductInactivate()
+ {
+ return errorsProductInactivate;
+ }
+
+ public void setErrorsProductInactivate(int errorsProductInactivate)
+ {
+ this.errorsProductInactivate = errorsProductInactivate;
+ }
+
+ public ArrayList getProductNotInactivatedList()
+ {
+ return productNotInactivatedList;
+ }
+
+ public void setProductNotInactivatedList(ArrayList productNotInactivatedList)
+ {
+ this.productNotInactivatedList = productNotInactivatedList;
+ }
+
+ public int getProductsInactivated()
+ {
+ return productsInactivated;
+ }
+
+ public void setProductsInactivated(int productsInactivated)
+ {
+ this.productsInactivated = productsInactivated;
+ }
+
+ public void addNotInactivatedProduct(String productName)
+ {
+ this.productNotInactivatedList.add(productName);
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/SynchronizeCollectionBean.java b/posterita/posterita/src/main/org/posterita/beans/SynchronizeCollectionBean.java
new file mode 100644
index 0000000000..833c8c5af2
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/SynchronizeCollectionBean.java
@@ -0,0 +1,89 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ **/
+
+/**
+ @author ashley
+ */
+
+package org.posterita.beans;
+
+public class SynchronizeCollectionBean extends UDIBean
+{
+ public String getStartDay()
+ {
+ return startDay;
+ }
+
+ public void setStartDay(String startDay)
+ {
+ this.startDay = startDay;
+ }
+
+ public String getStartHour()
+ {
+ return startHour;
+ }
+
+ public void setStartHour(String startHour)
+ {
+ this.startHour = startHour;
+ }
+
+ public String getStartMinute()
+ {
+ return startMinute;
+ }
+
+ public void setStartMinute(String startMinute)
+ {
+ this.startMinute = startMinute;
+ }
+
+ public String getStartMonth()
+ {
+ return startMonth;
+ }
+
+ public void setStartMonth(String startMonth)
+ {
+ this.startMonth = startMonth;
+ }
+
+ public String getStartYear()
+ {
+ return startYear;
+ }
+
+ public void setStartYear(String startYear)
+ {
+ this.startYear = startYear;
+ }
+
+ public String getFromDate()
+ {
+ return fromDate;
+ }
+
+ public void setFromDate(String fromDate)
+ {
+ this.fromDate = fromDate;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/TShirtProductDetailsBean.java b/posterita/posterita/src/main/org/posterita/beans/TShirtProductDetailsBean.java
new file mode 100644
index 0000000000..9b05ce4651
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/TShirtProductDetailsBean.java
@@ -0,0 +1,61 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+* Created on May 5, 2006 by ashley
+*
+*/
+
+package org.posterita.beans;
+
+public class TShirtProductDetailsBean extends UDIBean
+{
+
+
+ public String[] getColours()
+ {
+ return colours;
+ }
+ public void setColours(String[] colours)
+ {
+ this.colours = colours;
+ }
+ public String[] getSizes()
+ {
+ return sizes;
+ }
+ public void setSizes(String[] sizes)
+ {
+ this.sizes = sizes;
+ }
+ public Integer getProductId()
+ {
+ return productId;
+ }
+ public void setProductId(Integer productId)
+ {
+ this.productId = productId;
+ }
+ public String getImageLink()
+ {
+ return imageLink;
+ }
+ public void setImageLink(String imageLink)
+ {
+ this.imageLink = imageLink;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/TabularReportRecordBean.java b/posterita/posterita/src/main/org/posterita/beans/TabularReportRecordBean.java
new file mode 100644
index 0000000000..9c488c5f36
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/TabularReportRecordBean.java
@@ -0,0 +1,68 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 06-Oct-2006 10:51:52 by praveen
+ *
+ */
+
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+
+public class TabularReportRecordBean
+{
+ private String productName;
+ private String date;
+ private BigDecimal price;
+ private BigDecimal qty;
+
+ public String getDate() {
+ return date;
+ }
+
+ public void setDate(String date) {
+ this.date = date;
+ }
+
+ public BigDecimal getPrice() {
+ return price;
+ }
+
+ public void setPrice(BigDecimal price) {
+ this.price = price;
+ }
+
+ public String getProductName() {
+ return productName;
+ }
+
+ public void setProductName(String productName) {
+ this.productName = productName;
+ }
+
+ public BigDecimal getQty() {
+ return qty;
+ }
+
+ public void setQty(BigDecimal qty) {
+ this.qty = qty;
+ }
+
+
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/TaxBean.java b/posterita/posterita/src/main/org/posterita/beans/TaxBean.java
new file mode 100644
index 0000000000..144239c96d
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/TaxBean.java
@@ -0,0 +1,81 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on Nov 28, 2006
+ */
+
+
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+
+
+public class TaxBean extends UDIBean
+{
+
+ public Integer getOrgId() {
+ return orgId;
+ }
+ public void setOrgId(Integer orgId) {
+ this.orgId = orgId;
+ }
+ public Boolean getIsActive() {
+ return isActive;
+ }
+ public void setIsActive(Boolean isActive) {
+ this.isActive = isActive;
+ }
+ public String getDescription() {
+ return description;
+ }
+ public void setDescription(String description) {
+ this.description = description;
+ }
+ public Boolean getIsTaxExempted() {
+ return isTaxExempted;
+ }
+ public void setIsTaxExempted(Boolean isTaxExempted) {
+ this.isTaxExempted = isTaxExempted;
+ }
+ public Integer getTaxCategoryId() {
+ return taxCategoryId;
+ }
+ public void setTaxCategoryId(Integer taxCategoryId) {
+ this.taxCategoryId = taxCategoryId;
+ }
+ public Integer getTaxId() {
+ return taxId;
+ }
+ public void setTaxId(Integer taxId) {
+ this.taxId = taxId;
+ }
+ public String getTaxName() {
+ return taxName;
+ }
+ public void setTaxName(String taxName) {
+ this.taxName = taxName;
+ }
+ public BigDecimal getTaxRate() {
+ return taxRate;
+ }
+ public void setTaxRate(BigDecimal taxRate) {
+ this.taxRate = taxRate;
+ }
+
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/TerminalBean.java b/posterita/posterita/src/main/org/posterita/beans/TerminalBean.java
new file mode 100644
index 0000000000..b50d366e9c
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/TerminalBean.java
@@ -0,0 +1,398 @@
+/******************************************************************************
+ * Product: Posterita Web-Based POS and Adempiere Plugin *
+ * Copyright (C) 2008 Posterita Ltd *
+ * This file is part of POSterita *
+ * *
+ * POSterita is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License along *
+ * with this program; if not, write to the Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *
+ *****************************************************************************/
+package org.posterita.beans;
+
+import java.sql.Timestamp;
+
+/**
+ * @author Ashley G Ramdass Apr 14, 2008
+ */
+public class TerminalBean extends UDIBean
+{
+ protected Integer terminalId;
+ protected Integer purchasePriceListId;
+ protected Integer salesPriceListId;
+
+ protected String cashbookTransferType;
+ protected String checkTransferType;
+ protected String cardTransferType;
+ protected Integer cardBankAccountId;
+ protected Integer checkBankAccountId;
+ protected Integer templateBPartnerId;
+ protected Integer cashbookTransferCashbookId;
+ protected Integer cashbookTransferBankAccountId;
+ protected Integer checkTransferCashbookId;
+ protected Integer checkTransferBankAccountId;
+ protected Integer cardTransferCashbookId;
+ protected Integer cardTransferBankAccountId;
+ protected Boolean autoLock;
+ protected Boolean locked;
+ protected Integer lockingTime;
+ protected Timestamp lastLockTime;
+ protected Timestamp unlockingTime;
+
+ private String orgName;
+ private String poPriceList;
+ private String soPriceList;
+ private Boolean isCurrentTerminal = false;
+
+ public Integer getTerminalId()
+ {
+ return (terminalId == null ? 0 : terminalId) ;
+ }
+
+ public void setTerminalId(Integer terminalId)
+ {
+ this.terminalId = terminalId;
+ }
+
+ public String getName()
+ {
+ return this.name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public Integer getOrgId()
+ {
+ return (orgId == null ? 0 : orgId);
+ }
+
+ public void setOrgId(Integer orgId)
+ {
+ this.orgId = orgId;
+ }
+
+ public Integer getBpartnerId()
+ {
+ return (bpartnerId == null ? 0 : bpartnerId);
+ }
+
+ public void setBpartnerId(Integer bpartnerId)
+ {
+ this.bpartnerId = bpartnerId;
+ }
+
+ public Integer getWarehouseId()
+ {
+ return (warehouseId == null ? 0 : warehouseId);
+ }
+
+ public void setWarehouseId(Integer warehouseId)
+ {
+ this.warehouseId = warehouseId;
+ }
+
+ public Integer getPurchasePriceListId()
+ {
+ return (purchasePriceListId == null ? 0 : purchasePriceListId);
+ }
+
+ public void setPurchasePriceListId(Integer purchasePriceListId)
+ {
+ this.purchasePriceListId = purchasePriceListId;
+ }
+
+ public Integer getSalesPriceListId()
+ {
+ return (salesPriceListId == null ? 0 : salesPriceListId);
+ }
+
+ public void setSalesPriceListId(Integer salesPriceListId)
+ {
+ this.salesPriceListId = salesPriceListId;
+ }
+
+ public Integer getCashBookId()
+ {
+ return (cashBookId == null ? 0 : cashBookId);
+ }
+
+ public void setCashBookId(Integer cashBookId)
+ {
+ this.cashBookId = cashBookId;
+ }
+
+ public Integer getCheckBankAccountId()
+ {
+ return (checkBankAccountId == null ? 0 : checkBankAccountId);
+ }
+
+ public void setCheckBankAccountId(Integer checkBankAccountId)
+ {
+ this.checkBankAccountId = checkBankAccountId;
+ }
+
+ public Boolean getAutoLock()
+ {
+ return autoLock;
+ }
+
+ public void setAutoLock(Boolean autoLock)
+ {
+ this.autoLock = autoLock;
+ }
+
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public void setDescription(String description)
+ {
+ this.description = description;
+ }
+
+ public Integer getTemplateBPartnerId()
+ {
+ return (templateBPartnerId == null ? 0 : templateBPartnerId);
+ }
+
+ public void setTemplateBPartnerId(Integer templateBPartnerId)
+ {
+ this.templateBPartnerId = templateBPartnerId;
+ }
+
+ public Integer getCashbookTransferCashbookId()
+ {
+ return (cashbookTransferCashbookId == null ? 0 : cashbookTransferCashbookId);
+ }
+
+ public void setCashbookTransferCashbookId(Integer cashTransferCashbookId)
+ {
+ this.cashbookTransferCashbookId = cashTransferCashbookId;
+ }
+
+ public Integer getCashbookTransferBankAccountId()
+ {
+ return cashbookTransferBankAccountId;
+ }
+
+ public void setCashbookTransferBankAccountId(Integer cashTransferBankAccountId)
+ {
+ this.cashbookTransferBankAccountId = cashTransferBankAccountId;
+ }
+
+ public Integer getCheckTransferCashbookId()
+ {
+ return checkTransferCashbookId;
+ }
+
+ public void setCheckTransferCashbookId(Integer checkTransferCashbookId)
+ {
+ this.checkTransferCashbookId = checkTransferCashbookId;
+ }
+
+ public Integer getCheckTransferBankAccountId()
+ {
+ return checkTransferBankAccountId;
+ }
+
+ public void setCheckTransferBankAccountId(Integer checkTransferBankAccountId)
+ {
+ this.checkTransferBankAccountId = checkTransferBankAccountId;
+ }
+
+ public Integer getCardTransferCashbookId()
+ {
+ return cardTransferCashbookId;
+ }
+
+ public void setCardTransferCashbookId(Integer cardTransferCashbookId)
+ {
+ this.cardTransferCashbookId = cardTransferCashbookId;
+ }
+
+ public Integer getCardTransferBankAccountId()
+ {
+ return (cardTransferBankAccountId == null ? 0 : cardTransferBankAccountId);
+ }
+
+ public void setCardTransferBankAccountId(
+ Integer cardTransferBankAccountId)
+ {
+ this.cardTransferBankAccountId = cardTransferBankAccountId;
+ }
+
+ public Boolean getLocked()
+ {
+ return locked;
+ }
+
+ public void setLocked(Boolean locked)
+ {
+ this.locked = locked;
+ }
+
+ public Integer getCardBankAccountId()
+ {
+ return (cardBankAccountId == null ? 0 : cardBankAccountId);
+ }
+
+ public void setCardBankAccountId(Integer cardBankAccountId)
+ {
+ this.cardBankAccountId = cardBankAccountId;
+ }
+
+ public String getCashbookTransferType()
+ {
+ return cashbookTransferType;
+ }
+
+ public void setCashbookTransferType(String cashbookTransferType)
+ {
+ this.cashbookTransferType = cashbookTransferType;
+ }
+
+ public String getCheckTransferType()
+ {
+ return checkTransferType;
+ }
+
+ public void setCheckTransferType(String checkTransferType)
+ {
+ this.checkTransferType = checkTransferType;
+ }
+
+ public String getCardTransferType()
+ {
+ return cardTransferType;
+ }
+
+ public void setCardTransferType(String cardTransferType)
+ {
+ this.cardTransferType = cardTransferType;
+ }
+
+ /**
+ * @return the lockingTime
+ */
+ public Integer getLockingTime()
+ {
+ return lockingTime;
+ }
+
+ /**
+ * @param lockingTime the lockingTime to set
+ */
+ public void setLockingTime(Integer lockingTime)
+ {
+ this.lockingTime = lockingTime;
+ }
+
+ /**
+ * @return the orgName
+ */
+ public String getOrgName()
+ {
+ return orgName;
+ }
+
+ /**
+ * @param orgName the orgName to set
+ */
+ public void setOrgName(String orgName)
+ {
+ this.orgName = orgName;
+ }
+
+ /**
+ * @return the poPriceList
+ */
+ public String getPoPriceList()
+ {
+ return poPriceList;
+ }
+
+ /**
+ * @param poPriceList the poPriceList to set
+ */
+ public void setPoPriceList(String poPriceList)
+ {
+ this.poPriceList = poPriceList;
+ }
+
+ /**
+ * @return the soPriceList
+ */
+ public String getSoPriceList()
+ {
+ return soPriceList;
+ }
+
+ /**
+ * @param soPriceList the soPriceList to set
+ */
+ public void setSoPriceList(String soPriceList)
+ {
+ this.soPriceList = soPriceList;
+ }
+
+ /**
+ * @return the lastLockTime
+ */
+ public Timestamp getLastLockTime()
+ {
+ return lastLockTime;
+ }
+
+ /**
+ * @param lastLockTime the lastLockTime to set
+ */
+ public void setLastLockTime(Timestamp lastLockTime)
+ {
+ this.lastLockTime = lastLockTime;
+ }
+
+ /**
+ * @return the unlockingTime
+ */
+ public Timestamp getUnlockingTime()
+ {
+ return unlockingTime;
+ }
+
+ /**
+ * @param unlockingTime the unlockingTime to set
+ */
+ public void setUnlockingTime(Timestamp unlockingTime)
+ {
+ this.unlockingTime = unlockingTime;
+ }
+
+ /**
+ * @return The isCurrentTerminal
+ */
+ public Boolean getIsCurrentTerminal()
+ {
+ return isCurrentTerminal;
+ }
+
+ /**
+ * @param isCurrentTerminal The isCurrentTerminal to set
+ */
+ public void setIsCurrentTerminal(Boolean isCurrentTerminal)
+ {
+ this.isCurrentTerminal = isCurrentTerminal;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/TestMod.java b/posterita/posterita/src/main/org/posterita/beans/TestMod.java
new file mode 100644
index 0000000000..aedc1ea9ca
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/TestMod.java
@@ -0,0 +1,17 @@
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+
+public class TestMod
+{
+ public static void main(String args[])
+ {
+ BigDecimal qtyOnHand = new BigDecimal(100);
+ BigDecimal qtyEntered = new BigDecimal(50);
+ BigDecimal qtyOrdered = new BigDecimal(25);
+
+ BigDecimal qty = qtyOnHand.multiply(qtyEntered).divide(qtyOrdered, 12, BigDecimal.ROUND_HALF_UP);
+
+ System.out.println(qty);
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/TradeInBean.java b/posterita/posterita/src/main/org/posterita/beans/TradeInBean.java
new file mode 100644
index 0000000000..4f1f3c36a2
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/TradeInBean.java
@@ -0,0 +1,56 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+package org.posterita.beans;
+
+
+public class TradeInBean extends CustomerBean
+{
+
+ public Integer getBpartnerId()
+ {
+ return bpartnerId;
+ }
+
+ public void setBpartnerId(Integer bpartnerId)
+ {
+ this.bpartnerId = bpartnerId;
+ }
+
+ public Double getPriceEntered()
+ {
+ return priceEntered;
+ }
+
+ public void setPriceEntered(Double priceEntered)
+ {
+ this.priceEntered = priceEntered;
+ }
+
+ public String getVinNumber()
+ {
+ return vinNumber;
+ }
+
+ public void setVinNumber(String vinNumber)
+ {
+ this.vinNumber = vinNumber;
+ }
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/TrendsBean.java b/posterita/posterita/src/main/org/posterita/beans/TrendsBean.java
new file mode 100644
index 0000000000..d6b82b7077
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/TrendsBean.java
@@ -0,0 +1,121 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on Dec 15, 2005 by praveen
+ *
+ */
+package org.posterita.beans;
+
+public class TrendsBean
+{
+ private String model;
+ private String colour;
+ private int a1,m1;
+ private int a2,m2;
+ private int a3,m3;
+ private int sA1,sA2,sA3;
+ private int sM1,sM2,sM3;
+
+ public TrendsBean(){}
+
+
+ public int getA1() {
+ return a1;
+ }
+ public void setA1(int a1) {
+ this.a1 = a1;
+ }
+ public int getA2() {
+ return a2;
+ }
+ public void setA2(int a2) {
+ this.a2 = a2;
+ }
+ public int getA3() {
+ return a3;
+ }
+ public void setA3(int a3) {
+ this.a3 = a3;
+ }
+ public String getColour() {
+ return colour;
+ }
+ public void setColour(String colour) {
+ this.colour = colour;
+ }
+ public int getM1() {
+ return m1;
+ }
+ public void setM1(int m1) {
+ this.m1 = m1;
+ }
+ public int getM2() {
+ return m2;
+ }
+ public void setM2(int m2) {
+ this.m2 = m2;
+ }
+ public int getM3() {
+ return m3;
+ }
+ public void setM3(int m3) {
+ this.m3 = m3;
+ }
+ public String getModel() {
+ return model;
+ }
+ public void setModel(String model) {
+ this.model = model;
+ }
+ public int getSA1() {
+ return sA1;
+ }
+ public void setSA1(int sa1) {
+ sA1 = sa1;
+ }
+ public int getSA2() {
+ return sA2;
+ }
+ public void setSA2(int sa2) {
+ sA2 = sa2;
+ }
+ public int getSA3() {
+ return sA3;
+ }
+ public void setSA3(int sa3) {
+ sA3 = sa3;
+ }
+ public int getSM1() {
+ return sM1;
+ }
+ public void setSM1(int sm1) {
+ sM1 = sm1;
+ }
+ public int getSM2() {
+ return sM2;
+ }
+ public void setSM2(int sm2) {
+ sM2 = sm2;
+ }
+ public int getSM3() {
+ return sM3;
+ }
+ public void setSM3(int sm3) {
+ sM3 = sm3;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/UDIBean.java b/posterita/posterita/src/main/org/posterita/beans/UDIBean.java
new file mode 100644
index 0000000000..f8428a597e
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/UDIBean.java
@@ -0,0 +1,816 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Stack;
+import java.util.Vector;
+
+import org.apache.struts.upload.FormFile;
+import org.posterita.core.JulianDate;
+
+public class UDIBean
+{
+ protected String bpAddress2;
+ protected String aaCardnumber;
+ protected String accountNo;
+ protected String accountType;
+ protected String accountName;
+ protected String address1;
+ protected String address2;
+ protected Boolean agreement;
+ protected String aisle;
+ protected Integer allocationId;
+ protected String allocationStatus;
+ protected String area;
+ protected String attribute;
+ protected Integer attributeId;
+ protected Integer attributeSetId;
+ protected Integer attributeSetInstanceId;
+ protected Integer [] sernoAttributeSetInstanceIds;
+ protected String attributeValue;
+ protected String availableForBackOrderFilter ="availableForBackOrder in ('Y', 'N')";
+ protected Integer bankId;
+ protected Integer bankAccountId;
+ protected String bankName;
+ protected Integer basePriceListId;
+ protected String bin;
+ protected Integer bpartnerId;
+ protected Integer bPartnerLocationId;
+ protected Integer [] checkBox;
+ protected Boolean isChecked;
+ protected String checkNo;
+ protected String city;
+ protected Timestamp closingDate;
+ protected Integer colour;
+ protected String confirmEmail;
+ protected String confirmPassword;
+ protected Integer cost;
+ protected String counterOrderStatusInfo;
+ protected Integer counterOrgID;
+ protected String counterOrgName;
+ protected Double currentBalance;
+ protected String custIdNumber;
+ protected Timestamp dateCreated;
+ protected Timestamp dateUpdated;
+ protected Timestamp dateInvoiced;
+ protected Timestamp dateMovement;
+ protected Timestamp dateOrdered;
+ protected String datePromised;
+ protected Timestamp dateTrx;
+ protected String dealerName;
+ protected String description;
+ protected String district;
+ protected String docStatus;
+ protected Integer tradeInOrderlineId;
+ protected Integer attributeValueId;
+ protected String forward;
+ protected String birthdate;
+
+ protected Boolean isFullAccess;
+ protected Boolean isOverwritePriceLimit;
+
+ protected Boolean openDrawer = Boolean.TRUE;
+
+
+
+ protected String docStatusCode;
+
+ //1 is reserved -0 not reserved
+
+ protected Integer documentId;
+ protected String documentNo;
+
+ protected String documentType;
+ protected String email;
+ protected String endDay;
+
+ protected String endHour;
+ protected String endMinute;
+ protected String endMonth;
+ protected String endYear;
+ protected String engineNo;
+ protected String engineNumber;
+ protected String fax;
+ protected String fromDate;
+ protected Integer fromOrderLineId;
+ protected Integer grandTotal;
+ protected BigDecimal grossProfit;
+ protected BigDecimal grossProfitPercentage;
+ protected BigDecimal totalGrossProfit;
+ protected BigDecimal totalGrossProfitPercentage;
+ protected Integer id;
+ protected Integer index;
+ protected Integer inOutId;
+ protected Integer invoiceId;
+ protected Boolean isAccessAllOrgs;
+ protected Boolean a;
+ protected String isApproved;
+ protected Boolean isAutomobile;
+ protected Boolean isAvailableForBackOrder = Boolean.valueOf("True");
+ protected Boolean isClosable;
+ protected Boolean isCustomer;
+ protected Boolean isDefault = false;
+ protected String isDelivered;
+ protected Boolean isEmployee;
+
+ protected String isInvoiced;
+ protected Boolean isMandatory = false;
+ protected Boolean isMotorcycle;
+ protected Boolean isNatisReleased;
+ protected String isPaid;
+ protected Boolean isPresentForProduct;
+ protected Boolean isPublic;
+ protected Boolean isQtyReserved;
+ protected String isReceipt;
+ protected Boolean isRetailer;
+ protected Boolean isSalesRep;
+ protected Boolean isActive = false;
+ protected Boolean isSoTrx;
+ protected Boolean isVendor;
+ protected Boolean isVisible;
+ protected Boolean isWholesaler;
+ protected String level;
+ protected BigDecimal limitPrice;
+ protected BigDecimal limitPriceIncl;
+ protected BigDecimal lineAmt;
+ protected Integer lineNetAmt;
+ protected Integer lineNo;
+ protected Integer lineTotalAmt;
+ protected ArrayList list;
+ protected BigDecimal listPrice;
+ protected BigDecimal listPriceIncl;
+ protected String location;
+ protected Integer locationId;
+ protected Integer locatorId;
+ protected String locatorName;
+ protected String logoName;
+ protected Integer m_attributesetinstance_id;
+ protected String maintenanceContractNumber;
+ protected Integer make;
+ protected Integer menuId;
+ protected String menuItemName;
+ protected String menuLink;
+ protected String message;
+ protected Integer messageID;
+ protected Integer minOutId;
+ protected String mobile;
+ protected Integer model;
+ protected Integer modelGroup;
+ protected Integer month;
+ protected Integer movementId;
+ protected Integer moveConfirmId;
+ protected Integer movementLineId;
+ protected String name;
+
+
+ protected Integer natisReleaseId;
+ protected String newEmail;
+ protected String newPassword;
+ protected Integer nextAvailableLocatorId;
+ protected String oldPassword;
+ protected Integer orderId;
+ protected ArrayList orderLineBean;
+ protected ArrayList roleBeanList = new ArrayList();
+ protected Integer orderLineId;
+ protected int [] orderLineIds;
+ protected ArrayList orderLineList = new ArrayList();
+ protected ArrayList InventoryLineList = new ArrayList();
+ protected String orderStatusInfo;
+ protected String orderType;
+ protected Integer orgFromId;
+ protected String orgFromName;
+ protected Integer orgToId;
+ protected String orgToName;
+ protected String orgName;
+ protected String orgType;
+ protected Vector orgUsers;
+ protected Integer parentMenuId;
+ protected Integer partnerId;
+ protected Integer partnerLocationId;
+ protected String partnerName;
+ protected String password;
+ protected Stack path;
+ protected Integer payAmt;
+ protected Integer paymentId;
+ protected String phone;
+ protected String phone2;
+ protected String poReference;
+ protected String POReference;
+ protected String postalAddress;
+ protected String postalAddress1;
+ protected String postalCity;
+ protected String postalCode;
+ protected String postalPostalCode;
+ protected Integer prefOrderLineId;
+ protected BigDecimal priceActual;
+ protected Double priceEntered;
+ protected BigDecimal priceLimit;
+ protected BigDecimal priceList;
+ protected PriceListBean priceListBean;
+ protected ArrayList priceListBeanList;
+ protected Integer priceListVersionId;
+ protected ProductBean productBean;
+ protected ArrayList productBeanList = new ArrayList();
+ protected Integer productCategoryId;
+ protected BigDecimal price;
+
+ protected String productDetails;
+ protected Integer productId;
+ protected String productName;
+ protected Integer productQuantity;
+ protected Integer qtyInvoiced;
+ protected String qtyReserved;
+ protected BigDecimal quantity;
+ protected BigDecimal qtyOnHand;
+ protected BigDecimal qtyToMove;
+ protected String read;
+ protected Integer refInOutId;
+ protected Integer refNo;
+ protected Integer refOrderId;
+ protected Integer refOrderLineid;
+ protected Integer refToQuote;
+ protected ReportBean report;
+ ArrayList reportList = new ArrayList();;
+ protected String region;
+ protected Integer regionId;
+ protected String regionName;
+ protected String registerNumber;
+
+ protected Integer reserveStatus;
+
+ protected Integer roleId;
+ protected String roleName;
+ protected String routingNumber;
+ protected String sernoAttributeSetInstance;
+ protected String startDay;
+ protected String startHour;
+ protected String startMinute;
+ protected String startMonth;
+ protected String startYear;
+ protected Boolean status;
+ protected BigDecimal stdPrice;
+ protected BigDecimal stdPriceIncl;
+ protected Double stdPurchasePrice;
+ protected Double stdSalesPrice;
+ protected StockMovementBean stock;
+ protected ArrayList stockList = new ArrayList();
+ protected String subject;
+ protected String submit;
+
+ protected String surname;
+ protected Integer taxAmt;
+ protected Integer[] targetId;
+ protected String termsAgreement;
+ protected String toDate;
+ protected Integer toOrderLineId;
+ protected Integer totalLines;
+ protected Integer transmission;
+ protected Integer transmissionAttributeValueId;
+ protected String uom;
+ protected Integer userId;
+ protected Integer userID;
+ protected String username;
+ protected String vinNumber;
+ protected Integer warehouseId;
+
+ protected Integer wareHouseId;
+ protected String warehouseName;
+ protected String warehouseType;
+ protected Integer year;
+ protected Integer yearAttributeValueId;
+ protected Integer makeAttributeValueId;
+ protected String[] qtyTargeted;
+ protected String sotrxFlag;
+ protected String bpName;
+ protected String compiereDocStatus;
+ protected String hondaDocStatus;
+ protected Integer first;
+ protected Integer licensingDistrictId;
+ protected String licensingDistrict;
+
+ protected String passportNo;
+ protected String companyRegNo;
+
+ protected String unitNumber;
+ protected Integer unitsPerPack;
+ protected String productCode;
+ protected Integer vehicleSpecsId;
+ protected String natisApplicationDate;
+ protected Timestamp processedDate;
+
+ protected Timestamp natisRegistrationDate;
+ protected Timestamp wholesaleDate;
+ protected String natisControlNumber;
+ protected String natisRegisterNumber;
+ protected Integer natisModelNo;
+ protected String natisModelDescription;
+
+ protected Integer enginePower;
+ protected Integer engineCapacity;
+ protected Integer tare;
+ protected Integer noOfWheels;
+
+ protected Integer colourCodeMatchId;
+ protected String colourName;
+ protected String transmissionName;
+ protected String yearName;
+
+ protected String mainColourCode;
+ protected String countryOfImpCode;
+ protected String shippingInvNo;
+ protected String estimatedTimeOfArrival;
+ protected String colourCodeHES;
+
+ protected String licensingDistrictDescription;
+ protected String licensingDistrictCode;
+
+ protected String bpAddress;
+ protected String bpPostalAddress;
+
+ protected String bpPostalCode;
+ protected String bpCity;
+ protected String bpRegionName;
+ protected Integer bpRegionId;
+
+ protected String releaseStatus;
+ protected String releasedBy;
+ protected String reservedStatus;
+ protected Timestamp natisreleaseDate;
+
+ protected String uAddress1;
+ protected String uAddress2;
+ protected String uPostalAddress;
+ protected String uPostalCd;
+ protected String uCity;
+ protected String uRegion;
+
+ protected String colourGroup;
+
+ protected String modelMatching;
+
+ protected boolean isCar;
+ protected ArrayList showroomTrafficBean;
+
+ protected ArrayList showroomTrafficList = new ArrayList();
+ protected Integer sales;
+ protected Integer traffic;
+ protected Integer prospects;
+ protected String modelName;
+ protected Integer modelId;
+ protected Integer trxId;
+ protected Integer modelCode;
+ protected Integer modelCodeId;
+ protected String dealerCode;
+ protected Integer dealerCodeId;
+ protected Integer salesRepId;
+ protected Boolean isAllocationWarehouse;
+ protected String name2;
+ protected Boolean canAlterOrder;
+ protected Boolean canCreateOrder;
+ protected Boolean canViewOrder;
+ protected Timestamp wholeSaleDate;
+ protected Integer orderlineCount;
+ protected Integer orderlineInvoicedCount;
+ protected JulianDate startDate;
+ protected JulianDate endDate;
+ protected Integer weekNo;
+ protected Integer attributeSetInstance;
+ protected String makeName;
+ protected String financeOption;
+
+ protected String newVinNumber;
+ protected Integer attributesetinstanceIdFrom;
+ protected Integer attributesetinstanceIdTo;
+ protected ArrayList vinNumberList;
+ protected Integer productIds[];
+ protected String reservedBy;
+ protected Boolean isTradeIn = Boolean.valueOf("true");
+ protected String ETAFilter;
+ protected BigDecimal orderGrandTotal;
+ protected Integer orderIds[];
+
+
+ protected Integer mImportVehiclesId;
+ protected String natisModelNumber;
+ protected Timestamp vehEstimateTimeOfArrival;
+ protected String vehTare;
+ protected String vehEngineCapacity;
+ protected String vehNoOfWheels;
+ protected String vehEnginePower;
+ protected Boolean colourMatchingPresent;
+ protected Boolean modelMatchingPresent;
+ protected Boolean productPresent;
+ protected String vehImportErrDesc;
+
+ protected Integer modelMatchID;
+ protected String natisModelDesc;
+ protected String modelDesc;
+ protected String trans;
+ protected Boolean showActiveOnly;
+ protected Integer updateAttrValueId;
+ protected String active;
+ protected String visible;
+ protected Integer style;
+ protected Integer design;
+ protected Integer size;
+ protected String clientName;
+
+ protected Integer designAttributeValueId;
+ protected Integer modelAttributeValueId;
+ protected Integer sizeAttributeValueId;
+ protected Integer colourAttributeValueId;
+
+
+ protected BigDecimal endingBalance;
+ protected String endingBalanceAsString;
+ protected BigDecimal amount;
+ protected String trxType;
+ protected BigDecimal amountGiven;
+ protected BigDecimal amountRefunded;
+ protected Integer cashBookId;
+ protected Integer cashId;
+ protected Integer cashLineId;
+ protected String cashType;
+ protected String cashTypeName;
+ protected String cashBookName;
+ protected String chequeNo;
+ protected String creditCardType;
+ protected String creditCardNumber;
+ protected String creditCardNumberEncrypted;
+ protected Integer creditCardExpMonth;
+ protected String creditCardExpMonthName;
+ protected Integer creditCardExpYear;
+ protected Integer [] posOrderLineIds;
+ protected Integer posId;
+ protected String posName;
+ protected String posDesc;
+ protected String saleRepName;
+ protected Integer priceListId;
+ protected String priceListName;
+ protected String paymentRule;
+ protected Integer cashJournalId;
+ protected String cashJournalName;
+ protected String cashJournalDisc;
+ protected String statmentDate;
+ protected Timestamp dateAcct;
+ protected BigDecimal invoiceAmount;
+ protected BigDecimal differenceAmount;
+ protected BigDecimal generalExpenseAmount;
+ protected BigDecimal generalReceiptsAmount;
+ protected BigDecimal bankAcctTransferAmount;
+ protected BigDecimal transferAmount;
+ protected Integer cashBookIds;
+ protected BigDecimal beginingBalance;
+ protected String beginingBalanceAsString;
+ protected BigDecimal statementDifference;
+ protected String keyword;
+ protected String backOrder;
+ protected String fieldName;
+ protected String applicationName;
+ protected String applicationWebContext;
+ protected Integer storeId;
+ protected Boolean isWebstoreFeatured;
+ protected String brandName;
+ protected String designName;
+ protected String sizeName;
+ protected String keyword1;
+ protected String keyword2;
+ protected String keyword3;
+ protected String keyword4;
+ protected String[] sizes;
+ protected String[] colours;
+ protected String imageLink;
+
+ protected BigDecimal priceStandard;
+ protected String currency;//
+
+ protected BigDecimal cashTotal;
+ protected BigDecimal chequeTotal;
+ protected BigDecimal cardTotal;
+ protected BigDecimal tillGrandTotal;
+ protected String purchasePriceList;
+ protected String purchasePriceLimit;
+ protected String purchasePriceStandard;
+ protected String barCode;
+ protected String salesPriceList;
+ protected String salesPriceLimit;
+ protected String salesPriceStandard;
+ protected String reportType;
+ protected Integer noOfProductsRequired;
+ protected BigDecimal openingBalanceQty;
+ protected BigDecimal qtyOfGoodsSold;
+ protected BigDecimal qtyOfGoodsReceived;
+ protected BigDecimal qtyOfGoodsReturned;
+ protected BigDecimal closeingBalanceQty;
+ protected BigDecimal qtyReturnedByCustomer;
+ protected String qtyAndItem;
+ protected String[] discountPercent;
+ protected String [] actualPrice;
+ protected FormFile file;
+ protected FormFile logo;
+ protected FormFile image;
+
+ protected String userSurname;
+ protected Integer countryId;
+ protected String countryName;
+ protected String countryCode;
+
+ protected String newName;
+ protected String imageName;
+ protected ArrayList productsList;
+ protected Double paymentByCash;
+ protected String paymentMethod;
+ protected Double paymentByCard;
+ protected Double paymentByChq;
+ protected Boolean isDeleteOldRecords=false;
+ protected String isSales;
+ protected Boolean isSOPriceList = false;
+ protected String ifAdd;
+ protected String productCategory;
+ protected String productClassification;
+ protected String trackingNo;
+ protected String revenueRecognition;
+ protected String cvv;
+ protected String creditCardPayment;
+ protected String shipmentMethod;
+ protected Boolean shipTo;
+ protected Boolean billTo;
+ protected Integer chargeId;
+ protected String chargeName;
+ protected BigDecimal chargeAmount;
+
+ protected Integer revenueRecoId;
+
+ protected int numberOfRequests;
+ protected String userName;
+ protected Integer requestId;
+ protected Integer toUserId;
+ protected String fromAddress;
+ protected String toAddresses;
+ protected String ccAddresses;
+ protected String bccAddresses;
+ protected String textMessage;
+ protected String hostAddress;
+ protected String priority;
+ protected String title;
+ protected Integer statusId;
+
+ protected AttributeValuesPair attributeValuesPair;
+ protected HashMap attributeValuesMap;
+ protected Boolean isTextileProduct;
+ protected String qtyFilter;
+ protected String productType;
+
+
+ protected String attributeSetName;
+
+ protected String attributeName;
+ protected ArrayList attributeValueList;
+ protected String [] attributeValueIds;
+ protected Double totalActualPrice;
+ protected String qtyNumberFilter;
+ protected Integer taxCategoryId;
+ protected String taxCategoryName;
+ protected String vendorName;
+ protected String timePeriod;
+ protected String chartType;
+ protected String salesGroup;
+ protected BigDecimal taxRate;
+ protected Integer accountId;
+ protected String dateRange;
+ protected Boolean transferAllAmount;
+ protected BigDecimal adjustmentAmount;
+ protected BigDecimal differenceAmt;
+ protected Boolean creatingFromOrder;
+ protected String transferType;
+ protected String priceQtyFilter;
+ protected Boolean hasImage;
+ protected String userPIN;
+ protected Boolean isSelfService;
+ protected BigDecimal cardDifference;
+ protected BigDecimal chequeDifference;
+ protected String documentNote;
+ protected String currencySymbole;
+ protected String invoiceDate;
+ protected Integer netDays;
+ protected Integer daysDue;
+ protected Timestamp dueDate;
+ protected String discountDate;
+ protected BigDecimal discountAmt;
+ protected BigDecimal invoiceGrandTotal;
+ protected BigDecimal paidAmt;
+ protected BigDecimal openAmt;
+ protected Integer currencyId;
+ protected Integer paymentTermId;
+ protected Integer invoiceScheduleId;
+ protected BigDecimal userDiscount;
+
+ protected BigDecimal invoicedAmt;
+ protected BigDecimal pastDue91_plus;
+ protected BigDecimal pastDue61_90;
+ protected BigDecimal pastDue31_60;
+ protected BigDecimal pastDue1_30;
+ protected BigDecimal pastDue8_30;
+ protected BigDecimal pastDue1_7;
+ protected BigDecimal pastDueAmt;
+ protected BigDecimal dueAmt;
+ protected BigDecimal due0;
+ protected BigDecimal due1_7;
+ protected BigDecimal due8_30;
+ protected BigDecimal due0_30;
+ protected BigDecimal due31_60;
+ protected BigDecimal due61_90;
+ protected BigDecimal due91_PLUS;
+
+
+ protected BigDecimal paymentAmt;
+ protected BigDecimal overUnderPayment;
+ protected BigDecimal writeOffAmt;
+ protected String tenderType;
+ protected String invoiceNo;
+ protected BigDecimal creditUsed;
+ protected BigDecimal creditLimit;
+ protected BigDecimal revenue;
+ protected String paymentTermName;
+ protected Integer [] bpartnerIds;
+
+ protected Integer blackListedId;
+ protected String blackListedBankName;
+ protected String blackListedChequeNo;
+
+ protected Integer dunningId;
+ protected String dunningName;
+
+ protected Integer dunningLevelId;
+ protected String dunningLevelName;
+ protected String dunningPrintText;
+ protected String dunningPrintNote;
+ protected Integer BP_Group_ID ;
+ protected String soCreditStatus;
+ protected String bpfirstSale;
+ protected String creditStatus;
+ public String docBasisType;
+
+ //protected String applicationType;
+ protected BigDecimal amtMultiplier;
+
+
+ protected Integer commissionAmtId;
+ protected Integer commissionRunId;
+ protected Integer commissionLineId;
+ protected BigDecimal convertedAmt;
+ protected BigDecimal actualQty;
+ protected BigDecimal commissionAmt;
+ protected String commissionLineName;
+ protected Integer commissionDetailId;
+ protected String reference;
+ protected Integer invoiceLineId;
+ protected String info;
+ protected BigDecimal actualAmt;
+ protected String frequencyType;
+ protected String periodAndCurrencyDesc;
+ protected BigDecimal subtractAmt;
+ protected BigDecimal qtyInventoryIn;
+ protected BigDecimal qtyInventoryOut;
+
+ protected String taxName;
+ protected Integer taxId;
+ protected Boolean isTaxExempted;
+ protected Integer [] invoiceIds;
+ protected Integer [] paymentIds;
+ protected String paymentNo;
+ protected BigDecimal taxedAmt;
+ protected String trxDate;
+
+ protected Integer creditMemoId;
+ protected String creditMemoNumber;
+
+
+ protected Integer inventoryLineId;
+ protected Integer inventoryId;
+ protected BigDecimal qtyBook;
+ protected BigDecimal qtyCount;
+ protected BigDecimal qtyCsv;
+
+ protected String inventoryNo;
+ protected String movementDate;
+
+ protected Boolean afterDelivery;
+ protected Boolean fixedDueDate;
+ protected Boolean nextBusinessday;
+ protected Integer fixedMonthDay;
+ protected Integer fixedMonthOffset;
+ protected Integer fiedMonthCutoff;
+ protected String toBeShipped;
+ protected Integer discountDay1;
+ protected Integer discountDay2;
+ protected BigDecimal discountAmt1;
+ protected BigDecimal discountAmt2;
+ protected BigDecimal allocatedAmount;
+ protected BigDecimal bookQtyValue;
+ protected BigDecimal countQtyValue;
+
+ protected PaymentBean paymentBeanIndex;
+
+ protected BigDecimal [] allocateAmount;
+
+ protected BigDecimal paymentAllocatedAmt;
+ protected BigDecimal AvailableAmt;
+ protected Integer [] inventoryIds;
+ protected Integer [] inventoryLineIds;
+ protected String historyType;
+
+ protected String accountingValues;
+
+ protected String fullDetails;
+ protected BigDecimal unitPrice;
+ protected BigDecimal unitPurchasePrice;
+
+ // Additional fields required for user registration
+ protected String company;
+ protected String industry;
+ protected String comments;
+
+ protected BigDecimal roundOffFactor;
+ protected Integer stdPrecision;
+ protected String isoCode;
+ protected String curSymbol;
+ protected String isSalesReport;
+ protected String receiptFooterMsg;
+ protected String branch;
+ protected String taxNo;
+
+ /** Organisation **/
+ protected Integer orgId;
+
+ /** Common field used for searching **/
+ protected String searchText;
+
+ protected Integer webMenuId;
+
+ public Boolean getIsActive()
+ {
+ return isActive;
+ }
+ public void setIsActive(Boolean isActive)
+ {
+ this.isActive = isActive;
+ }
+
+ /**
+ * @param searchText search term
+ */
+ public void setSearchText(String searchText)
+ {
+ this.searchText = searchText;
+ }
+
+ /**
+ * @return search term
+ */
+ public String getSearchText()
+ {
+ return this.searchText;
+ }
+
+ /**
+ * @return Organisation
+ */
+ public Integer getOrgId()
+ {
+ return orgId;
+ }
+
+ /**
+ * @param orgId Organisation
+ */
+ public void setOrgId(Integer orgId)
+ {
+ this.orgId = orgId;
+ }
+
+}
+
+
+
diff --git a/posterita/posterita/src/main/org/posterita/beans/UDIPair.java b/posterita/posterita/src/main/org/posterita/beans/UDIPair.java
new file mode 100644
index 0000000000..437f9277f0
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/UDIPair.java
@@ -0,0 +1,128 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on 28-Jun-2005 by alok
+ *
+ */
+package org.posterita.beans;
+
+import java.util.ArrayList;
+
+
+public class UDIPair implements Comparable
+{
+
+ private Integer ID;
+ private String key;
+ private String value;
+
+ private UDIPair pair;
+ private ArrayList arr;
+
+ public UDIPair(Integer ID, String value)
+ {
+ this.ID = ID;
+ this.value = value;
+ }
+
+ public UDIPair(String key, String value)
+ {
+ this.key = key;
+ this.value = value;
+ }
+
+
+ public UDIPair(UDIPair pair, ArrayList arr)
+ {
+ this.pair = pair;
+ this.arr = arr;
+ }
+
+
+
+ public ArrayList getArr() {
+ return arr;
+ }
+
+
+ public void setArr(ArrayList arr) {
+ this.arr = arr;
+ }
+
+
+ public UDIPair getPair() {
+ return pair;
+ }
+
+
+ public void setPair(UDIPair pair) {
+ this.pair = pair;
+ }
+
+
+ /**
+ * @return Returns the iD.
+ */
+ public Integer getID() {
+ return ID;
+ }
+ /**
+ * @param id The iD to set.
+ */
+ public void setID(Integer id) {
+ ID = id;
+ }
+ /**
+ * @return Returns the value.
+ */
+ public String getValue() {
+ return value;
+ }
+ /**
+ * @param value The value to set.
+ */
+ public void setValue(String value) {
+ this.value = value;
+ }
+ /* (non-Javadoc)
+ * @see java.lang.Comparable#compareTo(java.lang.Object)
+ */
+ public int compareTo(Object o)
+ {
+ UDIPair pair = (UDIPair) o;
+
+ return this.getValue().compareTo(pair.getValue());
+ }
+
+ public String getKey()
+ {
+ return key;
+ }
+
+ public void setKey(String key)
+ {
+ this.key = key;
+ }
+
+ public String toString()
+ {
+ String str ="ID:" +getID() + " Value:" +getValue();
+ return str;
+ }
+ }
+
diff --git a/posterita/posterita/src/main/org/posterita/beans/UserBean.java b/posterita/posterita/src/main/org/posterita/beans/UserBean.java
new file mode 100644
index 0000000000..8e8999676a
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/UserBean.java
@@ -0,0 +1,355 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on Jul 29, 2005 by din
+ */
+
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+
+public class UserBean extends UDIBean
+{
+ public Integer getOrgId() {
+ return orgId;
+ }
+
+ public void setOrgId(Integer orgId) {
+ this.orgId = orgId;
+ }
+
+ public Boolean getIsFullAccess() {
+ return isFullAccess;
+}
+
+public void setIsFullAccess(Boolean isFullAccess) {
+ this.isFullAccess = isFullAccess;
+}
+
+ public BigDecimal getSubtractAmt() {
+ return subtractAmt;
+}
+
+public void setSubtractAmt(BigDecimal subtractAmt) {
+ this.subtractAmt = subtractAmt;
+}
+ public String getFrequencyType() {
+ return frequencyType;
+ }
+ public void setFrequencyType(String frequencyType) {
+ this.frequencyType = frequencyType;
+ }
+ public BigDecimal getAmtMultiplier() {
+ return amtMultiplier;
+}
+public void setAmtMultiplier(BigDecimal amtMultiplier) {
+ this.amtMultiplier = amtMultiplier;
+}
+ public String getDocBasisType() {
+ return docBasisType;
+ }
+ public void setDocBasisType(String docBasisType) {
+ this.docBasisType = docBasisType;
+ }
+ public String getUserPIN()
+ {
+ return userPIN;
+ }
+ public void setUserPIN(String userPIN)
+ {
+ this.userPIN = userPIN;
+ }
+ public Integer getPartnerId()
+ {
+ return partnerId;
+ }
+
+ public void setPartnerId(Integer partnerId)
+ {
+ this.partnerId = partnerId;
+ }
+
+ public String getCountryName() {
+ return countryName;
+}
+
+public void setCountryName(String countryName) {
+ this.countryName = countryName;
+}
+
+ public Integer getCountryId() {
+ return countryId;
+ }
+
+ public void setCountryId(Integer countryId) {
+ this.countryId = countryId;
+ }
+
+ public String getUserSurname() {
+ return userSurname;
+ }
+
+ public void setUserSurname(String userSurname) {
+ this.userSurname = userSurname;
+ }
+
+ public Integer getLocationId()
+ {
+ return locationId;
+ }
+
+ public void setLocationId(Integer locationId)
+ {
+ this.locationId = locationId;
+ }
+
+ public String getAddress1()
+ {
+ return address1;
+ }
+
+ public void setAddress1(String address1)
+ {
+ this.address1 = address1;
+ }
+
+ public String getAddress2()
+ {
+ return address2;
+ }
+
+ public void setAddress2(String address2)
+ {
+ this.address2 = address2;
+ }
+
+ public String getCity()
+ {
+ return city;
+ }
+
+ public void setCity(String city)
+ {
+ this.city = city;
+ }
+
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public void setDescription(String description)
+ {
+ this.description = description;
+ }
+ public Boolean getIsActive()
+ {
+ return isActive;
+ }
+
+ public void setIsActive(Boolean isActive)
+ {
+ this.isActive = isActive;
+ }
+
+ public String getPassword()
+ {
+ return password;
+ }
+
+ public void setPassword(String password)
+ {
+ this.password = password;
+ }
+
+ public String getConfirmPassword()
+ {
+ return confirmPassword;
+ }
+
+ public void setConfirmPassword(String confirmPassword)
+ {
+ this.confirmPassword = confirmPassword;
+ }
+
+ public String getPhone()
+ {
+ return phone;
+ }
+
+ public void setPhone(String phone)
+ {
+ this.phone = phone;
+ }
+
+ public String getPostalAddress()
+ {
+ return postalAddress;
+ }
+
+ public void setPostalAddress(String postalAddress)
+ {
+ this.postalAddress = postalAddress;
+ }
+
+ public String getUsername()
+ {
+ return username;
+ }
+ public void setUsername(String username)
+ {
+ this.username = username;
+ }
+
+ public String getEmail()
+ {
+ return email;
+ }
+
+ public void setEmail(String email)
+ {
+ this.email = email;
+ }
+ public String getFax()
+ {
+ return fax;
+ }
+
+ public void setFax(String fax)
+ {
+ this.fax = fax;
+ }
+
+ public Integer getRoleId()
+ {
+ return roleId;
+ }
+
+ public void setRoleId(Integer roleId)
+ {
+ this.roleId = roleId;
+ }
+ public String getRoleName()
+ {
+ return roleName;
+ }
+ public void setRoleName(String roleName)
+ {
+ this.roleName = roleName;
+ }
+ public Boolean getIsSalesRep()
+ {
+ return isSalesRep;
+ }
+
+ public void setIsSalesRep(Boolean isSalesRep)
+ {
+ this.isSalesRep = isSalesRep;
+ }
+
+ public Integer getRegionId()
+ {
+ return regionId;
+ }
+
+ public void setRegionId(Integer regionId)
+ {
+ this.regionId = regionId;
+ }
+
+ public Integer getUserId()
+ {
+ return userId;
+ }
+
+ public void setUserId(Integer userId)
+ {
+ this.userId = userId;
+ }
+
+ public String getRegion()
+ {
+ return region;
+ }
+ public void setRegion(String region)
+ {
+ this.region = region;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+ public String getCountryCode()
+ {
+ return countryCode;
+ }
+ public void setCountryCode(String countryCode)
+ {
+ this.countryCode = countryCode;
+ }
+
+ public BigDecimal getUserDiscount() {
+ return userDiscount;
+ }
+ public void setUserDiscount(BigDecimal userDiscount) {
+ this.userDiscount = userDiscount;
+ }
+
+ public String getPhone2() {
+ return phone2;
+ }
+ public void setPhone2(String phone2) {
+ this.phone2 = phone2;
+ }
+
+ public String getComments() {
+ return comments;
+ }
+
+ public void setComments(String comments) {
+ this.comments = comments;
+ }
+
+ public String getIndustry() {
+ return industry;
+ }
+
+ public void setIndustry(String industry) {
+ this.industry = industry;
+ }
+
+ public String getCompany() {
+ return company;
+ }
+
+ public void setCompany(String company) {
+ this.company = company;
+ }
+ /*public String getUserSurname() {
+ return userSurname;
+ }
+
+ public void setUserSurname(String userSurname) {
+ this.userSurname = userSurname;
+ }*/
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/VendorBean.java b/posterita/posterita/src/main/org/posterita/beans/VendorBean.java
new file mode 100644
index 0000000000..faa3c22bae
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/VendorBean.java
@@ -0,0 +1,122 @@
+package org.posterita.beans;
+
+public class VendorBean extends UDIBean
+{
+
+ public Integer getOrgId()
+ {
+ return orgId;
+ }
+
+ public void setOrgId(Integer orgId)
+ {
+ this.orgId = orgId;
+ }
+
+ public Integer getCountryId() {
+ return countryId;
+ }
+
+ public void setCountryId(Integer countryId) {
+ this.countryId = countryId;
+ }
+
+ public String getPartnerName()
+ {
+ return partnerName;
+ }
+
+ public void setPartnerName(String partnerName)
+ {
+ this.partnerName = partnerName;
+ }
+
+ public String getAddress1() {
+ return address1;
+ }
+
+ public void setAddress1(String address1) {
+ this.address1 = address1;
+ }
+
+ public String getAddress2() {
+ return address2;
+ }
+
+ public void setAddress2(String address2) {
+ this.address2 = address2;
+ }
+
+ public String getCity() {
+ return city;
+ }
+
+ public void setCity(String city) {
+ this.city = city;
+ }
+
+ public String getPhone() {
+ return phone;
+ }
+
+ public void setPhone(String phone) {
+ this.phone = phone;
+ }
+
+ public String getPhone2() {
+ return phone2;
+ }
+
+ public void setPhone2(String phone2) {
+ this.phone2 = phone2;
+ }
+
+ public String getEmail() {
+ return email;
+ }
+
+ public void setEmail(String email) {
+ this.email = email;
+ }
+
+ public String getFax() {
+ return fax;
+ }
+
+ public void setFax(String fax) {
+ this.fax = fax;
+ }
+
+ public String getSurname() {
+ return surname;
+ }
+
+ public void setSurname(String surname) {
+ this.surname = surname;
+ }
+ public Boolean getIsActive() {
+ return isActive;
+ }
+
+ public void setIsActive(Boolean isActive) {
+ this.isActive = isActive;
+ }
+
+ public Integer getBpartnerId() {
+ return bpartnerId;
+ }
+
+ public void setBpartnerId(Integer bpartnerId) {
+ this.bpartnerId = bpartnerId;
+ }
+ public Integer getPriceListId()
+ {
+ return priceListId;
+ }
+
+ public void setPriceListId(Integer priceListId)
+ {
+ this.priceListId = priceListId;
+ }
+}
+
diff --git a/posterita/posterita/src/main/org/posterita/beans/WarehouseBean.java b/posterita/posterita/src/main/org/posterita/beans/WarehouseBean.java
new file mode 100644
index 0000000000..15d401f728
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/WarehouseBean.java
@@ -0,0 +1,187 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on Jul 26, 2005 by din
+ */
+
+package org.posterita.beans;
+
+public class WarehouseBean extends UDIBean
+{
+
+
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public void setDescription(String description)
+ {
+ this.description = description;
+ }
+
+ public String getWarehouseType()
+ {
+ return warehouseType;
+ }
+
+ public void setWarehouseType(String warehouseType)
+ {
+ this.warehouseType = warehouseType;
+ }
+
+ public Boolean getIsAllocationWarehouse()
+ {
+ return isAllocationWarehouse;
+ }
+
+ public void setIsAllocationWarehouse(Boolean isAllocationWarehouse)
+ {
+ this.isAllocationWarehouse = isAllocationWarehouse;
+ }
+
+ public Integer getWarehouseId()
+ {
+ return warehouseId;
+ }
+
+ public void setWarehouseId(Integer warehouseId)
+ {
+ this.warehouseId = warehouseId;
+ }
+
+ public String getWarehouseName()
+ {
+ return warehouseName;
+ }
+
+ public void setWarehouseName(String warehouseName)
+ {
+ this.warehouseName = warehouseName;
+ }
+
+ public String getAddress1()
+ {
+ return address1;
+ }
+
+ public void setAddress1(String address1)
+ {
+ this.address1 = address1;
+ }
+
+ public String getCity()
+ {
+ return city;
+ }
+
+ public void setCity(String city)
+ {
+ this.city = city;
+ }
+
+ public String getPostalAddress()
+ {
+ return postalAddress;
+ }
+
+ public void setPostalAddress(String postalAddress)
+ {
+ this.postalAddress = postalAddress;
+ }
+
+ public Integer getRegionId()
+ {
+ return regionId;
+ }
+
+ public void setRegionId(Integer regionId)
+ {
+ this.regionId = regionId;
+ }
+
+ public Boolean getIsPublic()
+ {
+ return isPublic;
+ }
+
+ public void setIsPublic(Boolean isPublic)
+ {
+ this.isPublic = isPublic;
+ }
+
+ public String getAisle()
+ {
+ return aisle;
+ }
+
+ public void setAisle(String aisle)
+ {
+ this.aisle = aisle;
+ }
+
+ public String getBin()
+ {
+ return bin;
+ }
+
+ public void setBin(String bin)
+ {
+ this.bin = bin;
+ }
+
+ public Boolean getIsDefault()
+ {
+ return isDefault;
+ }
+
+ public void setIsDefault(Boolean isDefault)
+ {
+ this.isDefault = isDefault;
+ }
+
+ public String getLevel()
+ {
+ return level;
+ }
+
+ public void setLevel(String level)
+ {
+ this.level = level;
+ }
+
+ public String getRegionName()
+ {
+ return regionName;
+ }
+
+ public void setRegionName(String regionName)
+ {
+ this.regionName = regionName;
+ }
+
+ public Boolean getIsActive()
+ {
+ return isActive;
+ }
+
+ public void setIsActive(Boolean isActive)
+ {
+ this.isActive = isActive;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/WebDocumentBean.java b/posterita/posterita/src/main/org/posterita/beans/WebDocumentBean.java
new file mode 100644
index 0000000000..011fa944e9
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/WebDocumentBean.java
@@ -0,0 +1,609 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+* Created on Jul 26, 2005 by din
+*/
+
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.Properties;
+
+import org.compiere.model.MBPartner;
+import org.compiere.model.MBPartnerLocation;
+import org.compiere.model.MCashLine;
+import org.compiere.model.MInOut;
+import org.compiere.model.MInvoice;
+import org.compiere.model.MLocation;
+import org.compiere.model.MOrder;
+import org.compiere.model.MPayment;
+
+
+public class WebDocumentBean extends UDIBean
+{
+ String[] simpleCommand = new String[0];
+ String[] complexCommand = new String[0];
+ MBPartner me;
+ MBPartnerLocation mebpLocation;
+ MLocation meLocation;
+
+
+
+ MBPartner you;
+ MBPartnerLocation youbpLocation;
+ MLocation youLocation;
+ String daysRemaining;
+ String month;
+ String year;
+ String displayCheckBox = null;
+ private String salesRep;
+ private String description;
+
+ private ArrayList lines = new ArrayList();
+
+ private MOrder order;
+ private MInvoice invoice;
+ private MInOut minOut;
+ private MPayment payment;
+ private String tenderType;
+ private WebDocumentHeaderBean headerBean;
+
+ private Properties ctx;
+ private ArrayList allocations;
+
+ private BigDecimal totalLines;
+ private BigDecimal totalTax;
+ private BigDecimal grandTotal;
+ private String isPaid;
+ private String isShipped;
+ private Double paymentByCash;
+ private Double paymentByCard;
+ private Double paymentbyCheque;
+ private BigDecimal totalQty;
+ private MCashLine cashLine;
+ private BigDecimal subTotal;
+
+ public BigDecimal getSubTotal() {
+ return subTotal;
+ }
+
+ public void setSubTotal(BigDecimal subTotal) {
+ this.subTotal = subTotal;
+ }
+
+ public String getCurrencySymbole() {
+ return currencySymbole;
+ }
+ public void setCurrencySymbole(String currencySymbole) {
+ this.currencySymbole = currencySymbole;
+ }
+ public BigDecimal getTotalQty() {
+ return totalQty;
+ }
+ public void setTotalQty(BigDecimal totalQty) {
+ this.totalQty = totalQty;
+ }
+ public String getIsPaid()
+ {
+ return isPaid;
+ }
+ public void setIsPaid(String isPaid)
+ {
+ this.isPaid = isPaid;
+ }
+ public String getIsShipped()
+ {
+ return isShipped;
+ }
+ public void setIsShipped(String isShipped)
+ {
+ this.isShipped = isShipped;
+ }
+ public String getTrackingNo()
+ {
+ return trackingNo;
+ }
+ public void setTrackingNo(String trackingNo)
+ {
+ this.trackingNo = trackingNo;
+ }
+
+
+
+ public String getSalesRep() {
+ return salesRep;
+ }
+ public void setSalesRep(String salesRep) {
+ this.salesRep = salesRep;
+ }
+ public BigDecimal getGrandTotal() {
+ return grandTotal;
+ }
+ public void setGrandTotal(BigDecimal grandTotal) {
+ this.grandTotal = grandTotal;
+ }
+ public BigDecimal getTotalLines() {
+ return totalLines;
+ }
+ public void setTotalLines(BigDecimal totalLines) {
+ this.totalLines = totalLines;
+ }
+ public BigDecimal getTotalTax() {
+ return totalTax;
+ }
+ public void setTotalTax(BigDecimal totalTax) {
+ this.totalTax = totalTax;
+ }
+
+
+ public ArrayList getAllocations() {
+ return allocations;
+ }
+ public void setAllocations(ArrayList allocations) {
+ this.allocations = allocations;
+ }
+
+ public WebDocumentHeaderBean getHeaderBean()
+ {
+ return headerBean;
+ }
+
+ public void setHeaderBean(WebDocumentHeaderBean headerBean)
+ {
+ this.headerBean = headerBean;
+ }
+
+
+ public MOrder getOrder()
+ {
+ return order;
+ }
+
+ public void setOrder(MOrder order)
+ {
+ this.order = order;
+ }
+
+ public MInvoice getInvoice()
+ {
+ return invoice;
+ }
+
+ public void setInvoice(MInvoice invoice)
+ {
+ this.invoice = invoice;
+ }
+
+
+
+ public String[] getSimpleCommand() {
+ return simpleCommand;
+ }
+
+
+ public void setSimpleCommand(String[] simpleCommand)
+ {
+ this.simpleCommand = simpleCommand;
+ }
+
+
+ public MBPartner getMe()
+ {
+ return me;
+ }
+
+
+ public void setMe(MBPartner me)
+ {
+ this.me = me;
+ }
+
+
+ public MBPartnerLocation getMebpLocation()
+ {
+ return mebpLocation;
+ }
+
+
+ public void setMebpLocation(MBPartnerLocation mebpLocation)
+ {
+ this.mebpLocation = mebpLocation;
+ }
+
+
+ public MLocation getMeLocation()
+ {
+ return meLocation;
+ }
+
+
+ public void setMeLocation(MLocation meLocation)
+ {
+ this.meLocation = meLocation;
+ }
+
+
+ public MBPartner getYou()
+ {
+ return you;
+ }
+
+
+ public void setYou(MBPartner you)
+ {
+ this.you = you;
+ }
+
+
+ public MBPartnerLocation getYoubpLocation()
+ {
+ return youbpLocation;
+ }
+
+
+ public void setYoubpLocation(MBPartnerLocation youbpLocation)
+ {
+ this.youbpLocation = youbpLocation;
+ }
+
+
+ public MLocation getYouLocation()
+ {
+ return youLocation;
+ }
+
+
+ public void setYouLocation(MLocation youLocation)
+ {
+ this.youLocation = youLocation;
+ }
+
+
+ public ArrayList getLines()
+ {
+ return lines;
+ }
+
+ public void setLines(ArrayList lines)
+ {
+ this.lines = lines;
+ }
+
+
+ public String[] getComplexCommand()
+ {
+ return complexCommand;
+ }
+
+
+ public void setComplexCommand(String[] complexCommand)
+ {
+ this.complexCommand = complexCommand;
+ }
+
+ public String getDaysRemaining()
+ {
+ return daysRemaining;
+ }
+
+ public void setDaysRemaining(String daysRemaining)
+ {
+ this.daysRemaining = daysRemaining;
+ }
+
+
+
+ public String getMonth()
+ {
+ return month;
+ }
+
+ public void setMonth(String month)
+ {
+ this.month = month;
+ }
+
+ public String getYear()
+ {
+ return year;
+ }
+
+ public void setYear(String year)
+ {
+ this.year = year;
+ }
+
+ public String getDisplayCheckBox()
+ {
+ return displayCheckBox;
+ }
+
+ public void setDisplayCheckBox(String displayCheckBox)
+ {
+ this.displayCheckBox = displayCheckBox;
+ }
+
+ public String getSubmit()
+ {
+ return submit;
+ }
+
+ public void setSubmit(String submit)
+ {
+ this.submit = submit;
+ }
+
+ public Integer getOrderId()
+ {
+ return orderId;
+ }
+
+ public void setOrderId(Integer orderId)
+ {
+ this.orderId = orderId;
+ }
+
+ public String getPoReference()
+ {
+ return poReference;
+ }
+
+ public void setPoReference(String poReference)
+ {
+ this.poReference = poReference;
+ }
+
+ public String getTermsAgreement()
+ {
+ return termsAgreement;
+ }
+
+ public void setTermsAgreement(String termsAgreement)
+ {
+ this.termsAgreement = termsAgreement;
+ }
+
+ public ArrayList getOrderLineBean()
+ {
+ return orderLineBean;
+ }
+ public void setOrderLineBean(ArrayList orderLineBean)
+ {
+ this.orderLineBean = orderLineBean;
+ }
+
+ public String getAddress1()
+ {
+ return address1;
+ }
+
+ public void setAddress1(String address1)
+ {
+ this.address1 = address1;
+ }
+
+ public String getCity()
+ {
+ return city;
+ }
+
+ public void setCity(String city)
+ {
+ this.city = city;
+ }
+
+ public String getDocStatus()
+ {
+ return docStatus;
+ }
+
+ public void setDocStatus(String docStatus)
+ {
+ this.docStatus = docStatus;
+ }
+
+
+ public String getPartnerName()
+ {
+ return partnerName;
+ }
+
+ public void setPartnerName(String partnerName)
+ {
+ this.partnerName = partnerName;
+ }
+
+
+ public Timestamp getDateOrdered()
+ {
+ return dateOrdered;
+ }
+
+ public void setDateOrdered(Timestamp dateOrdered)
+ {
+ this.dateOrdered = dateOrdered;
+ }
+
+
+ public Integer getBpartnerId()
+ {
+ return bpartnerId;
+ }
+ public void setBpartnerId(Integer bpartnerId)
+ {
+ this.bpartnerId = bpartnerId;
+ }
+
+
+ public String getDatePromised()
+ {
+ return datePromised;
+ }
+
+ public void setDatePromised(String datePromised)
+ {
+ this.datePromised = datePromised;
+ }
+
+ public String getIsApproved()
+ {
+ return isApproved;
+ }
+
+ public void setIsApproved(String isApproved)
+ {
+ this.isApproved = isApproved;
+ }
+ public String getIsDelivered()
+ {
+ return isDelivered;
+ }
+ public void setIsDelivered(String isDelivered)
+ {
+ this.isDelivered = isDelivered;
+ }
+ public String getIsInvoiced()
+ {
+ return isInvoiced;
+ }
+ public void setIsInvoiced(String isInvoiced)
+ {
+ this.isInvoiced = isInvoiced;
+ }
+
+ public String getDocumentNo()
+ {
+ return documentNo;
+ }
+
+ public void setDocumentNo(String documentNo)
+ {
+ this.documentNo = documentNo;
+ }
+
+ public Boolean isSoTrx()
+ {
+ return isSoTrx;
+ }
+
+ public void setIsSoTrx(Boolean isSoTrx)
+ {
+ this.isSoTrx = isSoTrx;
+ }
+
+ public void setInvoiceId(Integer invoiceId)
+ {
+ this.invoiceId = invoiceId;
+ }
+
+ public Integer getInvoiceId()
+ {
+ return invoiceId;
+ }
+
+
+ public MInOut getMinOut()
+ {
+ return minOut;
+ }
+
+ public void setMinOut(MInOut minOut)
+ {
+ this.minOut = minOut;
+ }
+
+ public Integer getPaymentId()
+ {
+ return paymentId;
+ }
+
+ public void setPaymentId(Integer paymentId)
+ {
+ this.paymentId = paymentId;
+ }
+
+ public MPayment getPayment()
+ {
+ return payment;
+ }
+
+ public void setPayment(MPayment payment)
+ {
+ this.payment = payment;
+ }
+
+ public Integer getMinOutId()
+ {
+ return minOutId;
+ }
+
+ public void setMinOutId(Integer minOutId)
+ {
+ this.minOutId = minOutId;
+ }
+
+
+ public Properties getCtx() {
+ return ctx;
+ }
+ public void setCtx(Properties ctx) {
+ this.ctx = ctx;
+ }
+ public String getDescription() {
+ return description;
+ }
+ public void setDescription(String description) {
+ this.description = description;
+ }
+ public Double getPaymentByCard() {
+ return paymentByCard;
+ }
+ public void setPaymentByCard(Double paymentByCard) {
+ this.paymentByCard = paymentByCard;
+ }
+ public Double getPaymentByCash() {
+ return paymentByCash;
+ }
+ public void setPaymentByCash(Double paymentByCash) {
+ this.paymentByCash = paymentByCash;
+ }
+ public Double getPaymentbyCheque() {
+ return paymentbyCheque;
+ }
+ public void setPaymentbyCheque(Double paymentbyCheque) {
+ this.paymentbyCheque = paymentbyCheque;
+ }
+ public String getTenderType()
+ {
+ return tenderType;
+ }
+ public void setTenderType(String tenderType)
+ {
+ this.tenderType = tenderType;
+ }
+ public MCashLine getCashLine() {
+ return cashLine;
+ }
+ public void setCashLine(MCashLine cashLine) {
+ this.cashLine = cashLine;
+ }
+
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/WebDocumentHeaderBean.java b/posterita/posterita/src/main/org/posterita/beans/WebDocumentHeaderBean.java
new file mode 100644
index 0000000000..f6ece97bdb
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/WebDocumentHeaderBean.java
@@ -0,0 +1,194 @@
+/*
+ * Created on Mar 13, 2005
+ *
+ * To change the template for this generated file go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+package org.posterita.beans;
+
+import java.sql.Timestamp;
+
+public class WebDocumentHeaderBean
+{
+ private String dcsRef;
+ private String dcsCounterRef;
+ private String documentStatus;
+ private String dealerRef;
+ private String dealerCounterRef;
+ private String documentTitle;
+ private String documentName;
+ private String from;
+ private String to;
+ private String date;
+ private String counterDate;
+ private String youName;
+ private String poReference;
+ private Timestamp dateOrdered;
+ private String documentHeader;
+ private String shipped;
+ private String paymentType;
+ private String paymentByCash;
+ private String paymentByCard;
+ private String paymentbyCheque;
+ private String bpartnerId;
+
+
+
+
+
+ public String getPaymentType() {
+ return paymentType;
+ }
+
+ public void setPaymentType(String paymentType) {
+ this.paymentType = paymentType;
+ }
+
+ public String getShipped()
+ {
+ return shipped;
+ }
+
+ public void setShipped(String shipped)
+ {
+ this.shipped = shipped;
+ }
+
+ public String getDocumentHeader()
+ {
+ return documentHeader;
+ }
+
+ public void setDocumentHeader(String documentHeader)
+ {
+ this.documentHeader = documentHeader;
+ }
+
+ public String getYouName() {
+ return youName;
+ }
+ public void setYouName(String youName) {
+ this.youName = youName;
+ }
+ public String getCounterDate() {
+ return counterDate;
+ }
+ public void setCounterDate(String counterDate) {
+ this.counterDate = counterDate;
+ }
+ public String getDate() {
+ return date;
+ }
+ public void setDate(String date) {
+ this.date = date;
+ }
+ public String getDcsCounterRef() {
+ return dcsCounterRef;
+ }
+ public void setDcsCounterRef(String dcsCounterRef) {
+ this.dcsCounterRef = dcsCounterRef;
+ }
+ public String getDcsRef() {
+ return dcsRef;
+ }
+ public void setDcsRef(String dcsRef) {
+ this.dcsRef = dcsRef;
+ }
+ public String getDealerCounterRef() {
+ return dealerCounterRef;
+ }
+ public void setDealerCounterRef(String dealerCounterRef) {
+ this.dealerCounterRef = dealerCounterRef;
+ }
+ public String getDealerRef() {
+ return dealerRef;
+ }
+ public void setDealerRef(String dealerRef) {
+ this.dealerRef = dealerRef;
+ }
+ public String getDocumentName() {
+ return documentName;
+ }
+ public void setDocumentName(String documentName) {
+ this.documentName = documentName;
+ }
+ public String getDocumentStatus() {
+ return documentStatus;
+ }
+ public void setDocumentStatus(String documentStatus) {
+ this.documentStatus = documentStatus;
+ }
+ public String getDocumentTitle() {
+ return documentTitle;
+ }
+ public void setDocumentTitle(String documentTitle) {
+ this.documentTitle = documentTitle;
+ }
+ public String getFrom() {
+ return from;
+ }
+ public void setFrom(String from) {
+ this.from = from;
+ }
+ public String getTo() {
+ return to;
+ }
+ public void setTo(String to) {
+ this.to = to;
+ }
+
+ public String getPoReference()
+ {
+ return poReference;
+ }
+
+ public void setPoReference(String poReference)
+ {
+ this.poReference = poReference;
+ }
+
+ public Timestamp getDateOrdered()
+ {
+ return dateOrdered;
+ }
+
+ public void setDateOrdered(Timestamp dateOrdered)
+ {
+ this.dateOrdered = dateOrdered;
+ }
+
+ public String getPaymentByCard() {
+ return paymentByCard;
+ }
+
+ public void setPaymentByCard(String paymentByCard) {
+ this.paymentByCard = paymentByCard;
+ }
+
+ public String getPaymentByCash() {
+ return paymentByCash;
+ }
+
+ public void setPaymentByCash(String paymentByCash) {
+ this.paymentByCash = paymentByCash;
+ }
+
+ public String getPaymentbyCheque() {
+ return paymentbyCheque;
+ }
+
+ public void setPaymentbyCheque(String paymentbyCheque) {
+ this.paymentbyCheque = paymentbyCheque;
+ }
+
+ public String getBpartnerId()
+ {
+ return bpartnerId;
+ }
+
+ public void setBpartnerId(String bpartnerId)
+ {
+ this.bpartnerId = bpartnerId;
+ }
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/WebInvoiceLineBean.java b/posterita/posterita/src/main/org/posterita/beans/WebInvoiceLineBean.java
new file mode 100644
index 0000000000..2ebf1a89f4
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/WebInvoiceLineBean.java
@@ -0,0 +1,63 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+
+
+public class WebInvoiceLineBean extends WebOrderLineBean
+{
+ private Integer invoiceId;
+ private Integer qtyInvoiced;
+ //amount including tax
+ private BigDecimal lineTotalAmount;
+
+ public BigDecimal getLineTotalAmt()
+ {
+ return lineTotalAmount;
+ }
+
+ public void setLineTotalAmt(BigDecimal lineTotalAmt)
+ {
+ this.lineTotalAmount = lineTotalAmt;
+ }
+
+
+
+ public Integer getInvoiceId()
+ {
+ return invoiceId;
+ }
+
+ public void setInvoiceId(Integer invoiceId)
+ {
+ this.invoiceId = invoiceId;
+ }
+
+ public Integer getQtyInvoiced()
+ {
+ return qtyInvoiced;
+ }
+
+ public void setQtyInvoiced(Integer qtyInvoiced)
+ {
+ this.qtyInvoiced = qtyInvoiced;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/WebMinOutLineBean.java b/posterita/posterita/src/main/org/posterita/beans/WebMinOutLineBean.java
new file mode 100644
index 0000000000..2273eb5dda
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/WebMinOutLineBean.java
@@ -0,0 +1,26 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
+package org.posterita.beans;
+
+
+public class WebMinOutLineBean extends WebOrderLineBean
+{
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/WebOrderLineBean.java b/posterita/posterita/src/main/org/posterita/beans/WebOrderLineBean.java
new file mode 100644
index 0000000000..f8ba1a220d
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/WebOrderLineBean.java
@@ -0,0 +1,489 @@
+/*
+ * Created on Mar 3, 2005
+ *
+ * To change the template for this generated file go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+
+
+public class WebOrderLineBean
+{
+ private AttributeValuesPair attributeValuesPair;
+ private UDIPair[] actions;
+ private WebOrderLineBean myPref;
+ private WebOrderLineBean[] myChoices;
+ private BigDecimal discountPercentage;
+ private BigDecimal qtyTotal;
+ private BigDecimal taxRate;
+
+
+ //amount excluding tax
+ private BigDecimal lineNetAmt;
+ private BigDecimal taxAmt;
+ private BigDecimal priceActual;
+ private Integer orderLineId;
+ private Integer productId;
+ private ArrayList vinNumberPairs;
+ private Integer attributeSetInstanceId;
+ private String serno;
+ private Boolean isInvoiced;
+ private String engineNo;
+ private Boolean isQtyReserved;
+ private Integer partnerId;
+ private BigDecimal totalAmt;
+ private Integer tradeInOrderlineId;
+ private BigDecimal lineTotalAmt;
+ private String tradeInVin;
+
+ private String productName;
+ private Integer count;
+ private BigDecimal qtyOrdered;
+ private BigDecimal grandTotal;
+ private String trxType;
+ private BigDecimal amountGiven;
+ private BigDecimal amountRefunded;
+ private Boolean isRejectable;
+ private String currency;
+ private String description;
+ private BigDecimal unitPrice;
+ private String uom;
+
+ private BigDecimal discountAmt;
+ private BigDecimal writeOffAmt;
+ private BigDecimal subTotal;
+
+ private BigDecimal unitPurchasePrice;
+ private BigDecimal grossProfit;
+ private BigDecimal totalGrossProfit;
+ private BigDecimal grossProfitPercentage;
+ private BigDecimal totalGrossProfitPercentage;
+
+ public BigDecimal getGrossProfitPercentage()
+ {
+ return grossProfitPercentage;
+ }
+
+ public void setGrossProfitPercentage(BigDecimal grossProfitPercentage)
+ {
+ this.grossProfitPercentage = grossProfitPercentage;
+ }
+
+ public BigDecimal getTotalGrossProfitPercentage()
+ {
+ return totalGrossProfitPercentage;
+ }
+
+ public void setTotalGrossProfitPercentage(BigDecimal totalGrossProfitPercentage)
+ {
+ this.totalGrossProfitPercentage = totalGrossProfitPercentage;
+ }
+
+ public BigDecimal getSubTotal() {
+ return subTotal;
+ }
+
+ public void setSubTotal(BigDecimal subTotal) {
+ this.subTotal = subTotal;
+ }
+
+ public BigDecimal getDiscountAmt() {
+ return discountAmt;
+ }
+
+ public void setDiscountAmt(BigDecimal discountAmt) {
+ this.discountAmt = discountAmt;
+ }
+
+ public BigDecimal getWriteOffAmt() {
+ return writeOffAmt;
+ }
+
+ public void setWriteOffAmt(BigDecimal writeOffAmt) {
+ this.writeOffAmt = writeOffAmt;
+ }
+
+ public BigDecimal getUnitPrice() {
+ return unitPrice;
+ }
+
+ public void setUnitPrice(BigDecimal unitPrice) {
+ this.unitPrice = unitPrice;
+ }
+
+ public String getCurrency()
+ {
+ return currency;
+ }
+
+ public void setCurrency(String currency)
+ {
+ this.currency = currency;
+ }
+
+ /**
+ * @return Returns the amountGiven.
+ */
+ public BigDecimal getAmountGiven() {
+ return amountGiven;
+ }
+ /**
+ * @param amountGiven The amountGiven to set.
+ */
+ public void setAmountGiven(BigDecimal amountGiven) {
+ this.amountGiven = amountGiven;
+ }
+ /**
+ * @return Returns the amountRefunded.
+ */
+ public BigDecimal getAmountRefunded() {
+ return amountRefunded;
+ }
+ /**
+ * @param amountRefunded The amountRefunded to set.
+ */
+ public void setAmountRefunded(BigDecimal amountRefunded) {
+ this.amountRefunded = amountRefunded;
+ }
+ public String getTrxType()
+ {
+ return trxType;
+ }
+
+ public void setTrxType(String trxType)
+ {
+ this.trxType = trxType;
+ }
+ public BigDecimal getGrandTotal()
+ {
+ return grandTotal;
+ }
+
+ public void setGrandTotal(BigDecimal grandTotal)
+ {
+ this.grandTotal = grandTotal;
+ }
+ public BigDecimal getQtyOrdered()
+ {
+ return qtyOrdered;
+ }
+
+ public void setQtyOrdered(BigDecimal qtyOrdered)
+ {
+ this.qtyOrdered=qtyOrdered;
+ }
+
+ public Integer getCount()
+ {
+ return count;
+ }
+
+ public void setCount(Integer count)
+ {
+ this.count=count;
+ }
+
+ public String getProductName()
+ {
+ return productName;
+ }
+
+ public void setProductName(String productName)
+ {
+ this.productName=productName;
+ }
+
+ public Boolean getIsQtyReserved()
+ {
+ return isQtyReserved;
+ }
+
+ public void setIsQtyReserved(Boolean isQtyReserved)
+ {
+ this.isQtyReserved = isQtyReserved;
+ }
+
+ public String getEngineNo() {
+ return engineNo;
+ }
+ public void setEngineNo(String engineNo) {
+ this.engineNo = engineNo;
+ }
+ public Boolean getIsInvoiced()
+ {
+ return isInvoiced;
+ }
+
+ public void setIsinvoiced(Boolean isInvoiced)
+ {
+ this.isInvoiced = isInvoiced;
+ }
+
+
+ public BigDecimal getPriceActual()
+ {
+ return priceActual;
+ }
+
+ public void setPriceActual(BigDecimal priceActual)
+ {
+ this.priceActual = priceActual;
+ }
+ public BigDecimal getTaxAmt()
+ {
+ return taxAmt;
+ }
+
+ public void setTaxAmt(BigDecimal taxAmt)
+ {
+ this.taxAmt = taxAmt;
+ }
+
+
+ public UDIPair[] getActions()
+ {
+ return actions;
+ }
+ public void setActions(UDIPair[] actions)
+ {
+ this.actions = actions;
+ }
+ public WebOrderLineBean[] getMyChoices()
+ {
+ return myChoices;
+ }
+ public void setMyChoices(WebOrderLineBean[] myChoices)
+ {
+ this.myChoices = myChoices;
+ }
+ public WebOrderLineBean getMyPref()
+ {
+ return myPref;
+ }
+ public void setMyPref(WebOrderLineBean myPref)
+ {
+ this.myPref = myPref;
+ }
+
+ public void setLineNetAmt(BigDecimal lineNetAmt)
+ {
+ this.lineNetAmt = lineNetAmt;
+ }
+
+ public BigDecimal getLineNetAmt()
+ {
+ return lineNetAmt;
+ }
+
+ public AttributeValuesPair getAttributeValuesPair()
+ {
+ return attributeValuesPair;
+ }
+
+ public void setAttributeValuesPair(AttributeValuesPair attributeValuesPair)
+ {
+ this.attributeValuesPair = attributeValuesPair;
+ }
+
+ public void setOrderLineId(Integer orderLineId)
+ {
+ this.orderLineId = orderLineId;
+ }
+
+ public Integer getOrderLineId()
+ {
+ return orderLineId;
+ }
+
+ public void setProductId(Integer productId)
+ {
+ this.productId = productId;
+ }
+
+ public Integer getProductId()
+ {
+ return productId;
+ }
+
+ public void setAttributeSetInstanceid(Integer attributeSetInstanceId)
+ {
+ this.attributeSetInstanceId = attributeSetInstanceId;
+ }
+
+ public Integer getAttributeSetInstanceId()
+ {
+ return attributeSetInstanceId;
+ }
+
+
+ public ArrayList getVinNumberPairs()
+ {
+ return vinNumberPairs;
+ }
+
+ public void setVinNumberPairs(ArrayList vinNumberPairs)
+ {
+ this.vinNumberPairs = vinNumberPairs;
+ }
+
+ public String getSerno()
+ {
+ return serno;
+ }
+
+ public void setSerno(String serno)
+ {
+ this.serno = serno;
+ }
+
+ public Integer getPartnerId()
+ {
+ return partnerId;
+ }
+
+ public void setPartnerId(Integer partnerId)
+ {
+ this.partnerId = partnerId;
+ }
+
+ public BigDecimal getTotalAmt()
+ {
+ return totalAmt;
+ }
+
+ public void setTotalAmt(BigDecimal totalAmt)
+ {
+ this.totalAmt = totalAmt;
+ }
+
+ public Integer getTradeInOrderlineId()
+ {
+ return tradeInOrderlineId;
+ }
+
+ public void setTradeInOrderlineId(Integer tradeInOrderlineId)
+ {
+ this.tradeInOrderlineId = tradeInOrderlineId;
+ }
+
+ public BigDecimal getLineTotalAmt()
+ {
+ return lineTotalAmt;
+ }
+
+ public void setLineTotalAmt(BigDecimal lineTotalAmt)
+ {
+ this.lineTotalAmt = lineTotalAmt;
+ }
+
+ public String getTradeInVin()
+ {
+ return tradeInVin;
+ }
+
+ public void setTradeInVin(String tradeInVin)
+ {
+ this.tradeInVin = tradeInVin;
+ }
+
+
+
+ public Boolean getIsRejectable()
+ {
+ return isRejectable;
+ }
+
+ public void setIsRejectable(Boolean isRejectable)
+ {
+ this.isRejectable = isRejectable;
+ }
+
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public void setDescription(String description)
+ {
+ this.description = description;
+ }
+
+ public BigDecimal getDiscountPercentage() {
+ return discountPercentage;
+ }
+
+ public void setDiscountPercentage(BigDecimal discountPercentage) {
+ this.discountPercentage = discountPercentage;
+ }
+
+ public BigDecimal getQtyTotal() {
+ return qtyTotal;
+ }
+
+ public void setQtyTotal(BigDecimal qtyTotal) {
+ this.qtyTotal = qtyTotal;
+ }
+
+ public String getUom() {
+ return uom;
+ }
+
+ public void setUom(String uom) {
+ this.uom = uom;
+ }
+
+ public BigDecimal getTaxRate() {
+ return taxRate;
+ }
+
+ public void setTaxRate(BigDecimal taxRate) {
+ this.taxRate = taxRate;
+ }
+
+ public BigDecimal getPurchasePriceList()
+ {
+ return unitPurchasePrice;
+ }
+
+ public void setPurchasePriceList(BigDecimal purchasePriceList)
+ {
+ this.unitPurchasePrice = purchasePriceList;
+ }
+
+ public BigDecimal getGrossProfit()
+ {
+ return grossProfit;
+ }
+
+ public void setGrossProfit(BigDecimal grossProfit)
+ {
+ this.grossProfit = grossProfit;
+ }
+
+ public BigDecimal getUnitPurchasePrice()
+ {
+ return unitPurchasePrice;
+ }
+
+ public void setUnitPurchasePrice(BigDecimal unitPurchasePrice)
+ {
+ this.unitPurchasePrice = unitPurchasePrice;
+ }
+
+ public BigDecimal getTotalGrossProfit()
+ {
+ return totalGrossProfit;
+ }
+
+ public void setTotalGrossProfit(BigDecimal totalGrossProfit)
+ {
+ this.totalGrossProfit = totalGrossProfit;
+ }
+
+
+
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/WebStockBean.java b/posterita/posterita/src/main/org/posterita/beans/WebStockBean.java
new file mode 100644
index 0000000000..7b379e0277
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/WebStockBean.java
@@ -0,0 +1,49 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
+package org.posterita.beans;
+
+import java.util.ArrayList;
+
+
+public class WebStockBean
+{
+ private AttributeValuesBean attributeValuesBean;
+ private ArrayList regions;
+
+ public AttributeValuesBean getAttributeValuesBean()
+ {
+ return attributeValuesBean;
+ }
+
+ public void setAttributeValuesBean(AttributeValuesBean attributeValuesBean)
+ {
+ this.attributeValuesBean = attributeValuesBean;
+ }
+
+ public ArrayList getRegions()
+ {
+ return regions;
+ }
+
+ public void setRegions(ArrayList regions)
+ {
+ this.regions = regions;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/WebstoreProductImageFileBean.java b/posterita/posterita/src/main/org/posterita/beans/WebstoreProductImageFileBean.java
new file mode 100644
index 0000000000..8ff2977a1a
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/WebstoreProductImageFileBean.java
@@ -0,0 +1,104 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ **/
+
+/**
+ @author ashley
+ */
+
+package org.posterita.beans;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+
+public class WebstoreProductImageFileBean
+{
+
+ private String fileName;
+ private String brandDesignModelColourAttr;
+
+ private ArrayList sizeList;
+
+ public WebstoreProductImageFileBean()
+ {
+ sizeList = new ArrayList();
+ }
+
+ public String getBrandDesignModelColourAttr()
+ {
+ return brandDesignModelColourAttr;
+ }
+
+ public void setBrandDesignModelColourAttr(String brandDesignModelColourAttr)
+ {
+ this.brandDesignModelColourAttr = brandDesignModelColourAttr;
+ }
+
+ public String getFileName()
+ {
+ return fileName;
+ }
+
+ public void setFileName(String fileName)
+ {
+ this.fileName = fileName;
+ }
+
+ public ArrayList getSizeList()
+ {
+ return sizeList;
+ }
+
+ public void setSizeList(ArrayList sizeList)
+ {
+ this.sizeList = sizeList;
+ }
+
+ public void addSize(String size)
+ {
+ sizeList.add(size);
+ }
+
+ @Override
+ public boolean equals(Object obj)
+ {
+ boolean equals = false;
+
+ if(obj instanceof WebstoreProductImageFileBean)
+ {
+ if(((WebstoreProductImageFileBean)obj).brandDesignModelColourAttr.equalsIgnoreCase(this.brandDesignModelColourAttr))
+ {
+ WebstoreProductImageFileBean tWProductImageFileBean = (WebstoreProductImageFileBean)obj;
+ Iterator sizeIter = tWProductImageFileBean.getSizeList().iterator();
+ while(sizeIter.hasNext())
+ {
+ String s = sizeIter.next();
+ if(this.sizeList.contains(s))
+ {
+ equals = true;
+ break;
+ }
+ }
+ }
+ }
+
+ return equals;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/beans/WebstoreUserBean.java b/posterita/posterita/src/main/org/posterita/beans/WebstoreUserBean.java
new file mode 100644
index 0000000000..ea428e8fa2
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/beans/WebstoreUserBean.java
@@ -0,0 +1,127 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ **/
+package org.posterita.beans;
+
+import java.math.BigDecimal;
+
+public class WebstoreUserBean
+{
+
+ protected UserBean userBean;
+ protected AddressBean shipToAddrBean;
+ protected CreditCardBean creditCardBean;
+ protected Integer chargeId; // not in udibean yet
+ protected String tenderType; //i.e. Payment Method: by card, cash (not in udibean yet)
+ protected String deliveryViaRule; // MInOut.DELIVERYVIARULE_Shipper etc
+ protected String chargeName;
+ protected BigDecimal chargeAmount;
+ /*
+ * Will be used only in session.
+ * Step 1: Delivery Information
+ * Step 2: Payment Information
+ * Step 3: Order Confirmation
+ * Step 4: Finished
+ */
+ protected String step;
+
+
+
+ public String getStep()
+ {
+ return step;
+ }
+ public void setStep(String step)
+ {
+ this.step = step;
+ }
+
+ public CreditCardBean getCreditCardBean()
+ {
+ return creditCardBean;
+ }
+ public void setCreditCardBean(CreditCardBean creditCardBean)
+ {
+ this.creditCardBean = creditCardBean;
+ }
+ public AddressBean getShipToAddrBean()
+ {
+ return shipToAddrBean;
+ }
+ public void setShipToAddrBean(AddressBean shipToAddrBean)
+ {
+ this.shipToAddrBean = shipToAddrBean;
+ }
+ public UserBean getUserBean()
+ {
+ return userBean;
+ }
+ public void setUserBean(UserBean userBean)
+ {
+ this.userBean = userBean;
+ }
+
+ public String getTenderType()
+ {
+ return tenderType;
+ }
+ public void setTenderType(String tenderType)
+ {
+ this.tenderType = tenderType;
+ }
+ public Integer getChargeId()
+ {
+ return chargeId;
+ }
+ public void setChargeId(Integer chargeId)
+ {
+ this.chargeId = chargeId;
+ }
+ public String getChargeName()
+ {
+ return chargeName;
+ }
+ public void setChargeName(String chargeName)
+ {
+ this.chargeName = chargeName;
+ }
+ public BigDecimal getChargeAmount()
+ {
+ return chargeAmount;
+ }
+ public void setChargeAmount(BigDecimal chargeAmount)
+ {
+ this.chargeAmount = chargeAmount;
+ }
+ public String getDeliveryViaRule()
+ {
+ return deliveryViaRule;
+ }
+ public void setDeliveryViaRule(String deliveryViaRule)
+ {
+ this.deliveryViaRule = deliveryViaRule;
+ }
+
+
+
+
+
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/businesslogic/AbstractDocumentManager.java b/posterita/posterita/src/main/org/posterita/businesslogic/AbstractDocumentManager.java
new file mode 100644
index 0000000000..320f8abc03
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/businesslogic/AbstractDocumentManager.java
@@ -0,0 +1,142 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/**
+ @author vishee
+ */
+
+package org.posterita.businesslogic;
+
+import java.math.BigDecimal;
+import java.util.Properties;
+
+import org.compiere.model.MAttributeSetInstance;
+import org.compiere.model.MBPartner;
+import org.compiere.model.MTax;
+import org.compiere.util.Env;
+
+import org.posterita.beans.WebDocumentHeaderBean;
+
+
+public class AbstractDocumentManager
+{
+ public static final String REF_PO = "Ref PO No:";
+ public static final String COUNTER_REF_SO = "Ref SO No:";
+
+ public static final String DEALER_REF = "Dealer Purchase Order No:";
+ public static final String DEALER_COUNTER_REF = "Dealer Purchase Order No:";
+
+
+
+ public static final String FROM = "From:";
+ public static final String TO = "To:";
+
+
+ protected static BigDecimal getLineTaxAmt(Properties ctx, BigDecimal lineNetAmt, int taxId, int lineId)
+ {
+ BigDecimal baseAmt = Env.ZERO;
+
+ baseAmt = baseAmt.add(lineNetAmt);
+
+ MTax tax = new MTax(ctx, taxId, null);
+
+ return (tax.calculateTax(baseAmt, false, 4));
+ }
+
+ protected static String getSerno(Properties ctx, int attributeSetInstanceId)
+ {
+ if (attributeSetInstanceId == 0)
+ return "";
+
+ MAttributeSetInstance attributeSetInstance = new MAttributeSetInstance(ctx, attributeSetInstanceId, null);
+
+ return attributeSetInstance.getSerNo();
+ }
+
+ protected static WebDocumentHeaderBean createWebDocumentHeader(Properties ctx, int orgId, int bpartnerID, String docStatus, boolean isSoTrx,String paymentType)
+ {
+ if (isSoTrx)
+ return getSalesOrderHeader(ctx, orgId, bpartnerID, docStatus,paymentType);
+ else
+ return getPurchaseOrderHeader(ctx, orgId, bpartnerID, docStatus);
+ }
+
+ protected static WebDocumentHeaderBean getSalesOrderHeader(Properties ctx, int orgId, int bpartnerID, String docStatus,String paymentType)
+ {
+ WebDocumentHeaderBean headerBean = new WebDocumentHeaderBean();
+
+ headerBean.setDcsRef(COUNTER_REF_SO);
+ headerBean.setDcsCounterRef(REF_PO);
+ headerBean.setDealerRef(null);
+ headerBean.setPaymentType(paymentType);
+
+ //set to null because SOReference is not currently available in system
+ headerBean.setDealerCounterRef(DEALER_COUNTER_REF);
+ //headerBean.setDocumentStatus(order.getZZ_HondaDocStatus());
+ headerBean.setDate("Date Ordered:");
+ headerBean.setDocumentName("Sales Order");
+
+
+ String youName = null;
+ MBPartner youPartner = new MBPartner(ctx, bpartnerID, null);
+
+ youName = youPartner.getName();
+
+
+ headerBean.setYouName(youName);
+
+ headerBean.setFrom(TO);
+
+ headerBean.setTo(FROM);
+
+ return headerBean;
+ }
+
+
+
+
+ private static WebDocumentHeaderBean getPurchaseOrderHeader(Properties ctx, int orgId, int bpartnerID, String docStatus)
+ {
+ WebDocumentHeaderBean headerBean = new WebDocumentHeaderBean();
+
+ headerBean.setDcsRef(REF_PO);
+ headerBean.setDcsCounterRef(COUNTER_REF_SO);
+ headerBean.setDealerRef(DEALER_REF);
+ //set to null because SOReference is not currently available in system
+ headerBean.setDealerCounterRef(null);
+ headerBean.setDocumentStatus(docStatus);
+ headerBean.setDate("Date Ordered:");
+ headerBean.setDocumentName("Purchase order");
+
+
+ MBPartner youBP = new MBPartner(ctx, bpartnerID, null);
+ String youName = youBP.getName();
+
+ headerBean.setYouName(youName);
+
+ headerBean.setFrom(TO);
+
+ headerBean.setTo(FROM);
+
+
+ return headerBean;
+ }
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/businesslogic/AttributeValuesManager.java b/posterita/posterita/src/main/org/posterita/businesslogic/AttributeValuesManager.java
new file mode 100644
index 0000000000..b0b28ee5ff
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/businesslogic/AttributeValuesManager.java
@@ -0,0 +1,326 @@
+/**
+ * Product: Posterita Web-Based POS (an Adempiere Plugin)
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/**
+ @author ashley
+ */
+
+package org.posterita.businesslogic;
+
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Properties;
+
+import org.compiere.model.MAttribute;
+import org.compiere.model.MAttributeValue;
+import org.compiere.util.DB;
+import org.compiere.util.Env;
+import org.compiere.util.KeyNamePair;
+import org.posterita.beans.AttributeInstanceBean;
+import org.posterita.beans.AttributeValuesPair;
+import org.posterita.core.KeyNamePairUtil;
+import org.posterita.exceptions.OperationException;
+import org.posterita.keyname.ProductAttributeValueKeyNamePair;
+import org.posterita.util.PoManager;
+
+public class AttributeValuesManager
+{
+ private static ArrayList getAttributeValues(Properties ctx, int attributeId, int productCategoryId ) throws OperationException
+ {
+ ArrayList attributeValues = ProductAttributeValueKeyNamePair.getKeyNamePairs(ctx, attributeId, productCategoryId);
+
+ return attributeValues;
+
+ }
+
+ //retrieve the colour, model, transmission, year from an attributesetinstanceID
+ //returns a bean containing a colour, model, year, transmission keynamepair
+
+ public static AttributeValuesPair retrieveAttributeValues(Properties ctx,int attributeSetInstanceId) throws OperationException
+ {
+ if (attributeSetInstanceId == 0)
+ return new AttributeValuesPair();
+
+ ArrayList attributeInstances = getMAttributeInstances(ctx);
+
+ return retrieveAttributeValues(ctx, attributeSetInstanceId, attributeInstances);
+ }
+
+ public static AttributeValuesPair retrieveAttributeValues(Properties ctx,int attributeSetInstanceId, ArrayList attributeInstances) throws OperationException
+ {
+ HashMap attributeValuesMap = getAttributeValues(ctx, attributeSetInstanceId, attributeInstances);
+
+ AttributeValuesPair pair = new AttributeValuesPair();
+ pair.setBrandAttributeValue((KeyNamePair)attributeValuesMap.get("Brand"));
+ pair.setModelAttributeValue((KeyNamePair) attributeValuesMap.get("Model"));
+ pair.setColourAttributeValue((KeyNamePair) attributeValuesMap.get("Colour"));
+ pair.setTransmissionAttributeValue((KeyNamePair) attributeValuesMap.get("Transmission"));
+ pair.setYearAttributeValue((KeyNamePair) attributeValuesMap.get("Year"));
+ pair.setDesignAttributeValue((KeyNamePair) attributeValuesMap.get("Design"));
+ pair.setSizeAttributeValue((KeyNamePair) attributeValuesMap.get("Size"));
+ pair.setStyleAttributeValue((KeyNamePair) attributeValuesMap.get("Style"));
+
+ return pair;
+ }
+
+ private static HashMap getAttributeValues(Properties ctx, int attributeSetInstanceId, ArrayList attributeInstances) throws OperationException
+ {
+ ArrayList sameAttributeSetInstances = getAttributeInstancesByAttributeSetInstance(attributeSetInstanceId, attributeInstances);
+
+ Iterator iter = sameAttributeSetInstances.iterator();
+
+ HashMap attributeValuesMap = new HashMap();
+
+ AttributeInstanceBean attributeInstanceBean;
+ while (iter.hasNext())
+ {
+ attributeInstanceBean = (AttributeInstanceBean) iter.next();
+ attributeValuesMap = getAttributeValue(ctx,attributeInstanceBean, attributeValuesMap);
+
+ }
+
+ return attributeValuesMap;
+
+ }
+
+ @SuppressWarnings("unchecked")
+ private static HashMap getAttributeValue(Properties ctx, AttributeInstanceBean attributeInstanceBean, HashMap attributeValuesMap) throws OperationException
+ {
+ KeyNamePair pair = new KeyNamePair(attributeInstanceBean.getAttributeValueId(), attributeInstanceBean.getAttributeValue());
+ attributeValuesMap.put(attributeInstanceBean.getAttribute(), pair);
+
+ return attributeValuesMap;
+ }
+
+ public static ArrayList getMAttributeInstances(Properties ctx) throws OperationException
+ {
+// MOrg org = OrganisationManager.getHsafOrg(ctx); // Honda customised stuff
+
+ int adOrgID = Env.getAD_Org_ID(ctx);
+ String sql = "select ai.m_attributeSetInstance_id," +
+ " ai.m_attributevalue_id," +
+ " ai.value," +
+ " attr.name," +
+ " attr.M_Attribute_ID" +
+ " from m_attributeInstance ai, M_Attribute attr " +
+ " where ai.m_attribute_id=attr.m_attribute_id" +
+ " and ai.AD_CLIENT_ID=" + Env.getAD_Client_ID(ctx) +
+ " and ai.AD_ORG_ID="+adOrgID;
+
+ PreparedStatement pstmt =null;
+
+ ArrayList attributeInstances = new ArrayList();
+ try
+ {
+ pstmt = DB.prepareStatement(sql, null);
+ ResultSet rs = pstmt.executeQuery();
+
+ AttributeInstanceBean bean;
+ while (rs.next())
+ {
+ bean = new AttributeInstanceBean();
+ bean.setAttributeSetInstanceId(rs.getInt(1));
+ bean.setAttributeValueId(rs.getInt(2));
+ bean.setAttributeValue(rs.getString(3));
+ bean.setAttribute(rs.getString(4));
+ bean.setAttributeId(rs.getInt(5));
+ attributeInstances.add(bean);
+ }
+
+ rs.close();
+
+ }
+ catch (SQLException e)
+ {
+ throw new OperationException(e.getMessage());
+ }
+ finally
+ {
+ try
+ {
+ pstmt.close();
+ }
+ catch (Exception ex)
+ {
+ }
+ pstmt = null;
+ }
+
+ return attributeInstances;
+ }
+
+ private static ArrayList getAttributeInstancesByAttributeSetInstance(int attributeSetInstanceId, ArrayList allAttributeInstances)
+ {
+ Iterator iter = allAttributeInstances.iterator();
+
+ AttributeInstanceBean bean;
+ ArrayList sameInstances = new ArrayList();
+ while (iter.hasNext())
+ {
+ bean = (AttributeInstanceBean) iter.next();
+ if (bean.getAttributeSetInstanceId() == attributeSetInstanceId)
+ sameInstances.add(bean);
+ }
+
+
+ return sameInstances;
+ }
+
+ public static MAttributeValue createAttributeValue(Properties ctx, String value, int attributeId, int productCategoryId, String trxName) throws OperationException
+ {
+
+ MAttributeValue attributeValue = new MAttributeValue(ctx, 0, trxName);
+ attributeValue.setName(value);
+ attributeValue.setValue(value);
+// attributeValue.setM_Product_Category_ID(productCategoryId);
+ attributeValue.setM_Attribute_ID(attributeId);
+ PoManager.save(attributeValue);
+ return attributeValue;
+
+ }
+
+ public static MAttributeValue getOrCreateAttributeValue(Properties ctx, int attributeId, String value, int productCategoryId, String trxName) throws OperationException
+ {
+ //check is attribute value exist before creating new one
+ int attributeValueIds[] = MAttributeValue.getAllIDs(MAttributeValue.Table_Name, "ad_client_id=" + Env.getAD_Client_ID(ctx) + " and Upper(name)=Upper('" + value + "')", trxName);
+
+ MAttributeValue attributeValue;
+ if (attributeValueIds.length!= 0)
+ attributeValue = new MAttributeValue(ctx, attributeValueIds[0], trxName);
+ else
+ attributeValue = AttributeValuesManager.createAttributeValue(ctx, value, attributeId, productCategoryId, trxName);
+
+ return attributeValue;
+ }
+
+ public static MAttributeValue getAttributeValue(Properties ctx, int attributeId, int attributeSetInstanceId, String trxName) throws OperationException
+ {
+ String selStmt = "Select M_AttributeValue_ID from M_AttributeInstance where ";
+ selStmt += " AD_Client_ID=" + Env.getAD_Client_ID(ctx);
+ selStmt += " and M_AttributeSetInstance_ID=" + attributeSetInstanceId;
+ selStmt += " and M_Attribute_ID=" + attributeId;
+
+ PreparedStatement pstmt = null;
+
+ try
+ {
+ pstmt = DB.prepareStatement(selStmt, trxName);
+ ResultSet rs = pstmt.executeQuery();
+
+ if(!rs.next())
+ throw new OperationException("Could not find Attribute Value id for Attribute id: " + attributeId + " and Attribute Set Instance Id: " + attributeSetInstanceId);
+
+ int attributeValueId = rs.getInt(1);
+ rs.close();
+ MAttributeValue attrValue = new MAttributeValue(ctx, attributeValueId, trxName);
+ return attrValue;
+ }
+ catch(SQLException sqlEx)
+ {
+ throw new OperationException("Could not execute query for getting attribute value: " + selStmt);
+ }
+ finally
+ {
+ try
+ {
+ pstmt.close();
+ }
+ catch(Exception ex)
+ {}
+ }
+ }
+
+ public static ArrayList getAttributeValues(Properties ctx, int AttributeId) throws OperationException
+ {
+ StringBuffer whereClause = new StringBuffer();
+ whereClause.append("M_AttributeValue_ID in ( ");
+ whereClause.append("select distinct M_AttributeValue_ID from M_AttributeInstance ");
+ whereClause.append("where AD_Client_ID=" + Env.getAD_Client_ID(ctx) + " ");
+ whereClause.append(" and AD_Org_ID=" + Env.getAD_Org_ID(ctx) + " ");
+ whereClause.append("and M_Attribute_ID=" + AttributeId + " ");
+ whereClause.append(")");
+ try
+ {
+ return KeyNamePairUtil.getData(ctx, MAttributeValue.Table_Name, whereClause.toString());
+ }
+ catch(SQLException ex)
+ {
+ throw new OperationException("Could not retrieve Attribute Values with WhereClause: " + whereClause, ex);
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public static ArrayList getAttributes(Properties ctx) throws OperationException
+ {
+ String whereClause = "AD_Client_ID=" + Env.getAD_Client_ID(ctx) + " and IsActive='Y'";
+
+ try
+ {
+ return KeyNamePairUtil.getData(ctx, MAttribute.Table_Name, whereClause);
+ }
+ catch(SQLException ex)
+ {
+ throw new OperationException("Could not retrieve attributes with WhereClause: " + whereClause, ex);
+ }
+ }
+
+ public static int changeAttributeValue(Properties ctx, int attributeValueId, String newValue, String trxName) throws OperationException
+ {
+ int retAttributeValueId;
+ String whereClause = "AD_Client_ID=" + Env.getAD_Client_ID(ctx);
+ whereClause += " and AD_Org_ID=" + Env.getAD_Org_ID(ctx) + " and Upper(Name)=Upper('" + newValue + "')";
+
+ int attrValueIds[] = MAttributeValue.getAllIDs(MAttributeValue.Table_Name, whereClause, trxName);
+
+ if(attrValueIds.length > 1)
+ throw new OperationException("Duplicate name found in Attribute Value: " + newValue);
+
+ MAttributeValue attributeValue = new MAttributeValue(ctx, attributeValueId, trxName);
+ if(attributeValue.get_ID() == 0)
+ throw new OperationException("Could not load Attribute Value with ID: " + attributeValueId);
+
+ if(attrValueIds.length == 0)
+ {
+ attributeValue.setName(newValue);
+ attributeValue.setValue(newValue);
+ retAttributeValueId = attributeValue.get_ID();
+ }
+ else if(attributeValueId == attrValueIds[0])
+ {
+ attributeValue.setIsActive(true);
+ attributeValue.setName(newValue);
+ attributeValue.setValue(newValue);
+ retAttributeValueId = attributeValue.get_ID();
+ }
+ else
+ {
+ attributeValue.setIsActive(false);
+ retAttributeValueId = attrValueIds[0];
+ }
+
+ PoManager.save(attributeValue);
+
+ return retAttributeValueId;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/businesslogic/BankManager.java b/posterita/posterita/src/main/org/posterita/businesslogic/BankManager.java
new file mode 100644
index 0000000000..56071d09d5
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/businesslogic/BankManager.java
@@ -0,0 +1,333 @@
+/**
+ * Product: Posterita Web-Based POS (an Adempiere Plugin)
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/**
+ @author Alok Pathak
+ */
+
+package org.posterita.businesslogic;
+
+import java.math.BigDecimal;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.util.ArrayList;
+import java.util.Properties;
+import java.util.logging.Level;
+
+import org.compiere.model.MBankAccount;
+import org.compiere.model.MClient;
+import org.compiere.model.MLocation;
+import org.compiere.util.CLogger;
+import org.compiere.util.DB;
+import org.compiere.util.Env;
+import org.posterita.beans.BankAccountBean;
+import org.posterita.beans.BankBean;
+import org.posterita.core.CheckDuplicateEntities;
+import org.posterita.exceptions.BankAlreadyExistException;
+import org.posterita.exceptions.OperationException;
+import org.posterita.lib.UdiConstants;
+import org.posterita.model.MBank;
+import org.posterita.util.PoManager;
+
+
+public class BankManager
+{
+ private static final CLogger log = CLogger.getCLogger(BankManager.class);
+ private static final String ROUTING_NUMBER="12345";
+
+ public static MBank createBank(Properties ctx, String bankName,String address1,String postalAddress1,String city,String routingNumber, String trxName) throws OperationException
+ {
+
+ MBank bank = new MBank(ctx,0,trxName);
+
+ if(CheckDuplicateEntities.checkDuplicateName(ctx,bankName,MBank.Table_Name))
+ throw new BankAlreadyExistException("Bank already exists");
+
+ try
+ {
+ bank.setName(bankName);
+ bank.setRoutingNo(ROUTING_NUMBER);
+
+ MLocation location = new MLocation(ctx,bank.getC_Location_ID(),trxName);
+ location.setAddress1(address1);
+ location.setPostal_Add(postalAddress1);
+ location.setCity(city);
+ location.setC_Country_ID(UdiConstants.COUNTRY_MAURITIUS);
+
+ PoManager.save(location);
+
+ bank.setC_Location_ID(location.get_ID());
+
+ PoManager.save(bank);
+
+ }
+ catch(OperationException e)
+ {
+ throw new OperationException("Cannot create bank!!");
+ }
+
+ return bank;
+
+ }
+
+ public static MBankAccount createBankAccount(Properties ctx,int bankId,String accountNo,String accountType,double currentBalance, String trxName) throws OperationException
+ {
+ MBankAccount account;
+
+ try
+ {
+ account = new MBankAccount(ctx,0,trxName);
+ account.setC_Bank_ID(bankId);
+ account.setAccountNo(accountNo);
+ account.setBankAccountType(accountType);
+ account.setC_Currency_ID(MClient.get(ctx).getC_Currency_ID());
+ account.setIsDefault(true);
+ account.setCurrentBalance(new BigDecimal(currentBalance));
+
+
+ PoManager.save(account);
+ }
+ catch(OperationException e)
+ {
+ throw new OperationException("Cannot create bank account!!");
+ }
+
+ return account;
+
+ }
+
+
+ public static ArrayList getAllBanks(Properties ctx) throws OperationException
+ {
+ ArrayList list = new ArrayList();
+
+ //load all banks
+ int clientId = Env.getAD_Client_ID(ctx);
+ int orgId = Env.getAD_Org_ID(ctx);
+
+ int id[] = MBank.getAllIDs(MBank.Table_Name," ad_client_id = "+clientId+" and ad_org_id = "+orgId +" and isactive = 'Y'" ,null);
+ BankBean bean;
+
+ for(int i=0; i1)
+ throw new OperationException("Too many banks, not currently supported");
+
+ BankBean bean = (BankBean)allBanks.get(0);
+ bankId = bean.getBankId();
+ }
+
+ return bankId.intValue();
+ }
+
+ public static int getDefaultBankAccountId(Properties ctx, int adOrgId, String trxName) throws OperationException
+ {
+ String whereClause = "AD_Client_ID=" + Env.getAD_Client_ID(ctx) + " AND AD_Org_ID=" + adOrgId + " AND IsDefault='Y'";
+
+ int bankAccountIds[] = MBankAccount.getAllIDs(MBankAccount.Table_Name, whereClause, trxName);
+
+ if (bankAccountIds.length == 0)
+ {
+ throw new OperationException("No default bank account found");
+ }
+ else
+ {
+ return bankAccountIds[0];
+ }
+ }
+
+
+ /**
+ * Retrieves all the active bank accounts that the user present in the application context can
+ * have access to
+ * @param ctx Context
+ * @param trxName Transaction
+ * @return List of Bank Account model data
+ * @throws OperationException If the data cannot be retrieved
+ */
+ public static ArrayList getBankAccounts(Properties ctx, String trxName) throws OperationException
+ {
+ StringBuffer sqlStmt = new StringBuffer();
+ sqlStmt.append("SELECT b.C_Bank_ID, b.Name, ba.C_BankAccount_ID, ba.bankAccountType, ba.AccountNo, ba.Description ");
+ sqlStmt.append("FROM C_Bank b INNER JOIN C_BankAccount ba ON b.C_Bank_ID=ba.C_Bank_ID ");
+ sqlStmt.append("WHERE b.AD_Client_ID=? AND b.IsActive='Y' AND ba.IsActive='Y' AND b.AD_Org_ID IN (");
+ sqlStmt.append(Env.getContext(ctx, UdiConstants.ROLE_EDITABLE_ORGS_CTX_PARAM));
+ sqlStmt.append(")");
+ sqlStmt.append(" AND NOT EXISTS (SELECT * FROM AD_OrgInfo oi WHERE oi.TransferBank_ID=b.C_Bank_ID)");
+
+ ArrayList paramList = new ArrayList();
+ paramList.add(new Integer(Env.getAD_Client_ID(ctx)));
+
+ return getBankAccounts(ctx, sqlStmt.toString(), paramList, trxName);
+ }
+
+ /**
+ * Retrieves all the active bank accounts present for an organisation
+ * @param ctx Context
+ * @param trxName Transaction
+ * @return List of Bank Account model data
+ * @throws OperationException If the data cannot be retrieved
+ */
+ public static ArrayList getBankAccounts (Properties ctx, int adOrgId, String trxName) throws OperationException
+ {
+ StringBuffer sqlStmt = new StringBuffer();
+ sqlStmt.append("SELECT b.C_Bank_ID, b.Name, ba.C_BankAccount_ID, ba.bankAccountType, ba.AccountNo, ba.Description ");
+ sqlStmt.append("FROM C_Bank b INNER JOIN C_BankAccount ba ON b.C_Bank_ID=ba.C_Bank_ID ");
+ sqlStmt.append("WHERE b.AD_Client_ID=? AND b.IsActive='Y' AND ba.IsActive='Y' AND ba.AD_Org_ID=?");
+ sqlStmt.append(" AND NOT EXISTS (SELECT * FROM AD_OrgInfo oi WHERE oi.TransferBank_ID=b.C_Bank_ID)");
+
+ ArrayList paramList = new ArrayList();
+ paramList.add(new Integer(Env.getAD_Client_ID(ctx)));
+ paramList.add(new Integer(adOrgId));
+
+ return getBankAccounts(ctx, sqlStmt.toString(), paramList, trxName);
+ }
+
+ /**
+ * Retrieves list of bank accounts based on the criteria defined in the SQL Statement
+ * @param ctx Context
+ * @param sqlSmt SQL Statement
+ * @param params Parameters to be used to build the SQL
+ * @param trxName Transaction
+ * @return List of Bank Account
+ * @throws OperationException If data cannot be retrieved
+ */
+ private static ArrayList getBankAccounts(Properties ctx, String sqlSmt, ArrayList params, String trxName) throws OperationException
+ {
+ ArrayList list = new ArrayList();
+
+ PreparedStatement pstmt = null;
+ ResultSet rs = null;
+
+ try
+ {
+ int paramIndex = 1;
+ pstmt = DB.prepareStatement(sqlSmt, trxName);
+ if (params != null)
+ {
+ for (int i = 0; i < params.size(); i++)
+ {
+ pstmt.setObject(paramIndex++, params.get(i));
+ }
+ }
+ rs = pstmt.executeQuery();
+
+ while (rs.next())
+ {
+ BankAccountBean bean = new BankAccountBean();
+ bean.setBankId(rs.getInt(1));
+ bean.setBankName(rs.getString(2));
+ bean.setBankAccountId(rs.getInt(3));
+ bean.setAccountType(rs.getString(4));
+ bean.setAccountNo(rs.getString(5));
+ list.add(bean);
+ }
+ }
+ catch (Exception ex)
+ {
+ log.log(Level.SEVERE, "Could not get bank account information", ex);
+ throw new OperationException("Could not get bank account information", ex);
+ }
+ finally
+ {
+ DB.close(rs, pstmt);
+ }
+
+ return list;
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/businesslogic/CashManager.java b/posterita/posterita/src/main/org/posterita/businesslogic/CashManager.java
new file mode 100644
index 0000000000..808959159c
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/businesslogic/CashManager.java
@@ -0,0 +1,1409 @@
+/*
+ * Product: Posterita Web-Based POS (an Adempiere Plugin)
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/**
+ @author Alok Pathak
+ */
+
+package org.posterita.businesslogic;
+
+
+import java.math.BigDecimal;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.Properties;
+import java.util.logging.Level;
+
+import org.compiere.model.MAttachment;
+import org.compiere.model.MAttachmentEntry;
+import org.compiere.model.MBPartner;
+import org.compiere.model.MBPartnerLocation;
+import org.compiere.model.MBankAccount;
+import org.compiere.model.MCash;
+import org.compiere.model.MCashBook;
+import org.compiere.model.MCashLine;
+import org.compiere.model.MCurrency;
+import org.compiere.model.MDocType;
+import org.compiere.model.MInvoice;
+import org.compiere.model.MLocation;
+import org.compiere.model.MOrg;
+import org.compiere.model.MPayment;
+import org.compiere.process.DocumentEngine;
+import org.compiere.util.CLogger;
+import org.compiere.util.DB;
+import org.compiere.util.Env;
+import org.compiere.util.TimeUtil;
+import org.posterita.beans.CashBean;
+import org.posterita.beans.CashBookBean;
+import org.posterita.beans.CashBookDetailBean;
+import org.posterita.beans.CashLineBean;
+import org.posterita.beans.CashSummaryBean;
+import org.posterita.beans.CurrentTillAmountBean;
+import org.posterita.beans.OpenItemBean;
+import org.posterita.beans.WebDocumentBean;
+import org.posterita.beans.WebDocumentHeaderBean;
+import org.posterita.businesslogic.performanceanalysis.POSReportManager;
+import org.posterita.core.JulianDate;
+import org.posterita.core.utils.FormatBigDecimal;
+import org.posterita.exceptions.CanNotCloseTillException;
+import org.posterita.exceptions.CashBookAlreadyAssignedException;
+import org.posterita.exceptions.DataException;
+import org.posterita.exceptions.NoCashJournalPresentException;
+import org.posterita.exceptions.NullTransferAmountException;
+import org.posterita.exceptions.OperationException;
+import org.posterita.exceptions.TransferAmountExceedsTotalAmountException;
+import org.posterita.lib.UdiConstants;
+import org.posterita.util.PoManager;
+
+public class CashManager
+{
+ private static final CLogger log = CLogger.getCLogger(CashManager.class);
+
+ /**
+ * Adjust cash book (i.e: Expense, Receipts or Bank Transfer)
+ * @param ctx Context
+ * @param bean Transaction Details
+ * @param trxName Transaction
+ * @return Cash Journal Entry created
+ * @throws OperationException If entries could not be created or invalid transfer type
+ */
+ public static MCashLine adjustCashBook(Properties ctx, CashBookDetailBean bean, String trxName) throws OperationException
+ {
+ MCash cash = getCashJournal(ctx,trxName);
+
+ if(bean.getAdjustmentAmount() == null)
+ {
+ throw new NullTransferAmountException("Amount can not be null");
+ }
+
+ MCashLine cashLine = null;
+
+ if(bean.getTransferType().equalsIgnoreCase(MCashLine.CASHTYPE_GeneralReceipts))
+ {
+ cashLine = createCashLine(ctx, cash, bean.getAdjustmentAmount(),
+ MCashLine.CASHTYPE_GeneralReceipts, bean.getDescription(), trxName);
+ }
+
+ else if(bean.getTransferType().equalsIgnoreCase(MCashLine.CASHTYPE_GeneralExpense))
+ {
+ if(bean.getAdjustmentAmount().compareTo(cash.getEndingBalance()) > 0)
+ {
+ throw new TransferAmountExceedsTotalAmountException("cannot transfer amount more than the ending balance");
+ }
+ cashLine = createCashLine(ctx, cash, bean.getAdjustmentAmount().negate(),
+ MCashLine.CASHTYPE_GeneralExpense, bean.getDescription(), trxName);
+ }
+ else if(bean.getTransferType().equalsIgnoreCase(MCashLine.CASHTYPE_BankAccountTransfer))
+ {
+ if(bean.getAdjustmentAmount().compareTo(cash.getEndingBalance()) > 0)
+ {
+ throw new TransferAmountExceedsTotalAmountException("cannot transfer amount more than the ending balance");
+ }
+ // @ashley TODO Refactor should be able to chose bank account on which to transfer
+ int bankAccountId = POSTerminalManager.getBankAccountId(ctx, MPayment.TENDERTYPE_Check);
+ cashLine = createBankTransferCashEntry(ctx, cash, bean.getAdjustmentAmount(),
+ bankAccountId, bean.getDescription(), trxName);
+ }
+ else
+ {
+ throw new OperationException("Invalid transfer type: " + bean.getTransferType());
+ }
+
+ return cashLine;
+ }
+
+ /**
+ * Creates a new Journal entry
+ * @param ctx Context
+ * @param cashJournal Cash Journal
+ * @param amount Amount
+ * @param cashType Cash Type
+ * @param trxName Transaction
+ * @return The created journal entry (Cash Line)
+ * @throws OperationException If the entry cannot be created
+ */
+ public static MCashLine createCashLine(Properties ctx, MCash cashJournal, BigDecimal amount,
+ String cashType, String trxName) throws OperationException
+ {
+ return createCashLine(ctx, cashJournal, amount, cashType, "", trxName);
+ }
+
+ /**
+ * Creates a new Journal entry
+ * @param ctx Context
+ * @param cashJournal Cash Journal
+ * @param amount Amount
+ * @param cashType Cash Type
+ * @param description Description of the entry
+ * @param trxName Transaction
+ * @return The created journal entry (Cash Line)
+ * @throws OperationException If the entry cannot be created
+ */
+ public static MCashLine createCashLine(Properties ctx, MCash cashJournal, BigDecimal transferAmount,
+ String cashType, String description, String trxName) throws OperationException
+ {
+ MCashLine cashLine = new MCashLine(ctx, 0, trxName);
+ cashLine.setC_Cash_ID(cashJournal.get_ID());
+ cashLine.setAmount(transferAmount);
+ cashLine.setCashType(cashType);
+ cashLine.setDescription(description);
+ PoManager.save(cashLine);
+ return cashLine;
+ }
+
+ /**
+ * Creates a new Bank Account transfer Journal entry
+ * @param ctx Context
+ * @param cashJournal Cash Journal
+ * @param amount Amount to transfer
+ * @param bankAccountId Bank Account
+ * @param trxName Transaction
+ * @return Cash Line entry
+ * @throws OperationException If the entry cannot be created
+ */
+ public static MCashLine createBankTransferCashEntry(Properties ctx, MCash cashJournal,
+ BigDecimal transferAmount, int bankAccountId, String trxName) throws OperationException
+ {
+ return createBankTransferCashEntry(ctx, cashJournal, transferAmount, bankAccountId, null, trxName);
+ }
+
+ /**
+ * Creates a new Bank Account transfer Journal entry
+ * @param ctx Context
+ * @param cashJournal Cash Journal
+ * @param amount Amount to transfer
+ * @param bankAccountId Bank Account
+ * @param description Description of the line
+ * @param trxName Transaction
+ * @return Cash Line entry
+ * @throws OperationException If the entry cannot be created
+ */
+ public static MCashLine createBankTransferCashEntry(Properties ctx, MCash cashJournal,
+ BigDecimal amount, int bankAccountId, String description, String trxName) throws OperationException
+ {
+ MBankAccount bankAccount = new MBankAccount(ctx, bankAccountId, trxName);
+
+ StringBuffer descr = new StringBuffer();
+ // +ve/zero indicates transfer to bankAccount
+ // Though transfer of zero is meaningless
+ if (amount.signum() >= 0)
+ {
+ descr.append(" -> ");
+ }
+ else
+ {
+ descr.append(" <- ");
+ }
+ descr.append(bankAccount.getAccountNo()).append(" (BA)");
+
+ if (description != null && description.trim().length() > 0)
+ {
+ descr.append(" ").append(description);
+ }
+
+ MCashLine cashLine = new MCashLine(ctx, 0, trxName);
+ cashLine.setC_Cash_ID(cashJournal.get_ID());
+ cashLine.setDescription(descr.toString());
+ cashLine.setAmount(amount.negate());
+ cashLine.setCashType(MCashLine.CASHTYPE_BankAccountTransfer);
+ cashLine.setC_BankAccount_ID(bankAccountId);
+ PoManager.save(cashLine);
+ return cashLine;
+ }
+
+ /**
+ * @param ctx Context
+ * @return List of Cash Book Details
+ * @throws OperationException
+ */
+ public static CashBookDetailBean getCashBookDetails(Properties ctx, String trxName) throws OperationException
+ {
+ Integer cashBookId = POSTerminalManager.getCashBookId(ctx);
+ CashManager.getCashJournal(ctx, cashBookId, trxName);
+
+ String sql ="select cash.C_CASH_ID," +//1
+ "cash.C_CASHBOOK_ID," +//2
+ "cash.NAME," +//3
+ "cash.DESCRIPTION," +//4
+ "cash.DATEACCT," +//5
+ "cash.BEGINNINGBALANCE," +//6
+ "cash.ENDINGBALANCE," +//7
+ "cash.STATEMENTDIFFERENCE," +//8
+ "cash.DOCSTATUS," +//9
+ "book.name as bookName" +//10
+ " from C_CASH cash,C_CASHBOOK book " +
+ " where cash.C_CASHBOOK_ID=book.C_CASHBOOK_ID"+
+ " and book.C_CashBook_ID = " + cashBookId +
+ " and book.ad_client_id=" +Env.getAD_Client_ID(ctx)+
+ " and book.AD_ORG_ID=" +Env.getAD_Org_ID(ctx) +
+ " order by cash.created desc";
+
+ CashBookDetailBean bean = null;
+ PreparedStatement pstmt = null;
+ ResultSet rs = null;
+ try
+ {
+ pstmt = DB.prepareStatement(sql, trxName);
+ rs = pstmt.executeQuery();
+ if(rs.next())
+ {
+ bean = new CashBookDetailBean();
+ bean.setCashJournalId(Integer.valueOf(rs.getInt(1)));
+ bean.setCashBookId(Integer.valueOf(rs.getInt(2)));
+ bean.setCashJournalName(rs.getString(3));
+ bean.setCashJournalDisc(rs.getString(4));
+ bean.setDateAcct(rs.getTimestamp(5));
+ bean.setBeginingBalance( rs.getBigDecimal(6));
+ bean.setEndingBalance(rs.getBigDecimal(7));
+ bean.setStatementDifference(rs.getBigDecimal(8));
+ bean.setDocStatus(rs.getString(9));
+ bean.setCashBookName(rs.getString(10));
+ }
+ }
+ catch (SQLException e)
+ {
+ throw new OperationException(e);
+ }
+ finally
+ {
+ DB.close(rs, pstmt);
+ }
+
+ if (bean == null)
+ {
+ throw new NoCashJournalPresentException("No Cash journal is present");
+ }
+
+ return bean;
+ }
+
+
+ public static ArrayList getCashBookDetailsForTill(Properties ctx,int cashBookId, Timestamp fromDate,Timestamp toDate) throws OperationException
+ {
+
+
+ String sql1 ="select c_cash_id from C_CASH where C_CASHBOOK_ID="+cashBookId+
+ " and created between "+DB.TO_DATE(fromDate, false) + " AND " + DB.TO_DATE(toDate, false);
+
+ String sql="select nvl(sum(AMOUNT),0)" +
+ " from C_CASHLINE" +
+ " where C_CASH_ID in (" +sql1+")"+
+ " and AD_CLIENT_ID= " +Env.getAD_Client_ID(ctx)+
+ " and CASHTYPE='I'"+
+ " and created between " + DB.TO_DATE(fromDate, false) +
+ " and " + DB.TO_DATE(toDate, false) ;
+
+
+ CashBookDetailBean bean;
+ ArrayList list=new ArrayList();
+ PreparedStatement pstmt = DB.prepareStatement(sql,null);
+ try
+ {
+ ResultSet rs=pstmt.executeQuery();
+ while(rs.next())
+ {
+ bean=new CashBookDetailBean();
+ bean.setStatementDifference(rs.getBigDecimal(1));
+ list.add(bean);
+ }
+ rs.close();
+ }
+ catch (SQLException e)
+ {
+ throw new OperationException(e);
+ }
+ finally
+ {
+ try
+ {
+ if(pstmt != null)
+ pstmt.close();
+ }
+ catch(Exception ex){}
+
+ pstmt = null;
+ }
+
+ return list;
+ }
+
+
+
+
+ public static ArrayList getCashBookDetailsFyracle(Properties ctx) throws OperationException
+ {
+ Integer cashBookId=Integer.valueOf(POSTerminalManager.getCashBook(ctx).get_ID());
+ String sql ="select cash.C_CASH_ID," +//1
+ " cash.C_CASHBOOK_ID," +//2
+ " cash.NAME," +//3
+ " cash.DESCRIPTION," +//4
+ " cash.DATEACCT," +//5
+ " cash.BEGINNINGBALANCE," +//6
+ " cash.ENDINGBALANCE," +//7
+ " cash.STATEMENTDIFFERENCE," +//8
+ " cash.DOCSTATUS," +//9
+ " book.name bookName," +//10
+ " cash.created, " +//11
+ " cash.AD_CLIENT_ID," +//12
+ " cash.AD_ORG_ID" +//13
+ " from C_CASH cash,C_CASHBOOK book " +
+ " where cash.C_CASHBOOK_ID=book.C_CASHBOOK_ID"+
+ " and cash.C_CASHBOOK_ID="+cashBookId+
+ " and cash.ad_client_id="+Env.getAD_Client_ID(ctx)+
+ " and cash.ad_org_id="+Env.getAD_Org_ID(ctx) +
+ " order by cash.created desc";
+
+ CashBookDetailBean bean;
+ ArrayList list=new ArrayList();
+ PreparedStatement pstmt =DB.prepareStatement(sql,null);
+ try
+ {
+ ResultSet rs=pstmt.executeQuery();
+ if(rs.next())
+ {
+ bean=new CashBookDetailBean();
+ bean.setCashJournalId(Integer.valueOf(rs.getInt(1)));
+ bean.setCashBookId(Integer.valueOf(rs.getInt(2)));
+ bean.setCashJournalName(rs.getString(3));
+ bean.setCashJournalDisc(rs.getString(4));
+ bean.setDateAcct(rs.getTimestamp(5));
+ bean.setBeginingBalance(new BigDecimal(rs.getString(6)));
+ bean.setEndingBalance(new BigDecimal(rs.getString(7)));
+ bean.setStatementDifference(new BigDecimal(rs.getString(8)));
+ bean.setDocStatus(rs.getString(9));
+ bean.setCashBookName(rs.getString(10));
+ list.add(bean);
+ }
+ rs.close();
+ }
+ catch (SQLException e)
+ {
+ throw new OperationException(e);
+ }
+ finally
+ {
+ try
+ {
+ if(pstmt != null)
+ pstmt.close();
+ }
+ catch(Exception ex){}
+
+ pstmt = null;
+ }
+
+ return list;
+ }
+
+
+ /**
+ * Adjusts the beginning balance on the latest Cash journal available for the Cash Book
+ * @param ctx Context
+ * @param terminalId Terminal
+ * @param trxName Transaction
+ * @throws OperationException If Cash Journal could not be updated
+ */
+ public static void updateBeginningBalance(Properties ctx, int terminalId, String trxName) throws OperationException
+ {
+ int cashBookId = POSTerminalManager.getCashBookId(ctx, terminalId);
+
+ updateCashBookBeginningBalance(ctx, cashBookId, trxName);
+ }
+
+
+ public static void updateCashBookBeginningBalance(Properties ctx, int cashBookId, String trxName) throws OperationException
+ {
+ int toJournalId=0;
+ CashBean bean1 = getData(ctx,cashBookId,true,trxName);
+ if(bean1!=null)
+ {
+ toJournalId = bean1.getCashJournalId().intValue();
+ }
+
+ CashBean bean2 = getData(ctx,cashBookId,false,trxName);
+
+ BigDecimal endingBalance=null;
+
+ if (bean2!=null)
+ endingBalance = bean2.getEndingBalance();
+
+ if (endingBalance==null)
+ endingBalance=new BigDecimal(0);
+
+ MCash cash = new MCash(ctx,toJournalId,trxName);
+
+ endingBalance = FormatBigDecimal.currency(endingBalance);
+
+ cash.setBeginningBalance(endingBalance);//ending balance of the previous one is the begining balance of the new one
+ PoManager.save(cash);
+ }
+
+
+ private static String getDataSQL(Properties ctx, int cashBookId)
+ {
+ String sql="select * from " +
+ " (select cash.C_CASH_ID," +//1
+ "cash.C_CASHBOOK_ID," +//2
+ "cash.ENDINGBALANCE," +//3
+ "cash.DOCSTATUS," + //4
+ "cash.AD_CLIENT_ID," +//6
+ " cash.AD_ORG_ID," +//7
+ " cash.created"+//8
+ " from C_CASH cash,C_CASHBOOK book" +
+ " where cash.C_CASHBOOK_ID=book.C_CASHBOOK_ID" +
+ "@DOCSTATUS@" +
+ " and book.C_CashBook_ID="+cashBookId+
+ " and cash.ad_client_id=?"+
+ " and cash.AD_ORG_ID=? order by cash.Created Desc) cashDetails";
+ return sql;
+ }
+
+ public static CashBean getData(Properties ctx,int cashBookId,boolean isLatest,String trxName) throws OperationException
+ {
+
+ String sql = getDataSQL(ctx, cashBookId);
+
+ if(isLatest)
+ sql=sql.replaceAll("@DOCSTATUS@"," and cash.docstatus <> 'CO'");
+ else
+ sql=sql.replaceAll("@DOCSTATUS@"," and cash.docstatus = 'CO'");
+
+ PreparedStatement pstmt = DB.prepareStatement(sql,trxName);
+ CashBean bean=null;
+
+ try
+ {
+ pstmt.setInt(1, Env.getAD_Client_ID(ctx));
+ pstmt.setInt(2, Env.getAD_Org_ID(ctx));
+ ResultSet rs=pstmt.executeQuery();
+ if(rs.next())
+ {
+ bean=new CashBean();
+ bean.setCashJournalId(Integer.valueOf(rs.getInt(1)));
+ bean.setEndingBalance(rs.getBigDecimal(3));
+ bean.setDocStatus(rs.getString(4));
+ }
+
+ rs.close();
+ }
+ catch (SQLException e)
+ {
+ throw new OperationException(e);
+ }
+ finally
+ {
+ try
+ {
+ if (pstmt != null)
+ pstmt.close();
+ }
+ catch(Exception ex){}
+
+ pstmt = null;
+ }
+ return bean;
+ }
+
+ public static MCashBook createCashBook(Properties ctx, int orgId, String name, int currencyId, String trxName) throws OperationException
+ {
+ MCashBook cashBook = new MCashBook(ctx, 0, trxName);
+ cashBook.setName(name);
+ cashBook.setC_Currency_ID(currencyId);
+ cashBook.setAD_Org_ID(orgId);
+ PoManager.save(cashBook);
+ return cashBook;
+ }
+
+
+ private static MCash getCashJournal(Properties ctx, String trxName) throws OperationException
+ {
+ int cashBookId = POSTerminalManager.getCashBookId(ctx);
+ return getCashJournal(ctx, cashBookId, trxName);
+ }
+
+ public static MCash getCashJournal(Properties ctx, int cashBookId, String trxName) throws OperationException
+ {
+ MCash cashJournal = getMcash(ctx, cashBookId, JulianDate.getTodayDateOnly(), trxName);
+
+ if (cashJournal == null)
+ {
+ cashJournal = MCash.get(ctx, cashBookId, JulianDate.getTodayDateOnly(), trxName);
+ CashManager.updateCashBookBeginningBalance(ctx, cashBookId, trxName);
+ }
+
+ return cashJournal;
+ }
+
+
+ private static MCash getMcash(Properties ctx, int C_CashBook_ID,
+ Timestamp dateAcct, String trxName) throws OperationException
+ {
+ MCash retValue = null;
+
+ String sql;
+
+ sql = "SELECT * FROM C_Cash c "
+ + "WHERE c.C_CashBook_ID=?" // #1
+ //+ " AND TRUNC(c.StatementDate)=?" // #2
+ + " AND c.Processed='N'"
+ + " AND c.docstatus='DR'";
+
+ PreparedStatement pstmt = null;
+ try
+ {
+ pstmt = DB.prepareStatement (sql, trxName);
+
+ pstmt.setInt (1, C_CashBook_ID);
+ //pstmt.setTimestamp (2, TimeUtil.getDay(dateAcct));
+
+ ResultSet rs = pstmt.executeQuery ();
+ if (rs.next ())
+ retValue = new MCash (ctx, rs, trxName);
+ rs.close ();
+ }
+ catch (Exception e)
+ {
+ throw new OperationException(e);
+ }
+ finally
+ {
+ try
+ {
+ if (pstmt != null)
+ pstmt.close ();
+
+ }
+ catch (Exception e)
+ {}
+
+ pstmt = null;
+ }
+
+ return retValue;
+
+
+ }
+
+
+ /**
+ * @param ctx
+ * @param bean
+ * @param trxName
+ * @return
+ * @throws NullTransferAmountException
+ * @throws TransferAmountExceedsTotalAmountException
+ * @throws OperationException
+ */
+ public static CashBookDetailBean CloseTill(Properties ctx, CashBookDetailBean bean, String trxName)
+ throws NullTransferAmountException, TransferAmountExceedsTotalAmountException, OperationException
+ {
+ int terminalId = POSTerminalManager.getTerminalId(ctx);
+ MCash cashJournal = getCashJournal(ctx, trxName);
+
+ bean.setCash_id(cashJournal.get_ID());
+
+ BigDecimal transferAmt = (bean.getTransferAmount() == null ? Env.ZERO : bean.getTransferAmount());
+ BigDecimal differenceAmt = (bean.getDifferenceAmt() == null ? Env.ZERO : bean.getDifferenceAmt());
+ BigDecimal beginingBalance = bean.getBeginingBalance();
+ BigDecimal netTransfer = null;
+ BigDecimal beginningBalanceDifference = Env.ZERO;
+
+ CashBookDetailBean cbDetailsBean = getCashBookDetails(ctx, trxName);
+
+ CurrentTillAmountBean currentAmountBean = POSManager.getCurrentTillAmount(ctx);
+
+ beginningBalanceDifference = beginingBalance.subtract(cbDetailsBean.getBeginingBalance());
+
+ bean.setBeginingBalance(cbDetailsBean.getBeginingBalance());
+ bean.setEndingBalance(cbDetailsBean.getEndingBalance());
+ bean.setStatementDifference(cbDetailsBean.getStatementDifference());
+ netTransfer = transferAmt.subtract(cbDetailsBean.getBeginingBalance());
+ differenceAmt = (bean.getStatementDifference().subtract(netTransfer)).negate();
+ bean.setDifferenceAmt(differenceAmt);
+ bean.setCashBookName(cbDetailsBean.getCashBookName());
+ bean.setDocStatus(cbDetailsBean.getDocStatus());
+
+ if( bean.getDocStatus().equals(DocumentEngine.STATUS_Completed))
+ {
+ throw new CanNotCloseTillException("Already closed,Cannot close till ");
+ }
+
+ netTransfer = netTransfer.subtract(beginningBalanceDifference);
+
+ if (differenceAmt.compareTo(Env.ZERO) != 0)
+ {
+ createCashLine(ctx, cashJournal, differenceAmt, MCashLine.CASHTYPE_Difference, trxName);
+ }
+
+ BigDecimal cardTotal = currentAmountBean.getCardTotal();
+ BigDecimal chequeTotal = currentAmountBean.getChequeTotal();
+
+ // Do Transfer for CardTotal and Cheque total here
+
+ BigDecimal notifiedCardTotal = (bean.getCardTotal() == null ? Env.ZERO : bean.getCardTotal());
+ BigDecimal notifiedChequeTotal = (bean.getChequeTotal() == null ? Env.ZERO : bean.getChequeTotal());
+ bean.setCardDifference(Env.ZERO);
+ bean.setChequeDifference(Env.ZERO);
+
+ if(cardTotal.compareTo(notifiedCardTotal) != 0)
+ {
+ bean.setCardDifference(notifiedCardTotal.subtract(cardTotal));
+ }
+
+ if(chequeTotal.compareTo(notifiedChequeTotal) != 0)
+ {
+ bean.setChequeDifference(notifiedChequeTotal.subtract(chequeTotal));
+ }
+
+ PoManager.save(cashJournal);
+
+ POSTerminalManager.closeTerminal(ctx, terminalId, cashJournal, netTransfer, chequeTotal, cardTotal, trxName);
+
+ PoManager.processIt(cashJournal, DocumentEngine.ACTION_Complete);
+
+ return bean;
+ }
+
+
+ public static void closePreviousDraftedCashjournals(Properties ctx, int cashBookId,String trxName) throws OperationException
+ {
+ String sql = "SELECT C_CASH_ID FROM C_Cash c "
+ + "WHERE c.C_CashBook_ID=?"
+ + " AND c.Processed='N'"
+ + " AND c.docstatus='DR'"
+ + " AND TRUNC(c.StatementDate)"
+ + " order by c.StatementDate asc";
+ PreparedStatement pstmt = null;
+
+ MCash cash=null;
+ BigDecimal endingBalance=null;
+ try
+ {
+ pstmt = DB.prepareStatement (sql, trxName);
+ pstmt.setInt (1, cashBookId);
+ pstmt.setTimestamp (2, TimeUtil.getDay(JulianDate.getTodayDateOnly()));
+
+ ResultSet rs = pstmt.executeQuery ();
+ while(rs.next())
+ {
+ cash=new MCash(ctx,rs.getInt(1),null);
+ if (endingBalance!=null)
+ {
+ cash.setBeginningBalance(cash.getBeginningBalance().add(endingBalance));
+ }
+
+ PoManager.save(cash);
+ endingBalance=cash.getEndingBalance();
+
+ PoManager.processIt(cash, DocumentEngine.ACTION_Complete);
+ }
+
+ rs.close ();
+ }
+ catch (Exception e)
+ {
+ throw new OperationException(e);
+ }
+ finally
+ {
+ try
+ {
+ pstmt.close ();
+ }
+ catch (Exception e)
+ {}
+
+ pstmt = null;
+
+ }
+
+ }
+
+
+ public static ArrayList getCashDetails(Properties ctx, int cashBookId, Integer month, Integer year, String trxName) throws OperationException
+ {
+ ArrayList cashList = new ArrayList();
+
+ int adClientId = Env.getAD_Client_ID(ctx);
+ String userOrg = Env.getContext(ctx, UdiConstants.ROLE_EDITABLE_ORGS_CTX_PARAM);
+
+ String sql = "Select C_Cash_ID, Name, Created, Updated, StatementDate, DateAcct, BeginningBalance, EndingBalance, DocStatus "
+ + " from C_Cash"
+ + " where AD_Client_ID=" + adClientId
+ + " and AD_Org_ID in (" + userOrg + ")"
+ + " and IsActive='Y'"
+ + " AND C_CashBook_ID=" + cashBookId;
+
+
+ if (month != null)
+ {
+ String mm = String.valueOf(month);
+ if (mm.length() == 1)
+ {
+ mm = "0" + mm;
+ }
+ sql = sql + " and to_char(Created, 'mm') = '" + mm +"'";
+ }
+
+ if (year != null)
+ sql = sql + " and to_char(Created, 'yyyy') = '" + year + "'";
+
+ sql += " order by created desc";
+
+ PreparedStatement pstmt = null;
+
+ try
+ {
+ pstmt = DB.prepareStatement(sql, trxName);
+ ResultSet rs = pstmt.executeQuery();
+
+ while (rs.next())
+ {
+ CashBean cashBean = new CashBean();
+ cashBean.setCashId(rs.getInt(1));
+ cashBean.setName(rs.getString(2));
+ cashBean.setDateCreated(rs.getTimestamp(3));
+ cashBean.setDateUpdated(rs.getTimestamp(4));
+ cashBean.setStatmentDate(rs.getString(5));
+ cashBean.setDateAcct(rs.getTimestamp(6));
+ cashBean.setBeginingBalance(rs.getBigDecimal(7));
+ cashBean.setEndingBalance(rs.getBigDecimal(8));
+ cashBean.setDocStatus(rs.getString(9));
+
+ cashList.add(cashBean);
+ }
+
+ rs.close();
+ }
+ catch (Exception ex)
+ {
+ throw new OperationException("Cannot retrieve Cash with sql: " + sql, ex);
+ }
+ finally
+ {
+ try
+ {
+ pstmt.close();
+ }
+ catch(Exception e)
+ {}
+
+ pstmt = null;
+ }
+
+ return cashList;
+ }
+
+
+ /**
+ * Loads a cash book
+ * @param ctx Context
+ * @param cashBookId Cash Book ID to be loaded
+ * @param trxName Transaction
+ * @return Cash Book PO
+ * @throws OperationException If teh cash book cannot be loaded
+ */
+ public static MCashBook loadCashBook(Properties ctx, int cashBookId, String trxName) throws OperationException
+ {
+ MCashBook cashBook = new MCashBook(ctx, cashBookId, trxName);
+ if (cashBook.get_ID() <= 0)
+ {
+ throw new OperationException("Could not load cash book with id: " + cashBookId);
+ }
+ return cashBook;
+ }
+
+ public static MCash loadCash(Properties ctx, int cashId, String trxName) throws OperationException
+ {
+ MCash cash = new MCash(ctx, cashId, trxName);
+
+ if(cash.get_ID() == 0)
+ throw new OperationException("Could not load cash with i12,435.96d: " + cashId);
+
+ return cash;
+ }
+
+ public static CashSummaryBean getCashSummary(Properties ctx, int cashId, String trxName) throws OperationException
+ {
+ String sql = "select ca.CashType, sum(ca.Amount)"
+ + " from C_CASHLINE ca where C_cash_ID=" + cashId
+ + " group by ca.cashtype";
+
+ MCash cashJournal = new MCash(ctx, cashId, trxName);
+ CashSummaryBean bean = getCashSummary(ctx, sql, trxName);
+ bean.setBeginingBalance(cashJournal.getBeginningBalance());
+ bean.setEndingBalance(cashJournal.getEndingBalance());
+ return bean;
+ }
+
+ public static CashSummaryBean getCashSummary(Properties ctx, String fromDate, String toDate, String trxName) throws OperationException
+ {
+ int adClientId = Env.getAD_Client_ID(ctx);
+ String userOrg = Env.getContext(ctx, UdiConstants.ROLE_EDITABLE_ORGS_CTX_PARAM);
+ String sql = "select ca.CashType, sum(ca.Amount)"
+ + " from C_CASHLINE ca where ca.AD_Client_ID=" + adClientId
+ + " and ca.AD_Org_ID in (" + userOrg + ")"
+ + " and ca.Created between to_date('" + fromDate + "','DD-MM-YYYY HH24:MI:SS')"
+ + " and to_date('" + toDate + "','DD-MM-YYYY HH24:MI:SS') "
+ + " group by ca.cashtype";
+
+ return getCashSummary(ctx, sql, trxName);
+ }
+
+ private static CashSummaryBean getCashSummary(Properties ctx, String sql, String trxName) throws OperationException
+ {
+ PreparedStatement pstmt = null;
+ CashSummaryBean cashSummaryBean = new CashSummaryBean();
+ try
+ {
+ pstmt = DB.prepareStatement(sql, trxName);
+ ResultSet rs = pstmt.executeQuery();
+
+ while(rs.next())
+ {
+ String cashType = rs.getString(1);
+ BigDecimal amount = rs.getBigDecimal(2);
+
+ if(MCashLine.CASHTYPE_BankAccountTransfer.equals(cashType))
+ cashSummaryBean.setBankAcctTransferAmount(amount);
+ else if(MCashLine.CASHTYPE_Charge.equals(cashType))
+ cashSummaryBean.setChargeAmount(amount);
+ else if(MCashLine.CASHTYPE_Difference.equals(cashType))
+ cashSummaryBean.setDifferenceAmount(amount);
+ else if(MCashLine.CASHTYPE_GeneralExpense.equals(cashType))
+ cashSummaryBean.setGeneralExpenseAmount(amount);
+ else if(MCashLine.CASHTYPE_GeneralReceipts.equals(cashType))
+ cashSummaryBean.setGeneralReceiptsAmount(amount);
+ else if(MCashLine.CASHTYPE_Invoice.equals(cashType))
+ cashSummaryBean.setInvoiceAmount(amount);
+ else
+ throw new OperationException("Unknown CashType: " + cashType);
+ }
+
+ rs.close();
+ }
+ catch(Exception ex)
+ {
+ throw new OperationException("Could not retrieve cash summary with sql: " + sql, ex);
+ }
+ finally
+ {
+ try
+ {
+ pstmt.close();
+ }
+ catch(Exception e)
+ {}
+
+ pstmt = null;
+ }
+
+ return cashSummaryBean;
+ }
+
+ public static ArrayList getCashLineHistory(Properties ctx, String fromDate, String todate, String trxName) throws OperationException
+ {
+ int adClientId = Env.getAD_Client_ID(ctx);
+ String userOrg = Env.getContext(ctx, UdiConstants.ROLE_EDITABLE_ORGS_CTX_PARAM);
+
+ String sql = "select cl.C_CashLine_ID, cl.CashType, rl.name, cl.Created, cl.C_Cash_ID, cl.C_Invoice_ID, cl.Amount, cu.CurSymbol, cl.Description "
+ + " from C_CashLine cl, AD_Ref_List rl, C_Currency cu "
+ + " where cl.AD_Client_ID= " + adClientId
+ + " and cl.AD_Org_ID in (" + userOrg + ") "
+ + " and rl.AD_Reference_ID = " + MCashLine.CASHTYPE_AD_Reference_ID
+ + " and cl.CashType = rl.Value"
+ + " and cu.C_Currency_ID = cl.C_Currency_ID"
+ + " and cl.Created between to_date('"+ fromDate+"','DD-MM-YYYY HH24:MI:SS') "
+ + " and to_date('" + todate+"','DD-MM-YYYY HH24:MI:SS') "
+ + " order by cl.created";
+
+ return getCashLineHistory(ctx, sql, trxName);
+
+ }
+
+ public static ArrayList getCashLineHistory(Properties ctx, int cashId, String trxName) throws OperationException
+ {
+ int adClientId = Env.getAD_Client_ID(ctx);
+ String userOrg = Env.getContext(ctx, UdiConstants.ROLE_EDITABLE_ORGS_CTX_PARAM);
+ String sql = "select cl.C_CashLine_ID, cl.CashType, rl.name, cl.Created, cl.C_Cash_ID, cl.C_Invoice_ID, cl.Amount, cu.CurSymbol, cl.Description "
+ + " from C_CashLine cl, AD_Ref_List rl, C_Currency cu "
+ + " where cl.AD_Client_ID= " + adClientId
+ + " and cl.AD_Org_ID in (" + userOrg + ") "
+ + " and rl.AD_Reference_ID = " + MCashLine.CASHTYPE_AD_Reference_ID
+ + " and cl.CashType = rl.Value"
+ + " and cu.C_Currency_ID = cl.C_Currency_ID"
+ + " and cl.C_Cash_ID=" + cashId
+ + " order by cl.created";
+
+
+ return getCashLineHistory(ctx, sql, trxName);
+ }
+
+ private static ArrayList getCashLineHistory(Properties ctx, String sql, String trxName) throws OperationException
+ {
+ ArrayList repSummaryList = new ArrayList();
+
+ PreparedStatement pstmt = null;
+
+ try
+ {
+ pstmt = DB.prepareStatement(sql, trxName);
+ ResultSet rs = pstmt.executeQuery();
+
+ while(rs.next())
+ {
+ int i = 0;
+ CashLineBean repSummaryBean = new CashLineBean();
+ repSummaryBean.setCashLineId(rs.getInt(++i));
+ repSummaryBean.setCashType(rs.getString(++i));
+ repSummaryBean.setCashTypeName(rs.getString(++i));
+ repSummaryBean.setDateCreated(rs.getTimestamp(++i));
+ repSummaryBean.setCashId(rs.getInt(++i));
+ repSummaryBean.setInvoiceId(rs.getInt(++i));
+ repSummaryBean.setAmount(rs.getBigDecimal(++i));
+ repSummaryBean.setCurrency(rs.getString(++i));
+ repSummaryBean.setDescription(rs.getString(++i));
+ repSummaryList.add(repSummaryBean);
+ }
+
+ rs.close();
+ }
+ catch(Exception ex)
+ {
+ throw new OperationException("Could not retrieve data for report summary with sql: " + sql, ex);
+ }
+ finally
+ {
+ try
+ {
+ pstmt.close();
+ }
+ catch(Exception ex){}
+
+ pstmt = null;
+ }
+
+ return repSummaryList;
+ }
+
+
+ public static MCashLine createCashLineForInvoice(Properties ctx,OpenItemBean bean,String trxName) throws OperationException
+ {
+ int cashBookId = POSTerminalManager.getCashBookId(ctx);
+ MCash cash = MCash.get(ctx,cashBookId,JulianDate.getTodayDateOnly(),trxName);
+
+ MCashLine [] cashLines = cash.getLines(true);
+ if(cashLines.length==0)
+ {
+ updateCashBookBeginningBalance(ctx, cashBookId, trxName);
+ }
+
+ //Load invoice
+ MInvoice invoice = new MInvoice(ctx, bean.getInvoiceId(), trxName);
+ MDocType dt = MDocType.get(ctx, invoice.getC_DocType_ID());
+
+ BigDecimal amt = bean.getPaymentAmt();
+ BigDecimal discountAmt = bean.getDiscountAmt() == null ? Env.ZERO : bean.getDiscountAmt();
+ BigDecimal writeOffAmt = bean.getWriteOffAmt() == null ? Env.ZERO : bean.getWriteOffAmt();
+
+
+ if (MDocType.DOCBASETYPE_APInvoice.equals(dt.getDocBaseType())
+ || MDocType.DOCBASETYPE_ARCreditMemo.equals(dt.getDocBaseType()) )
+ {
+ amt = amt.negate();
+ discountAmt = discountAmt.negate();
+ writeOffAmt = writeOffAmt.negate();
+ }
+
+ MCashLine cashLine = new MCashLine(ctx,0,trxName);
+ cashLine.setC_Cash_ID(cash.get_ID());
+ cashLine.setCashType(MCashLine.CASHTYPE_Invoice);
+ cashLine.setC_Invoice_ID(bean.getInvoiceId());
+ cashLine.setC_Currency_ID(invoice.getC_Currency_ID());
+ cashLine.setAmount(amt);
+ cashLine.setDiscountAmt(discountAmt);
+ cashLine.setWriteOffAmt(writeOffAmt);
+
+ PoManager.save(cashLine);
+ return cashLine;
+ }
+
+ /**
+ * Creates a new Cash Journal entry with the amount specified for the invoice
+ * @param ctx Context
+ * @param cashId Cash Journal
+ * @param invoiceId Invoice
+ * @param amount Cash Amount
+ * @param trxName Transaction
+ * @return Cash Journal Entry
+ * @throws OperationException If Cash Line creation failed
+ */
+ public static MCashLine createCashLine(Properties ctx, int cashId, int invoiceId,
+ BigDecimal amount, BigDecimal writeOffAmout, BigDecimal discountAmt,
+ String trxName) throws OperationException
+ {
+ MInvoice invoice = new MInvoice(ctx, invoiceId, trxName);
+ if (invoice.get_ID() == 0)
+ {
+ throw new OperationException("Could not load invoice!!!");
+ }
+
+ MCashLine cashLine = new MCashLine(ctx, 0, trxName);
+ cashLine.setC_Cash_ID(cashId);
+ cashLine.setInvoice(invoice);
+ cashLine.setAmount(amount);
+ cashLine.setWriteOffAmt(writeOffAmout);
+ cashLine.setDiscountAmt(discountAmt);
+ PoManager.save(cashLine);
+ return cashLine;
+ }
+
+ public static WebDocumentBean getWebCashPaymentBean(Properties ctx, int cashLineId) throws OperationException, DataException
+ {
+ MCashLine cashLine = new MCashLine(ctx,cashLineId,null);
+ MInvoice invoice = new MInvoice(ctx,cashLine.getC_Invoice_ID(),null);
+ if (cashLine == null)
+ throw new OperationException("Invalid operation payment is null");
+
+ if (cashLine.get_ID() == 0)
+ throw new OperationException("You have deleted this payment. You cannot view this payment.");
+
+ WebDocumentBean bean = new WebDocumentBean();
+
+ bean.setPaymentId(Integer.valueOf(cashLine.get_ID()));
+
+ int currencyId = cashLine.getC_Currency_ID();
+ MCurrency currency = new MCurrency(ctx,currencyId,null);
+ bean.setCurrencySymbole(currency.getCurSymbol());
+
+
+ MOrg myOrg = OrganisationManager.getMyOrg(ctx);
+ MBPartner me = new MBPartner(ctx, myOrg.getLinkedC_BPartner_ID(null), null);
+ bean.setMe(me);
+ // MOrg orderOrg = new MOrg(ctx, cashLine.getAD_Org_ID(), null);
+
+ /* if (orderOrg.getLinkedC_BPartner_ID() != myOrg.getLinkedC_BPartner_ID())
+ throw new DocumentDoesNotBelongToYouException("This payment does not belong to you. You do not have access to it.");
+ */
+
+ MBPartnerLocation meLocation[] = MBPartnerLocation.getForBPartner(ctx,me.get_ID());
+ if (meLocation.length == 0)
+ throw new OperationException("No location has been set for your organisation. Please ask your administrator to set one for you");
+
+ MLocation location = new MLocation(ctx, meLocation[0].getC_Location_ID(), null);
+
+ if (location == null)
+ throw new OperationException("You must have a location set for your business partner, Please ask your administrator to set one for you");
+
+ bean.setMeLocation(location);
+
+ MBPartner you = new MBPartner(ctx, invoice.getC_BPartner_ID(), null);
+
+ MBPartnerLocation youBPLocation[] = MBPartnerLocation.getForBPartner(ctx, you.get_ID());
+
+ if (youBPLocation.length ==0)
+ throw new OperationException("No location has been set for the dealer organisation. Please ask your administrator to set one for you");
+
+ MLocation youLocation = new MLocation(ctx, youBPLocation[0].getC_Location_ID(), null);
+
+ bean.setYou(you);
+ bean.setYoubpLocation(youBPLocation[0]);
+ bean.setYouLocation(youLocation);
+ bean.setCashLine(cashLine);
+
+ WebDocumentHeaderBean headerBean = PaymentManager.createWebDocumentHeader(ctx, invoice.getAD_Org_ID(),invoice.getC_BPartner_ID(), "Completed", true,"Cash");
+ String tenderTypeName = "Cash";
+
+
+
+ headerBean.setPaymentType(tenderTypeName);
+
+ bean.setHeaderBean(headerBean);
+ bean.setInvoice(invoice);
+
+ return bean;
+ }
+
+ /**
+ * Retrieves all the cash books having a name like the search criteria
+ * @param ctx Context
+ * @param searchText Search criteria based on the name of cash book
+ * @param trxName Transaction
+ * @return List of Cash book data model
+ * @throws OperationException If data could not retrieved
+ */
+ public static ArrayList getCashBooks(Properties ctx, String searchText, String trxName) throws OperationException
+ {
+ String whereClause = "C_CashBook.Name LIKE (?)";
+
+ if (searchText == null)
+ {
+ searchText = "";
+ }
+
+ searchText = "%" + searchText.trim() + "%";
+
+ ArrayList paramsList = new ArrayList();
+ paramsList.add(searchText);
+
+ return getCashBooks(ctx, whereClause, null, paramsList, trxName);
+ }
+
+ /**
+ * Retrieves all the active Cash books
+ * @param ctx Context
+ * @param trxName Transaction
+ * @return List of Cash book data model
+ * @throws OperationException If data could not be retrieved
+ */
+ public static ArrayList getCashBooks(Properties ctx, String trxName) throws OperationException
+ {
+ return getCashBooks(ctx, "C_CashBook.IsActive='Y'", " ORDER BY C_CashBook.Name", null, trxName);
+ }
+
+ /**
+ * Retrives all the cash book for a particular organisation
+ * @param ctx Context
+ * @param adOrgId Organisation Id
+ * @param trxName Transaction
+ * @return List of Cash book data model
+ * @throws OperationException If data could not retrieved
+ */
+ public static ArrayList getAllCashbooks(Properties ctx, int adOrgId, String trxName) throws OperationException
+ {
+ String whereClause = "C_CashBook.IsActive='Y'AND C_CashBook.AD_Org_ID=?";
+
+ ArrayList paramsList = new ArrayList();
+ paramsList.add(new Integer(adOrgId));
+ return getCashBooks(ctx, whereClause, null, paramsList, trxName);
+ }
+
+ /**
+ * Retrieves all the cash book that can be assigned on a terminal (i.e: Not already present on another terminal).
+ * @param ctx Context
+ * @param adOrgId Organisation
+ * @param trxName Transaction
+ * @return List of Cash book data model
+ * @throws OperationException If data could not be retrieved
+ */
+ public static ArrayList getCashBooksForTerminal(Properties ctx, int adOrgId, int terminalId, String trxName) throws OperationException
+ {
+ StringBuffer whereClause = new StringBuffer();
+ whereClause.append("C_CashBook.IsActive='Y'AND C_CashBook.AD_Org_ID=? ");
+ whereClause.append("AND NOT EXISTS (SELECT * FROM U_POSTerminal WHERE U_POSTerminal.U_POSTerminal_ID<>? ");
+ whereClause.append("AND U_POSTerminal.C_CashBook_ID=C_CashBook.C_CashBook_ID AND U_POSTerminal.IsActive='Y')");
+
+ ArrayList paramsList = new ArrayList();
+ paramsList.add(new Integer(adOrgId));
+ paramsList.add(new Integer(terminalId));
+
+ return getCashBooks(ctx, whereClause.toString(), " ORDER BY C_CashBook.Name", paramsList, trxName);
+ }
+
+ /**
+ * Retrieves all the cash books based on the criteria defined in the where clause statement.
+ * @param ctx Context
+ * @param whereClause SQL Where clause
+ * @param orderByClause Order by clause
+ * @param params Parameters to set for the queries
+ * @param trxName Transaction
+ * @return List of Cash Book data model
+ * @throws OperationException If the data could not be retrieved
+ */
+ private static ArrayList getCashBooks(Properties ctx, String whereClause,
+ String orderByClause, ArrayList params, String trxName) throws OperationException
+ {
+ ArrayList cashBookList = new ArrayList();
+ PreparedStatement pstmt = null;
+ ResultSet rs = null;
+
+ StringBuffer sqlStmt = new StringBuffer();
+ sqlStmt.append("SELECT * FROM C_CashBook WHERE C_CashBook.AD_Client_ID=? ");
+
+ if (whereClause != null && whereClause.trim().length() > 0)
+ {
+ sqlStmt.append(" AND ");
+ sqlStmt.append(whereClause);
+ }
+ sqlStmt.append(" AND C_CashBook.AD_Org_ID IN (")
+ .append(Env.getContext(ctx, UdiConstants.ROLE_EDITABLE_ORGS_CTX_PARAM))
+ .append(") ");
+
+ if (orderByClause == null || orderByClause.length() == 0)
+ {
+ orderByClause = "ORDER BY Name";
+ }
+ sqlStmt.append(orderByClause);
+
+ try
+ {
+ int paramIndex = 1;
+ pstmt = DB.prepareStatement(sqlStmt.toString(), trxName);
+ pstmt.setInt(paramIndex++, Env.getAD_Client_ID(ctx));
+
+ if (params != null)
+ {
+ for (int i = 0; i < params.size(); i++)
+ {
+ pstmt.setObject(paramIndex++, params.get(i));
+ }
+ }
+
+ rs = pstmt.executeQuery();
+
+ while (rs.next())
+ {
+ MCashBook cashBook = new MCashBook(ctx, rs, trxName);
+ CashBookBean bean = new CashBookBean();
+ bean.setCashBookId(cashBook.get_ID());
+ bean.setCashBookName(cashBook.getName());
+ bean.setDescription(cashBook.getDescription());
+ bean.setOrgId(cashBook.getAD_Org_ID());
+ bean.setIsActive(cashBook.isActive());
+ bean.setIsDefault(cashBook.isDefault());
+ bean.setCurrencyId(cashBook.getC_Currency_ID());
+ bean.setCurrency(cashBook.getC_Currency().getISO_Code());
+ cashBookList.add(bean);
+ }
+ }
+ catch (Exception ex)
+ {
+ log.log(Level.SEVERE, "Could not get cash books", ex);
+ throw new OperationException("Could not retrieve cash books", ex);
+ }
+ finally
+ {
+ DB.close(rs, pstmt);
+ }
+
+ return cashBookList;
+ }
+
+ /**
+ * Returns the Cash book data model from its PO
+ * @param cashBook Cash Book PO
+ * @return Cash Book data model
+ */
+ public static CashBookBean getBean(MCashBook cashBook)
+ {
+ CashBookBean bean = new CashBookBean();
+ bean.setOrgId(cashBook.getAD_Org_ID());
+ bean.setCashBookId(cashBook.get_ID());
+ bean.setCashBookName(cashBook.getName());
+ bean.setCurrencyId(cashBook.getC_Currency_ID());
+ bean.setDescription(cashBook.getDescription());
+ bean.setIsActive(cashBook.isActive());
+ bean.setIsDefault(cashBook.isDefault());
+
+ return bean;
+ }
+
+ /**
+ * Returns the PO for the Cash Book from it's data model
+ * @param ctx Context
+ * @param bean Cash Book data model
+ * @param trxName Transaction
+ * @return Cash Book PO
+ * @throws OperationException If the Cash Book PO could not be loaded
+ */
+ public static MCashBook getPO(Properties ctx, CashBookBean bean, String trxName) throws OperationException
+ {
+ MCashBook cashBook = new MCashBook(ctx, bean.getCashBookId(), trxName);
+ if (cashBook.get_ID() != bean.getCashBookId())
+ {
+ // Happens only when trying to load a cash book that is not present
+ // and the PO model resets the Id to 0
+ throw new OperationException("Could not load cash book");
+ }
+ cashBook.setAD_Org_ID(bean.getOrgId());
+ cashBook.setC_Currency_ID(bean.getCurrencyId());
+ cashBook.setDescription(bean.getDescription());
+ cashBook.setName(bean.getCashBookName());
+ cashBook.setIsActive(bean.getIsActive());
+ cashBook.setIsDefault(bean.getIsDefault());
+
+ return cashBook;
+ }
+
+ /**
+ * Returns the data model of the Cash Book PO
+ * @param ctx Context
+ * @param cashBookId Cash Book ID
+ * @param trxName Transaction
+ * @return Cash Book data model
+ * @throws OperationException If Cash book PO could not be loaded
+ */
+ public static CashBookBean getCashBook(Properties ctx, int cashBookId, String trxName) throws OperationException
+ {
+ MCashBook cashBook = new MCashBook(ctx, cashBookId, trxName);
+ if (cashBook.get_ID() <= 0)
+ {
+ throw new OperationException("Could not load Cash Book with id: " + cashBookId);
+ }
+
+ return getBean(cashBook);
+ }
+
+ /**
+ * Creates or updates a Cash Book. For creation the cash book id in the data model should be 0
+ * otherwise it will try to load a cash book with the id provided
+ * @param ctx Context
+ * @param bean Data Model of the cash book
+ * @param trxName Transaction
+ * @return Cash Book PO
+ * @throws OperationException If the Cash Book PO could not be loaded or updated
+ */
+ public static MCashBook createUpdateCashBook(Properties ctx, CashBookBean bean, String trxName) throws OperationException
+ {
+ MCashBook cashBook = getPO(ctx, bean, trxName);
+ if (!cashBook.isActive() && POSTerminalManager.isCashbookPresentOnTerminal(ctx, cashBook.get_ID(), trxName))
+ {
+ throw new CashBookAlreadyAssignedException("Cannot deactivate the cash book as it has been assigned to a terminal");
+ }
+ PoManager.save(cashBook);
+ bean.setCashBookId(cashBook.get_ID());
+ return cashBook;
+ }
+
+
+ /**
+ * Updates the active status of a cash book
+ * @param ctx Context
+ * @param cashBookId Cash book ID
+ * @param active Whether to set the cash book active or not
+ * @param trxName Transaction
+ * @throws OperationException If Cash Book could not be loaded or updated
+ */
+ public static void updateCashBookStatus(Properties ctx, int cashBookId, boolean active, String trxName) throws OperationException
+ {
+ MCashBook cashBook = loadCashBook(ctx, cashBookId, trxName);
+
+ if (!active && POSTerminalManager.isCashbookPresentOnTerminal(ctx, cashBookId, trxName))
+ {
+ throw new CashBookAlreadyAssignedException("Cannot deactivate the cash book as it has been assigned to a terminal");
+ }
+
+ cashBook.setIsActive(active);
+ PoManager.save(cashBook);
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/businesslogic/CashTransferManager.java b/posterita/posterita/src/main/org/posterita/businesslogic/CashTransferManager.java
new file mode 100644
index 0000000000..ec6c4c9d5e
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/businesslogic/CashTransferManager.java
@@ -0,0 +1,171 @@
+/******************************************************************************
+ * Product: Posterita Web-Based POS and Adempiere Plugin *
+ * Copyright (C) 2008 Posterita Ltd *
+ * This file is part of POSterita *
+ * *
+ * POSterita is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License along *
+ * with this program; if not, write to the Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *
+ *****************************************************************************/
+package org.posterita.businesslogic;
+
+import java.math.BigDecimal;
+import java.sql.Timestamp;
+import java.util.Properties;
+
+import org.compiere.model.MBankAccount;
+import org.compiere.model.MCash;
+import org.compiere.model.MCashBook;
+import org.compiere.model.MCashLine;
+import org.compiere.process.DocumentEngine;
+import org.posterita.exceptions.OperationException;
+import org.posterita.util.PoManager;
+
+/**
+ * @author Ashley G Ramdass
+ * May 26, 2008
+ */
+public class CashTransferManager
+{
+ /**
+ * Transfers money from a Bank Account to another one.
+ *
+ * @param ctx Context
+ * @param fromBankAccountId From Bank Account
+ * @param toBankAccountId To Bank Account
+ * @param currencyId Currency
+ * @param amount Amount to Transfer
+ * @param dateAcct Accounting Date
+ * @param trxName Transaction
+ * @throws OperationException if documents can't be created or processed
+ */
+ public static void transferBankToBank(Properties ctx, int fromBankAccountId, int toBankAccountId,
+ int currencyId, BigDecimal amount, Timestamp dateAcct, String trxName) throws OperationException
+ {
+ MBankAccount fromBankAccount = new MBankAccount(ctx, fromBankAccountId, trxName);
+ MBankAccount toBankAccount = new MBankAccount(ctx, toBankAccountId, trxName);
+
+ int fromCashBookId = OrganisationManager.getCreateTransferCashBook(ctx, fromBankAccount.getAD_Org_ID(), currencyId, trxName);
+ int toCashBookId = OrganisationManager.getCreateTransferCashBook(ctx, toBankAccount.getAD_Org_ID(), currencyId, trxName);
+
+ MCash fromCashJournal = MCash.get(ctx, fromCashBookId, dateAcct, trxName);
+ if (fromCashJournal == null)
+ {
+ throw new OperationException("Could not create Cash Journal entry");
+ }
+
+ MCash toCashJournal = MCash.get(ctx, toCashBookId, dateAcct, trxName);
+ if (toCashJournal == null)
+ {
+ throw new OperationException("Could not create Cash Journal entry");
+ }
+
+ String description = fromBankAccount.getAccountNo() + " (BA) -> " + toBankAccount.getAccountNo() + " (BA)";
+
+ // Transfer from the bank account to the cash journal
+ MCashLine fromCashLine = new MCashLine(fromCashJournal);
+ fromCashLine.setC_Currency_ID(currencyId);
+ fromCashLine.setDescription(description);
+ fromCashLine.setCashType(MCashLine.CASHTYPE_BankAccountTransfer);
+ fromCashLine.setC_BankAccount_ID(fromBankAccountId);
+ fromCashLine.setAmount(amount);
+ fromCashLine.setIsGenerated(true);
+ PoManager.save(fromCashLine);
+
+ // Transfer from the cash journal to the bank account
+ MCashLine toCashLine = new MCashLine(toCashJournal);
+ toCashLine.setC_Currency_ID(currencyId);
+ toCashLine.setDescription(description);
+ toCashLine.setCashType(MCashLine.CASHTYPE_BankAccountTransfer);
+ toCashLine.setC_BankAccount_ID(toBankAccountId);
+ toCashLine.setAmount(amount.negate());
+ toCashLine.setIsGenerated(true);
+ PoManager.save(toCashLine);
+
+ PoManager.processIt(fromCashJournal, DocumentEngine.ACTION_Complete);
+
+ if (fromCashJournal.get_ID() != toCashJournal.get_ID())
+ {
+ PoManager.processIt(toCashJournal, DocumentEngine.ACTION_Complete);
+ }
+ }
+
+ /**
+ * Transfer money from a Cash Book to another
+ * @param ctx Context
+ * @param fromCashBookId From Cash Book
+ * @param toCashBookId To Cash Book
+ * @param currencyId Currency
+ * @param amount Amount to transfer
+ * @param dateAcct Accounting Date
+ * @param trxName Transaction
+ * @throws OperationException If documents can't be created or processed
+ */
+ public static void transferCashBookToCashBook(Properties ctx, int fromCashBookId, int toCashBookId,
+ int currencyId, BigDecimal amount, Timestamp dateAcct, String trxName) throws OperationException
+ {
+ MCash fromJournal = MCash.get(ctx, fromCashBookId, dateAcct, trxName);
+ transferFromJournalToCashBook(ctx, fromJournal, toCashBookId, currencyId, amount, dateAcct, trxName);
+ }
+
+ /**
+ * Transfer money from a Cash Book to another
+ * @param ctx Context
+ * @param fromCashBookId From Cash Book
+ * @param toCashBookId To Cash Book
+ * @param currencyId Currency
+ * @param amount Amount to transfer
+ * @param dateAcct Accounting Date
+ * @param trxName Transaction
+ * @throws OperationException If documents can't be created or processed
+ */
+ public static void transferFromJournalToCashBook(Properties ctx, MCash cashJournal, int toCashBookId,
+ int currencyId, BigDecimal amount, Timestamp dateAcct, String trxName) throws OperationException
+ {
+ MCashBook fromCashBook = new MCashBook(ctx, cashJournal.getC_CashBook_ID(), trxName);
+ MCashBook toCashBook = new MCashBook(ctx, toCashBookId, trxName);
+
+ int fromBankAccountId = OrganisationManager.getCreateTransferBankAccount(ctx, fromCashBook.getAD_Org_ID(), currencyId, null);
+ int toBankAccountId = OrganisationManager.getCreateTransferBankAccount(ctx, toCashBook.getAD_Org_ID(), currencyId, null);
+
+ MCash toCash = MCash.get(ctx, toCashBookId, dateAcct, trxName);
+
+ String description = fromCashBook.getName() + " (CB) -> " + toCashBook.getName() + " (CB)";
+
+ // Transfers the money from the cash book to the dummy bank account
+ MCashLine fromCashLine = new MCashLine(cashJournal);
+ fromCashLine.setDescription(description);
+ fromCashLine.setC_Currency_ID(currencyId);
+ fromCashLine.setCashType(MCashLine.CASHTYPE_BankAccountTransfer);
+ fromCashLine.setC_BankAccount_ID(fromBankAccountId);
+ fromCashLine.setAmount(amount.negate());
+ fromCashLine.setIsGenerated(true);
+ PoManager.save(fromCashLine);
+
+ if (fromBankAccountId != toBankAccountId)
+ {
+ // Transfer the amount between the two bank accounts
+ transferBankToBank(ctx, fromBankAccountId, toBankAccountId, currencyId, amount, dateAcct, trxName);
+ }
+
+ // Transfers the money from the dummy bank account the cash book
+ MCashLine toCashLine = new MCashLine(toCash);
+ toCashLine.setDescription(description);
+ toCashLine.setC_Currency_ID(currencyId);
+ toCashLine.setCashType(MCashLine.CASHTYPE_BankAccountTransfer);
+ toCashLine.setC_BankAccount_ID(toBankAccountId);
+ toCashLine.setAmount(amount);
+ toCashLine.setIsGenerated(true);
+ PoManager.save(toCashLine);
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/businesslogic/ClientManager.java b/posterita/posterita/src/main/org/posterita/businesslogic/ClientManager.java
new file mode 100644
index 0000000000..5431f8aec1
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/businesslogic/ClientManager.java
@@ -0,0 +1,333 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ **/
+
+/**
+ @author ashley
+ */
+
+package org.posterita.businesslogic;
+
+import java.io.File;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.Properties;
+
+import org.compiere.model.MBPartner;
+import org.compiere.model.MClient;
+import org.compiere.model.MCountry;
+import org.compiere.model.MElement;
+import org.compiere.model.MLocation;
+import org.compiere.model.MOrg;
+import org.compiere.model.MOrgInfo;
+import org.compiere.model.MPeriodControl;
+import org.compiere.model.MSetup;
+import org.compiere.model.PO;
+import org.compiere.print.PrintUtil;
+import org.compiere.util.DB;
+import org.compiere.util.Env;
+import org.compiere.util.KeyNamePair;
+import org.posterita.businesslogic.administration.BPartnerManager;
+import org.posterita.core.businesslogic.ImportManager;
+import org.posterita.exceptions.NoClientFoundException;
+import org.posterita.exceptions.OperationException;
+import org.posterita.lib.UdiConstants;
+import org.posterita.util.PathInfo;
+import org.posterita.util.PoManager;
+
+public class ClientManager
+{
+ public static final String ACCOUNTING_FILE_PATH = PathInfo.PROJECT_HOME
+ + "/config/accounting/AccountingUS.csv";
+ public static final String ACCOUNTS_IMPORT_FORMAT = "Accounting - Accounts";
+
+ // public static String ACCOUNTS_IMPORT_TABLE = "I_ElementValue";
+
+ private static MClient createClient(Properties nCtx, String clientName,
+ String orgName, int currencyId, String currencyName, int countryId,
+ String city, File file) throws OperationException
+ {
+ Properties ctx = Env.getCtx();
+
+ Env.setContext(ctx, "#AD_User_ID", 100); // set user as SuperUser
+ Env.setContext(ctx, UdiConstants.CLIENT_ID_CTX_PARAM, "11"); // Garden
+ // World
+
+ MCountry.get(ctx, countryId);
+
+ MSetup setup = new MSetup(ctx, 0);
+
+ // Step 1
+ boolean ok = setup.createClient(clientName, orgName, clientName
+ + " Client User", clientName + " Org User");
+
+ if (ok)
+ {
+ // Generate Accounting
+ KeyNamePair currency = new KeyNamePair(currencyId, currencyName);
+
+ if (!setup.createAccounting(currency, true, true, false, false,
+ false, file))
+ {
+ throw new OperationException("Could not create accounting for client");
+ }
+
+ // Generate Entities
+ if (!setup.createEntities(countryId, city, 0, currency.getKey()))
+ {
+ throw new OperationException(
+ "Could not create setup entities");
+ }
+
+ // Create Print Documents
+ PrintUtil.setupPrintForm(setup.getAD_Client_ID());
+ }
+ else
+ {
+ throw new OperationException("Could not create client");
+ }
+ int clientId = setup.getAD_Client_ID();
+
+ MClient client = MClient.get(ctx, clientId);
+
+ return client;
+ }
+
+ protected static void updateAccountingProcessor(Properties ctx,
+ int adClientId, String trxName) throws OperationException
+ {
+ String updStmt = "Update C_AcctProcessor set FrequencyType='M' where AD_Client_ID="
+ + adClientId;
+
+ int updates = DB.executeUpdate(updStmt, trxName);
+
+ if (updates == -1)
+ throw new OperationException(
+ "Accounting Processor could not be updated");
+ }
+
+ public static void createClientDependencies(Properties ctx, MClient client,
+ MOrg org, String address, int countryId, String city,
+ String postalAddress, String smtpHost, File file, String trxName)
+ throws OperationException {
+ // Set client smtp host for sending emails
+ client.setSMTPHost(smtpHost);
+ // client.setIsPostImmediate(true);
+ // client.setIsCostImmediate(true);
+ PoManager.save(client);
+
+ // Create Organisation location
+ MLocation location = LocationManager.createLocation(ctx, org.get_ID(), address, "", postalAddress, city, 0, countryId, trxName);
+
+ // Create Linked Business Partner
+ MBPartner bpartner = BPartnerManager.createLinkedBPartner(ctx, org.get_ID(), 0, org
+ .getName(), " ", false, false, false, false, address,
+ postalAddress, city, " ", countryId, trxName);
+ bpartner.setAD_OrgBP_ID(org.get_ID());
+ PoManager.save(bpartner);
+ MOrgInfo orgInfo = org.getInfo();
+ orgInfo.set_TrxName(trxName);
+ orgInfo.setC_Location_ID(location.getC_Location_ID());
+ PoManager.save(orgInfo);
+
+ openPeriods(ctx, trxName);
+
+ ImportManager.importFile(ctx, file, ACCOUNTS_IMPORT_FORMAT, trxName);
+ ImportManager.importAccounting(ctx, Env.getAD_Client_ID(ctx),
+ getAccoutingElementId(ctx), false, true, true, trxName);
+ updateAccountingProcessor(ctx, Env.getAD_Client_ID(ctx), trxName);
+ }
+
+ public static MClient getCreateClient(Properties ctx, String clientName,
+ String orgName, int currencyId, String currencyName, int countryId,
+ String city, String address, String postalAddress, String smtpHost, File file)
+ throws OperationException
+ {
+ MClient client;
+ Properties rctx = (Properties) ctx.clone();
+
+ if (isClientPresent(clientName))
+ {
+ int clientId = getClientId(clientName);
+ client = new MClient(ctx, clientId, null);
+ }
+ else
+ {
+ client = createClient(rctx, clientName, orgName, currencyId,
+ currencyName, countryId, city, file);
+ Env.setContext(rctx, UdiConstants.CLIENT_ID_CTX_PARAM, client.get_ID());
+ MOrg org = OrganisationManager.getOrgByName(rctx, orgName, null);
+ createClientDependencies(rctx, client, org, address, countryId,
+ city, postalAddress, smtpHost, file, null);
+ }
+
+ return client;
+ }
+
+ public static Properties getCtx(Properties ctx, String clientName,
+ String orgName) throws OperationException
+ {
+ int clientId = ClientManager.getClientId(clientName);
+
+ // Set AD_Client_ID in the context
+ Env.setContext(ctx, UdiConstants.CLIENT_ID_CTX_PARAM, clientId);
+
+ MOrg org = OrganisationManager.getOrgByName(ctx, orgName, null);
+ int orgId = org.get_ID();
+ Env.setContext(ctx, UdiConstants.ORG_ID_CTX_PARAM, orgId);
+ Env.setContext(ctx, UdiConstants.ROLE_EDITABLE_ORGS_CTX_PARAM, orgId);
+
+ return ctx;
+ }
+
+ public static Properties getCtx(Properties ctx, int clientId, int orgId) {
+ Env.setContext(ctx, UdiConstants.CLIENT_ID_CTX_PARAM, clientId);
+ Env.setContext(ctx, UdiConstants.ORG_ID_CTX_PARAM, orgId);
+ Env.setContext(ctx, UdiConstants.USER_ID_CTX_PARAM, 100);
+
+ return ctx;
+ }
+
+ public static void openPeriods(Properties ctx, String trxName)
+ throws OperationException
+ {
+ int idPCs[] = PO.getAllIDs(MPeriodControl.Table_Name, " AD_CLIENT_ID ="
+ + Env.getAD_Client_ID(ctx), trxName);
+
+ for (int i = 0; i < idPCs.length; i++)
+ {
+ MPeriodControl period = new MPeriodControl(ctx, idPCs[i], trxName);
+ period.setPeriodStatus(MPeriodControl.PERIODSTATUS_Open);
+ PoManager.save(period);
+
+ }
+ }
+
+ public static MClient loadClient(Properties ctx, int clientId,
+ String trxName) throws OperationException
+ {
+ MClient client = new MClient(ctx, clientId, trxName);
+ if (client.get_ID() == 0)
+ {
+ throw new OperationException("Could not load client with id: "
+
+ + clientId);
+ }
+ return client;
+ }
+
+ public static int getAccoutingElementId(Properties ctx)
+ throws OperationException {
+ int adClientId = Env.getAD_Client_ID(ctx);
+
+ String whereClause = "AD_Client_ID=" + adClientId;
+
+ int elementIds[] = MElement.getAllIDs(MElement.Table_Name, whereClause,
+ null);
+
+ if (elementIds.length == 0)
+ throw new OperationException(
+ "No accounting element found for client with id: "
+ + adClientId);
+ else if (elementIds.length > 1)
+ throw new OperationException(elementIds.length
+ + " account elements found for client with id: "
+ + adClientId);
+ else
+ return elementIds[0];
+ }
+
+ public static void changeClientName(Properties ctx, String clientName,
+ String trxName) throws OperationException {
+ if (clientName == null || clientName.trim().length() == 0)
+ throw new OperationException("Client Name cannot be null");
+
+ int adClientId = Env.getAD_Client_ID(ctx);
+
+ MClient client = loadClient(ctx, adClientId, trxName);
+
+ if (!client.getName().equals(clientName)) {
+ client.setName(clientName);
+
+ PoManager.save(client);
+ }
+ }
+
+ public static void cleanData(Properties ctx, boolean deleteAll)
+ throws OperationException {
+ throw new RuntimeException("This operation is no more supported");
+ }
+
+ public static int getClientId(String clientName) throws OperationException {
+ String sql = "select ad_client_id from ad_client where upper(name)=upper('"
+ + clientName + "')";
+
+ PreparedStatement pstmt = DB.prepareStatement(sql, null);
+ ResultSet rs = null;
+
+ int clientID = 0;
+ try {
+ rs = pstmt.executeQuery();
+ while (rs.next()) {
+ clientID = rs.getInt(1);
+ }
+
+ rs.close();
+ } catch (SQLException e) {
+ throw new OperationException(e);
+ } finally {
+ try {
+ pstmt.close();
+ } catch (Exception ex) {
+ }
+
+ pstmt = null;
+ }
+
+ if (clientID == 0)
+ throw new NoClientFoundException("no client found for clientName "
+ + clientName);
+
+ return clientID;
+ }
+
+ public static boolean isClientPresent(String clientName)
+ throws OperationException {
+ try {
+ getClientId(clientName);
+ } catch (NoClientFoundException e) {
+ return false;
+ }
+
+ return true;
+ }
+
+ /*
+ * Retrieve all clients in the system for which POS/Webstore transactions
+ * are valid
+ */
+ public static int[] getAvailableClientIds() {
+ int clientIds[] = MClient.getAllIDs(MClient.Table_Name,
+ "IsActive='Y' and AD_Client_ID not in (0)", null);
+
+ return clientIds;
+ }
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/businesslogic/CurrencyManager.java b/posterita/posterita/src/main/org/posterita/businesslogic/CurrencyManager.java
new file mode 100644
index 0000000000..80e6d828e7
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/businesslogic/CurrencyManager.java
@@ -0,0 +1,112 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ **/
+package org.posterita.businesslogic;
+
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.Properties;
+
+import org.compiere.model.MCurrency;
+import org.compiere.model.MPriceList;
+import org.compiere.util.DB;
+import org.compiere.util.Env;
+import org.compiere.util.KeyNamePair;
+import org.posterita.Constants;
+import org.posterita.exceptions.OperationException;
+
+public class CurrencyManager
+{
+
+ /**
+ * Retrieves the currency symbol for the currency ID specified
+ * @param currencyId Currency ID
+ * @return Currency Symbol
+ */
+ public static String getCurrencySymbol(int currencyId) throws OperationException
+ {
+ MCurrency cur = new MCurrency(new Properties(), currencyId, null);
+
+ if (cur.get_ID() == 0)
+ return ""; //Do not throw error here
+
+ return cur.getCurSymbol();
+ }
+
+ public static int getCurrencyPrecision(Properties ctx) throws OperationException
+ {
+ int pricelistId = Env.getContextAsInt(ctx, Constants.PRICE_LIST);
+ MPriceList priceList = MPriceList.get(ctx, pricelistId, null);
+
+ if (priceList == null)
+ {
+ throw new OperationException("Price list cannot be null!");
+ }
+
+ MCurrency mCurrency = new MCurrency(ctx, priceList.getC_Currency_ID(), null);
+
+ return mCurrency.getCostingPrecision();
+ }
+
+ public static MCurrency getCurrency(Properties ctx) throws OperationException
+ {
+ int pricelistId = POSTerminalManager.getSOPriceListId(ctx);
+ MPriceList priceList = MPriceList.get(ctx, pricelistId, null);
+
+ if (priceList == null)
+ {
+ throw new OperationException("No price list set for POS Terminal");
+ }
+
+ MCurrency mCurrency = MCurrency.get(ctx, priceList.getC_Currency_ID());
+
+ return mCurrency;
+ }
+
+ public static ArrayList getAllCurrencies() throws OperationException
+ {
+ ArrayList knPairList = new ArrayList();
+
+ String sql = "Select C_Currency_ID, Description from C_Currency order by description";
+
+ PreparedStatement pstmt = DB.prepareStatement(sql, null);
+
+ try
+ {
+ ResultSet rs = pstmt.executeQuery();
+ while(rs.next())
+ {
+ int currencyId = rs.getInt(1);
+ String currencyDescription = rs.getString(2);
+
+ knPairList.add(new KeyNamePair(currencyId, currencyDescription));
+ }
+ }
+ catch(SQLException ex)
+ {
+ throw new OperationException("Could not get currencies with sql: " + sql, ex);
+ }
+
+ return knPairList;
+ }
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/businesslogic/CustomerCart.java b/posterita/posterita/src/main/org/posterita/businesslogic/CustomerCart.java
new file mode 100644
index 0000000000..bb3a1dc5c9
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/businesslogic/CustomerCart.java
@@ -0,0 +1,161 @@
+/**
+ * Product: Posterita Web-Based POS (an Adempiere Plugin)
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/**
+ @author Praveen Beekoo
+ */
+package org.posterita.businesslogic;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+
+import org.posterita.beans.CustomerBean;
+import org.posterita.businesslogic.administration.CustomerManager;
+import org.posterita.exceptions.InvalidDateTimeException;
+import org.posterita.exceptions.OperationException;
+
+public class CustomerCart
+{
+
+ private HashMap customers = null;
+ private int noOfCustomers = 0;
+ private Properties ctx;
+
+
+ public CustomerCart(Properties ctx)
+ {
+ this.ctx = ctx;
+ customers = new HashMap();
+ }
+
+ public void addCustomer(int customer_id, int qty)
+ {
+ noOfCustomers++;
+
+ Integer previousQty = customers.get(Integer.valueOf(customer_id));
+
+ if(previousQty == null)
+ {
+ customers.put(Integer.valueOf(customer_id),Integer.valueOf(qty));
+ }
+ else
+ {
+ int newQty = previousQty.intValue() + qty;
+ customers.put(Integer.valueOf(customer_id),Integer.valueOf(newQty));
+ }
+ }
+
+ public void addCustomer(int customer_id)
+ {
+ addCustomer(customer_id, 1);
+ }
+
+ public void removeCustomer(int customer_id, int qty)
+ {
+ Integer oldQty = customers.get(Integer.valueOf(customer_id));
+
+ if( oldQty == null )
+ {
+ return;
+ }
+ else
+ {
+ if( oldQty.intValue() <= qty )
+ {
+ removeCustomer( customer_id );
+ noOfCustomers = noOfCustomers - oldQty.intValue();
+ }
+ else
+ {
+ int newQty = oldQty.intValue() - qty;
+ customers.put(Integer.valueOf(customer_id),Integer.valueOf(newQty));
+ noOfCustomers = noOfCustomers - qty;
+ }
+ }
+ }
+
+ public void removeCustomer(int customer_id)
+ {
+ Integer qty = customers.remove(Integer.valueOf(customer_id));
+
+ if( qty == null )
+ {
+ return;
+ }
+
+ noOfCustomers = noOfCustomers - qty.intValue();
+ }
+
+ public void clear()
+ {
+ customers.clear();
+ noOfCustomers = 0;
+ }
+
+ public int getNoOfCustomers()
+ {
+ return noOfCustomers;
+ }
+
+ public ArrayList getCustomers() throws Exception
+ {
+ ArrayList customerList = new ArrayList();
+ CustomerBean bean = null;
+ Integer customerId = null;
+
+ Set> entrySet = customers.entrySet();
+
+ for (Map.Entry entry : entrySet)
+ {
+ customerId = entry.getKey();
+
+ bean = CustomerManager.getCustomerDetails(ctx, customerId);
+
+ customerList.add(bean);
+ }
+
+ return customerList;
+ }
+
+ public Integer[] getCustomerIDs()
+ {
+ Set set = customers.keySet();
+
+ if( set.isEmpty() )
+ {
+ return new Integer[]{};
+ }
+
+ Integer[] ids = new Integer[]{};
+ ids = set.toArray( ids );
+
+ return ids;
+ }
+
+ public boolean hasCustomer( int customer_id )
+ {
+ return customers.containsKey( Integer.valueOf(customer_id) );
+ }
+
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/businesslogic/EditBulkProductFromFileManager.java b/posterita/posterita/src/main/org/posterita/businesslogic/EditBulkProductFromFileManager.java
new file mode 100644
index 0000000000..72eb26fb45
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/businesslogic/EditBulkProductFromFileManager.java
@@ -0,0 +1,336 @@
+/**
+ * Product: Posterita Web-Based POS (an Adempiere Plugin)
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/**
+ @author Alok Pathak
+ */
+
+package org.posterita.businesslogic;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedReader;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.Properties;
+import java.util.StringTokenizer;
+
+import org.apache.struts.upload.FormFile;
+import org.posterita.beans.ItemBean;
+import org.posterita.beans.ProductBean;
+import org.posterita.beans.ShoppingCartBean;
+import org.posterita.businesslogic.performanceanalysis.CSVReportManager;
+import org.posterita.businesslogic.stock.StockManager;
+import org.posterita.exceptions.BarcodeAlreadyExistsException;
+import org.posterita.exceptions.OperationException;
+import org.posterita.exceptions.ProductAlreadyExistException;
+import org.posterita.exceptions.ProductNotFoundException;
+import org.posterita.exceptions.ProductNotOnPriceListException;
+
+
+public class EditBulkProductFromFileManager
+{
+ /* @SuppressWarnings("unchecked")
+ public static ShoppingCartBean addToProductCart(Properties ctx,ProductBean bean, ShoppingCartBean cartBean) throws OperationException,ProductNotFoundException,ProductNotOnPriceListException
+ {
+ ArrayList oldItems;
+ if (cartBean == null)
+ {
+ cartBean = new ShoppingCartBean();
+ oldItems = new ArrayList();
+ }
+ else
+ {
+ oldItems = cartBean.getItems();
+ }
+
+ ArrayList oldItemsClone = (ArrayList) oldItems.clone();
+ ArrayList itemsToBeAdded = getProducts(bean);
+ oldItems = addToItemList(oldItemsClone, itemsToBeAdded);
+
+ cartBean.setItems(oldItems);
+ return cartBean;
+ }
+
+ private static ArrayList getProducts(ProductBean bean)
+ {
+ ArrayList list = new ArrayList();
+
+ Integer [] productIds = bean.getProductIds();
+ ItemBean itemBean=null;
+ for(int i=0;i addToItemList(ArrayList items, ArrayList itemsToBeAdded) throws ProductNotOnPriceListException, OperationException
+ {
+ Iterator iter = itemsToBeAdded.iterator();
+ ItemBean itemBean;
+
+ ItemBean foundItemBean;
+ while (iter.hasNext())
+ {
+ itemBean = (ItemBean) iter.next();
+
+ foundItemBean = StockManager.findItem(itemBean, items);
+
+ if (foundItemBean == null)
+ items.add(itemBean);
+
+ }
+
+ return items;
+ }
+
+ public static String createCSVFile(Properties ctx, Integer[] productIds) throws OperationException
+ {
+
+ ArrayList fileData = new ArrayList();
+
+ Object[] headers = new Object[]{
+ "Product ID",
+ "Name",
+ "Barcode",
+ "Purchase Price",
+ "Marked Price",
+ "Discounted Price"};
+
+ fileData.add(headers);
+
+ Object[] productInfo = null;
+
+ if( productIds != null )
+ {
+ for( int i = 0; i< productIds.length; i++)
+ {
+ int productId = productIds[i];
+
+ ProductBean bean= POSProductManager.viewPOSProduct(ctx,productId, null);
+
+ productInfo = new Object[6];
+
+ productInfo[0] = productId;
+ productInfo[1]=bean.getProductName();
+
+
+ if( bean.getBarCode() == null )
+ {
+ productInfo[2]="";
+ }
+ else
+ {
+ productInfo[2]=bean.getBarCode();
+ }
+ productInfo[3]=bean.getPurchasePriceStandard();
+ productInfo[4]=bean.getSalesPriceList();
+ productInfo[5]=bean.getSalesPriceStandard();
+
+ fileData.add(productInfo);
+ }
+ }
+
+
+ return CSVReportManager.generateCSVReport(ctx, fileData);
+
+ }
+
+ public static String createCSVFile(Properties ctx,ArrayList cartBeanItems) throws OperationException
+ {
+
+ Iterator iter = cartBeanItems.iterator();
+ ItemBean itemBean=null;
+
+ ArrayList fileData = new ArrayList();
+
+ Object[] headers = new Object[]{
+ "Product ID",
+ "Name",
+ "Barcode",
+ "Purchase Price",
+ "Marked Price",
+ "Discounted Price"};
+
+ fileData.add(headers);
+
+ Object[] productInfo = null;
+
+ while(iter.hasNext())
+ {
+ productInfo = new Object[headers.length];
+
+ itemBean =(ItemBean)iter.next();
+
+ //TODO
+ int productId=itemBean.getProductId();
+
+ ProductBean bean= POSProductManager.viewPOSProduct(ctx,productId, null);
+
+ productInfo[0] = productId;
+ productInfo[1]=bean.getProductName();
+ productInfo[2]=bean.getBarCode();
+ productInfo[3]=bean.getPurchasePriceStandard();
+ productInfo[4]=bean.getSalesPriceList();
+ productInfo[5]=bean.getSalesPriceStandard();
+ fileData.add(productInfo);
+ }
+
+ return CSVReportManager.generateCSVReport(ctx, fileData);
+
+ }
+
+ public static ArrayList updateAllProducts(Properties ctx, FormFile formFile,String trxName) throws NumberFormatException, ProductAlreadyExistException,BarcodeAlreadyExistsException, OperationException
+ {
+ ArrayList list=new ArrayList();
+
+ InputStream is = null;
+ BufferedInputStream bis = null;
+ BufferedReader reader = null;
+
+ try
+ {
+ is = formFile.getInputStream();
+
+ bis = new BufferedInputStream(is);
+
+ reader = new BufferedReader(new InputStreamReader(bis));
+
+ String s = null;
+ ProductBean bean=null;
+ String productId;
+ String name=null;
+ String purchasePrice=null;
+ String salePriceList=null;
+ String salePriceStd=null;
+ String barCode=null;
+ reader.readLine();
+
+ while((s=reader.readLine()) != null && s.trim().length()>0)
+ {
+ StringTokenizer st = new StringTokenizer(s,",");
+
+ bean=new ProductBean();
+
+ productId=st.nextToken();
+ productId=productId.replaceAll("\"","");
+ name=st.nextToken();
+ name=name.replaceAll("\"","");
+ barCode=st.nextToken();
+ barCode=barCode.replaceAll("\"","");
+ purchasePrice=st.nextToken();
+ purchasePrice=purchasePrice.replaceAll("\"","");
+ salePriceList=st.nextToken();
+ salePriceList=salePriceList.replaceAll("\"","");
+ salePriceStd=st.nextToken();
+ salePriceStd=salePriceStd.replaceAll("\"","");
+
+ bean.setProductId(Integer.valueOf(productId));
+ bean.setBarCode(barCode);
+ bean.setProductName(name);
+ bean.setDescription(name);
+ bean.setPurchasePriceStandard(purchasePrice);
+ bean.setSalesPriceList(salePriceList);
+ bean.setSalesPriceStandard(salePriceStd);
+ bean.setIsActive(true);
+ bean.setSalesPriceLimit(salePriceStd);
+ POSProductManager.editProduct(ctx,bean,null,trxName);
+ }
+ }
+ catch (FileNotFoundException e)
+ {
+ throw new OperationException(e);
+ }
+ catch (IOException e)
+ {
+ throw new OperationException(e);
+ }
+
+ finally
+ {
+ if (is != null)
+ {
+ try
+ {
+ is.close();
+ }
+ catch(Exception ex)
+ {}
+ }
+
+ if (bis != null)
+ {
+ try
+ {
+ bis.close();
+ }
+ catch(Exception ex)
+ {}
+ }
+
+ if (reader != null)
+ {
+ try
+ {
+ reader.close();
+ }
+ catch(Exception ex)
+ {}
+ }
+ }
+
+ return list;
+ }
+
+ public static ProductCart addToCart( Properties ctx, ProductCart cart, int productId)
+ {
+ if ( ! cart.hasProduct (productId ) )
+ {
+ cart.addProduct( productId );
+ }
+
+ return cart;
+ }
+
+ public static ArrayList getProductList(Properties ctx, Integer[] productIds) throws OperationException
+ {
+ ArrayList productList = new ArrayList();
+
+ if( productIds != null )
+ {
+ for( int i = 0; i< productIds.length; i++)
+ {
+ int productId = productIds[i];
+ ProductBean bean= POSProductManager.viewPOSProduct(ctx,productId, null);
+ productList.add( bean );
+
+ }
+ }
+
+ return productList;
+ }*/
+}
diff --git a/posterita/posterita/src/main/org/posterita/businesslogic/FileAttachmentManager.java b/posterita/posterita/src/main/org/posterita/businesslogic/FileAttachmentManager.java
new file mode 100644
index 0000000000..972fcafe29
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/businesslogic/FileAttachmentManager.java
@@ -0,0 +1,30 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on Mar 13, 2006 by praveen
+ *
+ */
+package org.posterita.businesslogic;
+
+import org.posterita.businesslogic.core.AttachmentManager;
+
+
+public class FileAttachmentManager extends AttachmentManager
+{
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/businesslogic/GenericStockManager.java b/posterita/posterita/src/main/org/posterita/businesslogic/GenericStockManager.java
new file mode 100644
index 0000000000..f34605faf7
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/businesslogic/GenericStockManager.java
@@ -0,0 +1,280 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on Nov 6, 2005 by alok
+ **/
+package org.posterita.businesslogic;
+
+import java.math.BigDecimal;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.Properties;
+import java.util.StringTokenizer;
+
+import org.compiere.model.MProduct;
+import org.compiere.util.DB;
+import org.compiere.util.Env;
+
+import org.posterita.beans.AvailableProductSizeBean;
+import org.posterita.beans.GenericProductBean;
+import org.posterita.beans.ItemBean;
+import org.posterita.beans.ProductImageInfo;
+import org.posterita.businesslogic.administration.ProductManager;
+import org.posterita.exceptions.OperationException;
+
+
+public class GenericStockManager
+{
+ public static final String DELIMITER = "_";
+
+ public static ArrayList getProducts(Properties ctx, int productCategoryId) throws OperationException
+ {
+
+ ArrayList products = getProductsInStock(ctx, productCategoryId);
+ products = setImageInfo(ctx, products);
+
+ return products;
+ }
+
+ public static ArrayList getProductsInStock(Properties ctx, int productCategoryId) throws OperationException
+ {
+ String sql = "select p.name," +
+ " sum(s.qtyonhand)," +
+ " p.m_product_id," +
+ " p.description" +
+ " from m_product p, m_storage s" +
+ " where p.m_product_id = s.m_product_id" +
+ " and p.ad_client_id = " + Env.getAD_Client_ID(ctx) +
+ " and p.m_product_category_id = " + productCategoryId +
+ " and s.qtyonhand > 0" +
+ " group by p.name, p.m_product_id, description" +
+ " order by p.name";
+
+ PreparedStatement pstmt = null;
+
+ ArrayList stock = new ArrayList();
+
+ ResultSet rs = null;
+ try
+ {
+ pstmt = DB.prepareStatement(sql, null);
+ rs = pstmt.executeQuery();
+
+ GenericProductBean stockBean;
+ while(rs.next())
+ {
+ stockBean = new GenericProductBean();
+ stockBean.setName(rs.getString(1));
+ stockBean.setQtyOnHand(Integer.valueOf(rs.getInt(2)));
+ stockBean.setProductId(Integer.valueOf(rs.getInt(3)));
+ stockBean.setDescription(rs.getString(4));
+
+ stock.add(stockBean);
+ }
+
+ rs.close();
+ }
+ catch(SQLException e)
+ {
+ throw new OperationException(e);
+ }
+ finally
+ {
+ try
+ {
+ pstmt.close();
+ }
+ catch (Exception ex)
+ {
+ throw new OperationException(ex);
+ }
+ pstmt = null;
+ }
+ return stock;
+ }
+
+ public static ArrayList setImageInfo(Properties ctx, ArrayList products)
+ {
+ Iterator iter = products.iterator();
+
+ ProductImageInfo info;
+ GenericProductBean bean;
+ while (iter.hasNext())
+ {
+ bean = (GenericProductBean) iter.next();
+ info = ProductManager.getProductImageInfo(ctx, bean.getProductId());
+ bean.setImageInfo(info);
+ }
+
+ return products;
+ }
+
+ public static String getSize(String productName)
+ {
+ StringTokenizer tokenizer = new StringTokenizer(productName, DELIMITER);
+
+ String size = tokenizer.nextToken();
+
+
+ return size;
+ }
+
+ public static AvailableProductSizeBean setSize(String size, AvailableProductSizeBean bean)
+ {
+ //TODO create a new sizeType which contains Small, Medium, Large and XLarge
+ if (size.equalsIgnoreCase("Small"))
+ bean.setExistsInSmall(Boolean.valueOf(true));
+
+ if (size.equalsIgnoreCase("Medium"))
+ bean.setExistsInMedium(Boolean.valueOf(true));
+
+ if (size.equalsIgnoreCase("Large"))
+ bean.setExistsInLarge(Boolean.valueOf(true));
+
+ if (size.equalsIgnoreCase("XLarge"))
+ bean.setExistsInXLarge(Boolean.valueOf(true));
+
+ return bean;
+ }
+
+ public static String getLikeProductQueryString(Properties ctx, String productName)
+ {
+ StringTokenizer tokenizer = new StringTokenizer(productName, DELIMITER);
+ String colour = tokenizer.nextToken();
+ String model = tokenizer.nextToken();
+
+ String likeProductQueryString = "'%" + colour + "%" + model + "'";
+
+ return likeProductQueryString;
+ }
+
+ public static AvailableProductSizeBean getAvailableSizesForProduct(Properties ctx, int productId) throws OperationException
+ {
+ ArrayList sizes = getAvailableSizes(ctx, productId);
+ Iterator iter = sizes.iterator();
+ AvailableProductSizeBean sizeBean = new AvailableProductSizeBean();
+ String size;
+
+ while (iter.hasNext())
+ {
+ GenericProductBean bean = (GenericProductBean) iter.next();
+ size = getSize(bean.getName());
+ setSize(size, sizeBean);
+ }
+
+ return sizeBean;
+ }
+
+ public static ArrayList getAvailableSizes(Properties ctx, int productId) throws OperationException
+ {
+ MProduct product = new MProduct(ctx, productId, null);
+
+ String productName = product.getName();
+
+ String likeQuery = getLikeProductQueryString(ctx, productName);
+
+ String sql = "select p.name," +
+ " sum(s.qtyonhand)," +
+ " p.m_product_id," +
+ " p.description" +
+ " from m_product p, m_storage s" +
+ " where p.m_product_id = s.m_product_id" +
+ " and p.ad_client_id = " + Env.getAD_Client_ID(ctx) +
+ " and p.name like " + likeQuery +
+ " and s.qtyonhand > 0" +
+ " group by p.name, p.m_product_id, description" +
+ " order by p.name";
+
+ PreparedStatement pstmt = DB.prepareStatement(sql, null);
+ ArrayList sizes = new ArrayList();
+ ResultSet rs = null;
+
+ try
+ {
+ rs = pstmt.executeQuery();
+
+ GenericProductBean bean;
+ String name;
+
+ while (rs.next())
+ {
+ bean = new GenericProductBean();
+ name = rs.getString(1);
+ bean.setName(name);
+ sizes.add(bean);
+ }
+
+ rs.close();
+ }
+ catch (SQLException e)
+ {
+ throw new OperationException(e);
+ }
+ finally
+ {
+ try
+ {
+ pstmt.close();
+ }
+ catch(Exception e)
+ {}
+
+ pstmt = null;
+ }
+
+ return sizes;
+ }
+
+
+
+ public static int getProduct(String name, String productSize) throws OperationException
+ {
+ StringTokenizer tokenizer = new StringTokenizer(name, DELIMITER);
+ String colour = tokenizer.nextToken();
+ String size = tokenizer.nextToken();
+ String model = tokenizer.nextToken();
+
+ size = productSize;
+ String productName = colour + DELIMITER + size + DELIMITER + model;
+
+ int productIds[] = MProduct.getAllIDs(MProduct.Table_Name, "ad_client_id=1001806" + " and name='"
+ + productName + "'", null);
+
+ if (productIds.length == 0)
+ throw new OperationException("Product not found!");
+
+ if (productIds.length > 1)
+ throw new OperationException("More than 1 product found for " + productName);
+
+ return productIds[0];
+ }
+
+ public static ItemBean setBean(Integer productId, BigDecimal qty)
+ {
+ ItemBean itemBean = new ItemBean();
+ itemBean.setProductId(productId);
+ itemBean.setQty(qty);
+
+ return itemBean;
+ }
+
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/businesslogic/HistoryFilterBean.java b/posterita/posterita/src/main/org/posterita/businesslogic/HistoryFilterBean.java
new file mode 100644
index 0000000000..bf91648e25
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/businesslogic/HistoryFilterBean.java
@@ -0,0 +1,76 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on Aug 15, 2005 by praveen
+ *
+ */
+package org.posterita.businesslogic;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.TreeSet;
+
+import org.posterita.beans.FilterBean;
+import org.posterita.beans.UDIPair;
+
+public class HistoryFilterBean
+{
+ private TreeSet bPartnerList = new TreeSet();
+ private TreeSet docStatusList = new TreeSet();
+
+ public HistoryFilterBean(ArrayList beans)
+ {
+
+ if(beans!=null)
+ {
+ Iterator iter = beans.iterator();
+
+ while(iter.hasNext())
+ {
+ FilterBean bean = (FilterBean) iter.next();
+
+ if(bean.getPartnerId()!=null)
+ {
+ UDIPair pair = new UDIPair(bean.getPartnerId(),bean.getPartnerName());
+ bPartnerList.add(pair);
+ }
+
+ if(bean.getDocStatus()!= null)
+ {
+ UDIPair docStatusPair = new UDIPair(bean.getDocStatusCode(), bean.getDocStatus());
+ docStatusList.add(docStatusPair);
+ }
+ }
+ }
+
+ }
+
+
+ public TreeSet getBPartnerList()
+ {
+ return bPartnerList;
+ }
+
+ public TreeSet getDocStatusList()
+ {
+ return docStatusList;
+ }
+
+
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/businesslogic/ImportPosProductManager.java b/posterita/posterita/src/main/org/posterita/businesslogic/ImportPosProductManager.java
new file mode 100644
index 0000000000..922a8a3a7f
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/businesslogic/ImportPosProductManager.java
@@ -0,0 +1,338 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on May 16, 2006 by alok
+ */
+
+
+package org.posterita.businesslogic;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedReader;
+import java.io.FileNotFoundException;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.math.BigDecimal;
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.NoSuchElementException;
+import java.util.Properties;
+import java.util.StringTokenizer;
+
+import org.apache.struts.upload.FormFile;
+import org.compiere.model.MStorage;
+import org.compiere.model.MTax;
+import org.compiere.model.MTransaction;
+import org.compiere.model.MUOM;
+import org.compiere.model.MWarehouse;
+import org.compiere.util.Env;
+import org.compiere.util.Trx;
+import org.posterita.beans.ProductBean;
+import org.posterita.businesslogic.administration.PriceListManager;
+import org.posterita.businesslogic.administration.ProductManager;
+import org.posterita.businesslogic.performanceanalysis.ReportManager;
+import org.posterita.businesslogic.stock.StockManager;
+import org.posterita.core.RandomStringGenerator;
+import org.posterita.core.TrxPrefix;
+import org.posterita.exceptions.BarcodeAlreadyExistsException;
+import org.posterita.exceptions.DuplicateUOMException;
+import org.posterita.exceptions.ImportProductException;
+import org.posterita.exceptions.OperationException;
+import org.posterita.exceptions.ProductAlreadyExistException;
+import org.posterita.exceptions.ProductNotImportedException;
+import org.posterita.exceptions.TaxRateNotDefineException;
+import org.posterita.exceptions.UOMNotFoundException;
+import org.posterita.exceptions.UOMValuePrecisionNotValidException;
+import org.posterita.formatter.BigDecimalFormatter;
+import org.posterita.util.PoManager;
+
+
+public class ImportPosProductManager
+{
+
+ public static ArrayList importSingleProducts(Properties ctx, FormFile formFile, int salesPriceListId, int purchasePriceListId, String trxName) throws NumberFormatException, ProductAlreadyExistException,BarcodeAlreadyExistsException, OperationException
+ {
+ ProductBean pbean = new ProductBean();
+ ArrayList list=new ArrayList();
+ InputStream is = null;
+ BufferedInputStream bis = null;
+ BufferedReader reader = null;
+
+ int orgId = 0; //Import all products under org * so that it may be accessible to all orgs
+ StringBuffer csv = new StringBuffer();
+ StringBuffer importProductEx = new StringBuffer();
+ try
+ {
+ is = formFile.getInputStream();
+
+ bis = new BufferedInputStream(is);
+
+ reader = new BufferedReader(new InputStreamReader(bis));
+
+ String s = null;
+ ProductBean bean=null;
+ String revenueRecognition=null;
+ String name=null;
+ String description= null;
+ String uom= null;
+ String purchasePrice=null;
+ String salePriceList=null;
+ String salePriceStd=null;
+ String salePriceLimit=null;
+ String barCode=null;
+ String taxRate=null;
+ String qty=null;
+
+ Integer uomId = null;
+ Integer lineNumber = 1; //Skip Header in Import File
+ ArrayList uomErrorList = new ArrayList();
+ BigDecimal qtyDB = new BigDecimal(0);
+
+ boolean isProductImported = true;
+ String filename = "";
+ String header = reader.readLine();
+
+ csv.append(header).append("\n");
+ while((s=reader.readLine())!=null && s.trim().length()>0)
+ {
+ lineNumber++;
+
+ StringTokenizer st = new StringTokenizer(s,",");
+
+ bean=new ProductBean();
+ Trx trx = Trx.get(TrxPrefix.getPrefix(),true);
+ try
+ {
+ trx.start();
+ try
+ {
+ revenueRecognition=st.nextToken();
+ revenueRecognition=revenueRecognition.replaceAll("\"","");
+ barCode=st.nextToken();
+ barCode=barCode.replaceAll("\"","");
+ name=st.nextToken();
+ name=name.replaceAll("\"","");
+ description=st.nextToken();
+ description=description.replaceAll("\"","");
+ uom=st.nextToken();
+ uom=uom.replaceAll("\"","");
+ purchasePrice=st.nextToken();
+ purchasePrice=purchasePrice.replaceAll("\"","");
+ salePriceList=st.nextToken();
+ salePriceList=salePriceList.replaceAll("\"","");
+ salePriceStd=st.nextToken();
+ salePriceStd=salePriceStd.replaceAll("\"","");
+ salePriceLimit=st.nextToken();
+ salePriceLimit=salePriceLimit.replaceAll("\"","");
+ taxRate=st.nextToken();
+ taxRate=taxRate.replaceAll("\"","");
+ qty=st.nextToken();
+ qty=qty.replaceAll("\"","");
+
+ }
+ catch (NoSuchElementException e)
+ {
+ // TODO: handle exception
+ throw new ImportProductException("An error occurred while passing the data in the file.");
+ }
+
+ if ((uom != null) || (uom != ""))
+ {
+ int[] uomIds = MUOM.getAllIDs(MUOM.Table_Name, "UPPER(name)='" + uom.toUpperCase() + "'" + "AND isActive = 'Y' AND AD_CLient_ID IN (0," + Env.getAD_Client_ID(ctx) +")", trxName);
+
+ if (uomIds.length == 0)
+ throw new UOMNotFoundException("UOM '" + uom + "' does not exist. ");
+ else
+ if (uomIds.length > 1)
+ throw new DuplicateUOMException("Duplicate UOM name found - " + uom + ". Please make sure that the name is unique as it is not case sensitive.");
+
+ MUOM muom = MUOM.get(ctx, uomIds[0]);
+
+ int uomPrecision = MUOM.getPrecision(ctx, muom.getC_UOM_ID());
+ uomId = muom.get_ID();
+ qtyDB = new BigDecimal(qty);
+
+ int enteredPrecision = StockManager.getQtyPrecision(qtyDB);
+
+ if (enteredPrecision > uomPrecision)
+ throw new UOMValuePrecisionNotValidException("The precision entered for the quantity field of the product: '"+ name
+ + "' should not be greater than '" + uomPrecision);
+ }
+
+ String whereClause=" AD_CLIENT_ID="+Env.getAD_Client_ID(ctx)+" and RATE="+taxRate;
+ int taxId []= MTax.getAllIDs(MTax.Table_Name,whereClause,trxName);
+ if(taxId.length==0)
+ throw new TaxRateNotDefineException(", the tax rate in the file ="+taxRate+" does not exist ");
+
+ MTax tax = new MTax(ctx,taxId[0],trxName);
+
+ bean.setRevenueRecognition(revenueRecognition);
+ bean.setBarCode(barCode);
+ bean.setProductName(name);
+ bean.setIsActive(true);
+ bean.setDescription(description);
+ bean.setUomId(uomId);
+ bean.setPurchasePriceStandard(purchasePrice);
+ bean.setSalesPriceList(salePriceList);
+ bean.setSalesPriceStandard(salePriceStd);
+ bean.setSalesPriceLimit(salePriceLimit);
+ bean.setTaxCategoryId(tax.getC_TaxCategory_ID());
+ bean.setOrgId(orgId);
+
+ int productId = ProductManager.getSimilarProduct(ctx,name,trxName);
+ if (productId == 0)
+ {
+ pbean=POSProductManager.createSinglePOSProductForImport(ctx,bean,qtyDB,trxName);
+ productId = pbean.getProductId();
+ }
+ else
+ {
+ pbean = POSProductManager.viewPOSProduct(ctx, productId, trxName);
+ }
+ BigDecimalFormatter formatter = new BigDecimalFormatter();
+ BigDecimal salesPriceStd = (BigDecimal)formatter.unformat(salePriceStd);
+ BigDecimal salesPriceList = (BigDecimal)formatter.unformat(salePriceList);
+ BigDecimal salesPriceLimit = (BigDecimal)formatter.unformat(salePriceLimit);
+
+ BigDecimal purchasePriceStd = (BigDecimal)formatter.unformat(purchasePrice);
+ PriceListManager.updatePriceLists(ctx, productId, salesPriceListId, salesPriceStd,
+ salesPriceList, salesPriceLimit, trx.getTrxName());
+ PriceListManager.updatePriceLists(ctx, productId, purchasePriceListId, purchasePriceStd,
+ Env.ZERO, Env.ZERO, trx.getTrxName());
+ trx.commit();
+ }
+ catch (OperationException e)
+ {
+ trx.rollback();
+ importProductEx = importProductEx.append(" Product "+ name + " at line " + lineNumber + " not imported. ").append(e.getMessage());
+ isProductImported = false;
+ csv.append(s).append("\"\n");
+ }
+ finally
+ {
+ trx.close();
+ }
+ list.add(pbean);
+
+ }
+ if (!isProductImported)
+ {
+ filename = RandomStringGenerator.randomstring() + ".csv";
+ String filepath = ReportManager.getReportPath(filename);
+ try
+ {
+ FileWriter writer = new FileWriter(filepath);
+ writer.write(csv.toString());
+ writer.flush();
+ writer.close();
+ }
+ catch (IOException e1)
+ {
+ throw new OperationException(e1);
+ }
+ throw new ProductNotImportedException(filename+importProductEx.toString());
+ }
+ }
+ catch (FileNotFoundException e)
+ {
+ e.printStackTrace();
+ }
+ catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+ finally
+ {
+ if (is != null)
+ {
+ try
+ {
+ is.close();
+ }
+ catch(Exception ex)
+ {}
+ }
+
+ if (bis != null)
+ {
+ try
+ {
+ bis.close();
+ }
+ catch(Exception ex)
+ {}
+ }
+
+ if (reader != null)
+ {
+ try
+ {
+ reader.close();
+ }
+ catch(Exception ex)
+ {}
+ }
+ }
+ return list;
+ }
+
+ public static void importStockMStorage(Properties ctx,int m_product_id,BigDecimal qty,String trxName) throws OperationException
+ {
+
+ int warehouseId=POSTerminalManager.getWarehouse(ctx).get_ID();
+
+ if (warehouseId==0)
+ throw new OperationException("no warehouse for this org");
+
+ MWarehouse warehouse = new MWarehouse(ctx,warehouseId,null);
+ int locatorId = warehouse.getDefaultLocator().get_ID();
+
+ MStorage st = MStorage.getCreate(ctx, locatorId, m_product_id, 0, trxName);
+ st.setQtyOnHand(st.getQtyOnHand().add(qty));
+ st.setQtyReserved(new BigDecimal(0));
+ st.setQtyOrdered(new BigDecimal(0));
+
+ PoManager.save(st);
+
+ }
+
+ public static void importStockMTransaction(Properties ctx,int m_product_id,BigDecimal qty, String trxName) throws OperationException
+ {
+
+ int warehouseId=POSTerminalManager.getWarehouse(ctx).get_ID();
+
+ if (warehouseId==0)
+ throw new OperationException("no warehouse for this org");
+
+ MWarehouse warehouse = new MWarehouse(ctx,warehouseId,null);
+
+ MTransaction trans = new MTransaction(ctx,0,trxName);
+
+ trans.setM_Product_ID(m_product_id);
+ trans.setM_Locator_ID(warehouse.getDefaultLocator().get_ID());
+ trans.setMovementQty(qty);
+ trans.setMovementType(MTransaction.MOVEMENTTYPE_InventoryIn);
+ trans.setMovementDate(new Timestamp(System.currentTimeMillis()));
+
+ PoManager.save(trans);
+
+ }
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/businesslogic/InvoiceManager.java b/posterita/posterita/src/main/org/posterita/businesslogic/InvoiceManager.java
new file mode 100644
index 0000000000..4f3c41681b
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/businesslogic/InvoiceManager.java
@@ -0,0 +1,1124 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Created on 05-Jul-2005 by alok
+ *
+ */
+package org.posterita.businesslogic;
+
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.Properties;
+
+import org.compiere.model.MBPartner;
+import org.compiere.model.MBPartnerLocation;
+import org.compiere.model.MCharge;
+import org.compiere.model.MClient;
+import org.compiere.model.MCurrency;
+import org.compiere.model.MDocType;
+import org.compiere.model.MInOut;
+import org.compiere.model.MInvoice;
+import org.compiere.model.MInvoiceLine;
+import org.compiere.model.MLocation;
+import org.compiere.model.MOrder;
+import org.compiere.model.MOrderLine;
+import org.compiere.model.MOrg;
+import org.compiere.model.MPInstance;
+import org.compiere.model.MPInstancePara;
+import org.compiere.model.MProcess;
+import org.compiere.model.MProduct;
+import org.compiere.model.MTax;
+import org.compiere.print.ReportEngine;
+import org.compiere.process.DocumentEngine;
+import org.compiere.process.InvoiceGenerate;
+import org.compiere.process.ProcessInfo;
+import org.compiere.process.ProcessInfoParameter;
+import org.compiere.util.DB;
+import org.compiere.util.Env;
+import org.compiere.util.Trx;
+import org.posterita.Constants;
+import org.posterita.beans.AttributeValuesPair;
+import org.posterita.beans.CommandBean;
+import org.posterita.beans.InvoiceHistoryBean;
+import org.posterita.beans.WebDocumentBean;
+import org.posterita.beans.WebDocumentHeaderBean;
+import org.posterita.beans.WebInvoiceLineBean;
+import org.posterita.beans.WebOrderLineBean;
+import org.posterita.businesslogic.administration.ProductManager;
+import org.posterita.businesslogic.core.ChargeManager;
+import org.posterita.core.UDIMap;
+import org.posterita.exceptions.DataException;
+import org.posterita.exceptions.NoOrderLineSelectedException;
+import org.posterita.exceptions.OperationException;
+import org.posterita.formatter.PrintFormatter;
+import org.posterita.order.UDIOrderTypes;
+import org.posterita.util.PoManager;
+
+public class InvoiceManager extends AbstractDocumentManager
+{
+
+ private static final String CUSTOMER_INVOICE = "Customer Invoice";
+ private static final String VENDOR_INVOICE = "Vendor Invoice";
+
+ public static MInvoice createCustomerInvoice(Properties ctx, int salesOrderId, String trxName) throws OperationException
+ {
+ MOrder so = new MOrder(ctx, salesOrderId, trxName);
+
+ MOrderLine lines[] = so.getLines();
+
+ Integer soLinesIds[] = new Integer[lines.length];
+
+ if (soLinesIds.length == 0)
+ throw new NoOrderLineSelectedException("No order line selected");
+
+ MInvoice returnInvoice = null;
+
+ for (int i = 0; i 0)
+ {
+ throw new OperationException("Orderline already invoiced!");
+ }
+
+
+ try
+ {
+ boolean isSOTrx = salesOrder.isSOTrx();
+
+ if (!isSOTrx)
+ throw new OperationException("Customer Invoice should be created from sales Order");
+
+ MDocType [] docType;
+
+ if (salesOrder.getOrderType().equals(UDIOrderTypes.CUSTOMER_RETURN_ORDER.getOrderType()))
+ docType = MDocType.getOfDocBaseType(ctx,MDocType.DOCBASETYPE_ARCreditMemo);
+ else
+ docType = MDocType.getOfDocBaseType(ctx,MDocType.DOCBASETYPE_ARInvoice);
+
+ Env.setContext(ctx, "#M_Warehouse_ID", salesOrder.getM_Warehouse_ID());
+ invoice = new MInvoice(salesOrder,docType[0].get_ID(),salesOrder.getDateOrdered());
+
+
+ invoice.setTotalLines(orderLine.getLineNetAmt());
+ invoice.setGrandTotal(orderLine.getLineNetAmt());
+ invoice.setIsSOTrx(true);
+ invoice.setC_Order_ID(salesOrder.get_ID());
+
+ invoice.setPaymentRule(salesOrder.getPaymentRule());
+ invoice.setC_DocTypeTarget_ID(docType[0].get_ID());
+ invoice.setC_BPartner_ID(salesOrder.getC_BPartner_ID());
+ invoice.setC_Currency_ID(salesOrder.getC_Currency_ID());
+ invoice.setIsTaxIncluded(false);
+
+ PoManager.save(invoice);
+
+ MTax tax;
+
+ MInvoiceLine invoiceLine = new MInvoiceLine(invoice);
+ invoiceLine.setOrderLine(orderLine);
+ invoiceLine.setC_OrderLine_ID(orderLine.get_ID());
+ invoiceLine.setQtyEntered(orderLine.getQtyEntered());
+ invoiceLine.setM_AttributeSetInstance_ID(orderLine.getM_AttributeSetInstance_ID());
+ if(orderLine.getQtyInvoiced().equals (new BigDecimal(1)))
+ {
+ invoiceLine.setQty(0);
+ invoiceLine.setQtyEntered(new BigDecimal(0));
+ invoiceLine.setQtyInvoiced(new BigDecimal(0));
+ }
+
+ else
+ {
+ tax = new MTax(ctx,orderLine.getC_Tax_ID(),null);
+ invoiceLine.setQty(orderLine.getQtyEntered());
+ invoiceLine.setQtyEntered(orderLine.getQtyEntered());
+ invoiceLine.setQtyInvoiced(orderLine.getQtyEntered());
+ invoiceLine.setTaxAmt(tax.calculateTax(orderLine.getLineNetAmt(),false,3));
+ invoiceLine.setLineNetAmt(orderLine.getLineNetAmt());
+ invoiceLine.setLineTotalAmt(new BigDecimal(orderLine.getLineNetAmt().intValue()+tax.calculateTax(orderLine.getLineNetAmt(),false,3).intValue()));
+ }
+ PoManager.save(invoiceLine);
+ }
+ catch(OperationException e)
+ {
+ throw e;
+ }
+ return invoice;
+ }
+
+ public static MInvoice createVendorInvoice(Properties ctx, int purchaseOrderId,String trxName) throws OperationException
+ {
+ MOrder po = new MOrder(ctx, purchaseOrderId, trxName);
+
+ MOrderLine lines[] = po.getLines();
+
+ Integer poLinesIds[] = new Integer[lines.length];
+
+ for (int i = 0; i list = new ArrayList();
+
+
+ PreparedStatement pstmt = DB.prepareStatement(sql,null);
+
+ ResultSet rs = null;
+
+ try
+ {
+ rs = pstmt.executeQuery();
+ InvoiceHistoryBean bean;
+ while(rs.next())
+ {
+ bean = new InvoiceHistoryBean();
+ bean.setInvoiceId(Integer.valueOf(rs.getInt(1)));
+ bean.setPartnerName(rs.getString(2));
+ bean.setPartnerId(Integer.valueOf(rs.getInt(3)));
+ bean.setDocumentNo(rs.getString(4));
+ bean.setDocStatus(UDIMap.docStatusMap.get(rs.getString(5)));
+ bean.setDocStatusCode(rs.getString(5));
+ bean.setOrderId(Integer.valueOf(rs.getInt(6)));
+ bean.setDateInvoiced(rs.getTimestamp(7));
+ bean.setGrandTotal(Integer.valueOf(rs.getInt(8)));
+ bean.setIsPaid(rs.getString(9));
+ list.add(bean);
+
+ }
+
+ rs.close();
+ }
+ catch (SQLException e)
+ {
+ throw new SQLException();
+ }
+ finally
+ {
+ try
+ {
+ pstmt.close();
+ }
+ catch(Exception e)
+ {}
+
+ pstmt = null;
+ }
+
+ return list;
+
+ }
+
+ public static ArrayList viewInvoice(Properties ctx, Integer invoiceId) throws OperationException
+ {
+ if (invoiceId.intValue() == 0)
+ throw new OperationException("cannot view invoice with id 0");
+
+ MInvoice invoice = new MInvoice(ctx, invoiceId.intValue(), null);
+
+ if (invoice.get_ID() == 0)
+ throw new OperationException("cannot view invoice with id 0");
+
+ ArrayList invoiceLines = retrieveInvoiceLineValues(ctx, invoice.getLines());
+
+ return invoiceLines;
+
+ }
+ public static ArrayList retrieveInvoiceLineValues(Properties ctx, MInvoiceLine[] lines) throws OperationException
+ {
+ MInvoiceLine line;
+ MProduct product;
+ AttributeValuesPair attributeValuesPair;
+ WebInvoiceLineBean invoiceLinebean;
+ ArrayList invoiceLines = new ArrayList();
+ for (int i = 0; i < lines.length; i++)
+ {
+ line = lines[i];
+ product = new MProduct(ctx, line.getM_Product_ID(), null);
+ attributeValuesPair = AttributeValuesManager.retrieveAttributeValues(ctx, product.getM_AttributeSetInstance_ID());
+ invoiceLinebean = new WebInvoiceLineBean();
+ invoiceLinebean.setAttributeValuesPair(attributeValuesPair);
+ invoiceLinebean.setSerno(OrderReferenceManager.getSerno(ctx, line.getM_AttributeSetInstance_ID()));
+ invoiceLinebean.setLineNetAmt(line.getLineNetAmt());
+ invoiceLinebean.setLineTotalAmt(line.getLineTotalAmt());
+ invoiceLinebean.setTaxAmt(line.getTaxAmt());
+ invoiceLines.add(invoiceLinebean);
+ }
+
+ return invoiceLines;
+
+ }
+
+ public static WebDocumentBean getWebInvoiceBean(MInvoice invoice) throws OperationException, DataException
+ {
+ if (invoice == null)
+ throw new OperationException("Invalid operation invoice is null");
+
+ if (invoice.get_ID() == 0)
+ throw new OperationException("You have deleted this invoice. You cannot view this invoice.");
+
+ WebDocumentBean bean = new WebDocumentBean();
+
+ bean.setInvoiceId(Integer.valueOf(invoice.get_ID()));
+
+ Properties ctx = invoice.getCtx();
+
+ MOrg myOrg = OrganisationManager.getMyOrg(ctx);
+ MBPartner me = new MBPartner(ctx, myOrg.getLinkedC_BPartner_ID(null), null);
+ bean.setMe(me);
+
+ // MOrg orderOrg = new MOrg(ctx, invoice.getAD_Org_ID(), null);
+
+ int currencyId = invoice.getC_Currency_ID();
+ MCurrency currency = new MCurrency(ctx,currencyId,null);
+ bean.setCurrencySymbole(currency.getCurSymbol());
+
+
+ /*if (orderOrg.getLinkedC_BPartner_ID() != myOrg.getLinkedC_BPartner_ID())
+ throw new DocumentDoesNotBelongToYouException("This invoice does not belong to you. You do not have access to it.");
+ */
+ MBPartnerLocation meLocation[] = MBPartnerLocation.getForBPartner(ctx,me.get_ID());
+ if (meLocation.length ==0)
+ throw new OperationException("No location has been set for your organisation. Please ask your administrator to set one for you");
+
+
+ MLocation location = new MLocation(ctx, meLocation[0].getC_Location_ID(), null);
+
+ if (meLocation == null)
+ throw new OperationException("You must have a location set for your business partner, Please ask your administrator to set one for you");
+
+ bean.setMeLocation(location);
+
+ MBPartner you = new MBPartner(ctx, invoice.getC_BPartner_ID(), null);
+ bean.setYou(you);
+
+ MBPartnerLocation youBPLocation[] = MBPartnerLocation.getForBPartner(ctx,you.get_ID());
+ MLocation youLocation = new MLocation(ctx, youBPLocation[0].getC_Location_ID(), null);
+
+ bean.setYoubpLocation(youBPLocation[0]);
+ bean.setYouLocation(youLocation);
+
+ ArrayList lines = populateInvoiceLines(ctx , invoice.getLines());
+ bean.setLines(lines);
+ bean = calculateInvoiceTotals(lines, bean);
+
+
+ WebDocumentHeaderBean headerBean = createWebDocumentHeader(ctx, invoice.getAD_Org_ID(), invoice.getC_BPartner_ID(), invoice.getDocStatus(), invoice.isSOTrx(),invoice.getPaymentRule());
+ headerBean.setDocumentHeader(getDocumentHeader(invoice));
+
+
+ int invoiceId = invoice.get_ID();
+
+ int[] shipmentIds = MInOut.getAllIDs(MInOut.Table_Name, "c_invoice_id=" + invoiceId, null);
+
+ if (shipmentIds.length == 0)
+ headerBean.setShipped("No");
+ else
+ headerBean.setShipped("Yes");
+
+ bean.setHeaderBean(headerBean);
+
+ bean.setInvoice(invoice);
+
+ MOrder order = new MOrder(ctx, invoice.getC_Order_ID(), null);
+ bean.setOrder(order);
+
+ CommandBean cmdBean = new CommandBean();
+ if (!invoice.isSOTrx())
+ cmdBean = getVendorInvoiceWebCommands(invoice);
+ else
+ cmdBean = getCustomerInvoiceWebCommands(invoice);
+
+ bean.setSimpleCommand(cmdBean.getSimpleCommand());
+ bean.setComplexCommand(cmdBean.getComplexCommand());
+
+
+ return bean;
+ }
+
+ public static String getDocumentHeader(MInvoice invoice)
+ {
+ if (invoice.isSOTrx())
+ return CUSTOMER_INVOICE;
+
+ return VENDOR_INVOICE;
+ }
+
+
+ private static WebDocumentBean calculateInvoiceTotals(ArrayList webOrderLineList, WebDocumentBean webInvoiceLineBean)
+ {
+ Iterator iter = webOrderLineList.iterator();
+
+ WebInvoiceLineBean bean;
+
+ BigDecimal totalLines = new BigDecimal(0);
+ BigDecimal totalTax = new BigDecimal(0);
+ BigDecimal grandTotal;
+
+ BigDecimal roundedTotalLines;
+ BigDecimal roundedTotalTax;
+ BigDecimal roundedGrandTotal;
+ while(iter.hasNext())
+ {
+ bean = (WebInvoiceLineBean) iter.next();
+ totalLines = totalLines.add(bean.getLineNetAmt());
+ totalTax = totalTax.add(bean.getTaxAmt());
+ }
+
+ grandTotal = totalLines.add(totalTax);
+
+
+ roundedTotalLines = round(totalLines, 2);
+ roundedTotalTax = round(totalTax, 2);
+
+ roundedGrandTotal = round(grandTotal, 2);
+
+ webInvoiceLineBean.setTotalLines(roundedTotalLines);
+ webInvoiceLineBean.setTotalTax(roundedTotalTax);
+ webInvoiceLineBean.setGrandTotal(roundedGrandTotal);
+
+ return webInvoiceLineBean;
+ }
+ private static BigDecimal round(BigDecimal number, int decimalPlaces)
+ {
+ BigDecimal roundedNumber = number.setScale(decimalPlaces, BigDecimal.ROUND_HALF_UP);
+
+ return roundedNumber;
+ }
+
+ private static ArrayList populateInvoiceLines(Properties ctx, MInvoiceLine[] lines) throws OperationException
+ {
+ MInvoiceLine line;
+ MProduct product;
+ AttributeValuesPair attributeValuesPair;
+ ArrayList invoiceLines = new ArrayList();
+ for (int i = 0; i < lines.length; i++)
+ {
+ line = lines[i];
+ product = new MProduct(ctx, line.getM_Product_ID(), null);
+ attributeValuesPair = AttributeValuesManager.retrieveAttributeValues(ctx, product.getM_AttributeSetInstance_ID());
+ WebInvoiceLineBean invoiceLineBean = new WebInvoiceLineBean();
+ invoiceLineBean.setAttributeValuesPair(attributeValuesPair);
+
+ BigDecimal roundedLineNetAmount = round(line.getLineNetAmt(), 2);
+
+ //line tax amount
+ BigDecimal lineTaxAmount = getLineTaxAmt(line.getCtx(), line.getLineNetAmt(), line.getC_Tax_ID(), line.get_ID());
+ BigDecimal roundedTaxAmount = round(lineTaxAmount, 2);
+ invoiceLineBean.setTaxAmt(roundedTaxAmount);
+
+
+ //lineTotalAmount = lineNetAmount + lineTaxAmount
+ BigDecimal lineTotalAmount = line.getLineNetAmt().add(lineTaxAmount);
+ BigDecimal roundedLineTotalAmount = round(lineTotalAmount, 2);
+
+ invoiceLineBean.setLineTotalAmt(roundedLineTotalAmount);
+ invoiceLineBean.setQtyOrdered(line.getQtyEntered());
+
+ invoiceLineBean.setLineNetAmt(roundedLineNetAmount);
+ invoiceLineBean.setPriceActual(line.getPriceActual());
+
+ invoiceLineBean.setProductId(Integer.valueOf(line.getM_Product_ID()));
+ invoiceLineBean.setOrderLineId(Integer.valueOf(line.get_ID()));
+
+ invoiceLineBean.setSerno(getSerno(ctx, line.getM_AttributeSetInstance_ID()));
+
+ if(line.getM_Product_ID() == 0)
+ {
+ if(line.getC_Charge_ID() != 0)
+ {
+ MCharge charge = ChargeManager.loadCharge(ctx, line.getC_Charge_ID(), null);
+ invoiceLineBean.setDescription(charge.getName());
+ }
+ else
+ invoiceLineBean.setDescription("Adjustment product");
+ }
+ else
+ invoiceLineBean.setDescription(ProductManager.getProductName(ctx, line.getM_Product_ID()));
+ invoiceLines.add(invoiceLineBean);
+ }
+
+ return invoiceLines;
+ }
+
+ private static CommandBean getVendorInvoiceWebCommands(MInvoice invoice) throws OperationException
+ {
+
+ if (invoice.isSOTrx())
+ throw new OperationException("Invoice should be a vendor Invoice");
+
+
+ String[] simpleCommands = new String[0];
+ String[] complexCommands = new String[0];
+
+ CommandBean bean = new CommandBean();
+ bean.setSimpleCommand(simpleCommands);
+ bean.setComplexCommand(complexCommands);
+ return bean;
+ }
+
+ private static CommandBean getCustomerInvoiceWebCommands(MInvoice invoice) throws OperationException, DataException
+ {
+
+ if (!invoice.isSOTrx())
+ throw new OperationException("Invoice should be a customer invoice");
+
+
+ String[] simpleCommands = null;
+ String[] complexCommands = null;
+
+ CommandBean bean = new CommandBean();
+
+ if (invoice.getDocStatus().equals(DocumentEngine.STATUS_Drafted))
+ {
+ simpleCommands = new String[]{Constants.INVOICE_ACTION_COMPLETE};
+ complexCommands = new String[]{Constants.INVOICE_ACTION_CANCEL};
+ }
+
+ if (invoice.getDocStatus().equals(DocumentEngine.STATUS_Voided))
+ {
+ complexCommands = new String[]{Constants.INVOICE_ACTION_DELETE};
+ }
+
+ if (invoice.getDocStatus().equals(DocumentEngine.STATUS_Completed))
+ {
+ bean = getCIWebCommands(invoice);
+ return bean;
+ }
+
+
+ bean.setSimpleCommand(simpleCommands);
+ bean.setComplexCommand(complexCommands);
+ return bean;
+ }
+
+ public static CommandBean getCIWebCommands(MInvoice invoice) throws OperationException, DataException
+ {
+ MOrder order = new MOrder(invoice.getCtx(), invoice.getC_Order_ID(), null);
+
+ int[] docTypes = MDocType.getAllIDs(MDocType.Table_Name, " ad_client_id="+ Env.getAD_Client_ID(invoice.getCtx()) + " and DOCSUBTYPESO='" + MDocType.DOCSUBTYPESO_POSOrder+ "'", null );
+
+ String simpleCommands[] = null;
+ String complexCommands[] = null;
+
+ //POS order
+ if (order.getC_DocType_ID() == docTypes[0])
+ {
+ simpleCommands = new String[]{};
+ complexCommands = new String[]{};
+ }
+
+ if (invoice.isPaid() && (!MinOutManager.isShipped(invoice.getCtx(), invoice)))
+ {
+ int[] shipmentIds = MInOut.getAllIDs(MInOut.Table_Name, "c_invoice_id=" + invoice.get_ID(), null);
+
+ if (shipmentIds.length == 0)
+ simpleCommands = new String[]{Constants.MINOUT_ACTION_SHIP};
+ else
+ if (shipmentIds.length > 1)
+ throw new DataException("This invoice has been shipped more than once!");
+
+ }
+ if (!invoice.isPaid() && (!MinOutManager.isShipped(invoice.getCtx(), invoice)))
+ {
+ simpleCommands = new String[] {Constants.INVOICE_ACTION_PAID, Constants.INVOICE_ACTION_PAID_AND_SHIP};
+ }
+
+ CommandBean bean = new CommandBean();
+ bean.setSimpleCommand(simpleCommands);
+ bean.setComplexCommand(complexCommands);
+
+ return bean;
+ }
+
+ public static MInvoice deleteInvoice(Properties ctx, MInvoice invoice) throws OperationException
+ {
+ invoice.setIsActive(false);
+ PoManager.save(invoice);
+
+ return invoice;
+ }
+
+ public static boolean allOrderLinesInvoiced(Properties ctx, MOrder order)
+ {
+ MOrderLine[] lines = order.getLines();
+
+ MOrderLine line;
+ for (int i = 0; i < lines.length; i ++)
+ {
+ line = lines[i];
+
+ if (!line.getQtyInvoiced().equals(line.getQtyOrdered()))
+ return false;
+
+ }
+
+ return true;
+ }
+
+ public static MInvoice voidInvoice(Properties ctx, MInvoice invoice) throws OperationException
+ {
+
+ if (!invoice.isSOTrx())
+ throw new OperationException("Only voiding of customer invoice is currently supported.");
+
+ if (!invoice.getDocStatus().equals(DocumentEngine.STATUS_Drafted))
+ throw new OperationException("The system only supports voiding of DRAFTED Invoice.");
+
+ //we need to force void here because invoice has already been processed
+ //invoice.isProcessed=true
+ forceVoid(ctx, invoice);
+
+ invoice = new MInvoice(ctx, invoice.get_ID(), invoice.get_TrxName());
+
+ return invoice;
+ }
+
+ public static void forceVoid(Properties ctx, MInvoice invoice) throws OperationException
+ {
+ PreparedStatement pstmt1 = null;
+ PreparedStatement pstmt2 = null;
+
+ String sql = "update C_Invoice set DOCSTATUS=" + "'"
+ + DocumentEngine.STATUS_Voided + "'"
+ + " where AD_CLIENT_ID=" + Env.getAD_Client_ID(ctx)
+ + " and C_INVOICE_ID=" + invoice.get_ID();
+
+ String sql2 = "update C_Invoice set DOCACTION=" + "'"
+ + DocumentEngine.ACTION_None + "'"
+ + " where AD_CLIENT_ID=" + Env.getAD_Client_ID(ctx)
+ + " and C_INVOICE_ID=" + invoice.get_ID();
+
+ pstmt1 = DB.prepareStatement(sql,invoice.get_TrxName());
+ pstmt2 = DB.prepareStatement(sql2,invoice.get_TrxName());
+
+ try
+ {
+ pstmt1.executeUpdate();
+ pstmt2.executeUpdate();
+ }
+ catch (SQLException e)
+ {
+ throw new OperationException(e.getMessage());
+ }
+ finally
+ {
+ try
+ {
+ pstmt1.close();
+ pstmt2.close();
+ }
+ catch (Exception e)
+ {}
+
+ pstmt1 = null;
+ pstmt2 = null;
+ }
+
+ }
+
+ public static int[] getInvoiceIdsForOrder(Properties ctx, int orderId, String trxName)
+ {
+ String whereClause = "isACTIVE='Y' and C_Order_ID=" + orderId;
+ int invoiceIds[] = MInvoice.getAllIDs(MInvoice.Table_Name, whereClause, trxName);
+ return invoiceIds;
+ }
+
+ public static MInvoice loadInvoice(Properties ctx, int invoiceId, String trxName) throws OperationException
+ {
+ MInvoice invoice = new MInvoice(ctx, invoiceId, trxName);
+ if(invoice.get_ID() == 0)
+ throw new OperationException("Could not load invoice with id: " + invoiceId);
+
+ return invoice;
+ }
+ public static ArrayList populateInvoiceLines(Properties ctx, MInvoice invoice,boolean abbr) throws OperationException
+ {
+ MInvoiceLine [] lines=invoice.getLines();
+ MInvoiceLine line;
+ MProduct product;
+ // AttributeValuesPair attributeValuesPair;
+ WebOrderLineBean orderLineBean;
+ BigDecimal qty = Env.ZERO;
+
+
+ ArrayList orderLines = new ArrayList();
+ for (int i = 0; i < lines.length; i++)
+ {
+ line = lines[i];
+
+ product = new MProduct(ctx, line.getM_Product_ID(), null);
+
+ int priceScale = line.getLineNetAmt().scale();
+
+ orderLineBean = new WebOrderLineBean();
+ orderLineBean.setLineNetAmt(line.getLineNetAmt());
+ BigDecimal lineTaxAmount = POSManager.getLineTaxAmt(line.getCtx(), line.getLineNetAmt(), line.getC_Tax_ID(),line.getQtyEntered());
+ lineTaxAmount = lineTaxAmount.setScale(priceScale, RoundingMode.HALF_UP);
+ orderLineBean.setTaxAmt(lineTaxAmount);
+ BigDecimal lineTotalAmount = line.getLineNetAmt().add(orderLineBean.getTaxAmt());
+ lineTotalAmount = lineTotalAmount.setScale(priceScale, RoundingMode.HALF_UP);
+ orderLineBean.setLineTotalAmt(lineTotalAmount);
+
+ orderLineBean.setProductId(Integer.valueOf(line.getM_Product_ID()));
+
+
+ if (line.getM_Product_ID() == 0)
+ {
+ if(line.getC_Charge_ID() != 0)
+ {
+ MCharge charge = ChargeManager.loadCharge(ctx, line.getC_Charge_ID(), null);
+ orderLineBean.setProductName(charge.getName());
+ }
+ else
+ throw new OperationException("Unknown Order line type with id: " + line.get_ID());
+ }
+ else
+ {
+ if(abbr)
+ orderLineBean.setProductName(new PrintFormatter().format(product).toString());
+ else
+ orderLineBean.setProductName(product.getName().replaceAll("~"," "));
+ orderLineBean.setDescription(product.getDescription());
+ }
+
+ orderLineBean.setOrderLineId(Integer.valueOf(line.get_ID()));
+ orderLineBean.setIsinvoiced(Boolean.valueOf(false));
+ orderLineBean.setIsQtyReserved(Boolean.valueOf(true));
+ qty= qty.add(line.getQtyEntered());
+ orderLineBean.setQtyTotal(qty);
+
+ orderLineBean.setQtyOrdered(line.getQtyEntered());
+ orderLineBean.setGrandTotal(invoice.getGrandTotal());
+
+
+
+
+ orderLines.add(orderLineBean);
+
+ }
+
+ return orderLines;
+ }
+
+ public static void printInvoice(Properties ctx,MInvoice invoice) throws OperationException
+ {
+ PrintManager.print(ctx,ReportEngine.INVOICE,invoice.get_ID());
+ }
+
+ /**
+ *
+ * @param ctx
+ * @param dateInvoiced
+ * @param orgId
+ * @param bPartnerId
+ * @param orderId
+ * @param consolidateDoc
+ * @param docAction
+ * @param trx
+ * @throws InstantiationException
+ * @throws IllegalAccessException
+ * @throws ClassNotFoundException
+ */
+ public static void generateInvoices(Properties ctx, Timestamp dateInvoiced, int orgId,
+ int bPartnerId, int orderId, boolean isConsolidateDoc, String docAction, Trx trx)
+ throws InstantiationException, IllegalAccessException, ClassNotFoundException
+ {
+ String trxName = trx.getTrxName();
+ int processId = MProcess.getProcess_ID("C_Invoice_Generate", trxName);
+ MProcess process = new MProcess(ctx, processId, trxName);
+
+ MPInstance processInstance = new MPInstance(ctx, processId, 0);
+ processInstance.save(trxName);
+
+ MPInstancePara paramDateInvoiced = new MPInstancePara(processInstance, 10);
+ paramDateInvoiced.setParameterName("DateInvoiced");
+ paramDateInvoiced.setP_Date(dateInvoiced);
+ paramDateInvoiced.save(trxName);
+
+ MPInstancePara paramOrgId = new MPInstancePara(processInstance, 20);
+ paramOrgId.setParameterName("AD_Org_ID");
+ paramOrgId.setP_Number(orgId);
+ paramOrgId.save(trxName);
+
+ MPInstancePara paramBPartnerId = new MPInstancePara(processInstance, 30);
+ paramBPartnerId.setParameterName("C_BPartner_ID");
+ paramBPartnerId.setP_Number(bPartnerId);
+ paramBPartnerId.save(trxName);
+
+ MPInstancePara paramOrderId = new MPInstancePara(processInstance, 40);
+ paramOrderId.setParameterName("C_Order_ID");
+ paramOrderId.setP_Number(orderId);
+ paramOrderId.save(trxName);
+
+ MPInstancePara paramConsolidateDoc = new MPInstancePara(processInstance, 50);
+ paramConsolidateDoc.setParameterName("ConsolidateDocument");
+ paramConsolidateDoc.setP_String(isConsolidateDoc?"Y":"N");
+ paramConsolidateDoc.save(trxName);
+
+ MPInstancePara paramDocAction = new MPInstancePara(processInstance, 60);
+ paramDocAction.setParameterName("DocAction");
+ paramDocAction.setP_String(docAction);
+ paramDocAction.save(trxName);
+
+ ProcessInfo pi = new ProcessInfo(process.getDescription(), processId);
+ ProcessInfoParameter piDateInvoiced = new ProcessInfoParameter("DateInvoiced", dateInvoiced, null, null, null);
+ ProcessInfoParameter piOrgId = new ProcessInfoParameter("AD_Org_ID", orgId, null, null, null);
+ ProcessInfoParameter piBPartnerId = new ProcessInfoParameter("C_BPartner_ID", bPartnerId, null, null, null);
+ ProcessInfoParameter piOrderId = new ProcessInfoParameter("C_Order_ID", orderId, null, null, null);
+ ProcessInfoParameter piConsolidateDoc = new ProcessInfoParameter("ConsolidateDocument", isConsolidateDoc?"Y":"N", null, null, null);
+ ProcessInfoParameter piDocAction = new ProcessInfoParameter("DocAction", docAction, null, null, null);
+
+ ProcessInfoParameter[] piParameters = new ProcessInfoParameter[]{piDateInvoiced, piOrgId, piBPartnerId, piOrderId, piConsolidateDoc, piDocAction};
+ pi.setParameter(piParameters);
+ pi.setAD_PInstance_ID(processInstance.getAD_PInstance_ID());
+ pi.setAD_Process_ID(processInstance.getAD_Process_ID());
+
+ ProcessManager.startProcess(ctx, InvoiceGenerate.class.getName(), pi, trx);
+ }
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/businesslogic/LocationManager.java b/posterita/posterita/src/main/org/posterita/businesslogic/LocationManager.java
new file mode 100644
index 0000000000..e348fefa1b
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/businesslogic/LocationManager.java
@@ -0,0 +1,133 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on 22-Jul-2005 by alok
+ *
+ */
+package org.posterita.businesslogic;
+
+import java.util.Properties;
+
+import org.compiere.model.MBPartner;
+import org.compiere.model.MBPartnerLocation;
+import org.compiere.model.MLocation;
+import org.posterita.exceptions.OperationException;
+import org.posterita.lib.UdiConstants;
+import org.posterita.util.PoManager;
+
+
+public class LocationManager
+{
+
+
+ public static MLocation saveLocation(Properties ctx, int orgId, int locationId, String address1,String address2, String postalAddress1, Integer regionId, String city,int countryId, String trxName) throws OperationException
+ {
+ MLocation location = null;
+
+ if (locationId == 0)
+ location = new MLocation(ctx,locationId,trxName);
+ else
+ location = loadLocation(ctx, locationId, trxName);
+
+ location.setAddress1(address1);
+ location.setAddress2(address2);
+ location.setCity(city);
+ location.setPostal_Add(postalAddress1);
+ location.setC_Country_ID(countryId);
+ location.setAD_Org_ID(orgId);
+ PoManager.save(location);
+
+ return location;
+ }
+
+
+ public static MLocation createLocation(Properties ctx, int orgId, String address1,String address2, String postalAddress1, String city,int regionId, int countryId, String trxName) throws OperationException
+ {
+ MLocation location = new MLocation(ctx,0,trxName);
+ location.setAD_Org_ID(orgId);
+ location.setAddress1(address1);
+ location.setAddress2(address2);
+ location.setCity(city);
+ location.setPostal_Add(postalAddress1);
+ location.setC_Region_ID(regionId);
+ location.setC_Country_ID(countryId);
+ PoManager.save(location);
+
+ return location;
+ }
+
+ public static MLocation editLocation(Properties ctx,int locationId,String address1,String postalAddress1, Integer regionId, String city, String trxName) throws OperationException
+ {
+
+ if(locationId<=0)
+ throw new OperationException("Location does not exist");
+
+ MLocation location;
+
+ try
+ {
+ location = new MLocation(ctx,locationId,trxName);
+
+ if(location==null)
+ throw new OperationException("Location does not exist");
+
+
+ location.setAddress1(address1);
+ location.setCity(city);
+ location.setPostal_Add(postalAddress1);
+
+ if(regionId!=null)
+ location.setC_Region_ID(regionId);
+
+ PoManager.save(location);
+
+ }
+ catch(OperationException e)
+ {
+ throw new OperationException("Could not edit location!!");
+ }
+
+
+ return location;
+
+ }
+
+ public static MBPartnerLocation createDefaultBPLocation(Properties ctx, MBPartner bpartner) throws OperationException
+ {
+ MLocation location = LocationManager.createLocation(ctx, bpartner.getAD_Org_ID(), "","","", "",0, UdiConstants.COUNTRY_MAURITIUS, null);
+
+
+ MBPartnerLocation bplocation = new MBPartnerLocation(bpartner);
+ bplocation.setC_Location_ID(location.get_ID());
+ PoManager.save(bplocation);
+
+ bpartner.setPrimaryC_BPartner_Location_ID(bplocation.get_ID());
+ PoManager.save(bpartner);
+
+ return bplocation;
+ }
+
+ public static MLocation loadLocation(Properties ctx, int locationId, String trxName) throws OperationException
+ {
+ MLocation location = new MLocation(ctx, locationId, trxName);
+ if(location.get_ID() == 0)
+ throw new OperationException("Could not load location with id: " + locationId);
+ return location;
+ }
+
+}
diff --git a/posterita/posterita/src/main/org/posterita/businesslogic/LoginManager.java b/posterita/posterita/src/main/org/posterita/businesslogic/LoginManager.java
new file mode 100644
index 0000000000..0f2c1ea5a6
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/businesslogic/LoginManager.java
@@ -0,0 +1,473 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ **/
+
+package org.posterita.businesslogic;
+
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.Properties;
+import java.util.Vector;
+
+import org.compiere.model.MClient;
+import org.compiere.model.MOrg;
+import org.compiere.model.MUser;
+import org.compiere.util.DB;
+import org.compiere.util.Env;
+import org.compiere.util.KeyNamePair;
+import org.compiere.util.WebInfo;
+import org.compiere.util.WebUser;
+import org.posterita.beans.ChangePasswordBean;
+import org.posterita.beans.LoginBean;
+import org.posterita.beans.OrgUsersBean;
+import org.posterita.beans.UserBean;
+import org.posterita.businesslogic.administration.RoleManager;
+import org.posterita.businesslogic.administration.UserManager;
+import org.posterita.exceptions.DataException;
+import org.posterita.exceptions.DuplicatePINException;
+import org.posterita.exceptions.EmailNotFoundException;
+import org.posterita.exceptions.InvalidPINException;
+import org.posterita.exceptions.InvalidPasswordLengthException;
+import org.posterita.exceptions.InvalidRoleException;
+import org.posterita.exceptions.NotLoggedInException;
+import org.posterita.exceptions.OperationException;
+import org.posterita.exceptions.SystemException;
+import org.posterita.exceptions.UserInactiveException;
+import org.posterita.exceptions.UserNotFoundException;
+import org.posterita.exceptions.WrongPasswordException;
+import org.posterita.lib.UdiConstants;
+import org.posterita.pos.help.POSHelpManager;
+import org.posterita.user.WebUserInfo;
+import org.posterita.util.PoManager;
+
+
+public class LoginManager
+{
+
+ public WebUser checkLoginPassword(Properties ctx, LoginBean bean) throws UserNotFoundException, UserInactiveException, SQLException, OperationException, NotLoggedInException
+ {
+ WebUser wu = get (ctx, bean.getUsername());
+
+ wu.login(bean.getPassword());
+
+ // Ensure that the right user id is found in ctx, not the 1 used by compiere cache.
+ Env.setContext(ctx, "#AD_User_ID", wu.getAD_User_ID());
+ setRoleContext(ctx);
+
+ if (!wu.isLoggedIn())
+ {
+ throw new NotLoggedInException();
+ }
+
+ return wu;
+ }
+
+
+ public void setRoleContext(Properties ctx) throws SQLException, OperationException
+ {
+ ArrayList list = RoleManager.getMyRoles(ctx);
+
+ for (KeyNamePair pair : list)
+ {
+ Env.setContext(ctx, "#AD_Role_ID", pair.getKey());
+ break;
+ }
+
+ Env.setContext(ctx,UdiConstants.ROLE_EDITABLE_ORGS_CTX_PARAM, RoleManager.getRoleEditableOrgAccess(ctx));
+ Env.setContext(ctx,UdiConstants.ROLE_VIEWABLE_ORGS_CTX_PARAM, RoleManager.getRoleViewableOrgAccess(ctx));
+ }
+
+ public WebUserInfo login (Properties ctx, WebUser wu) throws NotLoggedInException, InvalidRoleException, DataException, OperationException, SystemException
+ {
+
+ WebInfo info = new WebInfo(ctx, wu);
+ WebUserInfo udiInfo = new WebUserInfo(ctx,wu,info);
+
+// MRole currentRole = new MRole(ctx, udiInfo.getRoleId().intValue(), null);
+
+ return udiInfo;
+ }
+
+ public WebUserInfo loginUser(Properties ctx, LoginBean bean) throws UserNotFoundException, UserInactiveException, NotLoggedInException, SQLException, OperationException, InvalidRoleException, DataException, SystemException
+ {
+
+// int originalRoleID = UserManager.getOriginalRoleID(ctx);
+
+ MUser user = new MUser(ctx,bean.getUserId().intValue(),null);
+
+ bean.setUsername(user.getName());
+ bean.setPassword(user.getPassword());
+ WebUser wu = checkLoginPassword(ctx, bean);
+
+ WebUserInfo wuInfo = login(ctx, wu);
+
+ return wuInfo;
+ }
+
+ public boolean sendPassword(Properties ctx, UserBean bean, String subject, String content) throws SQLException, UserNotFoundException, EmailNotFoundException
+ {
+ MUser user = load(ctx, bean.getUsername());
+
+ if (user == null)
+ throw new UserNotFoundException();
+
+ String email = user.getEMail();
+
+ if (email == null || email.trim().length() == 0)
+ throw new EmailNotFoundException();
+
+ content = content + user.getPassword();
+
+ MClient client = new MClient(ctx,Env.getAD_Client_ID(ctx),null);
+
+ String from = "Support ";
+
+ return POSHelpManager.sendEmail(ctx, from, email, subject, content);
+
+
+ }
+
+
+ public static void changePassword(Properties ctx, ChangePasswordBean bean, WebUserInfo userInfo) throws WrongPasswordException, OperationException
+ {
+
+ MUser user = new MUser(ctx, userInfo.getUser().getAD_User_ID(),null);
+
+ String oldPassword = bean.getOldPassword();
+
+ if (!oldPassword.equals(userInfo.getUser().getPassword()))
+ throw new WrongPasswordException();
+
+ String newPassword = bean.getNewPassword();
+
+ if(newPassword.length()<6)
+ throw new InvalidPasswordLengthException("The password Should be at least six characters long");
+
+
+ user.setPassword(newPassword);
+
+ PoManager.save(user);
+
+ WebUser webUser = WebUser.get(ctx,user.getEMail(),user.getPassword(), false);
+
+ userInfo.setUser(webUser);
+ }
+
+
+
+ protected static MUser load(Properties ctx, String username) throws SQLException
+ {
+ MUser m_bpc = null;
+ String sql = "SELECT * "
+ + "FROM AD_User "
+ + "WHERE AD_Client_ID=?"
+ + " AND Name=?";
+
+ if (username == null)
+ username = "";
+
+ PreparedStatement pstmt = null;
+ ResultSet rs = null;
+
+ try
+ {
+ pstmt = DB.prepareStatement(sql, null);
+ pstmt.setInt(1, Env.getAD_Client_ID(ctx));
+ pstmt.setString(2, username);
+
+ rs = pstmt.executeQuery();
+
+ if (rs.next())
+ {
+ m_bpc = new MUser (ctx, rs, null);
+ }
+
+ rs.close();
+
+ }
+ catch (SQLException e)
+ {
+ throw e;
+ }
+ finally
+ {
+ try
+ {
+ pstmt.close ();
+ }
+ catch (Exception e)
+ {
+
+ }
+
+ pstmt = null;
+ }
+
+ return m_bpc;
+ }
+
+
+
+ private static WebUser get(Properties ctx, String username) throws SQLException, UserNotFoundException, UserInactiveException
+ {
+ MUser m_bpc = load(ctx, username);
+
+ if (m_bpc == null)
+ throw new UserNotFoundException();
+
+ if (!m_bpc.isActive())
+ throw new UserInactiveException();
+
+ WebUser wu = WebUser.get(ctx, m_bpc.getAD_User_ID());
+
+ return wu;
+ }
+
+ public static ArrayList getOrgUsers(Properties ctx)
+ {
+ ArrayList orgUsers = new ArrayList();
+ Vector users = null;
+ MOrg org = null;
+ OrgUsersBean bean = null;
+
+ int ad_client_id = Env.getAD_Client_ID(ctx);
+
+ StringBuffer whereClause = new StringBuffer("");
+ whereClause.append(" AD_CLIENT_ID = " + ad_client_id);
+ whereClause.append(" AND ISACTIVE = 'Y'");
+ whereClause.append(" AND ISVISIBLE = 'Y'");
+
+
+ whereClause.append(" ORDER BY NAME");
+
+ int[] orgIds = MOrg.getAllIDs(MOrg.Table_Name,whereClause.toString(),null);
+
+ for(int i=0; i getAccessibleOrgsKeyNamePair(Properties ctx) throws SQLException
+ {
+ int ad_user_id = Env.getAD_User_ID(ctx);
+ int ad_client_id = Env.getAD_Client_ID(ctx);
+
+ String sql = "select distinct(org.AD_ORG_ID), org.name " +
+ " from AD_USER_ROLES usrRole, AD_USER usr, AD_ROLE role, AD_ORG org " +
+ " where org.AD_ORG_ID = role.AD_ORG_ID " +
+ " and usrRole.AD_USER_ID = usr.AD_USER_ID " +
+ " and usrRole.AD_ROLE_ID = role.AD_ROLE_ID " +
+ " and role.AD_CLIENT_ID = ? " +
+ " and usrRole.AD_USER_ID = ? " +
+ " order by org.name";
+
+ PreparedStatement pstmt = DB.prepareStatement(sql, null);
+ ResultSet rs = null;
+ ArrayList orgList = new ArrayList();
+
+ try
+ {
+ pstmt.setInt(1,ad_client_id);
+ pstmt.setInt(2,ad_user_id);
+
+ rs = pstmt.executeQuery();
+
+ while(rs.next())
+ {
+ KeyNamePair pair = new KeyNamePair(rs.getInt(1),rs.getString(2));
+
+ orgList.add(pair);
+ }
+
+ rs.close();
+ }
+ catch (SQLException e)
+ {
+ throw e;
+ }
+ finally
+ {
+ try
+ {
+ pstmt.close();
+ }
+ catch(Exception e)
+ {}
+
+ pstmt = null;
+
+ }
+
+
+ return orgList;
+ }
+
+ public static ArrayList getUserRolesKeyNamePair(Properties ctx, int ad_org_id) throws SQLException
+ {
+ int ad_user_id = Env.getAD_User_ID(ctx);
+ int ad_client_id = Env.getAD_Client_ID(ctx);
+
+ String sql = "select role.AD_ROLE_ID, role.NAME " +
+ " from AD_USER_ROLES usrRole, AD_USER usr, AD_ROLE role, AD_ORG org " +
+ " where org.AD_ORG_ID = role.AD_ORG_ID " +
+ " and usrRole.AD_USER_ID = usr.AD_USER_ID " +
+ " and usrRole.AD_ROLE_ID = role.AD_ROLE_ID " +
+ " and role.AD_CLIENT_ID = ? " +
+ " and role.AD_ORG_ID = ? " +
+ " and usrRole.AD_USER_ID = ? " +
+ " order by role.NAME";
+
+ PreparedStatement pstmt = DB.prepareStatement(sql, null);
+ ResultSet rs = null;
+ ArrayList roleList = new ArrayList();
+
+ try
+ {
+ pstmt.setInt(1,ad_client_id);
+ pstmt.setInt(2,ad_org_id);
+ pstmt.setInt(3,ad_user_id);
+
+ rs = pstmt.executeQuery();
+
+ while(rs.next())
+ {
+ KeyNamePair pair = new KeyNamePair(rs.getInt(1),rs.getString(2));
+
+ roleList.add(pair);
+ }
+
+ rs.close();
+ }
+ catch (SQLException e)
+ {
+ throw e;
+ }
+ finally
+ {
+ try
+ {
+ pstmt.close();
+ }
+ catch(Exception e)
+ {}
+
+ pstmt = null;
+ }
+
+ return roleList;
+ }
+
+
+
+ private static String getallOrgsAccess(Properties ctx) throws SQLException
+ {
+ String sql = "SELECT o.AD_Org_ID,o.Name,o.IsSummary " // 1..3
+ + "FROM AD_Role r, AD_Client c"
+ + " INNER JOIN AD_Org o ON (c.AD_Client_ID=o.AD_Client_ID OR o.AD_Org_ID=0) "
+ + "WHERE r.AD_Role_ID=?" // #1
+ + " AND c.AD_Client_ID=?" // #2
+ + " AND o.IsActive='Y'"
+ + " AND (r.IsAccessAllOrgs='Y' "
+ + "OR (r.IsUseUserOrgAccess='N' AND o.AD_Org_ID IN (SELECT AD_Org_ID FROM AD_Role_OrgAccess ra "
+ + "WHERE ra.AD_Role_ID=r.AD_Role_ID AND ra.IsActive='Y')) "
+ + "OR (r.IsUseUserOrgAccess='Y' AND o.AD_Org_ID IN (SELECT AD_Org_ID FROM AD_User_OrgAccess ua "
+ + "WHERE ua.AD_User_ID=? AND ua.IsActive='Y'))" // #3
+ + ") "
+ + "ORDER BY o.Name";
+
+ String orgIds="";
+ PreparedStatement pstmt = null;
+ new ArrayList();
+ ResultSet rs = null;
+
+ try
+ {
+ pstmt = DB.prepareStatement(sql, null);
+ pstmt.setInt(1, Env.getAD_Role_ID(ctx));
+ pstmt.setInt(2, Env.getAD_Client_ID(ctx));
+ pstmt.setInt(3, Env.getAD_User_ID(ctx));
+ rs = pstmt.executeQuery();
+
+ // load Orgs
+ while (rs.next())
+ {
+ if(orgIds=="")
+ orgIds = orgIds+rs.getInt(1)+"";
+ else
+ orgIds = orgIds+","+rs.getInt(1)+"";
+ }
+
+ rs.close();
+ }
+ catch (SQLException ex)
+ {
+ throw ex;
+ }
+ finally
+ {
+ try
+ {
+ pstmt.close();
+ }
+ catch (Exception e)
+ {}
+
+ pstmt = null;
+ }
+
+ return orgIds;
+
+ }
+
+ public LoginBean getUserNameFromPIN(Properties ctx,String userPIN) throws DuplicatePINException, InvalidPINException
+ {
+ String whereClause="AD_CLIENT_ID="+Env.getAD_Client_ID(ctx)+
+ " and USERPIN='"+userPIN+"'";
+
+ int [] userIds = MUser.getAllIDs(MUser.Table_Name,whereClause,null);
+
+ if(userIds.length>1)
+ throw new DuplicatePINException("More than one user with same pin");
+ if(userIds.length<1)
+ throw new InvalidPINException("Invalid PIN");
+
+ MUser user = new MUser(ctx,userIds[0],null);
+
+ LoginBean bean = new LoginBean();
+ bean.setUsername(user.getName());
+ bean.setPassword(user.getPassword());
+
+ return bean;
+
+ }
+}
diff --git a/posterita/posterita/src/main/org/posterita/businesslogic/MenuManager.java b/posterita/posterita/src/main/org/posterita/businesslogic/MenuManager.java
new file mode 100644
index 0000000000..a0c2d68e31
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/businesslogic/MenuManager.java
@@ -0,0 +1,571 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on Nov 6, 2005 by alok
+ **/
+package org.posterita.businesslogic;
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.lang.reflect.Array;
+import java.math.BigDecimal;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.Properties;
+
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+
+import org.compiere.model.MMenu;
+import org.compiere.model.X_U_WebMenu;
+import org.compiere.util.DB;
+import org.compiere.util.Env;
+import org.posterita.Constants;
+import org.posterita.beans.MenuItemBean;
+import org.posterita.core.MenuItem;
+import org.posterita.core.bean.ElementBean;
+import org.posterita.core.businesslogic.ElementManager;
+import org.posterita.exceptions.OperationException;
+import org.posterita.exceptions.SystemException;
+import org.posterita.factory.AbstractFactory;
+import org.posterita.factory.POSMenuFactory;
+import org.posterita.keyname.MenuKeyNamePair;
+import org.posterita.model.MWebMenu;
+import org.posterita.util.PoManager;
+
+
+public class MenuManager
+{
+
+ public static ArrayList getMenus(Properties ctx, int roleId) throws SystemException, OperationException
+ {
+ POSMenuFactory.getFactoryInstance(ctx);
+ ArrayList menuList = new ArrayList();
+ int adRoleId = roleId;
+
+ String sqlStatement = "";
+
+ sqlStatement = " select m.* " +
+ " from U_WebMENU m, U_RoleMenu rm " +
+ " where m.U_WebMenu_ID = rm.U_WebMenu_ID "+
+ " and M.isActive='Y'"+
+ " and rm.AD_Role_ID = " + adRoleId +
+// " and m.AD_Client_ID = " + adClientId + // Menu not dependent on client
+ " order by m.Sequence, m.U_WebMenu_ID";
+
+
+ PreparedStatement prepStatement = null;
+ try
+ {
+ prepStatement = DB.prepareStatement(sqlStatement, null);
+ ResultSet rs = prepStatement.executeQuery();
+
+
+ while(rs.next())
+ {
+ MWebMenu menu = new MWebMenu(ctx, rs, null);
+
+ if (!menu.isActive())
+ {
+ menu.setMenuLink("#");
+ }
+
+ menuList.add(menu);
+ }
+ rs.close();
+
+ }
+ catch(SQLException ex)
+ {
+ throw new SystemException(ex.getMessage());
+ }
+ finally
+ {
+ try
+ {
+ prepStatement.close();
+ }
+ catch(Exception e)
+ {
+ }
+ prepStatement = null;
+ }
+ return menuList;
+ }
+
+ public static ArrayList getMenus(Properties ctx) throws SystemException, OperationException
+ {
+ int adRoleId = Env.getAD_Role_ID(ctx);
+ return MenuManager.getMenus(ctx, adRoleId);
+ }
+
+ public static ArrayList getMenus(Properties ctx, HttpServletRequest request) throws SystemException, OperationException
+ {
+ ArrayList menuList = getMenus(ctx);
+ rewriteMenuURL(menuList, request);
+
+ return menuList;
+ }
+
+
+ public static MenuItem buildMenuTree(Properties ctx, ArrayList menuList)
+ {
+ MenuItem rootMenuItem = MenuItem.getDummyMenuItem(ctx);
+
+ Iterator menuIter = menuList.iterator();
+ Iterator subIterator;
+ MWebMenu mMenu;
+ MWebMenu sMenu;
+
+
+ while(menuIter.hasNext())
+ {
+ mMenu = (MWebMenu)menuIter.next();
+
+ if(mMenu.getParentMenu_ID() == 0) // Parent Menu
+ {
+ MenuItem mItem = new MenuItem(mMenu);
+ rootMenuItem.addSubMenu(mItem);
+ subIterator = menuList.iterator();
+
+ while(subIterator.hasNext())
+ {
+ sMenu = (MWebMenu)subIterator.next();
+ if(sMenu.getParentMenu_ID() == mMenu.get_ID())
+ {
+ MenuItem sItem = new MenuItem(sMenu);
+
+ String menuLink = sItem.getMenuLink();
+ if(! menuLink.startsWith("javascript:"))
+ {
+ sItem.setMenuLink(sItem.getMenuLink() + sItem.getMenuId());
+ }
+
+ //sItem
+ mItem.addSubMenu(sItem);
+ }
+ }
+ //if(mItem.hasSubMenu())
+ mItem.setMenuLink(mItem.getMenuLink() + mItem.getMenuId());
+ }
+ }
+
+ return rootMenuItem;
+ }
+
+ public static void saveMenu(Properties ctx, MenuItemBean bean) throws OperationException
+ {
+ //when creating a new menu
+ MWebMenu menu;
+ if (bean.getMenuId().equals(Integer.valueOf(0)))
+ {
+ menu = new MWebMenu(ctx,0,null);
+ }
+// when editing a menu
+ else
+ {
+ menu = new MWebMenu(ctx,bean.getMenuId().intValue(),null);
+ }
+
+ menu.setIsActive(bean.getIsActive().booleanValue());
+ menu.setDescription(bean.getDescription());
+ PoManager.save(menu);
+ }
+
+ public static MWebMenu createParentMenu(Properties ctx, String menuName, String moduleName, int sequence) throws OperationException
+ {
+ MWebMenu menu = new MWebMenu(ctx, 0, null);
+
+ menu.setMenuLink("GetMenuItemsAction.do?action=getMenuItems&menuId=");
+ menu.setModule(moduleName);
+ menu.setPosition(AbstractFactory.MENU_POSITION_LEFT);
+ menu.setSequence(new BigDecimal(sequence));
+ menu.setName(menuName);
+
+ return menu;
+ }
+
+ public static MWebMenu createSubMenu(Properties ctx,String menuName, String menuLink, String moduleName, int parentId, int sequence) throws OperationException
+ {
+ return createSubMenu(ctx, menuName, menuLink, moduleName, parentId, sequence, null);
+ }
+
+ public static MWebMenu createSubMenu(Properties ctx,String menuName, String menuLink, String moduleName, int parentId, int sequence, String category) throws OperationException
+ {
+ MWebMenu menu = new MWebMenu(ctx, 0, null);
+ menu.setParentMenu_ID(parentId);
+
+ if(!menuLink.contains("javascript"))
+ {
+ if (menuLink.endsWith(".do"))
+ menuLink = menuLink + "?menuId=";
+ else
+ menuLink = menuLink + "&menuId=";
+ }
+
+ menu.setMenuLink(menuLink);
+ menu.setModule(moduleName);
+ menu.setSequence(new BigDecimal(sequence));
+ menu.setPosition(AbstractFactory.MENU_POSITION_LEFT);
+
+ menu.setName(menuName);
+ menu.setCategory(category);
+ return menu;
+ }
+
+
+ public static ArrayList getMenusForOrganisationType(Properties ctx) throws OperationException
+ {
+
+ // Creating the menus first.
+// MenuFactory factory = MenuFactory.getFactoryInstance(ctx);
+
+ ArrayList menuList = new ArrayList();
+
+ String sqlStatement = "";
+
+ sqlStatement = "select * " +
+ "from U_WEBMENU m where " + //m.AD_Client_ID = " + adClientId +
+ " m.AD_CLIENT_ID=0"+
+ " and m.AD_ORG_ID=0" +
+ " and m.isactive = 'Y'";
+
+// sqlStatement += " and m." + OrganisationManager.getOrganisationSqlStatement(ctx);
+
+ sqlStatement += " order by m.U_WebMenu_ID";
+
+ System.out.println(sqlStatement);
+
+ PreparedStatement prepStatement = null;
+ ResultSet rs = null;
+ try
+ {
+ prepStatement = DB.prepareStatement(sqlStatement, null);
+ rs = prepStatement.executeQuery();
+
+ while(rs.next())
+ {
+ // setting the link name to be either car / bike
+ //name = formatMenuName(ctx, name);
+
+ MWebMenu menu = new MWebMenu(ctx, rs, null);
+ menuList.add(menu);
+ }
+ rs.close();
+
+ }
+ catch(SQLException ex)
+ {
+ throw new OperationException("Could not retrieve menu list with sql: " + sqlStatement, ex);
+ }
+ finally
+ {
+
+
+ DB.close(rs, prepStatement);
+
+ rs = null;
+ prepStatement = null;
+ }
+ return menuList;
+ }
+
+
+ public static int[] getDefaultMenus(Properties ctx) throws OperationException
+ {
+ String whereClause = "AD_Client_ID=0 and AD_Org_ID=0 ";
+ whereClause += " and Position='TOP' and ParentMenu_ID is null";
+
+ int menuIds[] = MWebMenu.getAllIDs(MWebMenu.Table_Name, whereClause, null);
+
+ if(menuIds == null)
+ throw new OperationException("Could not retrieve Default Menus, Where Clause: " + whereClause);
+
+ return menuIds;
+ }
+
+ public static int[] getMenuIdForOrganisation(Properties ctx) throws OperationException
+ {
+ int adClientId = Env.getAD_Client_ID(ctx);
+
+ String whereClause = "AD_CLIENT_ID=" + adClientId;
+
+ int menuIds[] = MWebMenu.getAllIDs(MWebMenu.Table_Name, whereClause, null);
+
+ return menuIds;
+ }
+
+ public static int[] getMenuIdForSuperUser(Properties ctx) throws OperationException
+ {
+ int adClientId = Env.getAD_Client_ID(ctx);
+ int adOrgId = Env.getAD_Org_ID(ctx);
+
+ String whereClause = "AD_CLIENT_ID =" + adClientId + " and AD_ORG_ID = " + adOrgId + " and ISSUPERUSER = 'Y'";
+
+ int menuIds[] = MWebMenu.getAllIDs(MWebMenu.Table_Name, whereClause, null);
+
+ return menuIds;
+ }
+
+ public static ArrayList getClosableMenus(Properties ctx) throws OperationException
+ {
+ String sql = "ad_client_id=" + Env.getAD_Client_ID(ctx)
+ + " and isClosable='Y'";
+ //+ filter;
+
+ ArrayList menuKeyNamePairs;
+
+ try
+ {
+ menuKeyNamePairs = MenuKeyNamePair.getData(ctx, MWebMenu.Table_Name, sql);
+ }
+ catch (SQLException e)
+ {
+ throw new OperationException(e.getMessage());
+ }
+
+ return menuKeyNamePairs;
+ }
+
+ public static MenuItemBean getMenu(Properties ctx, int menuId)
+ {
+ MWebMenu menu = new MWebMenu(ctx, menuId, null);
+
+ MenuItemBean bean = new MenuItemBean();
+ bean.setDescription(menu.getDescription());
+ bean.setMenuId(menu.get_ID());
+ bean.setIsActive(menu.isActive());
+
+ return bean;
+ }
+
+ public static MenuItemBean editMenu(Properties ctx, MenuItemBean bean) throws OperationException
+ {
+ MWebMenu menu = new MWebMenu(ctx, bean.getMenuId(), null);
+ menu.setDescription(bean.getDescription());
+ menu.setIsActive(bean.getIsActive());
+ PoManager.save(menu);
+
+ bean.setName(menu.getName());
+
+ return bean;
+ }
+
+ public static int[] getMenus(Properties ctx,String module)
+ {
+ int ad_client_id = Env.getAD_Client_ID(ctx);
+ int ad_org_id = Env.getAD_Org_ID(ctx);
+
+ String whereClause = " and ad_client_id = "+ ad_client_id +
+ " and ad_org_id = "+ ad_org_id +" and isactive = 'Y'";
+
+ return MWebMenu.getAllIDs(MWebMenu.Table_Name,whereClause,null);
+ }
+
+
+ public static boolean getRoleMenuAccess(Properties ctx,String role) throws OperationException
+ {
+ int id = POSMenuFactory.getFactoryInstance(ctx).get(ctx,role).get_ID();
+
+ String sql="select AD_ROLE_ID from U_ROLEMENU where U_WEBMENU_ID="+id;
+ boolean access=false;
+ int currentRoleId=Env.getAD_Role_ID(ctx);
+ ResultSet rs = null;
+ PreparedStatement pstmt = DB.prepareStatement(sql,null);
+ try
+ {
+ rs = pstmt.executeQuery();
+
+ while(rs.next())
+ {
+ if(rs.getInt(1)==currentRoleId)
+ {
+ access=true;
+ break;
+ }
+
+ }
+
+ rs.close();
+ }
+ catch (SQLException e)
+ {
+ throw new OperationException(e);
+ }
+ finally
+ {
+ DB.close(rs, pstmt);
+ rs = null;
+ pstmt = null;
+ }
+
+ return access;
+ }
+
+ public static int getMenuId(Properties ctx, String key) throws SystemException, OperationException
+ {
+
+ String sqlStatement = "select u_webmenu_id from u_webmenu where lower(name)='" + key.toLowerCase() + "'";
+ int menu_id = 0;
+
+ PreparedStatement prepStatement = null;
+ try
+ {
+ prepStatement = DB.prepareStatement(sqlStatement, null);
+ ResultSet rs = prepStatement.executeQuery();
+
+
+ if(rs.next())
+ {
+ menu_id = rs.getInt(1);
+ }
+ rs.close();
+
+ }
+ catch(SQLException ex)
+ {
+ throw new SystemException(ex.getMessage());
+ }
+ finally
+ {
+ try
+ {
+ prepStatement.close();
+ }
+ catch(Exception e)
+ {
+ }
+ prepStatement = null;
+ }
+ return menu_id;
+ }
+
+ public static String getMainMenus(Properties ctx, HttpServletRequest request)
+ {
+ ArrayList mainMenuList = (ArrayList) request.getSession().getAttribute(Constants.TOP_MENUS);
+ String mainMenu = "";
+ Integer menuId = 0;
+ String styleClass = "";
+ int count = 0;
+
+ //Check which main menu link has been clicked so as to set style
+ if(request.getParameter("menuId") != null)
+ {
+ menuId = Integer.valueOf(request.getParameter("menuId"));
+ }
+
+ if(mainMenuList != null)
+ {
+ Iterator itr = mainMenuList.iterator();
+ StringWriter sw = new StringWriter();
+ PrintWriter out = new PrintWriter(sw);
+ ElementBean elementBean = null;
+
+ while(itr.hasNext())
+ {
+ MenuItem menuItem = (MenuItem) itr.next();
+ elementBean = ElementManager.getMsg(ctx, menuItem.getName());
+
+ if(menuId.compareTo(menuItem.getMenuId()) == 0 || (menuId == 0 && count == 0))
+ {
+ styleClass = "currentpage";
+ }
+ else
+ {
+ styleClass = "";
+ }
+
+ out.print("");
+
+ count ++;
+ }
+
+ out.flush();
+
+ mainMenu = sw.toString();
+ request.getSession().setAttribute(Constants.MAIN_MENUS, mainMenu);
+
+ }
+
+ return mainMenu;
+ }
+
+ /**
+ * Rewrite all the URLs. Adds session id if not present
+ * @param menuList
+ * @param request
+ */
+ public static void rewriteMenuURL(ArrayList menuList, HttpServletRequest request)
+ {
+ HttpSession session = request.getSession();
+ String sessionID = session.getId();
+
+ for(MWebMenu menu : menuList)
+ {
+ String link = menu.getMenuLink();
+
+ int index = link.indexOf("?");
+ if(index != -1)
+ {
+ String part1 = link.substring(0, index);
+ String part2 = link.substring(index);
+
+ link = part1 + ";jsessionid=" + sessionID + part2;
+
+ menu.setMenuLink(link);
+ }
+ }
+ }
+
+
+ public static Boolean isCashSalesAllowed(Properties ctx, int roleId) throws Exception
+ {
+ boolean isCashSalesAllowed = false;
+ ArrayList roleMenus = getMenus(ctx, roleId);
+
+ if(roleMenus != null)
+ {
+ Iterator itr = roleMenus.iterator();
+
+ while(itr.hasNext())
+ {
+ MWebMenu webMenu = (MWebMenu) itr.next();
+
+ if(webMenu.getName().equalsIgnoreCase("smenu.cash.sales"))
+ {
+ isCashSalesAllowed = true;
+ }
+ }
+ }
+ return isCashSalesAllowed;
+ }
+}
+
+
diff --git a/posterita/posterita/src/main/org/posterita/businesslogic/MinOutManager.java b/posterita/posterita/src/main/org/posterita/businesslogic/MinOutManager.java
new file mode 100644
index 0000000000..3a251369e4
--- /dev/null
+++ b/posterita/posterita/src/main/org/posterita/businesslogic/MinOutManager.java
@@ -0,0 +1,777 @@
+/**
+ * Product: Posterita Web-Based POS and Adempiere Plugin
+ * Copyright (C) 2007 Posterita Ltd
+ * This file is part of POSterita
+ *
+ * POSterita is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Created on 08-Jul-2005 by alok
+ *
+ */
+package org.posterita.businesslogic;
+
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.Properties;
+
+import org.compiere.model.MBPartner;
+import org.compiere.model.MBPartnerLocation;
+import org.compiere.model.MDocType;
+import org.compiere.model.MInOut;
+import org.compiere.model.MInOutConfirm;
+import org.compiere.model.MInOutLine;
+import org.compiere.model.MInOutLineConfirm;
+import org.compiere.model.MInvoice;
+import org.compiere.model.MInvoiceLine;
+import org.compiere.model.MLocation;
+import org.compiere.model.MLocator;
+import org.compiere.model.MOrder;
+import org.compiere.model.MOrderLine;
+import org.compiere.model.MOrg;
+import org.compiere.model.MProduct;
+import org.compiere.model.MWarehouse;
+import org.compiere.print.ReportEngine;
+import org.compiere.process.DocumentEngine;
+import org.compiere.util.DB;
+import org.compiere.util.Env;
+import org.posterita.Constants;
+import org.posterita.beans.ChangeDocumentStatusBean;
+import org.posterita.beans.CommandBean;
+import org.posterita.beans.InOutHistoryBean;
+import org.posterita.beans.WebDocumentBean;
+import org.posterita.beans.WebDocumentHeaderBean;
+import org.posterita.beans.WebMinOutLineBean;
+import org.posterita.core.JulianDate;
+import org.posterita.core.UDIMap;
+import org.posterita.exceptions.DataException;
+import org.posterita.exceptions.OperationException;
+import org.posterita.exceptions.ShipmentAlreadyExistsException;
+import org.posterita.exceptions.TrackingNumberNotfoundException;
+import org.posterita.util.PoManager;
+
+public class MinOutManager extends AbstractDocumentManager
+{
+ private static final String SHIPMENT_MADE = "Shipment Made";
+
+ //TODO pass warehouseId in list of arguments
+ public static MInOut createShipmentFromInvoice(Properties ctx,MInvoice invoice) throws OperationException
+ {
+
+
+ int SOId = invoice.getC_Order_ID();
+
+ MOrder order = new MOrder(ctx,SOId,invoice.get_TrxName());
+
+ MInvoiceLine[] lines = invoice.getLines();
+ int []orderLineIds = new int[lines.length];
+ for(int i=0;i list = new ArrayList();
+ ResultSet rs = null;
+
+ try
+ {
+ rs = pstmt.executeQuery();
+
+ while(rs.next())
+ {
+ bean = new InOutHistoryBean();
+ bean.setInOutId(Integer.valueOf(rs.getInt(1)));
+ bean.setDocumentNo(rs.getString(2));
+ bean.setDocStatus(UDIMap.docStatusMap.get(rs.getString(3)));
+ bean.setDocStatusCode(rs.getString(3));
+ bean.setOrderId(Integer.valueOf(rs.getInt(4)));
+ bean.setDateOrdered(rs.getTimestamp(5));
+ bean.setDateMovement(rs.getTimestamp(6));
+ bean.setWarehouseId(Integer.valueOf(rs.getInt(7)));
+ bean.setPoReference(rs.getString(8));
+ bean.setInvoiceId(Integer.valueOf(rs.getInt(9)));
+ bean.setRefInOutId(Integer.valueOf(rs.getInt(10)));
+ bean.setPartnerName(rs.getString(11));
+ bean.setPartnerId(Integer.valueOf(rs.getString(12)));
+ list.add(bean);
+ }
+
+ rs.close();
+ }
+ catch (SQLException e)
+ {
+ throw e;
+ }
+ finally
+ {
+ try
+ {
+ pstmt.close();
+ }
+ catch(Exception e)
+ {}
+
+ pstmt = null;
+ }
+
+
+ return list;
+ }
+
+ public static ArrayList getShipmentHistory(Properties ctx, String docStatus, Integer partnerId, Integer month, Integer year) throws SQLException
+ {
+ return getInOutHistory(ctx,"Y",docStatus,partnerId,month,year);
+ }
+
+ public static ArrayList getReceiptHistory(Properties ctx, String docStatus, Integer partnerId, Integer month, Integer year) throws SQLException
+ {
+ return getInOutHistory(ctx,"N",docStatus,partnerId,month,year);
+ }
+
+ public static WebDocumentBean getWebMinOutBean(Properties ctx, MInOut minOut) throws OperationException, DataException
+ {
+ if (minOut == null)
+ throw new OperationException("Invalid operation shipment/receipt is null");
+
+ if (minOut.get_ID() == 0)
+ throw new OperationException("You have deleted this shipment/receipt. You cannot view this shipment/receipt.");
+
+ WebDocumentBean bean = new WebDocumentBean();
+
+ bean.setMinOutId(Integer.valueOf(minOut.get_ID()));
+
+ MOrg myOrg = OrganisationManager.getMyOrg(ctx);
+ MBPartner me = new MBPartner(ctx, myOrg.getLinkedC_BPartner_ID(null), null);
+ bean.setMe(me);
+
+ //Me Location---------------
+ MBPartnerLocation meLocation[] = MBPartnerLocation.getForBPartner(ctx,me.get_ID());
+ if (meLocation.length ==0)
+ throw new OperationException("No location has been set for your organisation. Please ask your administrator to set one for you");
+
+ MLocation location = new MLocation(ctx, meLocation[0].getC_Location_ID(), null);
+
+ bean.setMeLocation(location);
+
+ //End-----------------
+
+ MBPartner you = new MBPartner(ctx, minOut.getC_BPartner_ID(), null);
+ bean.setYou(you);
+
+
+ //You Location------------
+ MBPartnerLocation youBPLocation[] = MBPartnerLocation.getForBPartner(ctx, you.get_ID());
+
+ if (youBPLocation.length ==0)
+ throw new OperationException("No location has been set for the dealer organisation. Please ask your administrator to set one for you");
+
+ MLocation youLocation = new MLocation(ctx, youBPLocation[0].getC_Location_ID(), null);
+
+ bean.setYoubpLocation(youBPLocation[0]);
+ bean.setYouLocation(youLocation);
+
+ bean.setLines(getWebMinOutLines(ctx, minOut));
+
+ WebDocumentHeaderBean headerBean = createWebDocumentHeader(ctx, minOut.getAD_Org_ID(),minOut.getC_BPartner_ID(), minOut.getDocStatus(), minOut.isSOTrx(),null);
+ headerBean.setDocumentHeader(getDocumentHeader(minOut));
+
+ MDocType doctype = new MDocType(ctx, minOut.getC_DocType_ID(), null);
+ headerBean.setDocumentTitle(doctype.getName());
+ bean.setHeaderBean(headerBean);
+
+ bean.setMinOut(minOut);
+
+
+ MInvoice invoice = new MInvoice(ctx, minOut.getC_Invoice_ID(), null);
+ bean.setInvoice(invoice);
+
+ CommandBean cmdBean = getShipmenttWebCommands(minOut);
+
+ bean.setSimpleCommand(cmdBean.getSimpleCommand());
+ bean.setComplexCommand(cmdBean.getComplexCommand());
+
+ return bean;
+ }
+
+ public static String getDocumentHeader(MInOut minOut)
+ {
+ if (minOut.isSOTrx())
+ return SHIPMENT_MADE;
+
+ return SHIPMENT_MADE;
+ }
+
+ public static ArrayList