[ROSSOGARGANO]
- caricamento/modifica/eliminazione udc da popup dettagli ordine - modifiche grafiche per identificazione ul tramite barcode in dettaglio ordine - gestione permessi fatturazione C.to deposito [INTEGRY] - correzione gestione setup
This commit is contained in:
@@ -32,7 +32,7 @@ ij_css_hex_color_upper_case = false
|
||||
ij_css_keep_blank_lines_in_code = 2
|
||||
ij_css_keep_indents_on_empty_lines = false
|
||||
ij_css_keep_single_line_blocks = false
|
||||
ij_css_properties_order = font,font-family,font-size,font-weight,font-style,font-variant,font-size-adjust,font-stretch,line-height,position,z-index,top,right,bottom,left,display,visibility,float,clear,overflow,overflow-x,overflow-y,clip,zoom,align-content,align-items,align-self,flex,flex-flow,flex-basis,flex-direction,flex-grow,flex-shrink,flex-wrap,justify-content,order,box-sizing,width,min-width,max-width,height,min-height,max-height,margin,margin-top,margin-right,margin-bottom,margin-left,padding,padding-top,padding-right,padding-bottom,padding-left,table-layout,empty-cells,caption-side,border-spacing,border-collapse,list-style,list-style-position,list-style-type,list-style-image,content,quotes,counter-reset,counter-increment,resize,cursor,user-select,nav-index,nav-up,nav-right,nav-down,nav-left,transition,transition-delay,transition-timing-function,transition-duration,transition-property,transform,transform-origin,animation,animation-name,animation-duration,animation-play-state,animation-timing-function,animation-delay,animation-iteration-count,animation-direction,text-align,text-align-last,vertical-align,white-space,text-decoration,text-emphasis,text-emphasis-color,text-emphasis-style,text-emphasis-position,text-indent,text-justify,letter-spacing,word-spacing,text-outline,text-transform,text-wrap,text-overflow,text-overflow-ellipsis,text-overflow-mode,word-wrap,word-break,tab-size,hyphens,pointer-events,opacity,color,border,border-width,border-style,border-color,border-top,border-top-width,border-top-style,border-top-color,border-right,border-right-width,border-right-style,border-right-color,border-bottom,border-bottom-width,border-bottom-style,border-bottom-color,border-left,border-left-width,border-left-style,border-left-color,border-radius,border-top-left-radius,border-top-right-radius,border-bottom-right-radius,border-bottom-left-radius,border-image,border-image-source,border-image-slice,border-image-width,border-image-outset,border-image-repeat,outline,outline-width,outline-style,outline-color,outline-offset,background,background-color,background-image,background-repeat,background-attachment,background-position,background-position-x,background-position-y,background-clip,background-origin,background-size,box-decoration-break,box-shadow,text-shadow
|
||||
ij_css_properties_order = font, font-family, font-size, font-weight, font-style, font-variant, font-size-adjust, font-stretch, line-height, position, z-index, top, right, bottom, left, display, visibility, float, clear, overflow, overflow-x, overflow-y, clip, zoom, align-content, align-items, align-self, flex, flex-flow, flex-basis, flex-direction, flex-grow, flex-shrink, flex-wrap, justify-content, order, box-sizing, width, min-width, max-width, height, min-height, max-height, margin, margin-top, margin-right, margin-bottom, margin-left, padding, padding-top, padding-right, padding-bottom, padding-left, table-layout, empty-cells, caption-side, border-spacing, border-collapse, list-style, list-style-position, list-style-type, list-style-image, content, quotes, counter-reset, counter-increment, resize, cursor, user-select, nav-index, nav-up, nav-right, nav-down, nav-left, transition, transition-delay, transition-timing-function, transition-duration, transition-property, transform, transform-origin, animation, animation-name, animation-duration, animation-play-state, animation-timing-function, animation-delay, animation-iteration-count, animation-direction, text-align, text-align-last, vertical-align, white-space, text-decoration, text-emphasis, text-emphasis-color, text-emphasis-style, text-emphasis-position, text-indent, text-justify, letter-spacing, word-spacing, text-outline, text-transform, text-wrap, text-overflow, text-overflow-ellipsis, text-overflow-mode, word-wrap, word-break, tab-size, hyphens, pointer-events, opacity, color, border, border-width, border-style, border-color, border-top, border-top-width, border-top-style, border-top-color, border-right, border-right-width, border-right-style, border-right-color, border-bottom, border-bottom-width, border-bottom-style, border-bottom-color, border-left, border-left-width, border-left-style, border-left-color, border-radius, border-top-left-radius, border-top-right-radius, border-bottom-right-radius, border-bottom-left-radius, border-image, border-image-source, border-image-slice, border-image-width, border-image-outset, border-image-repeat, outline, outline-width, outline-style, outline-color, outline-offset, background, background-color, background-image, background-repeat, background-attachment, background-position, background-position-x, background-position-y, background-clip, background-origin, background-size, box-decoration-break, box-shadow, text-shadow
|
||||
ij_css_space_after_colon = true
|
||||
ij_css_space_before_opening_brace = true
|
||||
ij_css_use_double_quotes = true
|
||||
@@ -59,7 +59,7 @@ ij_less_keep_indents_on_empty_lines = false
|
||||
ij_less_keep_single_line_blocks = false
|
||||
ij_less_line_comment_add_space = false
|
||||
ij_less_line_comment_at_first_column = false
|
||||
ij_less_properties_order = font,font-family,font-size,font-weight,font-style,font-variant,font-size-adjust,font-stretch,line-height,position,z-index,top,right,bottom,left,display,visibility,float,clear,overflow,overflow-x,overflow-y,clip,zoom,align-content,align-items,align-self,flex,flex-flow,flex-basis,flex-direction,flex-grow,flex-shrink,flex-wrap,justify-content,order,box-sizing,width,min-width,max-width,height,min-height,max-height,margin,margin-top,margin-right,margin-bottom,margin-left,padding,padding-top,padding-right,padding-bottom,padding-left,table-layout,empty-cells,caption-side,border-spacing,border-collapse,list-style,list-style-position,list-style-type,list-style-image,content,quotes,counter-reset,counter-increment,resize,cursor,user-select,nav-index,nav-up,nav-right,nav-down,nav-left,transition,transition-delay,transition-timing-function,transition-duration,transition-property,transform,transform-origin,animation,animation-name,animation-duration,animation-play-state,animation-timing-function,animation-delay,animation-iteration-count,animation-direction,text-align,text-align-last,vertical-align,white-space,text-decoration,text-emphasis,text-emphasis-color,text-emphasis-style,text-emphasis-position,text-indent,text-justify,letter-spacing,word-spacing,text-outline,text-transform,text-wrap,text-overflow,text-overflow-ellipsis,text-overflow-mode,word-wrap,word-break,tab-size,hyphens,pointer-events,opacity,color,border,border-width,border-style,border-color,border-top,border-top-width,border-top-style,border-top-color,border-right,border-right-width,border-right-style,border-right-color,border-bottom,border-bottom-width,border-bottom-style,border-bottom-color,border-left,border-left-width,border-left-style,border-left-color,border-radius,border-top-left-radius,border-top-right-radius,border-bottom-right-radius,border-bottom-left-radius,border-image,border-image-source,border-image-slice,border-image-width,border-image-outset,border-image-repeat,outline,outline-width,outline-style,outline-color,outline-offset,background,background-color,background-image,background-repeat,background-attachment,background-position,background-position-x,background-position-y,background-clip,background-origin,background-size,box-decoration-break,box-shadow,text-shadow
|
||||
ij_less_properties_order = font, font-family, font-size, font-weight, font-style, font-variant, font-size-adjust, font-stretch, line-height, position, z-index, top, right, bottom, left, display, visibility, float, clear, overflow, overflow-x, overflow-y, clip, zoom, align-content, align-items, align-self, flex, flex-flow, flex-basis, flex-direction, flex-grow, flex-shrink, flex-wrap, justify-content, order, box-sizing, width, min-width, max-width, height, min-height, max-height, margin, margin-top, margin-right, margin-bottom, margin-left, padding, padding-top, padding-right, padding-bottom, padding-left, table-layout, empty-cells, caption-side, border-spacing, border-collapse, list-style, list-style-position, list-style-type, list-style-image, content, quotes, counter-reset, counter-increment, resize, cursor, user-select, nav-index, nav-up, nav-right, nav-down, nav-left, transition, transition-delay, transition-timing-function, transition-duration, transition-property, transform, transform-origin, animation, animation-name, animation-duration, animation-play-state, animation-timing-function, animation-delay, animation-iteration-count, animation-direction, text-align, text-align-last, vertical-align, white-space, text-decoration, text-emphasis, text-emphasis-color, text-emphasis-style, text-emphasis-position, text-indent, text-justify, letter-spacing, word-spacing, text-outline, text-transform, text-wrap, text-overflow, text-overflow-ellipsis, text-overflow-mode, word-wrap, word-break, tab-size, hyphens, pointer-events, opacity, color, border, border-width, border-style, border-color, border-top, border-top-width, border-top-style, border-top-color, border-right, border-right-width, border-right-style, border-right-color, border-bottom, border-bottom-width, border-bottom-style, border-bottom-color, border-left, border-left-width, border-left-style, border-left-color, border-radius, border-top-left-radius, border-top-right-radius, border-bottom-right-radius, border-bottom-left-radius, border-image, border-image-source, border-image-slice, border-image-width, border-image-outset, border-image-repeat, outline, outline-width, outline-style, outline-color, outline-offset, background, background-color, background-image, background-repeat, background-attachment, background-position, background-position-x, background-position-y, background-clip, background-origin, background-size, box-decoration-break, box-shadow, text-shadow
|
||||
ij_less_space_after_colon = true
|
||||
ij_less_space_before_opening_brace = true
|
||||
ij_less_use_double_quotes = true
|
||||
@@ -81,7 +81,7 @@ ij_sass_keep_indents_on_empty_lines = false
|
||||
ij_sass_keep_single_line_blocks = false
|
||||
ij_sass_line_comment_add_space = false
|
||||
ij_sass_line_comment_at_first_column = false
|
||||
ij_sass_properties_order = font,font-family,font-size,font-weight,font-style,font-variant,font-size-adjust,font-stretch,line-height,position,z-index,top,right,bottom,left,display,visibility,float,clear,overflow,overflow-x,overflow-y,clip,zoom,align-content,align-items,align-self,flex,flex-flow,flex-basis,flex-direction,flex-grow,flex-shrink,flex-wrap,justify-content,order,box-sizing,width,min-width,max-width,height,min-height,max-height,margin,margin-top,margin-right,margin-bottom,margin-left,padding,padding-top,padding-right,padding-bottom,padding-left,table-layout,empty-cells,caption-side,border-spacing,border-collapse,list-style,list-style-position,list-style-type,list-style-image,content,quotes,counter-reset,counter-increment,resize,cursor,user-select,nav-index,nav-up,nav-right,nav-down,nav-left,transition,transition-delay,transition-timing-function,transition-duration,transition-property,transform,transform-origin,animation,animation-name,animation-duration,animation-play-state,animation-timing-function,animation-delay,animation-iteration-count,animation-direction,text-align,text-align-last,vertical-align,white-space,text-decoration,text-emphasis,text-emphasis-color,text-emphasis-style,text-emphasis-position,text-indent,text-justify,letter-spacing,word-spacing,text-outline,text-transform,text-wrap,text-overflow,text-overflow-ellipsis,text-overflow-mode,word-wrap,word-break,tab-size,hyphens,pointer-events,opacity,color,border,border-width,border-style,border-color,border-top,border-top-width,border-top-style,border-top-color,border-right,border-right-width,border-right-style,border-right-color,border-bottom,border-bottom-width,border-bottom-style,border-bottom-color,border-left,border-left-width,border-left-style,border-left-color,border-radius,border-top-left-radius,border-top-right-radius,border-bottom-right-radius,border-bottom-left-radius,border-image,border-image-source,border-image-slice,border-image-width,border-image-outset,border-image-repeat,outline,outline-width,outline-style,outline-color,outline-offset,background,background-color,background-image,background-repeat,background-attachment,background-position,background-position-x,background-position-y,background-clip,background-origin,background-size,box-decoration-break,box-shadow,text-shadow
|
||||
ij_sass_properties_order = font, font-family, font-size, font-weight, font-style, font-variant, font-size-adjust, font-stretch, line-height, position, z-index, top, right, bottom, left, display, visibility, float, clear, overflow, overflow-x, overflow-y, clip, zoom, align-content, align-items, align-self, flex, flex-flow, flex-basis, flex-direction, flex-grow, flex-shrink, flex-wrap, justify-content, order, box-sizing, width, min-width, max-width, height, min-height, max-height, margin, margin-top, margin-right, margin-bottom, margin-left, padding, padding-top, padding-right, padding-bottom, padding-left, table-layout, empty-cells, caption-side, border-spacing, border-collapse, list-style, list-style-position, list-style-type, list-style-image, content, quotes, counter-reset, counter-increment, resize, cursor, user-select, nav-index, nav-up, nav-right, nav-down, nav-left, transition, transition-delay, transition-timing-function, transition-duration, transition-property, transform, transform-origin, animation, animation-name, animation-duration, animation-play-state, animation-timing-function, animation-delay, animation-iteration-count, animation-direction, text-align, text-align-last, vertical-align, white-space, text-decoration, text-emphasis, text-emphasis-color, text-emphasis-style, text-emphasis-position, text-indent, text-justify, letter-spacing, word-spacing, text-outline, text-transform, text-wrap, text-overflow, text-overflow-ellipsis, text-overflow-mode, word-wrap, word-break, tab-size, hyphens, pointer-events, opacity, color, border, border-width, border-style, border-color, border-top, border-top-width, border-top-style, border-top-color, border-right, border-right-width, border-right-style, border-right-color, border-bottom, border-bottom-width, border-bottom-style, border-bottom-color, border-left, border-left-width, border-left-style, border-left-color, border-radius, border-top-left-radius, border-top-right-radius, border-bottom-right-radius, border-bottom-left-radius, border-image, border-image-source, border-image-slice, border-image-width, border-image-outset, border-image-repeat, outline, outline-width, outline-style, outline-color, outline-offset, background, background-color, background-image, background-repeat, background-attachment, background-position, background-position-x, background-position-y, background-clip, background-origin, background-size, box-decoration-break, box-shadow, text-shadow
|
||||
ij_sass_space_after_colon = true
|
||||
ij_sass_space_before_opening_brace = true
|
||||
ij_sass_use_double_quotes = true
|
||||
@@ -104,7 +104,7 @@ ij_scss_keep_indents_on_empty_lines = false
|
||||
ij_scss_keep_single_line_blocks = false
|
||||
ij_scss_line_comment_add_space = false
|
||||
ij_scss_line_comment_at_first_column = false
|
||||
ij_scss_properties_order = font,font-family,font-size,font-weight,font-style,font-variant,font-size-adjust,font-stretch,line-height,position,z-index,top,right,bottom,left,display,visibility,float,clear,overflow,overflow-x,overflow-y,clip,zoom,align-content,align-items,align-self,flex,flex-flow,flex-basis,flex-direction,flex-grow,flex-shrink,flex-wrap,justify-content,order,box-sizing,width,min-width,max-width,height,min-height,max-height,margin,margin-top,margin-right,margin-bottom,margin-left,padding,padding-top,padding-right,padding-bottom,padding-left,table-layout,empty-cells,caption-side,border-spacing,border-collapse,list-style,list-style-position,list-style-type,list-style-image,content,quotes,counter-reset,counter-increment,resize,cursor,user-select,nav-index,nav-up,nav-right,nav-down,nav-left,transition,transition-delay,transition-timing-function,transition-duration,transition-property,transform,transform-origin,animation,animation-name,animation-duration,animation-play-state,animation-timing-function,animation-delay,animation-iteration-count,animation-direction,text-align,text-align-last,vertical-align,white-space,text-decoration,text-emphasis,text-emphasis-color,text-emphasis-style,text-emphasis-position,text-indent,text-justify,letter-spacing,word-spacing,text-outline,text-transform,text-wrap,text-overflow,text-overflow-ellipsis,text-overflow-mode,word-wrap,word-break,tab-size,hyphens,pointer-events,opacity,color,border,border-width,border-style,border-color,border-top,border-top-width,border-top-style,border-top-color,border-right,border-right-width,border-right-style,border-right-color,border-bottom,border-bottom-width,border-bottom-style,border-bottom-color,border-left,border-left-width,border-left-style,border-left-color,border-radius,border-top-left-radius,border-top-right-radius,border-bottom-right-radius,border-bottom-left-radius,border-image,border-image-source,border-image-slice,border-image-width,border-image-outset,border-image-repeat,outline,outline-width,outline-style,outline-color,outline-offset,background,background-color,background-image,background-repeat,background-attachment,background-position,background-position-x,background-position-y,background-clip,background-origin,background-size,box-decoration-break,box-shadow,text-shadow
|
||||
ij_scss_properties_order = font, font-family, font-size, font-weight, font-style, font-variant, font-size-adjust, font-stretch, line-height, position, z-index, top, right, bottom, left, display, visibility, float, clear, overflow, overflow-x, overflow-y, clip, zoom, align-content, align-items, align-self, flex, flex-flow, flex-basis, flex-direction, flex-grow, flex-shrink, flex-wrap, justify-content, order, box-sizing, width, min-width, max-width, height, min-height, max-height, margin, margin-top, margin-right, margin-bottom, margin-left, padding, padding-top, padding-right, padding-bottom, padding-left, table-layout, empty-cells, caption-side, border-spacing, border-collapse, list-style, list-style-position, list-style-type, list-style-image, content, quotes, counter-reset, counter-increment, resize, cursor, user-select, nav-index, nav-up, nav-right, nav-down, nav-left, transition, transition-delay, transition-timing-function, transition-duration, transition-property, transform, transform-origin, animation, animation-name, animation-duration, animation-play-state, animation-timing-function, animation-delay, animation-iteration-count, animation-direction, text-align, text-align-last, vertical-align, white-space, text-decoration, text-emphasis, text-emphasis-color, text-emphasis-style, text-emphasis-position, text-indent, text-justify, letter-spacing, word-spacing, text-outline, text-transform, text-wrap, text-overflow, text-overflow-ellipsis, text-overflow-mode, word-wrap, word-break, tab-size, hyphens, pointer-events, opacity, color, border, border-width, border-style, border-color, border-top, border-top-width, border-top-style, border-top-color, border-right, border-right-width, border-right-style, border-right-color, border-bottom, border-bottom-width, border-bottom-style, border-bottom-color, border-left, border-left-width, border-left-style, border-left-color, border-radius, border-top-left-radius, border-top-right-radius, border-bottom-right-radius, border-bottom-left-radius, border-image, border-image-source, border-image-slice, border-image-width, border-image-outset, border-image-repeat, outline, outline-width, outline-style, outline-color, outline-offset, background, background-color, background-image, background-repeat, background-attachment, background-position, background-position-x, background-position-y, background-clip, background-origin, background-size, box-decoration-break, box-shadow, text-shadow
|
||||
ij_scss_space_after_colon = true
|
||||
ij_scss_space_before_opening_brace = true
|
||||
ij_scss_use_double_quotes = true
|
||||
@@ -174,7 +174,7 @@ ij_typescript_array_initializer_wrap = off
|
||||
ij_typescript_assignment_wrap = off
|
||||
ij_typescript_binary_operation_sign_on_next_line = false
|
||||
ij_typescript_binary_operation_wrap = off
|
||||
ij_typescript_blacklist_imports = rxjs/Rx,node_modules/**,**/node_modules/**,@angular/material,@angular/material/typings/**
|
||||
ij_typescript_blacklist_imports = rxjs/Rx, node_modules/**, **/node_modules/**, @angular/material, @angular/material/typings/**
|
||||
ij_typescript_blank_lines_after_imports = 1
|
||||
ij_typescript_blank_lines_around_class = 1
|
||||
ij_typescript_blank_lines_around_field = 0
|
||||
@@ -362,7 +362,7 @@ ij_javascript_array_initializer_wrap = off
|
||||
ij_javascript_assignment_wrap = off
|
||||
ij_javascript_binary_operation_sign_on_next_line = false
|
||||
ij_javascript_binary_operation_wrap = off
|
||||
ij_javascript_blacklist_imports = rxjs/Rx,node_modules/**,**/node_modules/**,@angular/material,@angular/material/typings/**
|
||||
ij_javascript_blacklist_imports = rxjs/Rx, node_modules/**, **/node_modules/**, @angular/material, @angular/material/typings/**
|
||||
ij_javascript_blank_lines_after_imports = 1
|
||||
ij_javascript_blank_lines_around_class = 1
|
||||
ij_javascript_blank_lines_around_field = 0
|
||||
@@ -733,7 +733,7 @@ ij_php_spaces_within_parentheses = false
|
||||
ij_php_spaces_within_short_echo_tags = true
|
||||
ij_php_spaces_within_switch_parentheses = false
|
||||
ij_php_spaces_within_while_parentheses = false
|
||||
ij_php_special_else_if_treatment = false
|
||||
ij_php_special_else_if_treatment = true
|
||||
ij_php_subpackage_weight = 28
|
||||
ij_php_ternary_operation_signs_on_next_line = false
|
||||
ij_php_ternary_operation_wrap = off
|
||||
@@ -768,23 +768,23 @@ ij_json_spaces_within_brackets = false
|
||||
ij_json_wrap_long_lines = false
|
||||
|
||||
[{*.htm,*.html,*.sht,*.shtm,*.shtml}]
|
||||
ij_html_add_new_line_before_tags = body,div,p,form,h1,h2,h3
|
||||
ij_html_add_new_line_before_tags = body, div, p, form, h1, h2, h3
|
||||
ij_html_align_attributes = true
|
||||
ij_html_align_text = false
|
||||
ij_html_attribute_wrap = normal
|
||||
ij_html_block_comment_add_space = false
|
||||
ij_html_block_comment_at_first_column = true
|
||||
ij_html_do_not_align_children_of_min_lines = 0
|
||||
ij_html_do_not_break_if_inline_tags = title,h1,h2,h3,h4,h5,h6,p
|
||||
ij_html_do_not_indent_children_of_tags = html,body,thead,tbody,tfoot
|
||||
ij_html_do_not_break_if_inline_tags = title, h1, h2, h3, h4, h5, h6, p
|
||||
ij_html_do_not_indent_children_of_tags = html, body, thead, tbody, tfoot
|
||||
ij_html_enforce_quotes = false
|
||||
ij_html_inline_tags = a,abbr,acronym,b,basefont,bdo,big,br,cite,cite,code,dfn,em,font,i,img,input,kbd,label,q,s,samp,select,small,span,strike,strong,sub,sup,textarea,tt,u,var
|
||||
ij_html_inline_tags = a, abbr, acronym, b, basefont, bdo, big, br, cite, cite, code, dfn, em, font, i, img, input, kbd, label, q, s, samp, select, small, span, strike, strong, sub, sup, textarea, tt, u, var
|
||||
ij_html_keep_blank_lines = 2
|
||||
ij_html_keep_indents_on_empty_lines = false
|
||||
ij_html_keep_line_breaks = true
|
||||
ij_html_keep_line_breaks_in_text = true
|
||||
ij_html_keep_whitespaces = false
|
||||
ij_html_keep_whitespaces_inside = span,pre,textarea
|
||||
ij_html_keep_whitespaces_inside = span, pre, textarea
|
||||
ij_html_line_comment_at_first_column = true
|
||||
ij_html_new_line_after_last_attribute = never
|
||||
ij_html_new_line_before_first_attribute = never
|
||||
|
||||
7
.idea/codeStyles/Project.xml
generated
Normal file
7
.idea/codeStyles/Project.xml
generated
Normal file
@@ -0,0 +1,7 @@
|
||||
<component name="ProjectCodeStyleConfiguration">
|
||||
<code_scheme name="Project" version="173">
|
||||
<codeStyleSettings language="PHP">
|
||||
<option name="SPECIAL_ELSE_IF_TREATMENT" value="true" />
|
||||
</codeStyleSettings>
|
||||
</code_scheme>
|
||||
</component>
|
||||
1
.idea/sqldialects.xml
generated
1
.idea/sqldialects.xml
generated
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="SqlDialectMappings">
|
||||
<file url="file://$PROJECT_DIR$/public_html/gest-lib/gestione_ricambistica/sql/getMaterialiRicambio.sql" dialect="TSQL" />
|
||||
<file url="file://$PROJECT_DIR$/public_html/gest-lib/monitoraggio_linee_v2/sql/listGiacenzeDisponibili.sql" dialect="TSQL" />
|
||||
<file url="file://$PROJECT_DIR$/public_html/gest-lib/pian_acc_rossg/sql/get-stato-lavorazioni.sql" dialect="TSQL" />
|
||||
<file url="file://$PROJECT_DIR$/public_html/gest-lib/pian_acc_rossg/sql/get-stato-versamenti.sql" dialect="TSQL" />
|
||||
|
||||
@@ -96,7 +96,9 @@ class EntityItem {
|
||||
}
|
||||
|
||||
public static function is_entityItem($value) {
|
||||
return !is_null($value) && gettype($value) == "object" && (get_class($value) == "EntityItem" || is_subclass_of($value, "EntityItem"));
|
||||
return !is_null($value) && gettype($value) == "object"
|
||||
&& (get_class($value) == "EntityItem"
|
||||
|| is_subclass_of($value, "EntityItem"));
|
||||
}
|
||||
|
||||
public function count_entityChildren($key) {
|
||||
@@ -161,16 +163,22 @@ class EntityItem {
|
||||
if ($value instanceof DateTime) {
|
||||
$type = Format::strtotimeYMDHMS;
|
||||
$value = $value->format($type);
|
||||
} else if (\Utility\Date::isValidUnixtime($value, $numberOnly)) {
|
||||
$value = strftime(Format::strftimeYMDHMS, $value);
|
||||
} else {
|
||||
try {
|
||||
$dateTime = DateTime::createFromFormat(DateTime::ISO8601, $value);
|
||||
if (\Utility\Date::isValidUnixtime($value, $numberOnly)) {
|
||||
$value = strftime(Format::strftimeYMDHMS, $value);
|
||||
} else {
|
||||
try {
|
||||
$dateTime = DateTime::createFromFormat(DateTime::ISO8601, $value);
|
||||
|
||||
if ($dateTime) {
|
||||
$value = $dateTime->format(Format::strtotimeYMDHMS);
|
||||
if (!$dateTime) {
|
||||
$dateTime = DateTime::createFromFormat("Y-m-d\TH:i:s", $value);
|
||||
}
|
||||
|
||||
if ($dateTime) {
|
||||
$value = $dateTime->format(Format::strtotimeYMDHMS);
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -188,9 +196,15 @@ class EntityItem {
|
||||
try {
|
||||
|
||||
$dateTime = $value instanceof DateTime ? $value : new DateTime($value);
|
||||
if (!$dateTime) {
|
||||
$dateTime = DateTime::createFromFormat("Y-m-d\TH:i:s", $value);
|
||||
}
|
||||
|
||||
$value = $dateTime->format(Format::strtotimeYMD);
|
||||
} catch (Exception $e) {
|
||||
$dateTime = new DateTime($value);
|
||||
$value = $dateTime->format(Format::strtotimeYMD);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -232,19 +246,25 @@ class EntityItem {
|
||||
} else {
|
||||
$value = $setNullConstant; // il valore da attribuire al NULL è passato nell'argument
|
||||
}
|
||||
} else if (is_string($value)) {
|
||||
if ($key != "query" && $key != "whereCond") {
|
||||
$value = str_replace("''", "'", $value);
|
||||
}
|
||||
} else if (gettype($value) == "object" && get_class($value) == "EntityArray") {
|
||||
$childEntityArray = $this->get_childEntityArray($key);
|
||||
foreach ($value->get_children() as $EntityItem) {
|
||||
$childEntityArray->append($EntityItem);
|
||||
}
|
||||
} else {
|
||||
if (is_string($value)) {
|
||||
if ($key != "query" && $key != "whereCond") {
|
||||
$value = str_replace("''", "'", $value);
|
||||
}
|
||||
} else {
|
||||
if (gettype($value) == "object" && get_class($value) == "EntityArray") {
|
||||
$childEntityArray = $this->get_childEntityArray($key);
|
||||
foreach ($value->get_children() as $EntityItem) {
|
||||
$childEntityArray->append($EntityItem);
|
||||
}
|
||||
|
||||
return $this;
|
||||
} else if (\Query::is_typeQuery($value)) {
|
||||
$value = $value->getSql();
|
||||
return $this;
|
||||
} else {
|
||||
if (\Query::is_typeQuery($value)) {
|
||||
$value = $value->getSql();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->arr_fields[$key] = $value;
|
||||
@@ -261,12 +281,14 @@ class EntityItem {
|
||||
if (self::is_entityItem($input)) {
|
||||
$this->detail("oldPk", $input);
|
||||
|
||||
} else if (is_array($input) && count($input) > 0) {
|
||||
$OldPk = new \EntityItem;
|
||||
foreach ($input as $key => $value) {
|
||||
$OldPk->set($key, $value);
|
||||
} else {
|
||||
if (is_array($input) && count($input) > 0) {
|
||||
$OldPk = new \EntityItem;
|
||||
foreach ($input as $key => $value) {
|
||||
$OldPk->set($key, $value);
|
||||
}
|
||||
return $this->setOldPk($OldPk);
|
||||
}
|
||||
return $this->setOldPk($OldPk);
|
||||
}
|
||||
|
||||
return $this;
|
||||
@@ -344,8 +366,10 @@ class EntityItem {
|
||||
if ($idx === false) {
|
||||
return $results;
|
||||
|
||||
} else if (isset($results[$idx])) {
|
||||
return $results[$idx];
|
||||
} else {
|
||||
if (isset($results[$idx])) {
|
||||
return $results[$idx];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -505,11 +529,13 @@ class EntityItem {
|
||||
if (is_string($this->cacheFile)) {
|
||||
$filename = $this->cacheFile;
|
||||
|
||||
} else if (!is_null($this->type)) {
|
||||
$filename = \Utility\Str::camelCaseEncode($this->type);
|
||||
|
||||
} else {
|
||||
$filename = "EntityItem";
|
||||
if (!is_null($this->type)) {
|
||||
$filename = \Utility\Str::camelCaseEncode($this->type);
|
||||
|
||||
} else {
|
||||
$filename = "EntityItem";
|
||||
}
|
||||
}
|
||||
|
||||
@Cache::writeR($filename . "_" . date("Ymd-His") . ".json", $this->get_jsonBody(), "logs");
|
||||
|
||||
@@ -100,7 +100,8 @@ class User {
|
||||
public static function get_current_userDepo() {
|
||||
$userName = self::get_current_username();
|
||||
|
||||
$query = self::run_sql("SELECT wtb_depo.cod_mdep FROM mtb_depo INNER JOIN wtb_depo ON mtb_depo.cod_mdep = wtb_depo.cod_mdep WHERE user_name = '{$userName}'");
|
||||
$query
|
||||
= self::run_sql("SELECT wtb_depo.cod_mdep FROM mtb_depo INNER JOIN wtb_depo ON mtb_depo.cod_mdep = wtb_depo.cod_mdep WHERE user_name = '{$userName}'");
|
||||
|
||||
return array_get($query, "cod_mdep");
|
||||
}
|
||||
@@ -108,7 +109,8 @@ class User {
|
||||
public static function get_current_userAllDepos() {
|
||||
$userName = self::get_current_username();
|
||||
|
||||
$query = new Query("SELECT wtb_depo.cod_mdep FROM mtb_depo INNER JOIN wtb_depo ON mtb_depo.cod_mdep = wtb_depo.cod_mdep WHERE user_name = '{$userName}'");
|
||||
$query
|
||||
= new Query("SELECT wtb_depo.cod_mdep FROM mtb_depo INNER JOIN wtb_depo ON mtb_depo.cod_mdep = wtb_depo.cod_mdep WHERE user_name = '{$userName}'");
|
||||
$result = $query->firstColumn()->toRet(false)->execute();
|
||||
|
||||
return $result;
|
||||
@@ -425,15 +427,16 @@ class User {
|
||||
|
||||
public static function isGestioneAbilitata($gestione) {
|
||||
if (self::is_amministratoreSistema()) {
|
||||
$flag = "S";
|
||||
} else {
|
||||
$query = new Query("SELECT flag_abil FROM stb_abil sa INNER JOIN stb_menu_opz sm ON sa.cod_opz = sm.cod_opz WHERE sa.user_name = '[user]' AND sm.gest_name = '[gest]'");
|
||||
$query
|
||||
->setVar("user", self::get_current_username())
|
||||
->setVar("gest", $gestione);
|
||||
$flag = $query->firstRowFirstValue()->toRet(false)->execute();
|
||||
return true;
|
||||
}
|
||||
|
||||
$query
|
||||
= new Query("SELECT flag_abil FROM stb_abil sa INNER JOIN stb_menu_opz sm ON sa.cod_opz = sm.cod_opz WHERE sa.user_name = '[user]' AND sm.gest_name = '[gest]'");
|
||||
$query
|
||||
->setVar("user", self::get_current_username())
|
||||
->setVar("gest", $gestione);
|
||||
$flag = $query->firstRowFirstValue()->toRet(false)->execute();
|
||||
|
||||
// N = permessi negati / R = solo visualizzazione
|
||||
return $flag != null && $flag != "N" && $flag != "R";
|
||||
}
|
||||
@@ -462,7 +465,8 @@ class User {
|
||||
$valid = preg_match("/^[a-zA-Z\d]{5,}\$/", $username);
|
||||
|
||||
if (!$valid) {
|
||||
$message = "Nome utente non valido. Sono permessi solo caratteri alfanumerici ed un minimo 5 caratteri.";
|
||||
$message
|
||||
= "Nome utente non valido. Sono permessi solo caratteri alfanumerici ed un minimo 5 caratteri.";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -484,4 +488,4 @@ class User {
|
||||
$userSetup = new GestSetupWebUser();
|
||||
return $userSetup->gestName($gestName)->section($section)->keySection($keySection)->userName(self::get_current_username())->defaultValue($defaultValue)->asBoolean()->get();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
#navbar-messenger>a,#navbar-user>a{color:#fff !important}nav#nb-main .navbar-center #titlebar{color:#f5f5f5}.navbar-default{background-color:#e30613;border-color:#b50511}.navbar-default .navbar-brand{color:#f5f5f5}.navbar-default .navbar-brand:hover,.navbar-default .navbar-brand:focus{color:#fff}.navbar-default .navbar-text{color:#f5f5f5}.navbar-default .navbar-nav>li>a{color:#f5f5f5}.navbar-default .navbar-nav>li>a:hover,.navbar-default .navbar-nav>li>a:focus{color:#fff}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:hover,.navbar-default .navbar-nav>.active>a:focus{color:#fff !important;background-color:#b50511}.navbar-default .navbar-nav>.open:not(.active)>a,.navbar-default .navbar-nav>.open:not(.active)>a:hover,.navbar-default .navbar-nav>.open:not(.active)>a:focus{color:#fff !important;background-color:#b50511}.navbar-default .navbar-toggle{border-color:#b50511}.navbar-default .navbar-toggle:hover,.navbar-default .navbar-toggle:focus{background-color:#b50511}.navbar-default .navbar-toggle .icon-bar{background-color:#f5f5f5}.navbar-default .navbar-link{color:#f5f5f5}.navbar-default .navbar-link:hover{color:#fff}@media(max-width: 767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#f5f5f5}.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus{color:#fff}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus{color:#fff !important;background-color:#b50511}}#bt_nb-side-dismiss>i,#bt_nb-side-collapse>i{color:#fff}#nb-side>div>.navbar{background-color:#e30613;border-color:#b50511}#panel-login>div.panel-heading{background-color:#e30613}/*# sourceMappingURL=custom.css.map */
|
||||
@@ -1,22 +0,0 @@
|
||||
#navbar-messenger, #navbar-user {
|
||||
> a {
|
||||
color: #fff !important;
|
||||
}
|
||||
}
|
||||
|
||||
/** NAVBAR */
|
||||
/* warning: ho generato con twbscolor, e aggiunto $bgActive, $colActive */
|
||||
|
||||
$bgDefault: #E30613;
|
||||
$bgHighlight: #b50511;
|
||||
$bgActive: #b50511;
|
||||
|
||||
$colDefault: #f5f5f5;
|
||||
$colHighlight: #fff;
|
||||
$colActive: #fff;
|
||||
|
||||
@import "../navbar";
|
||||
|
||||
#panel-login > div.panel-heading {
|
||||
background-color: $bgDefault;
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 9.6 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 5.9 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 14 KiB |
@@ -24,7 +24,7 @@
|
||||
"public_url": "https://sales.rossogargano.com:6443/portale"
|
||||
},
|
||||
"dbNameWeb": "ROSSOGARGANOCONT",
|
||||
"azienda": "ROSSOGARGANO",
|
||||
"azienda": "ROSSOGARGANOCONT",
|
||||
"logo_azienda": "logo_azienda.png",
|
||||
"sc_project": null,
|
||||
"sc_security": null
|
||||
|
||||
@@ -17,4 +17,4 @@ if (isset($_GET["popup-collo"])) {
|
||||
} else if (Controller::is_ajaxRequest()) {
|
||||
$Ret = new Ret;
|
||||
$Ret->set_errorCode(ErrorHandler::UNEXPECTED_AJAX_METHOD)->display();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -433,6 +433,11 @@ class ContrattiDiVendita {
|
||||
}
|
||||
|
||||
public static function generaFatturaContoDeposito($data) {
|
||||
|
||||
if (!self::canUserBillOnDepositAccount()) {
|
||||
return Ret::errorCode(ErrorHandler::MISSING_PARAMS, "generaFatturaContoDeposito");
|
||||
}
|
||||
|
||||
$idContratto = array_get($data, "idContratto");
|
||||
$codAnag = array_get($data, "codAnag");
|
||||
$articoli = array_get($data, "articoli");
|
||||
@@ -486,6 +491,14 @@ class ContrattiDiVendita {
|
||||
|
||||
|
||||
}
|
||||
|
||||
private static function canUserBillOnDepositAccount($userName) {
|
||||
$codDtip = self::getCodDtipContoDeposito();
|
||||
$userEnabled = User::isGestioneAbilitata("cmovi");
|
||||
if (empty($codDtip)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
include 'StatoOfferta.php';
|
||||
|
||||
@@ -10,7 +10,8 @@ import {
|
||||
} from "@js/ims/ems-core.module.js";
|
||||
import {
|
||||
getDatasourceAutomezzi,
|
||||
getDatasourceFornTrasp, getDatasourceMezzi,
|
||||
getDatasourceFornTrasp,
|
||||
getDatasourceMezzi,
|
||||
getDatasourcePorti,
|
||||
getDatasourceVettori
|
||||
} from "@js/api/stdutils.js";
|
||||
@@ -107,9 +108,7 @@ export default class PopupCreaViaggio extends BasePopup<VtbViaggi> {
|
||||
|
||||
override async onShow($div: JQuery<HTMLElement>) {
|
||||
this.kendoForm = $div.find("#creaViaggio").kendoForm({
|
||||
formData: {
|
||||
...this.formData.toJSON()
|
||||
},
|
||||
formData: this.formData,
|
||||
validatable: {
|
||||
validateOnBlur: true,
|
||||
validationSummary: false,
|
||||
|
||||
@@ -1,28 +1,38 @@
|
||||
SELECT mtb_aart.cod_mart AS codMart,
|
||||
mtb_aart.descrizione AS descrizione,
|
||||
mtb_aart.descrizione_estesa AS descrizioneEstesa,
|
||||
mtb_aart.unt_mis AS untMis,
|
||||
mtb_aart.cod_mgrp AS codMgrp,
|
||||
mtb_aart.cod_msgr AS codMsgr,
|
||||
mtb_aart.cod_msfa AS codMsfa,
|
||||
mtb_aart.qta_cnf AS qtaCnf,
|
||||
mtb_aart.cod_aliq AS codAliq,
|
||||
bar_code AS barcode,
|
||||
cod_barre_imb AS barcodeImballo,
|
||||
mtb_grup.descrizione AS gruppo,
|
||||
mtb_sgrp.descrizione AS sottoGruppo,
|
||||
mtb_sfam.descrizione AS sottoFamiglia,
|
||||
mtb_aart.posizione AS posizione,
|
||||
inv.posizione AS posizioneGiac,
|
||||
SUM(qta_col) AS giacenza
|
||||
SELECT mtb_aart.cod_mart AS codMart,
|
||||
mtb_aart.descrizione AS descrizione,
|
||||
mtb_aart.descrizione_estesa AS descrizioneEstesa,
|
||||
mtb_aart.unt_mis AS untMis,
|
||||
mtb_aart.cod_mgrp AS codMgrp,
|
||||
mtb_aart.cod_msgr AS codMsgr,
|
||||
mtb_aart.cod_msfa AS codMsfa,
|
||||
mtb_aart.qta_cnf AS qtaCnf,
|
||||
mtb_aart.cod_aliq AS codAliq,
|
||||
bar_code AS barcode,
|
||||
cod_barre_imb AS barcodeImballo,
|
||||
mtb_grup.descrizione AS gruppo,
|
||||
mtb_sgrp.descrizione AS sottoGruppo,
|
||||
mtb_sfam.descrizione AS sottoFamiglia,
|
||||
mtb_aart.posizione AS posizione,
|
||||
ISNULL(inv.posizione, 'N/D') + IIF(ISNULL(mtb_depo_posizioni.flag_mono_collo, 'N') = 'N', ' ' +
|
||||
CASE
|
||||
WHEN ser_collo = 'UL'
|
||||
THEN 'U' +
|
||||
RIGHT(CONVERT(VARCHAR(4), YEAR(inv.data_collo)), 2) +
|
||||
FORMAT(inv.num_collo, '0000000')
|
||||
ELSE
|
||||
inv.barcode_ul END,
|
||||
'') AS posizioneGiac,
|
||||
SUM(qta_col) AS giacenza
|
||||
FROM mtb_aart
|
||||
INNER JOIN mtb_grup ON mtb_aart.cod_mgrp = mtb_grup.cod_mgrp
|
||||
LEFT OUTER JOIN mtb_sgrp ON mtb_aart.cod_mgrp = mtb_sgrp.cod_mgrp AND mtb_aart.cod_msgr = mtb_sgrp.cod_msgr
|
||||
LEFT OUTER JOIN mtb_sfam ON mtb_aart.cod_mgrp = mtb_sfam.cod_mgrp AND mtb_aart.cod_msgr = mtb_sfam.cod_msgr AND
|
||||
mtb_aart.cod_msfa = mtb_sfam.cod_msfa
|
||||
LEFT OUTER JOIN mvw_sitart_udc_det_inventario inv ON inv.cod_mart = mtb_aart.cod_mart
|
||||
LEFT OUTER JOIN mtb_depo_posizioni ON inv.posizione = mtb_depo_posizioni.posizione
|
||||
WHERE mtb_grup.tipo_mgrp = 'RIC'
|
||||
GROUP BY inv.posizione, mtb_sgrp.descrizione, mtb_sfam.descrizione, mtb_grup.descrizione,
|
||||
cod_barre_imb, bar_code, mtb_aart.cod_aliq, mtb_aart.qta_cnf, mtb_aart.cod_msfa, mtb_aart.cod_msgr,
|
||||
mtb_aart.cod_mgrp, mtb_aart.unt_mis, mtb_aart.descrizione, mtb_aart.cod_mart, mtb_aart.descrizione_estesa,
|
||||
mtb_aart.posizione
|
||||
mtb_aart.posizione, flag_mono_collo, barcode_ul,
|
||||
inv.ser_collo, inv.data_collo, inv.num_collo
|
||||
@@ -8,7 +8,7 @@ $(function () {
|
||||
_impostazioni.init();
|
||||
});
|
||||
|
||||
const _impostazioni = {
|
||||
export let _impostazioni = {
|
||||
module: null,
|
||||
gestioni: null,
|
||||
|
||||
@@ -68,7 +68,7 @@ const _impostazioni = {
|
||||
});
|
||||
|
||||
$btnGroup.find(".btEditUserProp").on("click", function () {
|
||||
new PopupUser()
|
||||
new PopupUser(self)
|
||||
.gestName(gestName)
|
||||
.section(section)
|
||||
.keySection(keySection)
|
||||
@@ -1101,7 +1101,7 @@ const _impostazioni = {
|
||||
$inputGroupBtn.append(buttonSave);
|
||||
|
||||
$inputGroupBtn.find(".btSave").on("click", function () {
|
||||
value = queryDefault ? $gestSetup.find("select").val() : $gestSetup.find(".value").getValue();
|
||||
const value = queryDefault ? $gestSetup.find("select").val() : $gestSetup.find(".value").getValue();
|
||||
|
||||
_impostazioni.updatePropValue(gestSetupKey, value, $(this), $gestSetup, false, true).done(function () {
|
||||
$gestSetup.find(".btSave").disabled();
|
||||
@@ -1246,4 +1246,10 @@ const _impostazioni = {
|
||||
})
|
||||
.show();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
window._impostazioni = {
|
||||
..._impostazioni, ...window._impostazioni
|
||||
};
|
||||
|
||||
_impostazioni = window._impostazioni;
|
||||
@@ -1,6 +1,7 @@
|
||||
import FormPopup, {SubmitResponse} from "@js/FormPopup.js";
|
||||
import {DuplicaListinoDTO, OperationType, VtbListData} from "@js/ims/ems-engine.module.js";
|
||||
import {getListDivi} from "@js/api/stdutils.js";
|
||||
import Model = kendo.data.Model;
|
||||
|
||||
export default class PopupVtbListData extends FormPopup<VtbListData> {
|
||||
private readonly vtbListData?: VtbListData
|
||||
@@ -24,11 +25,11 @@ export default class PopupVtbListData extends FormPopup<VtbListData> {
|
||||
|
||||
this.options = {
|
||||
...this.options,
|
||||
formData: {
|
||||
formData: new Model({
|
||||
...this.vtbListData,
|
||||
codVlis: this.duplicate ? null : this.vtbListData?.codVlis,
|
||||
descrizione: this.duplicate ? null : this.vtbListData?.descrizione
|
||||
} as any,
|
||||
}) as any,
|
||||
layout: "grid",
|
||||
grid: {
|
||||
cols: 4,
|
||||
|
||||
@@ -88,11 +88,10 @@ class Modellini {
|
||||
}
|
||||
|
||||
private static function canEditCreator() {
|
||||
return User::group_is(User::AMMINISTRATORE_SISTEMA) ||
|
||||
User::group_is(User::AMMINISTRATORE_AZIENDALE) ||
|
||||
User::group_is(User::RESPONSABILE_EDP) ||
|
||||
strtoupper(User::get_current_username()) === strtoupper("SEGNALAZIONI") ||
|
||||
User::hasSetup("PVM", "MODELLINI", "CAN_EDIT_CREATOR", false);
|
||||
return User::group_is(User::AMMINISTRATORE_SISTEMA) || User::group_is(User::AMMINISTRATORE_AZIENDALE)
|
||||
|| User::group_is(User::RESPONSABILE_EDP)
|
||||
|| strtoupper(User::get_current_username()) === strtoupper("SEGNALAZIONI")
|
||||
|| User::hasSetup("PVM", "MODELLINI", "CAN_EDIT_CREATOR", false);
|
||||
}
|
||||
|
||||
public static function getLinkedUsers(array $data) {
|
||||
@@ -102,7 +101,8 @@ class Modellini {
|
||||
$ret->set_error("impossibile identificare la categoria selezionata");
|
||||
$ret->display();
|
||||
}
|
||||
$query = new Query("SELECT DISTINCT stb_user.* FROM stb_user LEFT JOIN srl_activity_users sau ON stb_user.user_name = sau.user_name WHERE sau.activity_id = '[activityId]'");
|
||||
$query
|
||||
= new Query("SELECT DISTINCT stb_user.* FROM stb_user LEFT JOIN srl_activity_users sau ON stb_user.user_name = sau.user_name WHERE sau.activity_id = '[activityId]'");
|
||||
$query
|
||||
->profileDB(self::get_profileDb())
|
||||
->setVar("activityId", $activityId);
|
||||
@@ -110,26 +110,28 @@ class Modellini {
|
||||
}
|
||||
|
||||
public static function canCreateNewCategories() {
|
||||
return User::group_is(self::getDesignedUserGroup()) || User::group_is(User::AMMINISTRATORE_SISTEMA) || User::group_is(User::AMMINISTRATORE_AZIENDALE);
|
||||
return User::group_is(self::getDesignedUserGroup()) || User::group_is(User::AMMINISTRATORE_SISTEMA)
|
||||
|| User::group_is(User::AMMINISTRATORE_AZIENDALE);
|
||||
}
|
||||
|
||||
public static function canCreateInspections() {
|
||||
return User::group_is(self::getDesignedUserGroup()) ||
|
||||
User::group_is(User::AMMINISTRATORE_SISTEMA) ||
|
||||
User::group_is(User::AMMINISTRATORE_AZIENDALE) ||
|
||||
strtoupper(User::get_current_username()) == strtoupper("deperibili") ||
|
||||
strtoupper(User::get_current_username()) == strtoupper("haccp") ||
|
||||
strtoupper(User::get_current_username()) == strtoupper("macelleria") ||
|
||||
strtoupper(User::get_current_username()) == strtoupper("ortofrutta") ||
|
||||
strtoupper(User::get_current_username()) == strtoupper("gastronomia") ||
|
||||
strtoupper(User::get_current_username()) == strtoupper("ingpappalettera") ||
|
||||
strtoupper(User::get_current_username()) == strtoupper("SEGNALAZIONI");
|
||||
return User::group_is(self::getDesignedUserGroup()) || User::group_is(User::AMMINISTRATORE_SISTEMA)
|
||||
|| User::group_is(User::AMMINISTRATORE_AZIENDALE)
|
||||
|| strtoupper(User::get_current_username()) == strtoupper("deperibili")
|
||||
|| strtoupper(User::get_current_username()) == strtoupper("haccp")
|
||||
|| strtoupper(User::get_current_username()) == strtoupper("macelleria")
|
||||
|| strtoupper(User::get_current_username()) == strtoupper("ortofrutta")
|
||||
|| strtoupper(User::get_current_username()) == strtoupper("gastronomia")
|
||||
|| strtoupper(User::get_current_username()) == strtoupper("ingpappalettera")
|
||||
|| strtoupper(User::get_current_username()) == strtoupper("SEGNALAZIONI");
|
||||
}
|
||||
|
||||
private static function canSendSignatureRequest() {
|
||||
$setup = new GestSetup();
|
||||
$enabledUsers = $setup->gestName("PVM")->section("MODELLINI")->keySection("SIGNATURE_ENABLED_USERS")->profileDB(self::get_profileDb())->get();
|
||||
return User::group_is(User::AMMINISTRATORE_SISTEMA) || User::group_is(User::AMMINISTRATORE_AZIENDALE) || in_array(User::get_current_username(), explode("|", $enabledUsers));
|
||||
$enabledUsers
|
||||
= $setup->gestName("PVM")->section("MODELLINI")->keySection("SIGNATURE_ENABLED_USERS")->profileDB(self::get_profileDb())->get();
|
||||
return User::group_is(User::AMMINISTRATORE_SISTEMA) || User::group_is(User::AMMINISTRATORE_AZIENDALE)
|
||||
|| in_array(User::get_current_username(), explode("|", $enabledUsers));
|
||||
}
|
||||
|
||||
public static function getEstimatedEndDateDays() {
|
||||
@@ -422,12 +424,14 @@ class Modellini {
|
||||
|
||||
if (isset($issue)) {
|
||||
if ($issue["user_name"] !== $userName) {
|
||||
$description = "L'utente " . User::get_current_username() . " ti ha affidato la segnalazione: [" . $issue["activity_id"] . "]";
|
||||
$description = "L'utente " . User::get_current_username() . " ti ha affidato la segnalazione: ["
|
||||
. $issue["activity_id"] . "]";
|
||||
self::notifyUsers($userNames, "Segnalazione Ricevuta", $description);
|
||||
}
|
||||
} else {
|
||||
if ($userName !== User::get_current_username()) {
|
||||
$description = "L'utente " . User::get_current_username() . " Ha inserito una nuova segnalazione a tuo carico";
|
||||
$description = "L'utente " . User::get_current_username()
|
||||
. " Ha inserito una nuova segnalazione a tuo carico";
|
||||
self::notifyUsers($userNames, "Nuova segnalazione ricevuta", $description);
|
||||
}
|
||||
}
|
||||
@@ -493,8 +497,11 @@ class Modellini {
|
||||
$ret->display();
|
||||
}
|
||||
$issueQuery = new Query();
|
||||
$issue = $issueQuery->select()->from("stb_activity")->where("activity_id", $issueId)->toRet(false)->date2ts()->firstRow()->execute();
|
||||
if (!(User::group_is(self::getDesignedUserGroup()) || User::group_is(User::AMMINISTRATORE_SISTEMA)) && (!$issue["user_name"] === User::get_current_username() && !$issue["user_creator"] === User::get_current_username())) {
|
||||
$issue
|
||||
= $issueQuery->select()->from("stb_activity")->where("activity_id", $issueId)->toRet(false)->date2ts()->firstRow()->execute();
|
||||
if (!(User::group_is(self::getDesignedUserGroup()) || User::group_is(User::AMMINISTRATORE_SISTEMA))
|
||||
&& (!$issue["user_name"] === User::get_current_username()
|
||||
&& !$issue["user_creator"] === User::get_current_username())) {
|
||||
$error = new Ret();
|
||||
$error->set_error("Spiacenti, il tuo utente non è abilitato alla eliminazione di questa segnalazione!");
|
||||
$error->display();
|
||||
@@ -522,16 +529,21 @@ class Modellini {
|
||||
$ret = $issue->send();
|
||||
if ($ret->is_OK()) {
|
||||
if (User::get_current_username() !== $data["userCreator"]) {
|
||||
$description = "L'utente '" . User::get_current_username() . "' ha eliminato una attività in cui eri coinvolto";
|
||||
$description = "L'utente '" . User::get_current_username()
|
||||
. "' ha eliminato una attività in cui eri coinvolto";
|
||||
self::notifyUsers($data["userCreator"], "Segnalazione eliminata", $description);
|
||||
} else if (User::get_current_username() !== $data["userName"]) {
|
||||
$description = "L'utente '" . User::get_current_username() . "' ha eliminato una attività in cui eri coinvolto";
|
||||
self::notifyUsers($data["userName"], "Segnalazione eliminata", $description);
|
||||
} else {
|
||||
if (User::get_current_username() !== $data["userName"]) {
|
||||
$description = "L'utente '" . User::get_current_username()
|
||||
. "' ha eliminato una attività in cui eri coinvolto";
|
||||
self::notifyUsers($data["userName"], "Segnalazione eliminata", $description);
|
||||
}
|
||||
}
|
||||
if ($jfasToCheck) {
|
||||
$query = new Query("SELECT COUNT(*) FROM stb_activity WHERE cod_jfas = '[cod_jfas]'");
|
||||
|
||||
$countActivities = $query->setVar("cod_jfas", $jfasToCheck)->date2ts()->firstRowFirstValue()->toRet(false)->execute();
|
||||
$countActivities
|
||||
= $query->setVar("cod_jfas", $jfasToCheck)->date2ts()->firstRowFirstValue()->toRet(false)->execute();
|
||||
if ($countActivities <= 0) {
|
||||
$jtbFasi = new EntityItem("jtb_fasi");
|
||||
$jtbFasi
|
||||
@@ -636,7 +648,8 @@ class Modellini {
|
||||
->push($issue, $activity)
|
||||
->send();
|
||||
if ($ret->is_OK()) {
|
||||
$description = "L'utente '" . User::get_current_username() . "' ha richiesto la verifica per la segnalazione [" . $activityId . "]";
|
||||
$description = "L'utente '" . User::get_current_username()
|
||||
. "' ha richiesto la verifica per la segnalazione [" . $activityId . "]";
|
||||
$title = "Richiesta verifica segnalazione";
|
||||
$ret = self::notifyUsers($userCreator, $title, $description);
|
||||
}
|
||||
@@ -793,7 +806,8 @@ class Modellini {
|
||||
|
||||
$body = self::getMailBody();
|
||||
$body = preg_replace("/__HOME__/", PVM::get_current_projectPublicUrl(), $body);
|
||||
$body = preg_replace("/__LOGO__/", PVM::get_current_projectPublicUrl() . AziendaUtils::getLogo(User::get_current_profileDb()), $body);
|
||||
$body = preg_replace("/__LOGO__/", PVM::get_current_projectPublicUrl()
|
||||
. AziendaUtils::getLogo(User::get_current_profileDb()), $body);
|
||||
$body = preg_replace("/__TITLE__/", $cc, $body);
|
||||
$body = preg_replace("/__DESCRIPTION__/", $description, $body);
|
||||
$body = preg_replace("/__LINKGESTIONE__/", Controller::current_url(), $body);
|
||||
@@ -886,7 +900,8 @@ class Modellini {
|
||||
$effectiveEndtime = array_key_exists("effectiveEndtime", $issue) ? $issue["effectiveEndtime"] : null;
|
||||
$parentActivityId = array_key_exists("parentActivityId", $issue) ? $issue["parentActivityId"] : null;
|
||||
$estimatedDate = array_key_exists("estimatedDate", $issue) ? $issue["estimatedDate"] : null;
|
||||
$activityDescription = array_key_exists("activityDescription", $issue) ? $issue["activityDescription"] : null;
|
||||
$activityDescription
|
||||
= array_key_exists("activityDescription", $issue) ? $issue["activityDescription"] : null;
|
||||
$note = array_key_exists("note", $issue) ? $issue["note"] : null;
|
||||
$resultDescription = array_key_exists("resultDescription", $issue) ? $issue["resultDescription"] : null;
|
||||
$codJcom = self::getCodJcom();
|
||||
@@ -979,10 +994,13 @@ class Modellini {
|
||||
}
|
||||
|
||||
private static function getNextCodJfas($codJfasParent) {
|
||||
|
||||
$prefix = self::getPrefissoIspezioni();
|
||||
|
||||
$query = new Query();
|
||||
$query
|
||||
->importSqlFile("getNextCodJfas")
|
||||
->setVar("codJfasParent", $codJfasParent);
|
||||
->setVar("prefix", $prefix);
|
||||
$codJfas = $query->date2ts()->firstRowFirstValue()->toRet()->execute();
|
||||
return $codJfas->get_data();
|
||||
}
|
||||
@@ -1063,14 +1081,16 @@ class Modellini {
|
||||
|
||||
if ($ret->is_OK()) {
|
||||
$title = "Sollecito attività " . $parentActivity;
|
||||
$descr = "L'utente <b>" . User::get_current_fullname() . "</b> ti invita a completare al più presto l'attività in oggetto!";
|
||||
$descr = "L'utente <b>" . User::get_current_fullname()
|
||||
. "</b> ti invita a completare al più presto l'attività in oggetto!";
|
||||
$ret = self::notifyUsers($userName, $title, $descr);
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
private static function canSendReminder() {
|
||||
return User::group_is(self::getDesignedUserGroup()) || User::group_is(User::AMMINISTRATORE_SISTEMA) || User::group_is(User::AMMINISTRATORE_AZIENDALE);
|
||||
return User::group_is(self::getDesignedUserGroup()) || User::group_is(User::AMMINISTRATORE_SISTEMA)
|
||||
|| User::group_is(User::AMMINISTRATORE_AZIENDALE);
|
||||
}
|
||||
|
||||
public static function downloadAllegato(array $data) {
|
||||
@@ -1115,7 +1135,8 @@ class Modellini {
|
||||
}
|
||||
|
||||
private static function hasDeviceToken($username) {
|
||||
$sql = "SELECT COUNT(user_name) AS n_devices FROM wtb_user_device_tokens WHERE user_name = '[username]' GROUP BY user_name";
|
||||
$sql
|
||||
= "SELECT COUNT(user_name) AS n_devices FROM wtb_user_device_tokens WHERE user_name = '[username]' GROUP BY user_name";
|
||||
$query = new Query($sql);
|
||||
$nDevices = $query->setVar("username", $username)->toRet(false)->firstRowFirstValue()->toRet(false)->execute();
|
||||
return (is_number($nDevices) && $nDevices > 0);
|
||||
@@ -1242,13 +1263,13 @@ class Modellini {
|
||||
<td bgcolor="#ffffff">
|
||||
<div align="center" style="padding: 0px 15px 0px 15px;">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="500" class="wrapper">
|
||||
|
||||
|
||||
<tbody><tr>
|
||||
<td style="padding: 20px 0px 30px 0px;" class="logo">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tbody><tr>
|
||||
<td bgcolor="#ffffff" width="100" align="left"><a href="__HOME__" target="_blank"><img alt="Logo" src="__LOGO__" width="162" height="80" style="display: block; font-family: Helvetica, Arial, sans-serif; color: #666666; font-size: 16px;" border="0"></a></td>
|
||||
|
||||
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</td>
|
||||
@@ -1269,13 +1290,13 @@ class Modellini {
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tbody><tr>
|
||||
<td>
|
||||
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
@@ -1303,7 +1324,7 @@ class Modellini {
|
||||
</tbody></table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody></table>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -1329,7 +1350,7 @@ class Modellini {
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
|
||||
<tbody><tr>
|
||||
<td style="padding: 20px 0px 20px 0px;">
|
||||
|
||||
|
||||
<table width="500" border="0" cellspacing="0" cellpadding="0" align="center" class="responsive-table">
|
||||
<tbody><tr>
|
||||
<td align="center" valign="middle" style="font-size: 12px; line-height: 18px; font-family: Helvetica, Arial, sans-serif; color:#666666;">
|
||||
@@ -1427,4 +1448,13 @@ EOF;
|
||||
|
||||
return $query->date2iso()->toRet()->execute();
|
||||
}
|
||||
}
|
||||
|
||||
private static function getPrefissoIspezioni() {
|
||||
|
||||
$setup = new GestSetup();
|
||||
return $setup
|
||||
->profileDB(self::get_profileDb())
|
||||
->section("MODELLINI")
|
||||
->keySection("PREFIX_ISPEZIONI")->get();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,100 +9,100 @@ if (isset($_GET["get_activity"])) {
|
||||
} elseif (isset($_GET["get_modellini"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_GET["get_modellini"]);
|
||||
Loader::get_modellini($data)->display();
|
||||
} else if (isset($_GET["search_articoli"])) {
|
||||
} elseif (isset($_GET["search_articoli"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_GET["search_articoli"]);
|
||||
Loader::search_articoli($data)->display();
|
||||
} else if (isset($_GET["search_listiniA"])) {
|
||||
} elseif (isset($_GET["search_listiniA"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_GET["search_listiniA"]);
|
||||
Loader::search_listiniA($data)->display();
|
||||
} else if (isset($_GET["search_users"])) {
|
||||
} elseif (isset($_GET["search_users"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_GET["search_users"]);
|
||||
Loader::search_users($data)->display();
|
||||
} else if (isset($_GET["search_categories"])) {
|
||||
} elseif (isset($_GET["search_categories"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_GET["search_categories"]);
|
||||
Loader::search_categories($data)->display();
|
||||
} else if (isset($_GET["search_subcategories"])) {
|
||||
} elseif (isset($_GET["search_subcategories"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_GET["search_subcategories"]);
|
||||
Loader::search_subcategories($data)->display();
|
||||
} else if (isset($_GET["search_groups"])) {
|
||||
} elseif (isset($_GET["search_groups"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_GET["search_groups"]);
|
||||
Loader::search_groups($data)->display();
|
||||
} else if (isset($_GET["search_luoghi"])) {
|
||||
} elseif (isset($_GET["search_luoghi"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_GET["search_luoghi"]);
|
||||
Loader::search_luoghi($data)->display();
|
||||
} else if (isset($_GET["get_categoriesAndSubs"])) {
|
||||
} elseif (isset($_GET["get_categoriesAndSubs"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_GET["get_categoriesAndSubs"]);
|
||||
Loader::get_categoriesAndSubs($data)->display();
|
||||
} else if (isset($_POST["post_issue"])) {
|
||||
} elseif (isset($_POST["post_issue"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["post_issue"]);
|
||||
Modellini::saveSegnalazione($data)->display();
|
||||
} else if (isset($_POST["post_activity"])) {
|
||||
} elseif (isset($_POST["post_activity"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["post_activity"]);
|
||||
Modellini::saveAttivita($data)->display();
|
||||
} else if (isset($_POST["delete_issue"])) {
|
||||
} elseif (isset($_POST["delete_issue"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["delete_issue"]);
|
||||
Modellini::deleteSegnalazione($data)->display();
|
||||
} else if (isset($_POST["delete_action"])) {
|
||||
} elseif (isset($_POST["delete_action"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["delete_action"]);
|
||||
Modellini::deleteAttivita($data)->display();
|
||||
} else if (isset($_POST["delete_category"])) {
|
||||
} elseif (isset($_POST["delete_category"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["delete_category"]);
|
||||
Modellini::deleteCategoria($data)->display();
|
||||
} else if (isset($_POST["verify_issue"])) {
|
||||
} elseif (isset($_POST["verify_issue"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["verify_issue"]);
|
||||
Modellini::richiediVerifica($data)->display();
|
||||
} else if (isset($_POST["close_issue"])) {
|
||||
} elseif (isset($_POST["close_issue"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["close_issue"]);
|
||||
Modellini::chiudiSegnalazione($data)->display();
|
||||
} else if (isset($_POST["reject_verification"])) {
|
||||
} elseif (isset($_POST["reject_verification"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["reject_verification"]);
|
||||
Modellini::bocciaVerifica($data)->display();
|
||||
} else if (isset($_POST["requestSignature"])) {
|
||||
} elseif (isset($_POST["requestSignature"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["requestSignature"]);
|
||||
Modellini::richiediFirma($data)->display();
|
||||
} else if (isset($_POST["insertSignature"])) {
|
||||
} elseif (isset($_POST["insertSignature"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["insertSignature"]);
|
||||
Modellini::inserisciFirma($data)->display();
|
||||
} else if (isset($_POST["insertMemo"])) {
|
||||
} elseif (isset($_POST["insertMemo"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["insertMemo"]);
|
||||
Modellini::insertMemo($data)->display();
|
||||
} else if (isset($_POST["deleteMemo"])) {
|
||||
} elseif (isset($_POST["deleteMemo"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["deleteMemo"]);
|
||||
Modellini::deleteMemo($data)->display();
|
||||
} else if (isset($_GET["linked_users"])) {
|
||||
} elseif (isset($_GET["linked_users"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_GET["linked_users"]);
|
||||
Modellini::getLinkedUsers($data)->display();
|
||||
} else if (isset($_POST["save_category"])) {
|
||||
} elseif (isset($_POST["save_category"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["save_category"]);
|
||||
Modellini::saveCategoria($data)->display();
|
||||
} else if (isset($_POST["post_inspection"])) {
|
||||
} elseif (isset($_POST["post_inspection"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["post_inspection"]);
|
||||
Modellini::salvaIspezione($data)->display();
|
||||
} else if (isset($_GET["fetch_inspection"])) {
|
||||
} elseif (isset($_GET["fetch_inspection"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_GET["fetch_inspection"]);
|
||||
Modellini::fetchIspezione($data)->display();
|
||||
} else if (isset($_GET["getInspectionPdf"])) {
|
||||
} elseif (isset($_GET["getInspectionPdf"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_GET["getInspectionPdf"]);
|
||||
Modellini::getInspectionPdf($data)->display();
|
||||
} else if (isset($_GET["getIssuePdf"])) {
|
||||
} elseif (isset($_GET["getIssuePdf"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_GET["getIssuePdf"]);
|
||||
Modellini::getIssuePdf($data)->display();
|
||||
} else if (isset($_POST["edit_inspection"])) {
|
||||
} elseif (isset($_POST["edit_inspection"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["post_inspection"]);
|
||||
Modellini::salvaIspezione($data)->display();
|
||||
} else if (isset($_POST["send_reminder"])) {
|
||||
} elseif (isset($_POST["send_reminder"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["send_reminder"]);
|
||||
Modellini::sendReminder($data)->display();
|
||||
} else if (isset($_GET["downloadFile"])) {
|
||||
} elseif (isset($_GET["downloadFile"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_GET["downloadFile"]);
|
||||
Modellini::downloadAllegato($data)->display();
|
||||
} else if (isset($_POST["saveSettings"])) {
|
||||
} elseif (isset($_POST["saveSettings"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["saveSettings"]);
|
||||
Modellini::saveSettings($data)->display();
|
||||
} else if (isset($_GET["getStorico"])) {
|
||||
} elseif (isset($_GET["getStorico"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_GET["getStorico"]);
|
||||
Modellini::getStorico($data)->display();
|
||||
} else if (Controller::is_ajaxRequest()) {
|
||||
} elseif (Controller::is_ajaxRequest()) {
|
||||
$Ret = new Ret;
|
||||
$Ret->set_errorCode(ErrorHandler::UNEXPECTED_AJAX_METHOD)->display();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
SELECT CONCAT('[codJfasParent]', RIGHT('000' + ISNULL(CAST(MAX(cod_value) + 1 as VARCHAR(3)), '1'), 3))
|
||||
from (
|
||||
select CAST(REPLACE(cod_jfas, '[codJfasParent]', '') as INTEGER) as cod_value
|
||||
from jtb_fasi
|
||||
where cod_jfas_parent = '[codJfasParent]'
|
||||
) as cods
|
||||
SELECT CONCAT(
|
||||
'[prefix]',
|
||||
RIGHT('00000' + ISNULL(CAST(MAX(cod_value) + 1 AS VARCHAR(3)), '1'), 5 - LEN('[prefix]'))
|
||||
)
|
||||
FROM (SELECT CAST(RIGHT(cod_jfas, LEN(cod_jfas) - LEN('[prefix]')) AS INTEGER) AS cod_value
|
||||
FROM jtb_fasi
|
||||
WHERE cod_jfas LIKE '[prefix]%'
|
||||
AND ISNUMERIC(RIGHT(cod_jfas, (LEN(cod_jfas) - LEN('[prefix]')))) = 1) AS cods
|
||||
@@ -14,15 +14,17 @@ class MonitoraggioLineeV2 {
|
||||
$ret = self::load_linea($codJfas);
|
||||
|
||||
|
||||
if ($ret->is_KO())
|
||||
if ($ret->is_KO()) {
|
||||
return $ret;
|
||||
}
|
||||
$linea = $ret->get_data();
|
||||
$codJfas = $linea["cod_jfas"];
|
||||
$codMdep = $linea["cod_mdep"];
|
||||
|
||||
$ret = self::getMesSetup($codJfas, $codMdep);
|
||||
if ($ret->is_KO())
|
||||
if ($ret->is_KO()) {
|
||||
return $ret;
|
||||
}
|
||||
|
||||
$mesSetup = $ret->getDto();
|
||||
|
||||
@@ -32,20 +34,65 @@ class MonitoraggioLineeV2 {
|
||||
array("id" => "descrizione_linea", "data" => $linea["descrizione"]),
|
||||
array("id" => "is_auto", "data" => $linea["is_auto"]),
|
||||
array("id" => "settings", "data" => $linea["settings"]),
|
||||
array("id" => "showRichiediPeso", "data" => self::getSetupFromArray($mesSetup, "MES", "SETUP", "RICHIEDI_PESO", self::SETUP_FORMAT_ARRAY, array())),
|
||||
array("id" => "showNumeroIdentificativo", "data" => self::getSetupFromArray($mesSetup, "PVM", "MONITORAGGIO_LINEE_V2", "MOSTRA_INPUT_NUMERO_IDENTIFICATIVO", self::SETUP_FORMAT_BOOLEAN, false)),
|
||||
array("id" => "configCheckResiduoOnStop", "data" => self::getSetupFromArray($mesSetup, "PVM", "MONITORAGGIO_LINEE_V2", "FLAG_CHECK_RESIDUO_ON_STOP", self::SETUP_FORMAT_BOOLEAN, false)),
|
||||
array("id" => "configCaloProdMin", "data" => self::getSetupFromArray($mesSetup, "MES", "SETUP", "CALO_PROD_MIN", self::SETUP_FORMAT_DECIMAL)),
|
||||
array("id" => "configCaloProdMax", "data" => self::getSetupFromArray($mesSetup, "MES", "SETUP", "CALO_PROD_MAX", self::SETUP_FORMAT_DECIMAL)),
|
||||
array("id" => "untMisSecondaria", "data" => self::getSetupFromArray($mesSetup, "PVM", "MONITORAGGIO_LINEE_V2", "UNT_MIS_SECONDARIA", null, "PEDANE")),
|
||||
array("id" => "flagDisableCambioDataProd", "data" => self::getSetupFromArray($mesSetup, "PVM", "MONITORAGGIO_LINEE_V2", "DISABLE_CAMBIO_DATA_PROD", self::SETUP_FORMAT_BOOLEAN, false)),
|
||||
array("id" => "flagAttivaNotificheSilenziosamente", "data" => self::getSetupFromArray($mesSetup, "PVM", "MONITORAGGIO_LINEE_V2", "FLAG_ATTIVA_NOTIFICHE_SILENZIOSAMENTE", self::SETUP_FORMAT_BOOLEAN, false)),
|
||||
array("id" => "isAttivaRientro", "data" => self::getSetupFromArray($mesSetup, "MES", "SETUP", "ATTIVA_RIENTRO", self::SETUP_FORMAT_BOOLEAN, false)),
|
||||
array("id" => "isVersamentoDirettoAbilitato", "data" => self::getSetupFromArray($mesSetup, "PVM", "MONITORAGGIO_LINEE_V2", "ABILITA_VERSAMENTO_DIRETTO", self::SETUP_FORMAT_BOOLEAN, false)),
|
||||
array("id" => "abilitaCreaDuplicaOrdine", "data" => self::getSetupFromArray($mesSetup, "PVM", "MONITORAGGIO_LINEE_V2", "ABILITA_CREA_DUPLICA_ORDINE", self::SETUP_FORMAT_BOOLEAN, false)),
|
||||
array("id" => "isMultipleOrdersOpenAllowed", "data" => self::getSetupFromArray($mesSetup, "PVM", "MONITORAGGIO_LINEE_V2", "ALLOW_MULTIPLE_ORDERS_OPEN", self::SETUP_FORMAT_BOOLEAN, false)),
|
||||
array("id" => "isShowQuarantine", "data" => self::getSetupFromArray($mesSetup, "PVM", "MONITORAGGIO_LINEE_V2", "MOSTRA_QUARANTENA", self::SETUP_FORMAT_BOOLEAN, false)),
|
||||
array("id" => "nomeReportRientro", "data" => self::getSetupFromArray($mesSetup, "MES", "REPORT", "RIENTRO")),
|
||||
array(
|
||||
"id" => "showRichiediPeso",
|
||||
"data" => self::getSetupFromArray($mesSetup, "MES", "SETUP", "RICHIEDI_PESO", self::SETUP_FORMAT_ARRAY, array())
|
||||
),
|
||||
array(
|
||||
"id" => "showNumeroIdentificativo",
|
||||
"data" => self::getSetupFromArray($mesSetup, "PVM", "MONITORAGGIO_LINEE_V2", "MOSTRA_INPUT_NUMERO_IDENTIFICATIVO", self::SETUP_FORMAT_BOOLEAN, false)
|
||||
),
|
||||
array(
|
||||
"id" => "configCheckResiduoOnStop",
|
||||
"data" => self::getSetupFromArray($mesSetup, "PVM", "MONITORAGGIO_LINEE_V2", "FLAG_CHECK_RESIDUO_ON_STOP", self::SETUP_FORMAT_BOOLEAN, false)
|
||||
),
|
||||
array(
|
||||
"id" => "configCaloProdMin",
|
||||
"data" => self::getSetupFromArray($mesSetup, "MES", "SETUP", "CALO_PROD_MIN", self::SETUP_FORMAT_DECIMAL)
|
||||
),
|
||||
array(
|
||||
"id" => "configCaloProdMax",
|
||||
"data" => self::getSetupFromArray($mesSetup, "MES", "SETUP", "CALO_PROD_MAX", self::SETUP_FORMAT_DECIMAL)
|
||||
),
|
||||
array(
|
||||
"id" => "untMisSecondaria",
|
||||
"data" => self::getSetupFromArray($mesSetup, "PVM", "MONITORAGGIO_LINEE_V2", "UNT_MIS_SECONDARIA", null, "PEDANE")
|
||||
),
|
||||
array(
|
||||
"id" => "flagDisableCambioDataProd",
|
||||
"data" => self::getSetupFromArray($mesSetup, "PVM", "MONITORAGGIO_LINEE_V2", "DISABLE_CAMBIO_DATA_PROD", self::SETUP_FORMAT_BOOLEAN, false)
|
||||
),
|
||||
array(
|
||||
"id" => "flagAttivaNotificheSilenziosamente",
|
||||
"data" => self::getSetupFromArray($mesSetup, "PVM", "MONITORAGGIO_LINEE_V2", "FLAG_ATTIVA_NOTIFICHE_SILENZIOSAMENTE", self::SETUP_FORMAT_BOOLEAN, false)
|
||||
),
|
||||
array(
|
||||
"id" => "isAttivaRientro",
|
||||
"data" => self::getSetupFromArray($mesSetup, "MES", "SETUP", "ATTIVA_RIENTRO", self::SETUP_FORMAT_BOOLEAN, false)
|
||||
),
|
||||
array(
|
||||
"id" => "isVersamentoDirettoAbilitato",
|
||||
"data" => self::getSetupFromArray($mesSetup, "PVM", "MONITORAGGIO_LINEE_V2", "ABILITA_VERSAMENTO_DIRETTO", self::SETUP_FORMAT_BOOLEAN, false)
|
||||
),
|
||||
array(
|
||||
"id" => "abilitaCreaDuplicaOrdine",
|
||||
"data" => self::getSetupFromArray($mesSetup, "PVM", "MONITORAGGIO_LINEE_V2", "ABILITA_CREA_DUPLICA_ORDINE", self::SETUP_FORMAT_BOOLEAN, false)
|
||||
),
|
||||
array(
|
||||
"id" => "isMultipleOrdersOpenAllowed",
|
||||
"data" => self::getSetupFromArray($mesSetup, "PVM", "MONITORAGGIO_LINEE_V2", "ALLOW_MULTIPLE_ORDERS_OPEN", self::SETUP_FORMAT_BOOLEAN, false)
|
||||
),
|
||||
array(
|
||||
"id" => "isShowQuarantine",
|
||||
"data" => self::getSetupFromArray($mesSetup, "PVM", "MONITORAGGIO_LINEE_V2", "MOSTRA_QUARANTENA", self::SETUP_FORMAT_BOOLEAN, false)
|
||||
),
|
||||
array(
|
||||
"id" => "nomeReportRientro", "data" => self::getSetupFromArray($mesSetup, "MES", "REPORT", "RIENTRO")
|
||||
),
|
||||
array(
|
||||
"id" => "identifyUlWithBarcode",
|
||||
"data" => self::getSetupFromArray($mesSetup, "PVM", "MONITORAGGIO_LINEE_V2", "IDENTIFY_UL_WITH_BARCODE", self::SETUP_FORMAT_BOOLEAN, false)
|
||||
),
|
||||
//SETUP COMPLESSA
|
||||
array("id" => "lineeDisponibili", "data" => MonitoraggioLineeV2::getLineeDisponibili()),
|
||||
//PRESO DA SETUP MRP
|
||||
@@ -195,10 +242,10 @@ class MonitoraggioLineeV2 {
|
||||
$testate = array_unique_multi2($x);
|
||||
foreach ($testate as $testata) {
|
||||
$righe = array_filter($listScarichi, function ($scarico) use ($testata) {
|
||||
return $scarico["data_collo"] === $testata["data_collo"] &&
|
||||
$scarico["num_collo"] === $testata["num_collo"] &&
|
||||
$scarico["gestione"] === $testata["gestione"] &&
|
||||
$scarico["ser_collo"] === $testata["ser_collo"];
|
||||
return $scarico["data_collo"] === $testata["data_collo"]
|
||||
&& $scarico["num_collo"] === $testata["num_collo"]
|
||||
&& $scarico["gestione"] === $testata["gestione"]
|
||||
&& $scarico["ser_collo"] === $testata["ser_collo"];
|
||||
});
|
||||
|
||||
$mtbColt = new EntityItem("mtb_colt");
|
||||
@@ -576,9 +623,11 @@ class MonitoraggioLineeV2 {
|
||||
$row["flagAvviabile"] = boolValue($row["flagAvviabile"]);
|
||||
$row["dataOrdDate"] = $row["dataOrd"];
|
||||
$row["dataOrd"] = Utility\Date::strtotime($row["dataOrd"], Format::strtotimeDMYHMS);
|
||||
$row["dataOrdProd"] = Utility\Date::strtotime(array_get($row, "dataOrdProd"), Format::strtotimeDMYHMS);
|
||||
$row["dataOrdProd"]
|
||||
= Utility\Date::strtotime(array_get($row, "dataOrdProd"), Format::strtotimeDMYHMS);
|
||||
$row["dataScad"] = Utility\Date::strtotime(array_get($row, "dataScad"), Format::strtotimeDMYHMS);
|
||||
$row["dataInizProd"] = Utility\Date::strtotime(array_get($row, "dataInizProd"), Format::strtotimeDMYHMS);
|
||||
$row["dataInizProd"]
|
||||
= Utility\Date::strtotime(array_get($row, "dataInizProd"), Format::strtotimeDMYHMS);
|
||||
$row["dataIniz"] = Utility\Date::strtotime(array_get($row, "dataIniz"), Format::strtotimeDMYHMS);
|
||||
$row["dataFine"] = Utility\Date::strtotime(array_get($row, "dataFine"), Format::strtotimeDMYHMS);
|
||||
$row["tempoTrascorso"] = array_get($row, "tempoTrascorso");
|
||||
@@ -586,11 +635,14 @@ class MonitoraggioLineeV2 {
|
||||
$row["ggScadPartita"] = array_get($row, "ggScadPartita");
|
||||
$row["noteLav"] = array_get($row, "noteLav");
|
||||
$row["descrizioneTcol"] = array_get($row, "descrizioneTcol");
|
||||
$row["qtaResidua"] = max(array_get($row, "qtaProd", 0) - (array_get($row, "qtaTrasferite", 0) / (array_get($row, "rapConv2", 1) ?: 1)), 0);
|
||||
$row["qtaResidua"] = max(array_get($row, "qtaProd", 0) - (array_get($row, "qtaTrasferite", 0)
|
||||
/ (array_get($row, "rapConv2", 1) ?: 1)), 0);
|
||||
|
||||
if (!is_null($row["mtbColtToEdit"])) {
|
||||
$row["mtbColtToEdit"]["data_collo"] = Utility\Date::strtotime($row["mtbColtToEdit"]["data_collo"], Format::strtotimeDMYHMS);
|
||||
$row["mtbColtToEdit"] = array_pick($row["mtbColtToEdit"], "gestione", "data_collo", "num_collo", "riga", "ser_collo", "cod_jfas");
|
||||
$row["mtbColtToEdit"]["data_collo"]
|
||||
= Utility\Date::strtotime($row["mtbColtToEdit"]["data_collo"], Format::strtotimeDMYHMS);
|
||||
$row["mtbColtToEdit"]
|
||||
= array_pick($row["mtbColtToEdit"], "gestione", "data_collo", "num_collo", "riga", "ser_collo", "cod_jfas");
|
||||
}
|
||||
|
||||
|
||||
@@ -702,7 +754,8 @@ class MonitoraggioLineeV2 {
|
||||
$whereOrdine = array_keys_exists(array("gestione", "data_ord", "num_ord"), $orderKey);
|
||||
$whereIdLotto = !$whereOrdine && array_keys_exists(array("id_lotto"), $orderKey);
|
||||
|
||||
$query = KendoService::queryInitializerService($data, "listGiacenzeDisponibili", "riga_ord, orderIndex, posizione, data_collo", false, false);
|
||||
$query
|
||||
= KendoService::queryInitializerService($data, "listGiacenzeDisponibili", "riga_ord, orderIndex, posizione, data_collo", false, false);
|
||||
|
||||
$query
|
||||
->setDateVar("dataOrd", array_get($orderKey, "data_ord"))
|
||||
@@ -793,13 +846,15 @@ class MonitoraggioLineeV2 {
|
||||
}
|
||||
|
||||
public static function get_listAllegati($codProd) {
|
||||
$Ret = JtbDisegniFiles::get_items(array("cod_prod" => $codProd, "file_type" => array(
|
||||
JtbDisegniFiles::DISEGNO_ALLEGATO,
|
||||
JtbDisegniFiles::ETICHETTA_CARTONE,
|
||||
JtbDisegniFiles::ETICHETTA_PRODOTTO,
|
||||
JtbDisegniFiles::REPORT_JASPER,
|
||||
JtbDisegniFiles::SUBREPORT_JASPER
|
||||
)));
|
||||
$Ret = JtbDisegniFiles::get_items(array(
|
||||
"cod_prod" => $codProd, "file_type" => array(
|
||||
JtbDisegniFiles::DISEGNO_ALLEGATO,
|
||||
JtbDisegniFiles::ETICHETTA_CARTONE,
|
||||
JtbDisegniFiles::ETICHETTA_PRODOTTO,
|
||||
JtbDisegniFiles::REPORT_JASPER,
|
||||
JtbDisegniFiles::SUBREPORT_JASPER
|
||||
)
|
||||
));
|
||||
if ($Ret->is_OK()) {
|
||||
$arr_allegati = $Ret->get_data();
|
||||
foreach ($arr_allegati as $i => $item) {
|
||||
@@ -818,8 +873,10 @@ class MonitoraggioLineeV2 {
|
||||
|
||||
if (array_key_exists("cod_disegno", $key)) {
|
||||
$allegato = JtbDisegniFiles::cache(array_pick($key, "cod_disegno", "file_name"));
|
||||
} else if (array_key_exists("cod_mart", $key)) {
|
||||
$allegato = MtbAartLink::cache($key["cod_mart"], $key["id_riga"]);
|
||||
} else {
|
||||
if (array_key_exists("cod_mart", $key)) {
|
||||
$allegato = MtbAartLink::cache($key["cod_mart"], $key["id_riga"]);
|
||||
}
|
||||
}
|
||||
|
||||
return $allegato;
|
||||
@@ -950,17 +1007,19 @@ class MonitoraggioLineeV2 {
|
||||
$Ret = new Ret();
|
||||
if (self::hasCodaStampa($codJfas)) {
|
||||
$Ret = self::aggiungiStampaInCoda($codJfas, $data);
|
||||
} else if (self::getStampanteLinea($codJfas) !== null) {
|
||||
$numProgCollo = array_get($data, "num_prog_collo");
|
||||
$IMSApi = new IMSApi;
|
||||
} else {
|
||||
if (self::getStampanteLinea($codJfas) !== null) {
|
||||
$numProgCollo = array_get($data, "num_prog_collo");
|
||||
$IMSApi = new IMSApi;
|
||||
|
||||
$IMSApi->post("mes_v2/printEtichettaSSCC")
|
||||
->queryParam("codJfas", $codJfas)
|
||||
->queryParam("numProgCollo", $numProgCollo)
|
||||
->body($MtbColt);
|
||||
$IMSApi->post("mes_v2/printEtichettaSSCC")
|
||||
->queryParam("codJfas", $codJfas)
|
||||
->queryParam("numProgCollo", $numProgCollo)
|
||||
->body($MtbColt);
|
||||
|
||||
$Ret = $IMSApi->send();
|
||||
$Ret = $IMSApi->send();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return $Ret;
|
||||
@@ -1046,7 +1105,8 @@ class MonitoraggioLineeV2 {
|
||||
$JP->param("gestione", $key["gestione"])
|
||||
->paramDate("data_ord", $key["data_ord"])
|
||||
->param("num_ord", $key["num_ord"])
|
||||
->cacheAs("Lista di prelievo - Ord. Lav. " . $key["num_ord"] . " del " . strftime("%d-%m-%y", $key["data_ord"]));
|
||||
->cacheAs("Lista di prelievo - Ord. Lav. " . $key["num_ord"] . " del "
|
||||
. strftime("%d-%m-%y", $key["data_ord"]));
|
||||
|
||||
$ret = $JP->run();
|
||||
}
|
||||
@@ -1140,7 +1200,8 @@ class MonitoraggioLineeV2 {
|
||||
$note = array_get($data, "note");
|
||||
|
||||
$gestSetup = new GestSetup;
|
||||
$setDescrizione = $gestSetup->gestName("MTB_PARTITA_MAG")->section("SETUP")->keySection("SET_DESCRIZIONE_FROM_NOTE_ORDINE")->asBoolean()->get();
|
||||
$setDescrizione
|
||||
= $gestSetup->gestName("MTB_PARTITA_MAG")->section("SETUP")->keySection("SET_DESCRIZIONE_FROM_NOTE_ORDINE")->asBoolean()->get();
|
||||
|
||||
$EntityList = new EntityList;
|
||||
|
||||
@@ -1250,10 +1311,13 @@ class MonitoraggioLineeV2 {
|
||||
|
||||
if (array_key_exists("data_ril", $cqr)) {
|
||||
$DtbOrdCqr->setDatetime("dataRil", $cqr["data_ril"], \Format::IMS_NULL_TIME);
|
||||
} else if (array_key_exists("ora_ril", $cqr)) {
|
||||
$dataRil = is_null($cqrPrec) || is_null($cqrPrec["data_ril"]) ? \Utility\Date::getToday() : $cqrPrec["data_ril"];
|
||||
$dataRil = \Utility\Date\Time::setTime($dataRil, $cqr["ora_ril"]);
|
||||
$DtbOrdCqr->setDatetime("dataRil", $dataRil, \Format::IMS_NULL_TIME);
|
||||
} else {
|
||||
if (array_key_exists("ora_ril", $cqr)) {
|
||||
$dataRil = is_null($cqrPrec)
|
||||
|| is_null($cqrPrec["data_ril"]) ? \Utility\Date::getToday() : $cqrPrec["data_ril"];
|
||||
$dataRil = \Utility\Date\Time::setTime($dataRil, $cqr["ora_ril"]);
|
||||
$DtbOrdCqr->setDatetime("dataRil", $dataRil, \Format::IMS_NULL_TIME);
|
||||
}
|
||||
}
|
||||
|
||||
if (is_null($valoreRil) || $valoreRil === "") {
|
||||
@@ -1310,10 +1374,13 @@ class MonitoraggioLineeV2 {
|
||||
if (array_key_exists("data_ril", $cqr)) {
|
||||
$DtbOrdCqr->setDatetime("dataRil", $cqr["data_ril"], \Format::IMS_NULL_TIME);
|
||||
|
||||
} else if (array_key_exists("ora_ril", $cqr)) {
|
||||
$dataRil = is_null($cqrPrec) || is_null($cqrPrec["data_ril"]) ? \Utility\Date::getToday() : $cqrPrec["data_ril"];
|
||||
$dataRil = \Utility\Date\Time::setTime($dataRil, $cqr["ora_ril"]);
|
||||
$DtbOrdCqr->setDatetime("dataRil", $dataRil, \Format::IMS_NULL_TIME);
|
||||
} else {
|
||||
if (array_key_exists("ora_ril", $cqr)) {
|
||||
$dataRil = is_null($cqrPrec)
|
||||
|| is_null($cqrPrec["data_ril"]) ? \Utility\Date::getToday() : $cqrPrec["data_ril"];
|
||||
$dataRil = \Utility\Date\Time::setTime($dataRil, $cqr["ora_ril"]);
|
||||
$DtbOrdCqr->setDatetime("dataRil", $dataRil, \Format::IMS_NULL_TIME);
|
||||
}
|
||||
}
|
||||
|
||||
/**************** core ***************/
|
||||
@@ -1332,19 +1399,21 @@ class MonitoraggioLineeV2 {
|
||||
|
||||
public static function is_lineaAuto($codJfas, $settings = null) {
|
||||
return is_array($settings)
|
||||
&& (
|
||||
(array_key_exists("lineaType", $settings) && $settings["lineaType"] === "A")
|
||||
);
|
||||
&& (
|
||||
(array_key_exists("lineaType", $settings) && $settings["lineaType"] === "A")
|
||||
);
|
||||
}
|
||||
|
||||
private static function hasCodaStampa($codJfas) {
|
||||
$settings = self::get_settingsLinea($codJfas);
|
||||
return !is_null($settings) && is_array($settings) && array_key_exists("printerServiceIp", $settings) && !is_null($settings["printerServiceIp"]);
|
||||
return !is_null($settings) && is_array($settings) && array_key_exists("printerServiceIp", $settings)
|
||||
&& !is_null($settings["printerServiceIp"]);
|
||||
}
|
||||
|
||||
public static function hasSupervisorPanel($codJfas) {
|
||||
$settings = self::get_settingsLinea($codJfas);
|
||||
return !is_null($settings) && is_array($settings) && array_key_exists("supervisorServiceIp", $settings) && !is_null($settings["supervisorServiceIp"]);
|
||||
return !is_null($settings) && is_array($settings) && array_key_exists("supervisorServiceIp", $settings)
|
||||
&& !is_null($settings["supervisorServiceIp"]);
|
||||
}
|
||||
|
||||
public static function getStoricoOrdini($data) {
|
||||
@@ -1367,10 +1436,14 @@ class MonitoraggioLineeV2 {
|
||||
foreach ($arr_rows as $i => $row) {
|
||||
$row["dataOrd"] = Utility\Date::strtotime($row["dataOrd"], Format::strtotimeDMYHMS);
|
||||
$row["dataOrdProd"] = Utility\Date::strtotime($row["dataOrdProd"], Format::strtotimeDMYHMS);
|
||||
$row["dataScad"] = array_key_exists("dataScad", $row) ? Utility\Date::strtotime($row["dataScad"], Format::strtotimeDMYHMS) : null;
|
||||
$row["dataInizProd"] = array_key_exists("dataInizProd", $row) ? Utility\Date::strtotime($row["dataInizProd"], Format::strtotimeDMYHMS) : null;
|
||||
$row["dataIniz"] = isset($row["dataIniz"]) ? Utility\Date::strtotime($row["dataIniz"], Format::strtotimeDMYHMS) : null;
|
||||
$row["dataFine"] = isset($row["dataFine"]) ? Utility\Date::strtotime($row["dataFine"], Format::strtotimeDMYHMS) : null;
|
||||
$row["dataScad"]
|
||||
= array_key_exists("dataScad", $row) ? Utility\Date::strtotime($row["dataScad"], Format::strtotimeDMYHMS) : null;
|
||||
$row["dataInizProd"]
|
||||
= array_key_exists("dataInizProd", $row) ? Utility\Date::strtotime($row["dataInizProd"], Format::strtotimeDMYHMS) : null;
|
||||
$row["dataIniz"]
|
||||
= isset($row["dataIniz"]) ? Utility\Date::strtotime($row["dataIniz"], Format::strtotimeDMYHMS) : null;
|
||||
$row["dataFine"]
|
||||
= isset($row["dataFine"]) ? Utility\Date::strtotime($row["dataFine"], Format::strtotimeDMYHMS) : null;
|
||||
$row["codJcom"] = isset($row["codJcom"]) ? $row["codJcom"] : null;
|
||||
$row["noteLav"] = isset($row["noteLav"]) ? $row["noteLav"] : null;
|
||||
$row["partitaMag"] = isset($row["partitaMag"]) ? $row["partitaMag"] : null;
|
||||
@@ -1387,7 +1460,8 @@ class MonitoraggioLineeV2 {
|
||||
|
||||
public static function suggestDataScadPartitaMag($data) {
|
||||
$gestSetup = new GestSetup();
|
||||
$flagSCPartitaMagOrdLav = $gestSetup->gestName("PVM")->section("MONITORAGGIO_LINEE_V2")->keySection("FLAG_SUGGESTCODEPARTITAMAG_ORDLAV")->asBoolean()->get();
|
||||
$flagSCPartitaMagOrdLav
|
||||
= $gestSetup->gestName("PVM")->section("MONITORAGGIO_LINEE_V2")->keySection("FLAG_SUGGESTCODEPARTITAMAG_ORDLAV")->asBoolean()->get();
|
||||
$numProd = array_get($data, "num_ord_prod");
|
||||
|
||||
$query = new Query;
|
||||
@@ -1410,7 +1484,8 @@ class MonitoraggioLineeV2 {
|
||||
$orderKey = $data["keyOrd"];
|
||||
$keyDisegno = array_get($data, "key", array());
|
||||
$JP = new JasperProcessor;
|
||||
$Ret = $JP->loadFromJtbDisegni($data["codProd"], array_get($keyDisegno, "cod_disegno"), JtbDisegniFiles::ETICHETTA_CARTONE);
|
||||
$Ret
|
||||
= $JP->loadFromJtbDisegni($data["codProd"], array_get($keyDisegno, "cod_disegno"), JtbDisegniFiles::ETICHETTA_CARTONE);
|
||||
if ($Ret->is_OK()) {
|
||||
$JP->param("gestione", $orderKey["gestione"])
|
||||
->paramDate("data_ord", $orderKey["data_ord"])
|
||||
@@ -1423,12 +1498,14 @@ class MonitoraggioLineeV2 {
|
||||
|
||||
private static function getStampanteLinea($codJfas) {
|
||||
$settings = self::get_settingsLinea($codJfas);
|
||||
return (!is_null($settings) && is_array($settings) && array_key_exists("printerName", $settings)) ? $settings["printerName"] : null;
|
||||
return (!is_null($settings) && is_array($settings)
|
||||
&& array_key_exists("printerName", $settings)) ? $settings["printerName"] : null;
|
||||
}
|
||||
|
||||
public static function getMaterialiInLinea($codJfas, $orderKey, $getPartitaMag = false, $checkQtaEsistente = true, $codMart = null) {
|
||||
$setup = new GestSetup();
|
||||
$posizioni = $setup->gestName("MES")->section("SETUP")->keySection($codJfas . "_POS_BUFFER")->separator(";")->asArray()->defaultValue(null)->get();
|
||||
$posizioni = $setup->gestName("MES")->section("SETUP")->keySection($codJfas
|
||||
. "_POS_BUFFER")->separator(";")->asArray()->defaultValue(null)->get();
|
||||
$posizioniStr = isset($posizioni) && $checkQtaEsistente ? implode(",", $posizioni) : null;
|
||||
$query = new Query();
|
||||
|
||||
@@ -1468,7 +1545,8 @@ class MonitoraggioLineeV2 {
|
||||
$whereOrdine = array_keys_exists(array("gestione", "data_ord", "num_ord"), $orderKey);
|
||||
$whereIdLotto = !$whereOrdine && array_keys_exists(array("id_lotto"), $orderKey);
|
||||
|
||||
$query = KendoService::queryInitializerService(array(), "listGiacenzeDisponibili", "riga_ord, orderIndex, posizione, data_collo", false, false);
|
||||
$query
|
||||
= KendoService::queryInitializerService(array(), "listGiacenzeDisponibili", "riga_ord, orderIndex, posizione, data_collo", false, false);
|
||||
|
||||
$query
|
||||
->setDateVar("dataOrd", array_get($orderKey, "data_ord"))
|
||||
@@ -1916,14 +1994,16 @@ WHERE data_ord = '[dataOrd]'
|
||||
if (!is_null($data["idRiga"]) && !empty($data["idRiga"])) {
|
||||
$carat->set("idRiga", $data["idRiga"]);
|
||||
}
|
||||
} else if (!empty($data["idRiga"])) {
|
||||
$carat
|
||||
->delete()
|
||||
->set("carat", $data["carat"])
|
||||
->set("idRiga", $data["idRiga"])
|
||||
->set("valCarat", $data["val"]);
|
||||
} else {
|
||||
return $ret->set_error("Impossibile salvare il valore impostato");
|
||||
if (!empty($data["idRiga"])) {
|
||||
$carat
|
||||
->delete()
|
||||
->set("carat", $data["carat"])
|
||||
->set("idRiga", $data["idRiga"])
|
||||
->set("valCarat", $data["val"]);
|
||||
} else {
|
||||
return $ret->set_error("Impossibile salvare il valore impostato");
|
||||
}
|
||||
}
|
||||
$mtbPartitaMag = new EntityItem("mtb_partita_mag");
|
||||
$mtbPartitaMag
|
||||
@@ -1960,7 +2040,8 @@ WHERE data_ord = '[dataOrd]'
|
||||
}
|
||||
|
||||
private static function getLastStepOrder($ordineLav, $codJfas) {
|
||||
$query = new Query("SELECT TOP 1 * FROM dtb_ord_steps WHERE data_ord = '[dataOrd]' AND num_ord = [numOrd] AND gestione ='L' AND cod_jfas = '[codJfas]' ORDER BY id_step DESC, id_riga DESC");
|
||||
$query
|
||||
= new Query("SELECT TOP 1 * FROM dtb_ord_steps WHERE data_ord = '[dataOrd]' AND num_ord = [numOrd] AND gestione ='L' AND cod_jfas = '[codJfas]' ORDER BY id_step DESC, id_riga DESC");
|
||||
|
||||
$query
|
||||
->setVar("numOrd", $ordineLav["num_ord"])
|
||||
@@ -2031,8 +2112,31 @@ WHERE data_ord = '[dataOrd]'
|
||||
return $ret;
|
||||
}
|
||||
|
||||
public static function postUdc($data) {
|
||||
$numCollo = array_get($data, "numCollo");
|
||||
$dataCollo = array_get($data, "dataCollo");
|
||||
$serCollo = array_get($data, "serCollo");
|
||||
$gestione = array_get($data, "gestione");
|
||||
$qtaCol = array_get($data, "qtaCol");
|
||||
$partitaMag = array_get($data, "partitaMag");
|
||||
$codJfas = array_get($data, "codJfas");
|
||||
$barcodeUl = array_get($data, "barcodeUl");
|
||||
$dataVers = array_get($data, "dataVers");
|
||||
if (!empty($numCollo) && (empty($dataCollo) || empty($serCollo) || empty($gestione))) {
|
||||
return Ret::error("Dati UL da salvare incompleti");
|
||||
}
|
||||
if (empty($numCollo)) {
|
||||
$dto = array();
|
||||
return self::save_udc($dto);
|
||||
} else {
|
||||
$dto = array();
|
||||
return self::rettificaGiacenzaUL($data);
|
||||
}
|
||||
}
|
||||
|
||||
private static function getStepOrderAt($ordineLav, $codJfas, $idStep) {
|
||||
$query = new Query("SELECT * FROM dtb_ord_steps WHERE data_ord = '[dataOrd]' AND num_ord = [numOrd] AND gestione ='L' AND cod_jfas = '[codJfas]' AND id_step = [idStep] ORDER BY id_step DESC, id_riga DESC");
|
||||
$query
|
||||
= new Query("SELECT * FROM dtb_ord_steps WHERE data_ord = '[dataOrd]' AND num_ord = [numOrd] AND gestione ='L' AND cod_jfas = '[codJfas]' AND id_step = [idStep] ORDER BY id_step DESC, id_riga DESC");
|
||||
|
||||
$query
|
||||
->setVar("numOrd", $ordineLav["num_ord"])
|
||||
@@ -2127,7 +2231,8 @@ WHERE data_ord = '[dataOrd]'
|
||||
$terminaLavorazione = array_get($order, "termina_lavorazione", "S");
|
||||
$terminaLavorazioneLinea = array_get($order, "termina_lavorazione_linea", "N");
|
||||
|
||||
if (($terminaLavorazione == "S" || $terminaLavorazioneLinea == "S") && \MonitoraggioLineeV2::isGeneraCaricoScaricoImmediato(array_get($order, "codMdep"))) {
|
||||
if (($terminaLavorazione == "S" || $terminaLavorazioneLinea == "S")
|
||||
&& \MonitoraggioLineeV2::isGeneraCaricoScaricoImmediato(array_get($order, "codMdep"))) {
|
||||
$jsonObj->effettuaScaricoMateriali = "N";
|
||||
}
|
||||
|
||||
@@ -2219,7 +2324,8 @@ WHERE data_ord = '[dataOrd]'
|
||||
$terminaLavorazione = array_get($order, "termina_lavorazione", "S");
|
||||
$terminaLavorazioneLinea = array_get($order, "termina_lavorazione_linea", "N");
|
||||
|
||||
$body->set("effettuaScarico", !(($terminaLavorazione == "S" || $terminaLavorazioneLinea == "S") && \MonitoraggioLineeV2::isGeneraCaricoScaricoImmediato(array_get($order, "codMdep"))));
|
||||
$body->set("effettuaScarico", !(($terminaLavorazione == "S" || $terminaLavorazioneLinea == "S")
|
||||
&& \MonitoraggioLineeV2::isGeneraCaricoScaricoImmediato(array_get($order, "codMdep"))));
|
||||
|
||||
$IMSApi = new \IMSApi();
|
||||
|
||||
@@ -2384,12 +2490,14 @@ WHERE data_ord = '[dataOrd]'
|
||||
|
||||
$codJfas = $ordine["codJfas"];
|
||||
$GestSetupUser = new GestSetupWebUser;
|
||||
$checkMaterialiInLinea = $GestSetupUser->keySection($codJfas . "_CHECK_MATERIALI_IN_LINEA")->defaultValue("N")->asBoolean()->get();
|
||||
$checkMaterialiInLinea = $GestSetupUser->keySection($codJfas
|
||||
. "_CHECK_MATERIALI_IN_LINEA")->defaultValue("N")->asBoolean()->get();
|
||||
|
||||
$ret = new Ret();
|
||||
if ($checkMaterialiInLinea && $key) {
|
||||
$setup = new GestSetup();
|
||||
$posizioni = $setup->gestName("MES")->section("SETUP")->keySection($codJfas . "_POS_BUFFER")->separator(";")->asArray()->get();
|
||||
$posizioni = $setup->gestName("MES")->section("SETUP")->keySection($codJfas
|
||||
. "_POS_BUFFER")->separator(";")->asArray()->get();
|
||||
$posizioniStr = implode(",", $posizioni);
|
||||
$codMdep = self::getDepoLinea($codJfas);
|
||||
|
||||
@@ -2420,7 +2528,8 @@ WHERE data_ord = '[dataOrd]'
|
||||
if ($ordine) {
|
||||
$setup = new GestSetup();
|
||||
|
||||
$posizioni = $setup->gestName("MES")->section("SETUP")->keySection($codJfas . "_POS_BUFFER")->separator(";")->asArray()->get();
|
||||
$posizioni = $setup->gestName("MES")->section("SETUP")->keySection($codJfas
|
||||
. "_POS_BUFFER")->separator(";")->asArray()->get();
|
||||
$posizioniStr = implode(",", $posizioni);
|
||||
$codMdep = self::getDepoLinea($codJfas);
|
||||
|
||||
@@ -2442,7 +2551,8 @@ WHERE data_ord = '[dataOrd]'
|
||||
|
||||
public static function checkSemilavorati($ordine, $codJfas, $checkSLonUDC = false, $qtaProd = 0) {
|
||||
$setup = new GestSetup();
|
||||
$posizioni = $setup->gestName("MES")->section("SETUP")->keySection($codJfas . "_POS_BUFFER")->separator(";")->asArray()->get();
|
||||
$posizioni = $setup->gestName("MES")->section("SETUP")->keySection($codJfas
|
||||
. "_POS_BUFFER")->separator(";")->asArray()->get();
|
||||
$posizioniStr = implode(",", $posizioni);
|
||||
$codMdep = $ordine["codMdep"];
|
||||
|
||||
@@ -2756,83 +2866,85 @@ WHERE data_ord = '[dataOrd]'
|
||||
}
|
||||
|
||||
$ret = $mtbColt->send();
|
||||
} else if ($riga["data_doc"]) {
|
||||
$query = new Query();
|
||||
$ret = $query->importSqlFile("getDtbDocr")
|
||||
->setDateVar("dataDoc", $riga["data_doc"])
|
||||
->setVar("serDoc", $riga["ser_doc"])
|
||||
->setVar("numDoc", $riga["num_doc"])
|
||||
->where("cod_mart", $riga["cod_mart"])
|
||||
->toRet()->execute();
|
||||
} else {
|
||||
if ($riga["data_doc"]) {
|
||||
$query = new Query();
|
||||
$ret = $query->importSqlFile("getDtbDocr")
|
||||
->setDateVar("dataDoc", $riga["data_doc"])
|
||||
->setVar("serDoc", $riga["ser_doc"])
|
||||
->setVar("numDoc", $riga["num_doc"])
|
||||
->where("cod_mart", $riga["cod_mart"])
|
||||
->toRet()->execute();
|
||||
|
||||
$righe = $ret->get_data();
|
||||
$primaRiga = $righe[0];
|
||||
$righe = $ret->get_data();
|
||||
$primaRiga = $righe[0];
|
||||
|
||||
$dtbDoct = new EntityItem("dtb_doct");
|
||||
$dtbDoct = new EntityItem("dtb_doct");
|
||||
|
||||
$dtbDoct
|
||||
->update()
|
||||
->set("codDtip", $primaRiga["cod_dtip"])
|
||||
->set("codAnag", $primaRiga["cod_anag"])
|
||||
->setDate("dataDoc", $primaRiga["data_doc"])
|
||||
->set("serDoc", $primaRiga["ser_doc"])
|
||||
->set("numDoc", $primaRiga["num_doc"]);
|
||||
$dtbDoct
|
||||
->update()
|
||||
->set("codDtip", $primaRiga["cod_dtip"])
|
||||
->set("codAnag", $primaRiga["cod_anag"])
|
||||
->setDate("dataDoc", $primaRiga["data_doc"])
|
||||
->set("serDoc", $primaRiga["ser_doc"])
|
||||
->set("numDoc", $primaRiga["num_doc"]);
|
||||
|
||||
if ($qtaInserita > $qtaIniziale) {
|
||||
$dtbDocr = new EntityItem("dtb_docr");
|
||||
$qtaDiff = $qtaInserita - $qtaIniziale;
|
||||
$qtaConvertita = min(array($qtaDiff, $riga["qta_giacenza"])) / $primaRiga["rap_conv"];
|
||||
$qtaCalcolata = $primaRiga["qta_doc"] + $qtaConvertita;
|
||||
$newNumCnf = $qtaCalcolata / $primaRiga["qta_cnf"];
|
||||
if ($qtaInserita > $qtaIniziale) {
|
||||
$dtbDocr = new EntityItem("dtb_docr");
|
||||
$qtaDiff = $qtaInserita - $qtaIniziale;
|
||||
$qtaConvertita = min(array($qtaDiff, $riga["qta_giacenza"])) / $primaRiga["rap_conv"];
|
||||
$qtaCalcolata = $primaRiga["qta_doc"] + $qtaConvertita;
|
||||
$newNumCnf = $qtaCalcolata / $primaRiga["qta_cnf"];
|
||||
|
||||
$dtbDocr->update()
|
||||
->set("qtaDoc", $qtaCalcolata)
|
||||
->set("numCnf", $newNumCnf)
|
||||
->set("idRiga", $primaRiga["id_riga"]);
|
||||
$dtbDocr->update()
|
||||
->set("qtaDoc", $qtaCalcolata)
|
||||
->set("numCnf", $newNumCnf)
|
||||
->set("idRiga", $primaRiga["id_riga"]);
|
||||
|
||||
$dtbDoct->set("dtbDocr")->append($dtbDocr);
|
||||
} else {
|
||||
$qtaTotale = $qtaIniziale - $qtaInserita;
|
||||
$break = false;
|
||||
$dtbDoct->set("dtbDocr")->append($dtbDocr);
|
||||
} else {
|
||||
$qtaTotale = $qtaIniziale - $qtaInserita;
|
||||
$break = false;
|
||||
|
||||
// foreach le righe con le quantità e continua finchè la qta è minore
|
||||
foreach ($righe as $riga) {
|
||||
if ($qtaTotale > 0) {
|
||||
$rigaQtaDoc = $riga["qta_doc"];
|
||||
$dtbDocr = new EntityItem("dtb_docr");
|
||||
// foreach le righe con le quantità e continua finchè la qta è minore
|
||||
foreach ($righe as $riga) {
|
||||
if ($qtaTotale > 0) {
|
||||
$rigaQtaDoc = $riga["qta_doc"];
|
||||
$dtbDocr = new EntityItem("dtb_docr");
|
||||
|
||||
if ($rigaQtaDoc > $qtaTotale) {
|
||||
$newRigaQtaDoc = $rigaQtaDoc - ($qtaTotale / $riga["rap_conv"]);
|
||||
$newNumCnf = $newRigaQtaDoc / $riga["qta_cnf"];
|
||||
if ($rigaQtaDoc > $qtaTotale) {
|
||||
$newRigaQtaDoc = $rigaQtaDoc - ($qtaTotale / $riga["rap_conv"]);
|
||||
$newNumCnf = $newRigaQtaDoc / $riga["qta_cnf"];
|
||||
|
||||
$dtbDocr
|
||||
->update()
|
||||
->set("qtaDoc", $newRigaQtaDoc)
|
||||
->set("numCnf", $newNumCnf);
|
||||
$dtbDocr
|
||||
->update()
|
||||
->set("qtaDoc", $newRigaQtaDoc)
|
||||
->set("numCnf", $newNumCnf);
|
||||
|
||||
$break = true;
|
||||
$break = true;
|
||||
} else {
|
||||
$qtaTotale = $qtaTotale - $rigaQtaDoc;
|
||||
$dtbDocr->delete();
|
||||
}
|
||||
|
||||
$dtbDocr->set("idRiga", $riga["id_riga"]);
|
||||
$dtbDoct->set("dtbDocr")->append($dtbDocr);
|
||||
|
||||
if ($break) {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
$qtaTotale = $qtaTotale - $rigaQtaDoc;
|
||||
$dtbDocr->delete();
|
||||
}
|
||||
|
||||
$dtbDocr->set("idRiga", $riga["id_riga"]);
|
||||
$dtbDoct->set("dtbDocr")->append($dtbDocr);
|
||||
|
||||
if ($break) {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (array_get($_SESSION, "monitoraggioLinee_loggedUser")) {
|
||||
$dtbDoct->authUsername($_SESSION["monitoraggioLinee_loggedUser"]);
|
||||
}
|
||||
if (array_get($_SESSION, "monitoraggioLinee_loggedUser")) {
|
||||
$dtbDoct->authUsername($_SESSION["monitoraggioLinee_loggedUser"]);
|
||||
}
|
||||
|
||||
$ret = $dtbDoct->send();
|
||||
$ret = $dtbDoct->send();
|
||||
}
|
||||
}
|
||||
|
||||
$retScarichiArticolo = MonitoraggioLineeV2::getScarichiArticoloOrdine($orderKey, $codMart);
|
||||
@@ -2872,7 +2984,8 @@ WHERE data_ord = '[dataOrd]'
|
||||
$righe = $ret->get_data();
|
||||
|
||||
$righeScarico = array_filter($righe, function ($item) use ($rigaScarico) {
|
||||
return $item["cod_mart"] === $rigaScarico["cod_mart"] && $item["partita_mag"] === $rigaScarico["partita_mag"];
|
||||
return $item["cod_mart"] === $rigaScarico["cod_mart"]
|
||||
&& $item["partita_mag"] === $rigaScarico["partita_mag"];
|
||||
});
|
||||
|
||||
$mtbColt = new EntityItem("mtb_colt");
|
||||
@@ -2899,52 +3012,55 @@ WHERE data_ord = '[dataOrd]'
|
||||
}
|
||||
|
||||
$ret = $mtbColt->send();
|
||||
} else if ($rigaScarico["data_doc"]) {
|
||||
$query = new Query();
|
||||
} else {
|
||||
if ($rigaScarico["data_doc"]) {
|
||||
$query = new Query();
|
||||
|
||||
$ret = $query->importSqlFile("getDtbDocr")
|
||||
->setDateVar("dataDoc", $rigaScarico["data_doc"])
|
||||
->setVar("serDoc", $rigaScarico["ser_doc"])
|
||||
->setVar("numDoc", $rigaScarico["num_doc"])
|
||||
->toRet()->execute();
|
||||
$ret = $query->importSqlFile("getDtbDocr")
|
||||
->setDateVar("dataDoc", $rigaScarico["data_doc"])
|
||||
->setVar("serDoc", $rigaScarico["ser_doc"])
|
||||
->setVar("numDoc", $rigaScarico["num_doc"])
|
||||
->toRet()->execute();
|
||||
|
||||
$righe = $ret->get_data();
|
||||
$righe = $ret->get_data();
|
||||
|
||||
$righeScarico = array_values(array_filter($righe, function ($item) use ($rigaScarico) {
|
||||
return $item["cod_mart"] === $rigaScarico["cod_mart"] && $item["partita_mag"] === $rigaScarico["partita_mag"];
|
||||
}));
|
||||
$righeScarico = array_values(array_filter($righe, function ($item) use ($rigaScarico) {
|
||||
return $item["cod_mart"] === $rigaScarico["cod_mart"]
|
||||
&& $item["partita_mag"] === $rigaScarico["partita_mag"];
|
||||
}));
|
||||
|
||||
$dtbDoct = new EntityItem("dtb_doct");
|
||||
$dtbDoct = new EntityItem("dtb_doct");
|
||||
|
||||
if (count($righe) === count($righeScarico)) {
|
||||
$dtbDoct->delete();
|
||||
} else {
|
||||
$dtbDoct->update();
|
||||
if (count($righe) === count($righeScarico)) {
|
||||
$dtbDoct->delete();
|
||||
} else {
|
||||
$dtbDoct->update();
|
||||
}
|
||||
|
||||
$primaRiga = $righeScarico[0];
|
||||
|
||||
$dtbDoct
|
||||
->set("codDtip", $primaRiga["cod_dtip"])
|
||||
->set("codAnag", $primaRiga["cod_anag"])
|
||||
->setDate("dataDoc", $primaRiga["data_doc"])
|
||||
->set("numDoc", $primaRiga["num_doc"])
|
||||
->set("serDoc", $primaRiga["ser_doc"]);
|
||||
|
||||
foreach ($righeScarico as $riga) {
|
||||
$dtbDocr = new EntityItem("dtb_docr");
|
||||
|
||||
$dtbDocr->delete()
|
||||
->set("idRiga", $riga["id_riga"]);
|
||||
|
||||
$dtbDoct->set("dtbDocr")->append($dtbDocr);
|
||||
}
|
||||
|
||||
if (array_get($_SESSION, "monitoraggioLinee_loggedUser")) {
|
||||
$dtbDoct->authUsername($_SESSION["monitoraggioLinee_loggedUser"]);
|
||||
}
|
||||
|
||||
$ret = $dtbDoct->send();
|
||||
}
|
||||
|
||||
$primaRiga = $righeScarico[0];
|
||||
|
||||
$dtbDoct
|
||||
->set("codDtip", $primaRiga["cod_dtip"])
|
||||
->set("codAnag", $primaRiga["cod_anag"])
|
||||
->setDate("dataDoc", $primaRiga["data_doc"])
|
||||
->set("numDoc", $primaRiga["num_doc"])
|
||||
->set("serDoc", $primaRiga["ser_doc"]);
|
||||
|
||||
foreach ($righeScarico as $riga) {
|
||||
$dtbDocr = new EntityItem("dtb_docr");
|
||||
|
||||
$dtbDocr->delete()
|
||||
->set("idRiga", $riga["id_riga"]);
|
||||
|
||||
$dtbDoct->set("dtbDocr")->append($dtbDocr);
|
||||
}
|
||||
|
||||
if (array_get($_SESSION, "monitoraggioLinee_loggedUser")) {
|
||||
$dtbDoct->authUsername($_SESSION["monitoraggioLinee_loggedUser"]);
|
||||
}
|
||||
|
||||
$ret = $dtbDoct->send();
|
||||
}
|
||||
|
||||
$retScarichiArticolo = MonitoraggioLineeV2::getScarichiArticoloOrdine($orderKey, $codMart);
|
||||
@@ -3177,7 +3293,8 @@ WHERE data_ord = '[dataOrd]'
|
||||
|
||||
$effettuaScaricoMateriali = true;
|
||||
|
||||
if (($terminaLavorazione == "S" || $terminaLavorazioneLinea == "S") && \MonitoraggioLineeV2::isGeneraCaricoScaricoImmediato(array_get($ordine, "cod_mdep"))) {
|
||||
if (($terminaLavorazione == "S" || $terminaLavorazioneLinea == "S")
|
||||
&& \MonitoraggioLineeV2::isGeneraCaricoScaricoImmediato(array_get($ordine, "cod_mdep"))) {
|
||||
$effettuaScaricoMateriali = false;
|
||||
}
|
||||
|
||||
@@ -3248,7 +3365,8 @@ WHERE data_ord = '[dataOrd]'
|
||||
$pesoMazzetta = array_get($data, "pesoMazzetta");
|
||||
$pezziCartone = array_get($data, "pezziCartone");
|
||||
|
||||
if (is_null($codMart) || is_null($partitaMag) || is_null($pesoCartone) || is_null($pesoMazzetta) || is_null($pezziCartone)) {
|
||||
if (is_null($codMart) || is_null($partitaMag) || is_null($pesoCartone) || is_null($pesoMazzetta)
|
||||
|| is_null($pezziCartone)) {
|
||||
$ret = new Ret();
|
||||
return $ret->set_error("Dati mancanti in saveCqPartitaMagLevanplast");
|
||||
}
|
||||
@@ -3364,7 +3482,8 @@ WHERE data_ord = '[dataOrd]'
|
||||
|
||||
public static function getAbilitaModificaArticolo() {
|
||||
$gestSetup = new GestSetup();
|
||||
$defaultValue = $gestSetup->section("MONITORAGGIO_LINEE_V2")->keySection("ABILITA_MODIFICA_ARTICOLI")->asBoolean()->get();
|
||||
$defaultValue
|
||||
= $gestSetup->section("MONITORAGGIO_LINEE_V2")->keySection("ABILITA_MODIFICA_ARTICOLI")->asBoolean()->get();
|
||||
|
||||
$gestSetupUser = new GestSetupWebUser();
|
||||
return $gestSetupUser->section("MONITORAGGIO_LINEE_V2")->keySection("ABILITA_MODIFICA_ARTICOLI")->asBoolean()->defaultValue($defaultValue)->get();
|
||||
@@ -3381,8 +3500,10 @@ WHERE data_ord = '[dataOrd]'
|
||||
|
||||
public static function getOrdiniLavorazione($codJfas) {
|
||||
$gestSetup = new GestSetup();
|
||||
$earlierDate = $gestSetup->gestName("MES")->section("SETUP")->keySection("EARLIER_DATE")->defaultValue("-30")->asString()->get();
|
||||
$ggMassimiOrdini = $gestSetup->gestName("MES")->section("SETUP")->keySection("GG_MASSIMI_ORD")->defaultValue("14")->asString()->get();
|
||||
$earlierDate
|
||||
= $gestSetup->gestName("MES")->section("SETUP")->keySection("EARLIER_DATE")->defaultValue("-30")->asString()->get();
|
||||
$ggMassimiOrdini
|
||||
= $gestSetup->gestName("MES")->section("SETUP")->keySection("GG_MASSIMI_ORD")->defaultValue("14")->asString()->get();
|
||||
|
||||
$dateStart = strtotime($earlierDate . " days");
|
||||
$dateEnd = strtotime($ggMassimiOrdini . " days");
|
||||
@@ -3493,7 +3614,8 @@ WHERE data_ord = '[dataOrd]'
|
||||
$filterMdep = $data["filterMdep"];
|
||||
|
||||
$gestSetup = new GestSetup;
|
||||
$setDescrizione = $gestSetup->gestName("MTB_PARTITA_MAG")->section("SETUP")->keySection("SET_DESCRIZIONE_FROM_NOTE_ORDINE")->asBoolean()->get();
|
||||
$setDescrizione
|
||||
= $gestSetup->gestName("MTB_PARTITA_MAG")->section("SETUP")->keySection("SET_DESCRIZIONE_FROM_NOTE_ORDINE")->asBoolean()->get();
|
||||
|
||||
$Ret = self::getAnagraficaProdotto($codMart);
|
||||
if ($Ret->is_OK()) {
|
||||
@@ -3593,9 +3715,8 @@ WHERE data_ord = '[dataOrd]'
|
||||
|
||||
public static function getSetupFromArray($setupArray, $gestName, $section, $keySection, $format = null, $defaultValue = null) {
|
||||
$filtered = array_filter($setupArray, function ($setup) use ($gestName, $section, $keySection) {
|
||||
return array_get($setup, "gestName") === $gestName &&
|
||||
array_get($setup, "section") === $section &&
|
||||
array_get($setup, "keySection") === $keySection;
|
||||
return array_get($setup, "gestName") === $gestName && array_get($setup, "section") === $section
|
||||
&& array_get($setup, "keySection") === $keySection;
|
||||
});
|
||||
|
||||
$value = array_get(reset($filtered), "value", $defaultValue);
|
||||
@@ -3603,12 +3724,17 @@ WHERE data_ord = '[dataOrd]'
|
||||
switch ($format) {
|
||||
case self::SETUP_FORMAT_ARRAY:
|
||||
if (is_string($value)) {
|
||||
if (strpos($value, ",") >= 0)
|
||||
if (strpos($value, ",") >= 0) {
|
||||
$separator = ",";
|
||||
else if (strpos($value, ";") >= 0)
|
||||
$separator = ";";
|
||||
else if (strpos($value, "|") >= 0)
|
||||
$separator = "|";
|
||||
} else {
|
||||
if (strpos($value, ";") >= 0) {
|
||||
$separator = ";";
|
||||
} else {
|
||||
if (strpos($value, "|") >= 0) {
|
||||
$separator = "|";
|
||||
}
|
||||
}
|
||||
}
|
||||
$value = explode($separator, $value);
|
||||
}
|
||||
break;
|
||||
@@ -3632,8 +3758,9 @@ WHERE data_ord = '[dataOrd]'
|
||||
->queryParam("codMdep", $codMdep)
|
||||
->timeout(10);
|
||||
$ret = $IMSApi->send();
|
||||
if ($ret->is_KO())
|
||||
if ($ret->is_KO()) {
|
||||
return $ret;
|
||||
}
|
||||
$_REQUEST["SETUP"]["MES"][$codJfas] = $ret->getDto();
|
||||
|
||||
return $ret;
|
||||
@@ -3658,8 +3785,9 @@ WHERE data_ord = '[dataOrd]'
|
||||
->body($body);
|
||||
$ret = $IMSApi->send();
|
||||
|
||||
if ($ret->is_OK())
|
||||
if ($ret->is_OK()) {
|
||||
$ret->set_data($ret->getDto());
|
||||
}
|
||||
|
||||
return $ret;
|
||||
}
|
||||
@@ -3698,8 +3826,9 @@ WHERE data_ord = '[dataOrd]'
|
||||
->body($body);
|
||||
$ret = $IMSApi->send();
|
||||
|
||||
if ($ret->is_OK())
|
||||
if ($ret->is_OK()) {
|
||||
$ret->set_data($ret->getDto());
|
||||
}
|
||||
|
||||
return $ret;
|
||||
}
|
||||
@@ -3750,8 +3879,9 @@ WHERE data_ord = '[dataOrd]'
|
||||
->body($body);
|
||||
$ret = $IMSApi->send();
|
||||
|
||||
if ($ret->is_OK())
|
||||
if ($ret->is_OK()) {
|
||||
$ret->set_data($ret->getDto());
|
||||
}
|
||||
|
||||
return $ret;
|
||||
}
|
||||
@@ -3759,7 +3889,8 @@ WHERE data_ord = '[dataOrd]'
|
||||
public static function getBilance($data) {
|
||||
$codJfas = array_get($data, "codJfas");
|
||||
|
||||
$ret = self::sendCommand("bilancia/retrieveConfig", $codJfas, array(), "Lettura configurazione bilance non riuscita");
|
||||
$ret
|
||||
= self::sendCommand("bilancia/retrieveConfig", $codJfas, array(), "Lettura configurazione bilance non riuscita");
|
||||
|
||||
if ($ret->is_KO()) {
|
||||
return $ret;
|
||||
@@ -3767,4 +3898,35 @@ WHERE data_ord = '[dataOrd]'
|
||||
|
||||
return Ret::data($ret->getDto());
|
||||
}
|
||||
|
||||
private static function rettificaGiacenzaUL($data) {
|
||||
$codMdep = array_get($data, "codMdep");
|
||||
|
||||
$srcMtbColr = new EntityItem("mtb_colr");
|
||||
$srcMtbColr
|
||||
->set("gestione", array_get($data, "gestione"))
|
||||
->set("serCollo", array_get($data, "serCollo"))
|
||||
->set("numCollo", array_get($data, "numCollo"))
|
||||
->setDate("dataCollo", array_get($data, "dataCollo"))
|
||||
->set("qtaCol", array_get($data, "oldQtaCol"))
|
||||
->set("numCnf", array_get($data, "oldNumCnf"))
|
||||
->set("codMart", array_get($data, "codMart"))
|
||||
->setDate("dataOrd", array_get($data, "dataOrd"))
|
||||
->set("numOrd", array_get($data, "numOrd"))
|
||||
->set("rigaOrd", 0)
|
||||
->set("partitaMag", array_get($data, "partitaMag"));
|
||||
$dto = new EntityItem();
|
||||
$dto
|
||||
->set("newNumCnf", array_get($data, "numCnf"))
|
||||
->set("newQtaCol", array_get($data, "qtaCol"))
|
||||
->set("sourceMtbColr", $srcMtbColr, false, true);
|
||||
$imsApi = new IMSApi();
|
||||
$ret = $imsApi
|
||||
->queryParam("codMdep", $codMdep)
|
||||
->post("creaRettificaCollo")
|
||||
->body($dto)
|
||||
->send();
|
||||
|
||||
return $ret;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,7 +154,8 @@ class OrderEventHandler {
|
||||
* @return DefaultHandler|null
|
||||
*/
|
||||
public static function loadCustomHandler($order) {
|
||||
$codJfas = array_key_exists("codJfas", $order) ? $order["codJfas"] : (array_key_exists("cod_jfas", $order) ? $order["cod_jfas"] : null);
|
||||
$codJfas
|
||||
= array_key_exists("codJfas", $order) ? $order["codJfas"] : (array_key_exists("cod_jfas", $order) ? $order["cod_jfas"] : null);
|
||||
$tipoProd = self::getTipoProd($codJfas);
|
||||
|
||||
if ($tipoProd) {
|
||||
@@ -234,6 +235,7 @@ class OrderEventHandler {
|
||||
->set("preparatoDa", $data["num_id"])
|
||||
->set("numEtich", array_get($data, "num_etich", 0))
|
||||
->set("qtaCnf", array_get($data, "qta_cnf"))
|
||||
->setDatetime("dataVers", array_get($data, "data_vers"))
|
||||
->set("colliPedana", $qtaCollo)
|
||||
->set("eseguiScarichi", false)
|
||||
->set("assegnaPosizione", $setPosizione)
|
||||
@@ -303,9 +305,10 @@ class OrderEventHandler {
|
||||
"ser_collo" => $entity["serCollo"],
|
||||
"num_collo" => $entity["numCollo"],
|
||||
"data_collo" => Date::strtotime($entity["dataCollo"], \Format::strtotimeDMYHMS),
|
||||
// "riga" => $entity["mtbColr"][0]["riga"]
|
||||
// "riga" => $entity["mtbColr"][0]["riga"]
|
||||
);
|
||||
$numProgCollo = count(\MonitoraggioLineeV2::get_udc(array_merge($orderKey, array("cod_prod" => $ordineLav["codProd"])))->get_data());
|
||||
$numProgCollo
|
||||
= count(\MonitoraggioLineeV2::get_udc(array_merge($orderKey, array("cod_prod" => $ordineLav["codProd"])))->get_data());
|
||||
$Ret->set_data(array("key_collo" => $colloKey, "numProgCollo" => $numProgCollo));
|
||||
}
|
||||
}
|
||||
@@ -441,7 +444,8 @@ WHERE segno = -1
|
||||
}
|
||||
|
||||
private static function getColloDaInventario($keycollo) {
|
||||
$query = new Query("SELECT * FROM mvw_sitart_udc_det_inventario WHERE num_collo = '[numero]' AND data_collo = '[data]' AND gestione = '[gestione]' AND ser_collo = '[serie]'");
|
||||
$query
|
||||
= new Query("SELECT * FROM mvw_sitart_udc_det_inventario WHERE num_collo = '[numero]' AND data_collo = '[data]' AND gestione = '[gestione]' AND ser_collo = '[serie]'");
|
||||
$collo = $query
|
||||
->setVar("numero", $keycollo["num_collo"])
|
||||
->setDateVar("data", $keycollo["data_collo"])
|
||||
@@ -497,7 +501,8 @@ WHERE segno = -1
|
||||
$ret = new Ret();
|
||||
$setup = new \GestSetup();
|
||||
$codCmac = $setup->gestName("MES")->section("SETUP")->keySection($codJfas . "_COD_CMAC")->get();
|
||||
$posizioni = $setup->gestName("MES")->section("SETUP")->keySection($codJfas . "_POS_BUFFER")->separator(";")->asArray()->get();
|
||||
$posizioni = $setup->gestName("MES")->section("SETUP")->keySection($codJfas
|
||||
. "_POS_BUFFER")->separator(";")->asArray()->get();
|
||||
if (!empty($posizioni) && !empty($codCmac)) {
|
||||
$key = array_get($data, "key");
|
||||
$ret = \MonitoraggioLineeV2::get_ordineLav($key);
|
||||
@@ -535,4 +540,4 @@ WHERE segno = -1
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,11 +6,20 @@
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<% if (numColloRif) { %>
|
||||
UL n.<span style="font-weight: bold" class="numColloRif"><%= numColloRif %></span>
|
||||
del <span style="font-weight: bold"
|
||||
class="dataColloRif"><%= moment(dataColloRif * 1000).format("DD/MM/YYYY") %></span>
|
||||
<% if (!useBarcodeUl) { %>
|
||||
UL n.<span style="font-weight: bold" class="numColloRif"><%= numColloRif %></span>
|
||||
del <span style="font-weight: bold"
|
||||
class="dataColloRif"><%= moment(dataColloRif * 1000).format("DD/MM/YYYY") %></span>
|
||||
<% }else { %>
|
||||
<%= barcodeUl %>
|
||||
<% } %>
|
||||
<% } %>
|
||||
</td>
|
||||
<td class="text-center"><%= progressivoUl ?? "" %></td>
|
||||
<td class="text-center">
|
||||
<span class="dataProd font-weight-bold"><%= moment(dataProd * 1000).format("DD/MM/YYYY") %></span> <br>
|
||||
<span class="dataProd font-weight-bold"><%= moment(dataProd * 1000).format("HH:mm:ss") %></span>
|
||||
</td>
|
||||
<td class="td_qtaGiacenza text-center">
|
||||
<span class="qtaGiacenza" data-qta="<%= qtaGiacenza %>">
|
||||
<!-- Se il numero è positivo oppure uno zero negativo (dovuto ad arrotondamenti) lo mostro positivo-->
|
||||
@@ -45,6 +54,10 @@
|
||||
class="dataCollo"><%= moment(dataCollo * 1000).format("DD/MM/YYYY") %></span>
|
||||
<% } %>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<span class="dataProd font-weight-bold"><%= moment(dataVers * 1000).format("DD/MM/YYYY") %></span> <br>
|
||||
<span class="dataProd font-weight-bold"><%= moment(dataVers * 1000).format("HH:mm:ss") %></span>
|
||||
</td>
|
||||
<td class="text-center partitaMag"><%= partitaMag %></td>
|
||||
<td class="td_qtaScaricata text-center">
|
||||
<span class="txt_scarichi_qtaCol" data-qta_col="<%= qtaCol %>">
|
||||
|
||||
@@ -8,106 +8,106 @@ if (isset($_GET["popup-orderDetail"])) {
|
||||
} elseif (isset($_GET["popup-detailScarichiSemoleOrdine"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_GET["popup-detailScarichiSemoleOrdine"]);
|
||||
include "popup-detailScarichiSemoleOrdine.php";
|
||||
} else if (isset($_GET["popupSelezionePriorita"])) {
|
||||
} elseif (isset($_GET["popupSelezionePriorita"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_GET["popupSelezionePriorita"]);
|
||||
include "popupSelezionePriorita.php";
|
||||
} else if (isset($_GET["popupGiacenzeDisponibili"])) {
|
||||
} elseif (isset($_GET["popupGiacenzeDisponibili"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_GET["popupGiacenzeDisponibili"]);
|
||||
include "popupGiacenzeDisponibili.php";
|
||||
} else if (isset($_GET["popupDettaglioQtaTotale"])) {
|
||||
} elseif (isset($_GET["popupDettaglioQtaTotale"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_GET["popupDettaglioQtaTotale"]);
|
||||
include "popupDettaglioQtaTotale.php";
|
||||
} else if (isset($_GET["get_ordini"])) {
|
||||
} elseif (isset($_GET["get_ordini"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_GET["get_ordini"]);
|
||||
MonitoraggioLineeV2::get_ordini($data)->display();
|
||||
} else if (isset($_POST["update_priority"])) {
|
||||
} elseif (isset($_POST["update_priority"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["update_priority"]);
|
||||
MonitoraggioLineeV2::update_priority($data)->display();
|
||||
} else if (isset($_POST["update_udc"])) {
|
||||
} elseif (isset($_POST["update_udc"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["update_udc"]);
|
||||
MonitoraggioLineeV2::update_udc($data)->display();
|
||||
} else if (isset($_POST["avvia_ordine"])) {
|
||||
} elseif (isset($_POST["avvia_ordine"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["avvia_ordine"]);
|
||||
MonitoraggioLineeV2::avvia_ordine($data)->display();
|
||||
} else if (isset($_POST["sospendi_ordine"])) {
|
||||
} elseif (isset($_POST["sospendi_ordine"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["sospendi_ordine"]);
|
||||
MonitoraggioLineeV2::sospendi_ordine($data)->display();
|
||||
} else if (isset($_POST["termina_ordine"])) {
|
||||
} elseif (isset($_POST["termina_ordine"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["termina_ordine"]);
|
||||
MonitoraggioLineeV2::termina_ordine($data)->display();
|
||||
} else if (isset($_POST["insert_ordine"])) {
|
||||
} elseif (isset($_POST["insert_ordine"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["insert_ordine"]);
|
||||
MonitoraggioLineeV2::insert_ordine($data)->display();
|
||||
} else if (isset($_GET["get_pdfCollo"])) {
|
||||
} elseif (isset($_GET["get_pdfCollo"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_GET["get_pdfCollo"]);
|
||||
MonitoraggioLineeV2::get_pdfCollo($data)->display();
|
||||
} else if (isset($_GET["getFormDataforAction"])) {
|
||||
} elseif (isset($_GET["getFormDataforAction"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_GET["getFormDataforAction"]);
|
||||
MonitoraggioLineeV2::getFormDataforAction($data)->display();
|
||||
} else if (isset($_GET["download_allegato"])) {
|
||||
} elseif (isset($_GET["download_allegato"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_GET["download_allegato"]);
|
||||
MonitoraggioLineeV2::download_allegato($data)->display();
|
||||
} else if (isset($_POST["save_udc"])) {
|
||||
} elseif (isset($_POST["save_udc"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["save_udc"]);
|
||||
MonitoraggioLineeV2::save_udc($data)->display();
|
||||
} else if (isset($_GET["get_statoMacchine"])) {
|
||||
} elseif (isset($_GET["get_statoMacchine"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_GET["get_statoMacchine"]);
|
||||
MonitoraggioLineeV2\StatoMacchine::load($data)->display();
|
||||
} else if (isset($_POST["sostituisci_materiale"])) {
|
||||
} elseif (isset($_POST["sostituisci_materiale"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["sostituisci_materiale"]);
|
||||
MonitoraggioLineeV2::sostituisci_materiale($data)->display();
|
||||
} else if (isset($_POST["rimuovi_materiale"])) {
|
||||
} elseif (isset($_POST["rimuovi_materiale"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["rimuovi_materiale"]);
|
||||
MonitoraggioLineeV2::rimuovi_materiale($data)->display();
|
||||
} else if (isset($_GET["get_listaDiPrelievo"])) {
|
||||
} elseif (isset($_GET["get_listaDiPrelievo"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_GET["get_listaDiPrelievo"]);
|
||||
MonitoraggioLineeV2::getPdfListaDiPrelievo($data)->display();
|
||||
} else if (isset($_POST["delete_collo"])) {
|
||||
} elseif (isset($_POST["delete_collo"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["delete_collo"]);
|
||||
MonitoraggioLineeV2::delete_collo($data)->display();
|
||||
} else if (isset($_GET["getPrintQueue"])) {
|
||||
} elseif (isset($_GET["getPrintQueue"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_GET["getPrintQueue"]);
|
||||
MonitoraggioLineeV2::getPrintQueue($data["cod_jfas"])->display();
|
||||
} else if (isset($_GET["storicoOrdini"])) {
|
||||
} elseif (isset($_GET["storicoOrdini"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_GET["storicoOrdini"]);
|
||||
MonitoraggioLineeV2::getStoricoOrdini($data)->display();
|
||||
} else if (isset($_POST["rimuoviStampaInCoda"])) {
|
||||
} elseif (isset($_POST["rimuoviStampaInCoda"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["rimuoviStampaInCoda"]);
|
||||
MonitoraggioLineeV2::rimuoviStampaInCoda($data["codJfas"], $data["printId"])->display();
|
||||
} else if (isset($_POST["complete_qtaUdc"])) {
|
||||
} elseif (isset($_POST["complete_qtaUdc"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["complete_qtaUdc"]);
|
||||
MonitoraggioLineeV2::complete_qtaUdc($data)->display();
|
||||
} else if (isset($_POST["sendConsentToWrapper"])) {
|
||||
} elseif (isset($_POST["sendConsentToWrapper"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["sendConsentToWrapper"]);
|
||||
MonitoraggioLineeV2::sendConsentToWrapper($data)->display();
|
||||
} else if (isset($_POST["insertPartitaMag"])) {
|
||||
} elseif (isset($_POST["insertPartitaMag"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["insertPartitaMag"]);
|
||||
MonitoraggioLineeV2::insertPartitaMag($data)->display();
|
||||
} else if (isset($_POST["cambio_data_produzione"])) {
|
||||
} elseif (isset($_POST["cambio_data_produzione"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["cambio_data_produzione"]);
|
||||
MonitoraggioLineeV2::cambioDataProduzione($data)->display();
|
||||
} else if (isset($_POST["setCqRipValues"])) {
|
||||
} elseif (isset($_POST["setCqRipValues"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["setCqRipValues"]);
|
||||
MonitoraggioLineeV2::setCqRipValues($data)->display();
|
||||
} else if (isset($_POST["deleteSingleMeasurement"])) {
|
||||
} elseif (isset($_POST["deleteSingleMeasurement"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["deleteSingleMeasurement"]);
|
||||
MonitoraggioLineeV2::deleteSingleMeasurement($data)->display();
|
||||
} else if (isset($_GET["getPdfCq"])) {
|
||||
} elseif (isset($_GET["getPdfCq"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_GET["getPdfCq"]);
|
||||
MonitoraggioLineeV2\CQ::getPdf($data)->display();
|
||||
} else if (isset($_GET["getEtichetta"])) {
|
||||
} elseif (isset($_GET["getEtichetta"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_GET["getEtichetta"]);
|
||||
MonitoraggioLineeV2::getEtichetta($data)->display();
|
||||
} else if (isset($_GET["suggestDataScadPartitaMag"])) {
|
||||
} elseif (isset($_GET["suggestDataScadPartitaMag"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_GET["suggestDataScadPartitaMag"]);
|
||||
MonitoraggioLineeV2::suggestDataScadPartitaMag($data)->display();
|
||||
} else if (isset($_GET["checkMaterialiOrdini"])) {
|
||||
} elseif (isset($_GET["checkMaterialiOrdini"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_GET["checkMaterialiOrdini"]);
|
||||
MonitoraggioLineeV2::checkMaterialiOrdini($data)->display();
|
||||
} else if (isset($_POST["save_carat"])) {
|
||||
} elseif (isset($_POST["save_carat"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["save_carat"]);
|
||||
MonitoraggioLineeV2::save_carat($data)->display();
|
||||
} else if (isset($_POST["getMaterialiInLinea"])) {
|
||||
} elseif (isset($_POST["getMaterialiInLinea"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["getMaterialiInLinea"]);
|
||||
MonitoraggioLineeV2::getMaterialiInLinea(
|
||||
$data["codJfas"],
|
||||
@@ -116,84 +116,87 @@ if (isset($_GET["popup-orderDetail"])) {
|
||||
isset($data["checkQtaEsistente"]) ? $data["checkQtaEsistente"] : true,
|
||||
isset($data["codMart"]) ? $data["codMart"] : null
|
||||
)->display();
|
||||
} else if (isset($_POST["getMateriali"])) {
|
||||
} elseif (isset($_POST["getMateriali"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["getMateriali"]);
|
||||
MonitoraggioLineeV2::getMateriali(
|
||||
$data["codJfas"],
|
||||
$data["key"],
|
||||
isset($data["codMart"]) ? $data["codMart"] : null
|
||||
)->display();
|
||||
} else if (isset($_POST["getMaterialiAlternativi"])) {
|
||||
} elseif (isset($_POST["getMaterialiAlternativi"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["getMaterialiAlternativi"]);
|
||||
MonitoraggioLineeV2::get_materialiAlternativi($data["data"], $data["key"])->display();
|
||||
} else if (isset($_POST["salvaSelezionePriorita"])) {
|
||||
} elseif (isset($_POST["salvaSelezionePriorita"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["salvaSelezionePriorita"]);
|
||||
MonitoraggioLineeV2::salvaSelezionePriorita($data)->display();
|
||||
} else if (isset($_POST["saveControllo"])) {
|
||||
} elseif (isset($_POST["saveControllo"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["saveControllo"]);
|
||||
MonitoraggioLineeV2::saveControllo($data)->display();
|
||||
} else if (isset($_POST["sendCommand"])) {
|
||||
} elseif (isset($_POST["sendCommand"])) {
|
||||
$data = \Utility::sanitizeB64JSON_parse($_POST["sendCommand"]);
|
||||
MonitoraggioLineeV2::sendCommand($data["command"], $data["codJfas"], $data["body"], null, array_get($data, "timeout"))->display();
|
||||
} else if (isset($_POST["checkOrdiniInProduzione"])) {
|
||||
} elseif (isset($_POST["checkOrdiniInProduzione"])) {
|
||||
$data = \Utility::sanitizeB64JSON_parse($_POST["checkOrdiniInProduzione"]);
|
||||
MonitoraggioLineeV2::checkOrdiniInProduzione($data)->display();
|
||||
} else if (isset($_POST["getListLineePerOrdine"])) {
|
||||
} elseif (isset($_POST["getListLineePerOrdine"])) {
|
||||
$data = \Utility::sanitizeB64JSON_parse($_POST["getListLineePerOrdine"]);
|
||||
MonitoraggioLineeV2::getListLineePerOrdine($data)->display();
|
||||
} else if (isset($_POST["savePeso"])) {
|
||||
} elseif (isset($_POST["savePeso"])) {
|
||||
$data = \Utility::sanitizeB64JSON_parse($_POST["savePeso"]);
|
||||
MonitoraggioLineeV2::savePeso($data)->display();
|
||||
} else if (isset($_GET["onBeforeSaveUDC"])) {
|
||||
} elseif (isset($_GET["onBeforeSaveUDC"])) {
|
||||
$data = \Utility::sanitizeB64JSON_parse($_GET["onBeforeSaveUDC"]);
|
||||
MonitoraggioLineeV2::onBeforeSaveUDC($data)->display();
|
||||
} else if (isset($_POST["getSchedaTecnica"])) {
|
||||
} elseif (isset($_POST["getSchedaTecnica"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["getSchedaTecnica"]);
|
||||
MonitoraggioLineeV2::getSchedaTecnica($data)->display();
|
||||
} else if (isset($_POST["stampaUDCInCoda"])) {
|
||||
} elseif (isset($_POST["stampaUDCInCoda"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["stampaUDCInCoda"]);
|
||||
MonitoraggioLineeV2::stampaUDCInCoda($data)->display();
|
||||
} else if (isset($_GET["check_editSessionExpired"])) {
|
||||
} elseif (isset($_GET["check_editSessionExpired"])) {
|
||||
MonitoraggioLineeV2::check_editSessionExpired()->display();
|
||||
} else if (isset($_POST["creaScarico"])) {
|
||||
} elseif (isset($_POST["creaScarico"])) {
|
||||
$data = \Utility::sanitizeB64JSON_parse($_POST["creaScarico"]);
|
||||
MonitoraggioLineeV2::creaScarico($data)->display();
|
||||
} else if (isset($_GET["authorize"])) {
|
||||
} elseif (isset($_GET["authorize"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_GET["authorize"]);
|
||||
MonitoraggioLineeV2::authorize($data)->display();
|
||||
} else if (isset($_POST["modificaScarico"])) {
|
||||
} elseif (isset($_POST["modificaScarico"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["modificaScarico"]);
|
||||
MonitoraggioLineeV2::modificaScarico($data)->display();
|
||||
} else if (isset($_POST["eliminaScarico"])) {
|
||||
} elseif (isset($_POST["eliminaScarico"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["eliminaScarico"]);
|
||||
MonitoraggioLineeV2::eliminaScarico($data)->display();
|
||||
} else if (isset($_GET["getPartiteDisp"])) {
|
||||
} elseif (isset($_GET["getPartiteDisp"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_GET["getPartiteDisp"]);
|
||||
MonitoraggioLineeV2::getPartiteDisp($data)->display();
|
||||
} else if (isset($_GET["getOrdini"])) {
|
||||
} elseif (isset($_GET["getOrdini"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_GET["getOrdini"]);
|
||||
MonitoraggioLineeV2::getOrdini($data)->display();
|
||||
} else if (isset($_POST["rettificaProduzione"])) {
|
||||
} elseif (isset($_POST["rettificaProduzione"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["rettificaProduzione"]);
|
||||
MonitoraggioLineeV2::rettificaProduzione($data)->display();
|
||||
} else if (isset($_POST["chiusuraOrdine"])) {
|
||||
} elseif (isset($_POST["chiusuraOrdine"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["chiusuraOrdine"]);
|
||||
MonitoraggioLineeV2::chiusuraOrdine($data)->display();
|
||||
} else if (isset($_GET["getNamesForCQLevanplast"])) {
|
||||
} elseif (isset($_GET["getNamesForCQLevanplast"])) {
|
||||
MonitoraggioLineeV2::getNamesForCQLevanplast()->display();
|
||||
} else if (isset($_POST["saveCqPartitaMagLevanplast"])) {
|
||||
} elseif (isset($_POST["saveCqPartitaMagLevanplast"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["saveCqPartitaMagLevanplast"]);
|
||||
MonitoraggioLineeV2::saveCqPartitaMagLevanplast($data)->display();
|
||||
} else if (isset($_POST["hasTopicNotificheAbilitate"])) {
|
||||
} elseif (isset($_POST["hasTopicNotificheAbilitate"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["hasTopicNotificheAbilitate"]);
|
||||
MonitoraggioLineeV2::hasTopicNotificheAbilitate($data)->display();
|
||||
} else if (isset($_POST["checkMaterialeInBarcode"])) {
|
||||
} elseif (isset($_POST["checkMaterialeInBarcode"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["checkMaterialeInBarcode"]);
|
||||
MonitoraggioLineeV2::checkMaterialeInBarcode($data)->display();
|
||||
} else if (isset($_POST["versaMaterialeSuOrdine"])) {
|
||||
} elseif (isset($_POST["versaMaterialeSuOrdine"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["versaMaterialeSuOrdine"]);
|
||||
MonitoraggioLineeV2::versaMaterialeSuOrdine($data)->display();
|
||||
} else if (Controller::is_ajaxRequest()) {
|
||||
} elseif (isset($_POST["postUdc"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["postUdc"]);
|
||||
MonitoraggioLineeV2::postUdc($data)->display();
|
||||
} elseif (Controller::is_ajaxRequest()) {
|
||||
$Ret = new Ret;
|
||||
$Ret->set_errorCode(ErrorHandler::UNEXPECTED_AJAX_METHOD)->display();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,8 @@ ob_start();
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<?php if (MonitoraggioLineeV2::isAttivaScarico() && $flagOrdineEvaso === "N") { ?>
|
||||
<?php
|
||||
if (MonitoraggioLineeV2::isAttivaScarico() && $flagOrdineEvaso === "N") { ?>
|
||||
<div class="flex reverse mb-20" style="gap: 1rem;">
|
||||
<button id="bt_nuovoScarico" class="btn btn-success icbtn btn-md" type="button">
|
||||
<span>
|
||||
@@ -44,20 +45,24 @@ ob_start();
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php
|
||||
} ?>
|
||||
<table class="table table-hover table-striped table-bordered table-text-middle" id="scarichiArticoloTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3" style="background-color: #dcffe4">Provenienza</th>
|
||||
<th colspan="4" style="background-color: #ffdedc">Scarico</th>
|
||||
<th colspan="5" style="background-color: #dcffe4">Provenienza</th>
|
||||
<th colspan="5" style="background-color: #ffdedc">Scarico</th>
|
||||
<th rowspan="2"></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Posizione</th>
|
||||
<th>U.D.C.</th>
|
||||
<th>Prog.</th>
|
||||
<th>Data vers.</th>
|
||||
<th>Q.tà in Giacenza</th>
|
||||
<th>Documento</th>
|
||||
<th>U.D.S.</th>
|
||||
<th>Data vers.</th>
|
||||
<th>Lotto</th>
|
||||
<th>Q.tà Scaricata</th>
|
||||
</tr>
|
||||
@@ -68,14 +73,15 @@ ob_start();
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th colspan="6"></th>
|
||||
<th colspan="9"></th>
|
||||
<th id="totaleQtaScaricata"></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
<?php if (MonitoraggioLineeV2::isAttivaRientro()) { ?>
|
||||
<?php
|
||||
if (MonitoraggioLineeV2::isAttivaRientro()) { ?>
|
||||
<table class="table table-hover table-striped table-bordered table-text-middle" id="rientriArticoloTable">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -92,11 +98,12 @@ ob_start();
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php } ?>
|
||||
<?php
|
||||
} ?>
|
||||
|
||||
<?php
|
||||
|
||||
$html = Utility\Str::remove_multiple_spaces(@ob_get_clean());
|
||||
$ret->set_string($html)->set_data($retData);
|
||||
|
||||
$ret->display();
|
||||
$ret->display();
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -3,12 +3,13 @@ class PopupCreateUDCForm {
|
||||
ordine = null;
|
||||
title = null;
|
||||
gridSize = null;
|
||||
enableEditDateTime = false;
|
||||
btOKText = null;
|
||||
|
||||
constructor(ordine) {
|
||||
this.ordine = ordine;
|
||||
this.title = "Crea U.D.C.";
|
||||
this.gridSize = {md: 4, xs: 12};
|
||||
this.gridSize = {md: 6, xs: 12};
|
||||
this.btOKText = _monitoraggioLinee.hasCodaStampa() ? "Crea U.D.C. e stampa etichetta" : "Crea U.D.C.";
|
||||
}
|
||||
|
||||
@@ -58,6 +59,13 @@ class PopupCreateUDCForm {
|
||||
<input type="text" id="numId" class="numId form-control no-spin-buttons text-center"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="div_dataVers" hidden>
|
||||
<br>
|
||||
<label class="text-center" for="dataVers">Data Prod.</label>
|
||||
<div>
|
||||
<input type="text" id="dataVers" class="dataVers form-control no-spin-buttons text-center"/>
|
||||
</div>
|
||||
</div>
|
||||
${_monitoraggioLinee.module.get_dataSource("isShowQuarantine") &&
|
||||
`<div class="checkbox-lg">
|
||||
<label>
|
||||
@@ -77,6 +85,18 @@ class PopupCreateUDCForm {
|
||||
$divNumId.removeAttr("hidden");
|
||||
}
|
||||
|
||||
|
||||
if (self.enableEditDateTime) {
|
||||
const $divDataProd = $div.find(".div_dataVers");
|
||||
$divDataProd.removeAttr("hidden");
|
||||
$divDataProd.find("input#dataVers").kendoDateTimePicker({
|
||||
dateInput: true,
|
||||
value: new Date(),
|
||||
componentType: "modern",
|
||||
max: new Date()
|
||||
});
|
||||
}
|
||||
|
||||
const $qtaCollo = $div.find("input.qtaUdc");
|
||||
$qtaCollo.val(self.ordine.qtaBatchProd);
|
||||
|
||||
@@ -113,7 +133,7 @@ class PopupCreateUDCForm {
|
||||
const qtaCollo = $qtaCollo.getNumericValue(false);
|
||||
const $numId = $div.find("#numId");
|
||||
const numId = $numId.getValue();
|
||||
|
||||
const dataVers = this.enableEditDateTime ? $div.find("input#dataVers").val() : null;
|
||||
if (!$numId.is(":hidden") && !numId) {
|
||||
$numId.focus().parent().addClass("has-error");
|
||||
throw new Error("Numero Identificativo Operatore mancante.");
|
||||
@@ -122,6 +142,7 @@ class PopupCreateUDCForm {
|
||||
return {
|
||||
qtaCollo,
|
||||
numId,
|
||||
dataVers: dataVers,
|
||||
segnaQuarantena: $div.find("#segnaQuarantena").is(":checked")
|
||||
};
|
||||
}
|
||||
@@ -147,6 +168,11 @@ class PopupCreateUDCForm {
|
||||
return true;
|
||||
}
|
||||
|
||||
enableEditDataProd(enableEditDate = false) {
|
||||
this.enableEditDateTime = enableEditDate;
|
||||
return this;
|
||||
}
|
||||
|
||||
async open() {
|
||||
const self = this;
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import PopupSimpleNumberInput from "@js/utils/PopupSimpleNumberInput.js";
|
||||
import isNil from "lodash-es/isNil.js";
|
||||
import {numberStyle} from "@js/utils.js";
|
||||
import PopupNuovoMaterialeOrdine from "@gest-lib/monitoraggio_linee_v2/ts/PopupNuovoMaterialeOrdine.js";
|
||||
import PopupEditUdc, {ModelUdcOrdine} from "@gest-lib/monitoraggio_linee_v2/ts/PopupEditUdc.js";
|
||||
|
||||
export let _ordini = {
|
||||
autoRefresh: null, // Timer()
|
||||
@@ -201,7 +202,7 @@ export let _ordini = {
|
||||
if (ret?.returnId) {
|
||||
self.configBilance = ret.returnData;
|
||||
}
|
||||
}catch (e) {
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
}
|
||||
@@ -412,8 +413,7 @@ export let _ordini = {
|
||||
}
|
||||
self.autoRefresh.start();
|
||||
});
|
||||
},
|
||||
// checkOrdineInCorso: function () {
|
||||
}, // checkOrdineInCorso: function () {
|
||||
// const self = this;
|
||||
// let $tbOrdini = self.$table();
|
||||
// let $tbodyInCorso = $tbOrdini.children("tbody[data-in_corso='1']");
|
||||
@@ -991,15 +991,12 @@ export let _ordini = {
|
||||
});
|
||||
})
|
||||
.btOK({
|
||||
text: "Conferma",
|
||||
dismissOnClick: true,
|
||||
onClick(e, $bt, $div) {
|
||||
text: "Conferma", dismissOnClick: true, onClick(e, $bt, $div) {
|
||||
return $div.find("#idBilancia").data("kendoDropDownList").dataItem().toJSON();
|
||||
}
|
||||
})
|
||||
.gridSize({
|
||||
xs: 12,
|
||||
md: 4
|
||||
xs: 12, md: 4
|
||||
})
|
||||
.okCancel()
|
||||
.title("Seleziona Bilancia")
|
||||
@@ -1171,7 +1168,8 @@ export let _ordini = {
|
||||
}
|
||||
|
||||
return $divBtns;
|
||||
}, beginOrderStop: function (ordine) {
|
||||
},
|
||||
beginOrderStop: function (ordine) {
|
||||
const self = this;
|
||||
|
||||
let qtaProd = ordine.qtaProd;
|
||||
@@ -1193,7 +1191,8 @@ export let _ordini = {
|
||||
self.onBeforeOrderStop(ordine, response);
|
||||
}
|
||||
});
|
||||
}, onPrintUdcRequest: async function (keyCollo, codJfas, numCnf, numProg) {
|
||||
},
|
||||
onPrintUdcRequest: async function (keyCollo, codJfas, numCnf, numProg) {
|
||||
const self = this;
|
||||
if (_monitoraggioLinee.hasCodaStampa()) {
|
||||
const ret = await this.richiediStampaCollo();
|
||||
@@ -1209,7 +1208,8 @@ export let _ordini = {
|
||||
}
|
||||
return self.printUdc(data);
|
||||
}
|
||||
}, printUdc(data) {
|
||||
},
|
||||
printUdc(data) {
|
||||
const self = this;
|
||||
let d = $.Deferred();
|
||||
let ajax = new Ajax();
|
||||
@@ -1221,7 +1221,8 @@ export let _ordini = {
|
||||
d.resolve();
|
||||
})
|
||||
.execute();
|
||||
}, async richiediStampaCollo() {
|
||||
},
|
||||
async richiediStampaCollo() {
|
||||
let modalBoxYN = new ModalBox();
|
||||
return await modalBoxYN.yesNo().info("Aggiungere l'U.D.C. generata alla coda di stampa?");
|
||||
},
|
||||
@@ -1270,6 +1271,57 @@ export let _ordini = {
|
||||
})
|
||||
.execute();
|
||||
});
|
||||
$div.find("#addUdc").on("click", async (e) => {
|
||||
const $btn = $(e.currentTarget);
|
||||
try {
|
||||
await self.onBeforeCreateUDC(ordine, true);
|
||||
} finally {
|
||||
self._refreshModalDetails(key, ordine, null);
|
||||
$btn.btn_setWaitStatus(false);
|
||||
}
|
||||
|
||||
})
|
||||
$div.find(".bt_editUdc").on("click", async (e) => {
|
||||
const $btn = $(e.currentTarget);
|
||||
const $tr = $btn.closest("tr");
|
||||
const keyCollo = $tr.getBase64JsonDataAttr("key_collo");
|
||||
let model = new ModelUdcOrdine({
|
||||
dataCollo: keyCollo.data_collo,
|
||||
serCollo: keyCollo.ser_collo,
|
||||
numCollo: keyCollo.num_collo,
|
||||
gestione: keyCollo.gestione,
|
||||
dataOrd: ordine.dataOrd,
|
||||
numOrd: ordine.numOrd,
|
||||
codJfas: keyCollo.cod_jfas,
|
||||
codMdep: ordine.codMdep,
|
||||
dataVers: keyCollo.datetime_row,
|
||||
barcodeUl: keyCollo.barcode_ul,
|
||||
codMart: codProd,
|
||||
codDtip: keyCollo.cod_dtip,
|
||||
qtaCol: keyCollo.qta_col,
|
||||
qtaProd: keyCollo.qta_col / ordine.rapConv,
|
||||
qtaCnf: ordine.qtaCnf,
|
||||
numCnf: keyCollo.num_cnf,
|
||||
colliPedana: ordine.colliPedana,
|
||||
descrizione: ordine.descrizioneProd,
|
||||
partitaMag: ordine.partitaMag,
|
||||
untMis: ordine.untOrd,
|
||||
rapConv: ordine.rapConv,
|
||||
qtaMin: (keyCollo.qta_col - keyCollo.giacenza) / ordine.rapConv
|
||||
});
|
||||
|
||||
|
||||
try {
|
||||
const {success} = await new PopupEditUdc(model, _monitoraggioLinee.module).open();
|
||||
|
||||
if (success) {
|
||||
self._refreshModalDetails(key, ordine, null);
|
||||
}
|
||||
} finally {
|
||||
$btn.btn_setWaitStatus(false);
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
$div.find(".bt_printOrdCq").on("click", function () {
|
||||
window.print();
|
||||
@@ -1287,37 +1339,36 @@ export let _ordini = {
|
||||
.onSuccess({modalBox: {IFrame: true}})
|
||||
.execute();
|
||||
});
|
||||
|
||||
$div.find(".bt_getEditCollo").on("click", function (e) {
|
||||
let $bt = $(this);
|
||||
let $tr = $bt.closest("tr");
|
||||
let keyCollo = $tr.getDataAttr("key_collo");
|
||||
e.preventDefault();
|
||||
let modal = new ModalBox();
|
||||
modal
|
||||
.btOK({
|
||||
text: "Modifica", style: "primary", onClick: function () {
|
||||
let numCnf = $("#num_cnf").getNumericValue();
|
||||
let ajax = new Ajax();
|
||||
ajax.post("update_udc")
|
||||
.data({
|
||||
keyCollo: keyCollo, numCnf: numCnf, keyOrdine: key
|
||||
})
|
||||
.noticeAsToast()
|
||||
.waitModal().execute(function (ret) {
|
||||
if (ret.returnId === 1) {
|
||||
new Toast().success("U.D.C. Aggiornata");
|
||||
modal.close();
|
||||
modalBox.close();
|
||||
self.view_modalDettagli(key, ordine, $bt);
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
.md()
|
||||
.draggable()
|
||||
.primary("<div class='input-group input-group-sm mb-6'> <label for='num_cnf' class='input-group-addon text-monospace bg-white font-weight-bold text-dark'>Quantità (CT)</label> <input id='num_cnf' name='qta_col' type='number' min='1' class='form-control disabled text-dark' value='" + keyCollo.num_cnf + "'> </div>", "Inserisci nuova quantità");
|
||||
});
|
||||
// $div.find(".bt_getEditCollo").on("click", function (e) {
|
||||
// let $bt = $(this);
|
||||
// let $tr = $bt.closest("tr");
|
||||
// let keyCollo = $tr.getDataAttr("key_collo");
|
||||
// e.preventDefault();
|
||||
// let modal = new ModalBox();
|
||||
// modal
|
||||
// .btOK({
|
||||
// text: "Modifica", style: "primary", onClick: function () {
|
||||
// let numCnf = $("#num_cnf").getNumericValue();
|
||||
// let ajax = new Ajax();
|
||||
// ajax.post("update_udc")
|
||||
// .data({
|
||||
// keyCollo: keyCollo, numCnf: numCnf, keyOrdine: key
|
||||
// })
|
||||
// .noticeAsToast()
|
||||
// .waitModal().execute(function (ret) {
|
||||
// if (ret.returnId === 1) {
|
||||
// new Toast().success("U.D.C. Aggiornata");
|
||||
// modal.close();
|
||||
// modalBox.close();
|
||||
// self.view_modalDettagli(key, ordine, $bt);
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// })
|
||||
// .md()
|
||||
// .draggable()
|
||||
// .primary("<div class='input-group input-group-sm mb-6'> <label for='num_cnf' class='input-group-addon text-monospace bg-white font-weight-bold text-dark'>Quantità (CT)</label> <input id='num_cnf' name='qta_col' type='number' min='1' class='form-control disabled text-dark' value='" + keyCollo.num_cnf + "'> </div>", "Inserisci nuova quantità");
|
||||
// });
|
||||
$div.find(".bt_showEtich").on("click", function () {
|
||||
let $bt = $(this);
|
||||
let $tr = $bt.closest("tr");
|
||||
@@ -1485,7 +1536,8 @@ export let _ordini = {
|
||||
})
|
||||
.execute();
|
||||
});
|
||||
}, _generatePdfCq: function (orderKey, $bt) {
|
||||
},
|
||||
_generatePdfCq: function (orderKey, $bt) {
|
||||
let d = $.Deferred();
|
||||
let ajax = new Ajax();
|
||||
ajax.get("getPdfCq")
|
||||
@@ -1496,7 +1548,8 @@ export let _ordini = {
|
||||
.execute();
|
||||
|
||||
return d;
|
||||
}, _refreshModalDetails: function (orderkey, ordine, $bt) {
|
||||
},
|
||||
_refreshModalDetails: function (orderkey, ordine, $bt) {
|
||||
const self = this;
|
||||
self.modalDetail.close();
|
||||
self.view_modalDettagli(orderkey, ordine, $bt);
|
||||
@@ -1568,7 +1621,8 @@ export let _ordini = {
|
||||
d.resolve();
|
||||
}
|
||||
return d;
|
||||
}, retrieve_priority: function ($tbOrdini) {
|
||||
},
|
||||
retrieve_priority: function ($tbOrdini) {
|
||||
const self = this;
|
||||
let arr_rows = [];
|
||||
|
||||
@@ -1600,7 +1654,8 @@ export let _ordini = {
|
||||
});
|
||||
|
||||
return arr_rows;
|
||||
}, handle_materials_action: function ($bt, orderKey) {
|
||||
},
|
||||
handle_materials_action: function ($bt, orderKey) {
|
||||
let d = $.Deferred();
|
||||
const self = this;
|
||||
let action = $bt.data("action");
|
||||
@@ -1722,7 +1777,8 @@ export let _ordini = {
|
||||
break;
|
||||
}
|
||||
return d;
|
||||
}, toggle_input_materiali: function ($btn) {
|
||||
},
|
||||
toggle_input_materiali: function ($btn) {
|
||||
let $codMartTd = $btn.closest("tr").find(".td_codMart");
|
||||
$codMartTd.children().toggleClass("hidden");
|
||||
let codMart = $codMartTd.find(".txt_materiali_codMart").text();
|
||||
@@ -1733,13 +1789,15 @@ export let _ordini = {
|
||||
$inputQtaOrd.toggleClass("hidden")
|
||||
$inputQtaOrd.closest("td").find(".qta_ord_desc").toggleClass("hidden");
|
||||
}
|
||||
}, toggle_input_scarichi: function ($row) {
|
||||
},
|
||||
toggle_input_scarichi: function ($row) {
|
||||
const $qtaScaricataTd = $row.find(".td_qtaScaricata");
|
||||
const qtaCol = $qtaScaricataTd.find(".txt_scarichi_qtaCol").data("qta_col");
|
||||
$qtaScaricataTd.children().toggleClass("hidden");
|
||||
$qtaScaricataTd.find("input.qtaScaricata").val(qtaCol).change();
|
||||
$row.find("td.pulsanti .btn").toggleClass("hidden");
|
||||
}, get_pdfListaDiPrelievo: function (orderKey) {
|
||||
},
|
||||
get_pdfListaDiPrelievo: function (orderKey) {
|
||||
const ajax = new Ajax();
|
||||
|
||||
ajax.get("get_listaDiPrelievo")
|
||||
@@ -1748,7 +1806,8 @@ export let _ordini = {
|
||||
.noticeAsModal()
|
||||
.onSuccess({modalBox: {IFrame: true}, toast: {message: "Ordine stampato"}})
|
||||
.execute();
|
||||
}, loadGiacenze: function (rows) {
|
||||
},
|
||||
loadGiacenze: function (rows) {
|
||||
const self = this;
|
||||
self.tableGiacenze = $("#giacenzeTable");
|
||||
self.tableGiacenze.find("tbody").html("");
|
||||
@@ -1799,7 +1858,8 @@ export let _ordini = {
|
||||
|
||||
self.tableGiacenze.find("tbody").append($row);
|
||||
}, self));
|
||||
}, loadScarichiArticolo: async function (ret, ordine, result) {
|
||||
},
|
||||
loadScarichiArticolo: async function (ret, ordine, result) {
|
||||
if (typeof _monitoraggioLinee === "undefined") {
|
||||
window._monitoraggioLinee = {
|
||||
module: new Module("monitoraggio_linee_v2"), codJfas: get_urlParameter("linea")
|
||||
@@ -1818,13 +1878,16 @@ export let _ordini = {
|
||||
let untMis = self.righeScarichi?.length > 0 && self.righeScarichi[0].unt_mis || "";
|
||||
const template = _.template(_monitoraggioLinee.module.get_template("tableScarichiArticoloRow"));
|
||||
const isAttivaRientro = _monitoraggioLinee.module.get_dataSource("isAttivaRientro");
|
||||
const identifyWithBarcode = _monitoraggioLinee.module.get_dataSource("identifyUlWithBarcode");
|
||||
|
||||
_.forEach(self.righeScarichi, _.bind(function (row) {
|
||||
const $row = $(template({
|
||||
useBarcodeUl: identifyWithBarcode,
|
||||
numDoc: row.num_doc,
|
||||
dataDoc: row.data_doc,
|
||||
numCollo: row.num_collo,
|
||||
dataCollo: row.data_collo,
|
||||
dataVers: row.data_vers,
|
||||
posizione: row.posizione,
|
||||
numColloRif: row.num_collo_rif,
|
||||
dataColloRif: row.data_collo_rif,
|
||||
@@ -1833,6 +1896,9 @@ export let _ordini = {
|
||||
untMis: row.unt_mis,
|
||||
qtaGiacenza: row.qta_giacenza,
|
||||
flagEvaso: ret.flagOrdineEvaso,
|
||||
barcodeUl: row.barcode_ul,
|
||||
progressivoUl: row.prog_ul,
|
||||
dataProd: row.data_prod,
|
||||
isAttivaRientro,
|
||||
}));
|
||||
|
||||
@@ -2040,7 +2106,8 @@ export let _ordini = {
|
||||
});
|
||||
}
|
||||
}
|
||||
}, show_detail_unloadings: function (codMart, orderKey, order, $bt = null) {
|
||||
},
|
||||
show_detail_unloadings: function (codMart, orderKey, order, $bt = null) {
|
||||
const self = this;
|
||||
if ($bt) {
|
||||
codMart = $bt.closest("tr").data("cod_mart");
|
||||
@@ -2187,7 +2254,8 @@ export let _ordini = {
|
||||
})
|
||||
.execute();
|
||||
});
|
||||
}, send_loginRequest: function () {
|
||||
},
|
||||
send_loginRequest: function () {
|
||||
const self = this;
|
||||
const d = $.Deferred();
|
||||
const data = {
|
||||
@@ -2209,7 +2277,8 @@ export let _ordini = {
|
||||
.execute();
|
||||
|
||||
return d;
|
||||
}, start_adminSession: function (callbackSuccess) {
|
||||
},
|
||||
start_adminSession: function (callbackSuccess) {
|
||||
const ajax = new Ajax();
|
||||
|
||||
ajax.get("check_editSessionExpired")
|
||||
@@ -2376,7 +2445,8 @@ export let _ordini = {
|
||||
callback: _.bind(self.onOrderStart, self)
|
||||
};
|
||||
}).execute();
|
||||
}, onOrderStart: function () {
|
||||
},
|
||||
onOrderStart: function () {
|
||||
const self = this;
|
||||
self.refresh_table();
|
||||
},
|
||||
@@ -2467,7 +2537,7 @@ export let _ordini = {
|
||||
|
||||
scriptAppended: false,
|
||||
|
||||
async onBeforeCreateUDC(ordine) {
|
||||
async onBeforeCreateUDC(ordine, enableEditDataProd = false) {
|
||||
const self = this;
|
||||
|
||||
const ret = await new Ajax()
|
||||
@@ -2490,7 +2560,7 @@ export let _ordini = {
|
||||
}
|
||||
|
||||
try {
|
||||
await new _monitoraggioLinee.classMap[ret.returnData?.className || "PopupCreateUDCForm"](ordine, ret?.returnData).open();
|
||||
await new _monitoraggioLinee.classMap[ret.returnData?.className || "PopupCreateUDCForm"](ordine, ret?.returnData).enableEditDataProd(enableEditDataProd).open();
|
||||
} catch (e) {
|
||||
new Toast()
|
||||
.danger(`Nessun popup registrato per ${ret.returnData?.className}`);
|
||||
@@ -2568,7 +2638,8 @@ export let _ordini = {
|
||||
}
|
||||
}).execute();
|
||||
this.onOrderStop();
|
||||
}, onOrderStop: function () {
|
||||
},
|
||||
onOrderStop: function () {
|
||||
const self = this;
|
||||
self.refresh_table();
|
||||
},
|
||||
@@ -2595,7 +2666,8 @@ export let _ordini = {
|
||||
self.pauseOrder(ordine);
|
||||
}
|
||||
}).execute();
|
||||
}, pauseOrder: function (ordine) {
|
||||
},
|
||||
pauseOrder: function (ordine) {
|
||||
const self = this;
|
||||
let ajax = new Ajax();
|
||||
let key = {gestione: ordine.gestione, data_ord: ordine.dataOrd, num_ord: ordine.numOrd};
|
||||
@@ -2614,7 +2686,8 @@ export let _ordini = {
|
||||
self.onOrderPause(ordine);
|
||||
}
|
||||
}).execute();
|
||||
}, onOrderPause: function (ordine) {
|
||||
},
|
||||
onOrderPause: function (ordine) {
|
||||
const self = this;
|
||||
self.refresh_table();
|
||||
},
|
||||
@@ -2663,7 +2736,8 @@ export let _ordini = {
|
||||
} else {
|
||||
return await self.onSaveUDC(ordine, qtaCollo, numId, extraInfo);
|
||||
}
|
||||
}, onSaveUDC: async function (ordine, qtaCollo, numId, extraInfo = null) {
|
||||
},
|
||||
onSaveUDC: async function (ordine, qtaCollo, numId, extraInfo = null) {
|
||||
const self = this;
|
||||
const key = {gestione: ordine.gestione, data_ord: ordine.dataOrd, num_ord: ordine.numOrd};
|
||||
let data = {
|
||||
@@ -2720,13 +2794,16 @@ export let _ordini = {
|
||||
}
|
||||
|
||||
return ret;
|
||||
}, onAfterSaveUDC: function (ordine) {
|
||||
}, onVersamentoRequested: function (ordine) {
|
||||
},
|
||||
onAfterSaveUDC: function (ordine) {
|
||||
},
|
||||
onVersamentoRequested: function (ordine) {
|
||||
const self = this;
|
||||
new PopupScanBarcode(_monitoraggioLinee.module, async (barcode) => {
|
||||
return await self.checkMaterialeInBarcode(barcode, ordine);
|
||||
}).open();
|
||||
}, checkMaterialeInBarcode: async function (barcode, ordine) {
|
||||
},
|
||||
checkMaterialeInBarcode: async function (barcode, ordine) {
|
||||
const self = this;
|
||||
let ajax = new Ajax()
|
||||
let result = await ajax.post("checkMaterialeInBarcode")
|
||||
@@ -2808,7 +2885,8 @@ export let _ordini = {
|
||||
|
||||
return true;
|
||||
|
||||
}, recuperaMateriale: async function (colloRif, versamento, qtaRientro) {
|
||||
},
|
||||
recuperaMateriale: async function (colloRif, versamento, qtaRientro) {
|
||||
|
||||
let ajax = new Ajax()
|
||||
ajax.post("recuperaMaterialeDaOrdine")
|
||||
|
||||
@@ -1,43 +1,63 @@
|
||||
SELECT mtb_colt.gestione,
|
||||
mtb_colt.data_collo,
|
||||
mtb_colt.ser_collo,
|
||||
mtb_colt.num_collo,
|
||||
SUM(mtb_colr.num_cnf) AS num_cnf,
|
||||
SUM(mtb_colr.qta_col) AS qta_col,
|
||||
ISNULL(SUM(mvw_sitart_udc_det_inventario.qta_col), 0) AS giacenza,
|
||||
ISNULL(SUM(mvw_sitart_udc_det_inventario.num_cnf), 0) AS giacenza_col,
|
||||
mtb_aart.unt_mis,
|
||||
mtb_colt.data_vers AS datetime_row,
|
||||
mtb_colt.cod_dtip,
|
||||
mtb_colt.cod_jfas
|
||||
FROM mtb_colt
|
||||
INNER JOIN mtb_colr ON mtb_colt.gestione = mtb_colr.gestione AND
|
||||
mtb_colt.data_collo = mtb_colr.data_collo AND
|
||||
mtb_colt.num_collo = mtb_colr.num_collo AND
|
||||
mtb_colt.ser_collo = mtb_colr.ser_collo
|
||||
INNER JOIN mtb_aart ON mtb_colr.cod_mart = mtb_aart.cod_mart
|
||||
LEFT OUTER JOIN mvw_sitart_udc_det_inventario ON mvw_sitart_udc_det_inventario.gestione = mtb_colr.gestione AND
|
||||
SELECT udc.gestione,
|
||||
udc.data_collo,
|
||||
udc.ser_collo,
|
||||
udc.num_collo,
|
||||
udc.num_cnf,
|
||||
udc.qta_col,
|
||||
udc.datetime_row,
|
||||
udc.unt_mis,
|
||||
udc.cod_dtip,
|
||||
udc.cod_mart,
|
||||
udc.cod_jfas,
|
||||
udc.progressivo_ul,
|
||||
udc.barcode_ul,
|
||||
ISNULL(mvw_sitart_udc_det_inventario.qta_col, 0) AS giacenza,
|
||||
ISNULL(mvw_sitart_udc_det_inventario.num_cnf, 0) AS giacenza_col
|
||||
FROM (SELECT mtb_colt.gestione,
|
||||
mtb_colt.data_collo,
|
||||
mtb_colt.ser_collo,
|
||||
mtb_colt.num_collo,
|
||||
SUM(mtb_colr.num_cnf) AS num_cnf,
|
||||
SUM(mtb_colr.qta_col) AS qta_col,
|
||||
mtb_colt.data_vers AS datetime_row,
|
||||
mtb_aart.unt_mis,
|
||||
mtb_aart.cod_mart,
|
||||
mtb_colt.cod_dtip,
|
||||
mtb_colt.cod_jfas,
|
||||
mtb_colt.progressivo_ul,
|
||||
mtb_colt.barcode_ul
|
||||
|
||||
FROM mtb_colt
|
||||
INNER JOIN mtb_colr ON mtb_colt.gestione = mtb_colr.gestione AND
|
||||
mtb_colt.data_collo = mtb_colr.data_collo AND
|
||||
mtb_colt.num_collo = mtb_colr.num_collo AND
|
||||
mtb_colt.ser_collo = mtb_colr.ser_collo
|
||||
INNER JOIN mtb_aart ON mtb_colr.cod_mart = mtb_aart.cod_mart
|
||||
WHERE (('[whereOrdine]' = '1'
|
||||
AND mtb_colt.gestione = '[gestione]'
|
||||
AND mtb_colt.data_ord = '[data_ord]'
|
||||
AND mtb_colt.num_ord = '[num_ord]')
|
||||
OR ('[whereIdLotto]' = '1'
|
||||
AND mtb_colt.cod_jfas = '[cod_jfas]'
|
||||
AND mtb_colt.id_lotto = '[id_lotto]'))
|
||||
AND mtb_colt.segno = 1
|
||||
AND mtb_colr.cod_mart = '[cod_prod]'
|
||||
GROUP BY mtb_colt.gestione,
|
||||
mtb_colt.data_collo,
|
||||
mtb_colt.ser_collo,
|
||||
mtb_colt.num_collo,
|
||||
mtb_colt.data_vers,
|
||||
mtb_colt.cod_dtip,
|
||||
mtb_colt.cod_jfas,
|
||||
mtb_aart.unt_mis,
|
||||
mtb_aart.cod_mart,
|
||||
mtb_colt.progressivo_ul,
|
||||
mtb_colt.barcode_ul) udc
|
||||
LEFT OUTER JOIN mvw_sitart_udc_det_inventario ON mvw_sitart_udc_det_inventario.gestione = udc.gestione AND
|
||||
mvw_sitart_udc_det_inventario.data_collo =
|
||||
mtb_colr.data_collo AND
|
||||
udc.data_collo AND
|
||||
mvw_sitart_udc_det_inventario.num_collo =
|
||||
mtb_colr.num_collo AND
|
||||
udc.num_collo AND
|
||||
mvw_sitart_udc_det_inventario.ser_collo =
|
||||
mtb_colr.ser_collo AND
|
||||
mvw_sitart_udc_det_inventario.cod_mart = mtb_colr.cod_mart
|
||||
WHERE (('[whereOrdine]' = '1'
|
||||
AND mtb_colt.gestione = '[gestione]'
|
||||
AND mtb_colt.data_ord = '[data_ord]'
|
||||
AND mtb_colt.num_ord = '[num_ord]')
|
||||
OR ('[whereIdLotto]' = '1'
|
||||
AND mtb_colt.cod_jfas = '[cod_jfas]'
|
||||
AND mtb_colt.id_lotto = '[id_lotto]'))
|
||||
AND mtb_colt.segno = 1
|
||||
AND mtb_colr.cod_mart = '[cod_prod]'
|
||||
GROUP BY mtb_colt.gestione,
|
||||
mtb_colt.data_collo,
|
||||
mtb_colt.ser_collo,
|
||||
mtb_colt.num_collo,
|
||||
mtb_colt.data_vers,
|
||||
mtb_colt.cod_dtip,
|
||||
mtb_colt.cod_jfas,
|
||||
mtb_aart.unt_mis
|
||||
udc.ser_collo AND
|
||||
mvw_sitart_udc_det_inventario.cod_mart = udc.cod_mart
|
||||
@@ -2,6 +2,7 @@ WITH colliScarico AS (SELECT mt.data_collo,
|
||||
mt.num_collo,
|
||||
mt.ser_collo,
|
||||
mt.gestione,
|
||||
mt.data_vers,
|
||||
mt.id_lotto,
|
||||
ma.cod_mart,
|
||||
mr.partita_mag,
|
||||
@@ -16,7 +17,7 @@ WITH colliScarico AS (SELECT mt.data_collo,
|
||||
ISNULL(dor.unt_ord, ma.unt_mis) AS unt_mis,
|
||||
SUM(mr.num_cnf) AS num_cnf,
|
||||
mr.qta_cnf,
|
||||
ISNULL(dor.rap_conv, 1) as rap_conv
|
||||
ISNULL(dor.rap_conv, 1) AS rap_conv
|
||||
FROM mtb_colt mt
|
||||
INNER JOIN mtb_colr mr
|
||||
ON mt.gestione = mr.gestione AND mt.data_collo = mr.data_collo AND
|
||||
@@ -39,7 +40,8 @@ WITH colliScarico AS (SELECT mt.data_collo,
|
||||
AND mr.cod_mart = '[codMart]'
|
||||
GROUP BY mr.num_collo_rif, dt.data_doc, dt.num_doc, mr.ser_collo_rif, mr.data_collo_rif,
|
||||
mr.partita_mag, ma.cod_mart, mt.num_collo, mt.data_collo, mt.ser_collo, mt.gestione,
|
||||
mt.id_lotto, dt.ser_doc, dt.cod_dtip, dor.unt_ord, ma.unt_mis, mr.qta_cnf, dor.rap_conv),
|
||||
mt.id_lotto, dt.ser_doc, dt.cod_dtip, dor.unt_ord, ma.unt_mis, mr.qta_cnf, dor.rap_conv,
|
||||
mt.data_vers),
|
||||
result AS (SELECT colliScarico.data_collo,
|
||||
colliScarico.num_collo,
|
||||
colliScarico.ser_collo,
|
||||
@@ -47,20 +49,25 @@ WITH colliScarico AS (SELECT mt.data_collo,
|
||||
colliScarico.id_lotto,
|
||||
colliScarico.cod_mart,
|
||||
colliScarico.partita_mag,
|
||||
colliScarico.data_vers,
|
||||
colliScarico.qta_col,
|
||||
data_doc,
|
||||
num_doc,
|
||||
ser_doc,
|
||||
cod_dtip,
|
||||
mvw.data_collo AS data_collo_rif,
|
||||
mvw.num_collo AS num_collo_rif,
|
||||
mvw.ser_collo AS ser_collo_rif,
|
||||
mvw.qta_col / colliScarico.rap_conv AS qta_giacenza,
|
||||
mvw.posizione,
|
||||
colliScarico.data_doc,
|
||||
colliScarico.num_doc,
|
||||
colliScarico.ser_doc,
|
||||
colliScarico.cod_dtip,
|
||||
colliScarico.unt_mis,
|
||||
colliScarico.num_cnf,
|
||||
colliScarico.qta_cnf,
|
||||
colliScarico.rap_conv,
|
||||
colliCarico.data_collo AS data_collo_rif,
|
||||
colliCarico.num_collo AS num_collo_rif,
|
||||
colliCarico.ser_collo AS ser_collo_rif,
|
||||
colliCarico.data_vers AS data_prod,
|
||||
colliCarico.progressivo_ul AS prog_ul,
|
||||
colliCarico.barcode_ul AS barcode_ul,
|
||||
mvw.qta_col / colliScarico.rap_conv AS qta_giacenza,
|
||||
mvw.posizione,
|
||||
|
||||
'Batch di scarico' AS source
|
||||
FROM colliScarico
|
||||
LEFT JOIN mvw_sitart_udc_det_all mvw
|
||||
@@ -69,7 +76,11 @@ WITH colliScarico AS (SELECT mt.data_collo,
|
||||
mvw.ser_collo = colliScarico.ser_collo_rif AND
|
||||
mvw.cod_mart = colliScarico.cod_mart AND
|
||||
ISNULL(mvw.partita_mag, '') = ISNULL(colliScarico.partita_mag, '') AND
|
||||
mvw.cod_mdep = '[codMdep]')
|
||||
mvw.cod_mdep = '[codMdep]'
|
||||
LEFT OUTER JOIN mtb_colt colliCarico ON mvw.data_collo = colliCarico.data_collo AND
|
||||
mvw.num_collo = colliCarico.num_collo AND
|
||||
mvw.ser_collo = colliCarico.ser_collo AND
|
||||
mvw.gestione = colliCarico.gestione)
|
||||
SELECT result.*
|
||||
FROM result
|
||||
UNION ALL
|
||||
@@ -80,22 +91,29 @@ SELECT NULL AS data_collo,
|
||||
NULL AS id_lotto,
|
||||
dor.cod_mart AS cod_mart,
|
||||
dcr.partita_mag,
|
||||
dtb_doct.data_ins AS data_vers,
|
||||
SUM((dcr.qta_doc * dcr.rap_conv) / dor.rap_conv) AS qta_col,
|
||||
dcr.data_doc,
|
||||
dcr.num_doc,
|
||||
dcr.ser_doc,
|
||||
dcr.cod_dtip,
|
||||
NULL AS data_collo_rif,
|
||||
NULL AS num_collo_rif,
|
||||
NULL AS ser_collo_rif,
|
||||
SUM(mpd.qta_esistente / dor.rap_conv) AS qta_giacenza,
|
||||
NULL AS posizione,
|
||||
dor.unt_ord AS unt_mis,
|
||||
dcr.num_cnf,
|
||||
dcr.qta_cnf,
|
||||
dor.rap_conv,
|
||||
NULL AS data_collo_rif,
|
||||
NULL AS num_collo_rif,
|
||||
NULL AS ser_collo_rif,
|
||||
NULL AS data_prod,
|
||||
NULL AS progressivo_ul,
|
||||
NULL AS barcode_ul,
|
||||
SUM(mpd.qta_esistente / dor.rap_conv) AS qta_giacenza,
|
||||
NULL AS posizione,
|
||||
'Documento di scarico' AS source
|
||||
FROM dtb_docr dcr
|
||||
INNER JOIN dtb_doct ON dcr.data_doc = dtb_doct.data_doc AND dcr.ser_doc = dtb_doct.ser_doc AND
|
||||
dcr.cod_dtip = dtb_doct.cod_dtip AND dcr.cod_anag = dtb_doct.cod_anag AND
|
||||
dcr.num_doc = dtb_doct.num_doc
|
||||
INNER JOIN dtb_ordr dor
|
||||
ON dcr.num_ord = dor.num_ord AND dor.data_ord = dcr.data_ord AND dor.riga_ord = dcr.riga_ord
|
||||
LEFT OUTER JOIN mtb_colt mt
|
||||
@@ -103,7 +121,7 @@ FROM dtb_docr dcr
|
||||
dcr.ser_doc = mt.ser_doc
|
||||
INNER JOIN mtb_part_dt mpd
|
||||
ON mpd.cod_mart = dcr.cod_mart
|
||||
AND (mpd.partita_mag is null and dcr.partita_mag is null or mpd.partita_mag = dcr.partita_mag)
|
||||
AND (mpd.partita_mag IS NULL AND dcr.partita_mag IS NULL OR mpd.partita_mag = dcr.partita_mag)
|
||||
AND mpd.cod_mdep = dcr.cod_mdep
|
||||
WHERE dor.data_ord = '[dataOrd]'
|
||||
AND dor.num_ord = '[numOrd]'
|
||||
@@ -112,4 +130,4 @@ WHERE dor.data_ord = '[dataOrd]'
|
||||
AND dor.cod_mart = '[codMart]'
|
||||
AND mt.num_collo IS NULL
|
||||
GROUP BY dor.cod_mart, dcr.data_doc, dcr.num_doc, dcr.ser_doc, dcr.cod_dtip, dor.unt_ord, dcr.partita_mag, dcr.num_cnf,
|
||||
dcr.qta_cnf, dor.rap_conv
|
||||
dcr.qta_cnf, dor.rap_conv, dtb_doct.data_ins
|
||||
208
public_html/gest-lib/monitoraggio_linee_v2/ts/PopupEditUdc.ts
Normal file
208
public_html/gest-lib/monitoraggio_linee_v2/ts/PopupEditUdc.ts
Normal file
@@ -0,0 +1,208 @@
|
||||
import FormPopup from "@js/FormPopup.js";
|
||||
import {MtbColt, ServiceRestResponse} from "@js/ims/ems-core.module";
|
||||
|
||||
export class ModelUdcOrdine extends kendo.data.Model.define({
|
||||
id: "barcodeUl",
|
||||
field: {
|
||||
gestione: {type: "string"},
|
||||
dataCollo: {type: "Date"},
|
||||
serCollo: {type: "string"},
|
||||
numCollo: {type: "number"},
|
||||
barcodeUl: {type: "string"},
|
||||
dataOrd: {type: "Date"},
|
||||
numOrd: {type: "number"},
|
||||
dataVers: {type: "Date"},
|
||||
qtaCol: {type: "number"},
|
||||
qtaProd: {type: "number"},
|
||||
qtaMin: {type: "number"},
|
||||
codMart: {type: "string"},
|
||||
codJfas: {type: "string"},
|
||||
codMdep: {type: "string"},
|
||||
descrizione: {type: "string"},
|
||||
colliPedana: {type: "string"},
|
||||
qtaCnf: {type: "number"},
|
||||
codDtip: {type: "string"},
|
||||
rapConv: {type: "number"},
|
||||
partitaMag: {type: "string"},
|
||||
untMis: {type: "string"},
|
||||
dataVersS: {type: "string"},
|
||||
oldQtaCol: {type: "number"},
|
||||
numCnf: {type: "number"},
|
||||
oldNumCnf: {type: "number"},
|
||||
}
|
||||
}) implements Pick<MtbColt, "dataOrd" | "numOrd" | "gestione" | "dataCollo" | "serCollo" | "numCollo" | "barcodeUl" | "codJfas" | "codMdep" | "codDtip"> {
|
||||
gestione: string;
|
||||
dataCollo: Date;
|
||||
serCollo: string;
|
||||
numCollo: number;
|
||||
barcodeUl: string;
|
||||
dataOrd: Date;
|
||||
numOrd: number;
|
||||
dataVers: Date;
|
||||
qtaCol: number;
|
||||
oldQtaCol: number;
|
||||
numCnf: number;
|
||||
oldNumCnf: number;
|
||||
qtaProd: number;
|
||||
qtaMin: number;
|
||||
codMart: string;
|
||||
codJfas: string;
|
||||
codMdep: string;
|
||||
descrizione: string;
|
||||
colliPedana: string;
|
||||
qtaCnf: number;
|
||||
codDtip: string;
|
||||
rapConv: number;
|
||||
partitaMag: string;
|
||||
untMis: string;
|
||||
|
||||
|
||||
dataVersS: string;
|
||||
|
||||
constructor(data?: ModelUdcOrdine) {
|
||||
super(data);
|
||||
}
|
||||
}
|
||||
|
||||
export default class PopupEditUdc extends FormPopup<ModelUdcOrdine, ModelUdcOrdine> {
|
||||
private readonly data: ModelUdcOrdine;
|
||||
private readonly dataSourceUntMis: kendo.data.DataSource;
|
||||
|
||||
constructor(data?: ModelUdcOrdine, module?: Module) {
|
||||
super("monitoraggio_linee_v2", module);
|
||||
|
||||
this.data = data;
|
||||
this.data.dataVersS = (moment(data.dataVers).isValid() ? moment(data.dataVers) : moment())?.format("DD/MM/YYYY HH:mm")
|
||||
this.data.oldNumCnf = this.data.numCnf;
|
||||
this.data.oldQtaCol = this.data.qtaCol;
|
||||
this.modalBox
|
||||
.title(this.data.numCollo ? `Modifica UDC` : `Crea UDC`)
|
||||
.style(this.data.numCollo ? `primary` : `success`)
|
||||
.gridSize({xs: 12, sm: 6, md: 5})
|
||||
.okCancel()
|
||||
.bodyClass("p-0")
|
||||
.btOK({
|
||||
text: "Salva",
|
||||
dismissOnClick: false
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
override async onAfterShow($div: JQuery<HTMLElement>) {
|
||||
this.$okBtn.disabled(!this.form.validator.validate());
|
||||
}
|
||||
|
||||
override async content(): Promise<string> {
|
||||
this.options = {
|
||||
...this.options,
|
||||
formData: this.data,
|
||||
layout: "grid",
|
||||
grid: {
|
||||
cols: 2,
|
||||
gutter: 10
|
||||
},
|
||||
items: [
|
||||
{
|
||||
field: "dataVersS",
|
||||
label: "Data di produzione",
|
||||
colSpan: 1,
|
||||
validation: {
|
||||
required: {
|
||||
message: "Inserisci la data di produzione"
|
||||
},
|
||||
min: 1
|
||||
},
|
||||
editor: "DateTimePicker",
|
||||
|
||||
attributes: {
|
||||
onkeydown: "if (event.keyCode !== 9){ return false }"
|
||||
},
|
||||
editorOptions: {
|
||||
change: (e) => {
|
||||
this.form.editable.options.model.set("dataVers", e.sender.value())
|
||||
},
|
||||
componentType: "modern",
|
||||
hidden: true
|
||||
}
|
||||
},
|
||||
{
|
||||
field: "qtaProd",
|
||||
label: `Q.tà prodotte (${this.data.untMis})`,
|
||||
title: `Q.tà prodotte (${this.data.untMis})`,
|
||||
colSpan: 1,
|
||||
validation: {
|
||||
required: {
|
||||
message: "Inserisci una quantità valida"
|
||||
},
|
||||
min: this.data.qtaMin ?? 1
|
||||
},
|
||||
editor: "NumericTextBox",
|
||||
editorOptions: {
|
||||
selectOnFocus: true,
|
||||
decimals: this.data.untMis.toUpperCase() === "KG" ? 2 : 0,
|
||||
spinners: false,
|
||||
format: this.data.untMis.toUpperCase() === "KG" ? "n2" : "n0",
|
||||
|
||||
}
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
// language=HTML
|
||||
return `
|
||||
<div class="panel panel-default mb-0">
|
||||
<div class="panel-body p-0">
|
||||
<table class="table table-striped table-hover table-text-middle mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Prodotto</th>
|
||||
<th>Descrizione</th>
|
||||
<th>Partita</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="fa_1_3x text-center">
|
||||
<td style="text-align: center"> ${this.data.codMart}</td>
|
||||
<td style="text-align: center"> ${this.data.descrizione}</td>
|
||||
<td> ${this.data.partitaMag}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="p-10">
|
||||
${await super.content()}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
override async onChange(e: kendo.ui.FormChangeEvent): Promise<void> {
|
||||
const model = this.getModel();
|
||||
|
||||
if (e.field === "qtaProd") {
|
||||
model.set("qtaCol", e.value * model.rapConv);
|
||||
model.set("numCnf", (e.value * model.rapConv) / model.qtaCnf)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
async onSubmit(e: kendo.ui.FormSubmitEvent) {
|
||||
return await this.saveUdc(e.model as ModelUdcOrdine);
|
||||
}
|
||||
|
||||
async saveUdc(data: ModelUdcOrdine) {
|
||||
const ret = await this.ajax()
|
||||
.post("postUdc")
|
||||
.data(data)
|
||||
.waitModal()
|
||||
.noticeAsModal()
|
||||
.execute<Array<ServiceRestResponse>>();
|
||||
|
||||
|
||||
return {
|
||||
success: ret?.returnId === 1,
|
||||
data: data
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
import FormPopup from "@js/FormPopup.js";
|
||||
import {DtbOrdt, DtbOrdr, MtbAart, ServiceRestResponse} from "@js/ims/ems-core.module.js";
|
||||
import {DtbOrdr, DtbOrdt, MtbAart, ServiceRestResponse} from "@js/ims/ems-core.module.js";
|
||||
import {getDatasourceArticoli} from "@js/api/stdutils.js";
|
||||
import {OrdineLavorazione} from "@gest-lib/monitoraggio_ordini/ts/MonitoraggioOrdini.js";
|
||||
|
||||
@@ -71,9 +71,7 @@ export default class PopupNuovoMaterialeOrdine extends FormPopup<DtbOrdt, ModelN
|
||||
override async content(): Promise<string> {
|
||||
this.options = {
|
||||
...this.options,
|
||||
formData: {
|
||||
...this.data,
|
||||
} as ModelNuovoMaterialeOrdine,
|
||||
formData: this.data,
|
||||
layout: "grid",
|
||||
grid: {
|
||||
cols: 3,
|
||||
|
||||
@@ -51,7 +51,7 @@ export default class PopupRientro extends FormPopup<{ colloRien: MtbColt, numCnf
|
||||
|
||||
this.options = {
|
||||
...this.options,
|
||||
formData: {
|
||||
formData: new CreateColloRientroForm({
|
||||
...this.data,
|
||||
articolo: this.articolo,
|
||||
lunghezza: null,
|
||||
@@ -59,7 +59,7 @@ export default class PopupRientro extends FormPopup<{ colloRien: MtbColt, numCnf
|
||||
qtaCnf: null,
|
||||
qtaCol: null,
|
||||
numCnf: null
|
||||
} as CreateColloRientroForm,
|
||||
}),
|
||||
layout: "grid",
|
||||
grid: {
|
||||
cols: 2,
|
||||
|
||||
@@ -69,14 +69,14 @@ export default class PianificazioniTabView extends TabView<PianAccRossg> {
|
||||
$btn.btn_setWaitStatus();
|
||||
|
||||
try {
|
||||
if (await new PopupCreaOrdineRacc({
|
||||
if (await new PopupCreaOrdineRacc(new CreaOrdineProdForm({
|
||||
dataOrd: this.module.getSelectedDate().value,
|
||||
qtaCnf: 0,
|
||||
qtaCnfFormatted: "0",
|
||||
qtaPrev: 0,
|
||||
qtaPrevFormatted: "0",
|
||||
nCamion: 0
|
||||
} as CreaOrdineProdForm, this.module.module).open()) {
|
||||
}), this.module.module).open()) {
|
||||
await this.dataSource.read();
|
||||
}
|
||||
} finally {
|
||||
@@ -250,7 +250,8 @@ export default class PianificazioniTabView extends TabView<PianAccRossg> {
|
||||
cod_vdes: data.cod_vdes,
|
||||
cod_mdep: data.cod_mdep,
|
||||
cod_mart: data.cod_mart,
|
||||
rag_soc: data.rag_soc_produttore,
|
||||
rag_soc_produttore: data.rag_soc_produttore,
|
||||
rag_soc_op: data.rag_soc_op,
|
||||
partita_mag: data.partita_mag,
|
||||
descrizione: data.articolo,
|
||||
qta_ord: data.tot_kg_ord,
|
||||
|
||||
@@ -7,7 +7,6 @@ export class OrdineAcq extends kendo.data.Model.define({
|
||||
fields: {
|
||||
row_number: {type: "number"},
|
||||
cod_anag: {type: "string"},
|
||||
rag_soc: {type: "string"},
|
||||
fornitore: {type: "string"},
|
||||
cod_vdes: {type: "string"},
|
||||
destinatario: {type: "string"},
|
||||
@@ -21,7 +20,6 @@ export class OrdineAcq extends kendo.data.Model.define({
|
||||
}
|
||||
}) {
|
||||
cod_anag: string
|
||||
rag_soc: string
|
||||
rag_soc_produttore: string
|
||||
rag_soc_op: string
|
||||
fornitore: string
|
||||
@@ -133,9 +131,7 @@ export default class PopupCreaOrdineRacc extends BasePopup<boolean> {
|
||||
|
||||
override async onShow($div: JQuery<HTMLElement>) {
|
||||
this.kendoForm = $div.find("#creaOrdineRacc").kendoForm({
|
||||
formData: {
|
||||
...this.model
|
||||
} as CreaOrdineProdForm,
|
||||
formData: this.model.toJSON(),
|
||||
validatable: {
|
||||
validateOnBlur: false,
|
||||
validationSummary: false,
|
||||
|
||||
@@ -90,9 +90,7 @@ export default class PopupImportCert extends BasePopup<CertificatoS1> {
|
||||
|
||||
override async onShow($div: JQuery<HTMLElement>) {
|
||||
this.form = $div.find("#importaCertificato").kendoForm({
|
||||
formData: {
|
||||
...this.model
|
||||
} as CertificatoS1,
|
||||
formData: this.model.toJSON(),
|
||||
validatable: {
|
||||
validateOnBlur: false,
|
||||
validationSummary: false,
|
||||
|
||||
@@ -948,9 +948,7 @@ export default class PopupNuovoCarico extends FormPopup<NuovoCarico, NuovoCarico
|
||||
|
||||
this.options = {
|
||||
...this.options,
|
||||
formData: {
|
||||
...this.data
|
||||
} as NuovoCarico,
|
||||
formData: this.data,
|
||||
layout: "grid",
|
||||
grid: {
|
||||
cols: 6,
|
||||
|
||||
@@ -54,9 +54,7 @@ export default class PopupSelezionaOrdineRacc extends BasePopup<Pianificazione>
|
||||
|
||||
override async onShow($div: JQuery<HTMLElement>) {
|
||||
this.kendoForm = $div.find("#creaOrdineRacc").kendoForm({
|
||||
formData: {
|
||||
...this.model
|
||||
} as SelOrdineRaccForm,
|
||||
formData: this.model,
|
||||
validatable: {
|
||||
validateOnBlur: false,
|
||||
validationSummary: false,
|
||||
|
||||
@@ -839,6 +839,8 @@ PopupOrdine.prototype._buildRiga = function (riga) {
|
||||
|
||||
$tr.find("[name='descrizione_estesa']").val(riga.descr_articolo).attr("placeholder", riga.descr_articolo_default).readonly(isLocked);
|
||||
$tr.find("[name='val_unt']").val(riga.val_unt).readonly(isLocked);
|
||||
if (!_pianoArrivi.getAbilitazioni("gestioneAcquisti"))
|
||||
$tr.find("[name='val_unt']").closest("td").hide();
|
||||
$tr.find("[name='perc_prov']").val(riga.perc_prov);
|
||||
$tr.find("[name='val_prov']").val(riga.val_prov);
|
||||
$qtaOrd.val(riga.qta_ord).readonly(isLocked);
|
||||
@@ -943,6 +945,23 @@ PopupOrdine.prototype._buildRiga = function (riga) {
|
||||
|
||||
$(this).val(input);
|
||||
});
|
||||
if (isEliminabile) {
|
||||
$tr.find(".btDelete").on("click", function () {
|
||||
if (isNew) {
|
||||
$tr.remove();
|
||||
} else {
|
||||
$tr.attr("data-deleted", "1").attr("data-dirty", "1").hide();
|
||||
$tr.find("[name]").removeAttr("data-required");
|
||||
}
|
||||
}).show();
|
||||
} else {
|
||||
$tr.find(".btDelete").remove();
|
||||
|
||||
$flagEvaso.on("change", function () {
|
||||
let _flagEvaso = $(this).getValue();
|
||||
$tr.toggleClass("danger", _flagEvaso === "A");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$flagEvaso.toggle(!isEliminabile);
|
||||
@@ -965,7 +984,7 @@ PopupOrdine.prototype._buildRiga = function (riga) {
|
||||
});
|
||||
}
|
||||
|
||||
if (!self._isNew() && isInevaso) {
|
||||
if (!self._isNew() && isInevaso && !isLocked) {
|
||||
$tr.find(".btSplit").on("click", function () {
|
||||
let key = self._key;
|
||||
let _codMart = $tr.find("._codMart").html();
|
||||
|
||||
Reference in New Issue
Block a user