{% spaceless %} {#{{ pa(man_id) }} {{ pa(man) }}#} {# смотрим какая точка для бух главная, эта или другая #} {% if jobmans.data.ar__jm_sp[man_id] is defined and jobmans.data.ar__jm_sp[man_id]|length > 1 %} {% if sps_heads__jm_sp[man_id] is defined %} {% if sps_heads__jm_sp[man_id] == get.sp %} {#работает выбрана наша точка из многих#} {% set show_pay_form = true %} {% else %} {#работает выбрана НЕ наша точка из многих#} {% set show_pay_form = false %} {% endif %} {% endif %} {% else %} {#работаем нет многих точек#} {% set show_pay_form = true %} {% endif %} {% set summa_man1 = 0 %} {% include '/vendor/didrive_mod/job_buh/1/didrive/tpl/body.2007.tables.user_up_line.htm' %} {% for i in range(low=0, high=31, step=1) %} {% set date = date_start|date_modify("+"~i~" day")|date("Y-m-d") %} {#{{ date }}#} {% if date|date("U") <= date_finish|date("U") %} {% set new_dolgn = '' %} {% set last_id = '' %} {% for k3,i in actions.data.actions if i['date'] == date and ( i['type'] == 'check' or i['type'] == 'plus' or i['type'] == 'minus' or i['type'] == 'auto_plus' ) and i['jobman'] == man_id and last_id != i.id %} {% set last_id = i.id %} {% set today_summ = 0 %} {% set today_summa = 0 %} {% endfor %} {% endif %} {% if 1 == 2 %}
{% set new_dolgn = '' %} {% for k3,i in user_v if i['date'] == date %} {% if i['type'] == 'spec' %} {#spec {{ pa(i) }}#} {% else %} {% set now_dolgn = i %} {% set new_dolgn = 1 %} {% endif %} {% endfor %} {% set now_spec = '' %} {% if jobmans.data.spec[jobman_id] is defined %} {% for k3 , i in jobmans.data.spec[jobman_id] if i.date == date %} {% if i.sale_point == get.sp %} {% set now_spec = i %} {% else %} {% include dir_mod_now_mod_ditpl~'body.2007.1sp.1worker.new_spec.htm' %} {% endif %} {% endfor %} {% endif %} {# если работает на другой точке и нет спец назначения на эту #} {% if now_dolgn.sale_point is defined and now_dolgn.sale_point != get.sp and now_spec == '' %}
{{ sps[now_dolgn.sale_point]['head'] }} {{ now_dolgn.dolgnost_name }}
{% else %} {#{% if jobman_id == 517 %} now_dolgn {{ pa(now_dolgn) }} now_spec {{ pa(now_spec) }} {% endif %}#} {% if 1 == 1 %} {% if now_dolgn != '' or ( now_spec.sale_point is defined and now_spec.sale_point == get.sp ) %} {% include dir_mod_now_mod_ditpl~'body.2007.1sp.1worker.day_option.htm' %} {% endif %} {% endif %} {% if now_dolgn != '' and new_dolgn != '' %} {% set i = now_dolgn %} {% for k3,i22 in user_v if i22['date'] == date %} {% if i['type'] == 'spec' %} {% else %} {% if 1 == 3 %} {% if i22 != i %} {% set i23 = i %} {% set i = i22 %} {% include dir_mod_now_mod_ditpl~'body.2007.1sp.1worker.new_dolgnost.htm' %} {% set i = i23 %} {% endif %} {% endif %} {% endif %} {% endfor %} {% if 1 == 3 %} {% include dir_mod_now_mod_ditpl~'body.2007.1sp.1worker.new_dolgnost.htm' %} {% endif %} {% endif %} {% if now_spec != '' %} {#{{ pa(now_spec) }}#} {% set i = now_spec %} {% if 1 == 3 %} {% include dir_mod_now_mod_ditpl~'body.2007.1sp.1worker.new_spec.htm' %} {% endif %} {% endif %} {% if now_dolgn != '' or now_spec != '' %} {#
122++#} {#{{ pa(now_dolgn) }}#} {% if 1 == 3 %} {% for p, i in actions.data.actions if i.jobman == jobman_id and i.sale_point == get.sp and i.date == date and i.type == 'metki' %} {% include dir_mod_now_mod_ditpl~'body.2007.1sp.1worker.'~i.type~'.htm' %} {#{{ pa(i) }}#} {% endfor %} {% endif %} {% set i2 = 0 %} {% set n1 = 1 %} {#{% set skip = [] %}#} {% set last_id = 0 %} {% for p, i in actions.data.actions if i.jobman == jobman_id and i.date == date and i.type == 'check' %} {% if i.spec_sp > 0 and i.spec_sp != get.sp and i.sale_point == '' %} {#+++ на другой точке#}
рабочая смена на {{ sps[i.spec_sp]['head'] }}
{% elseif i.sale_point != '' and i.sale_point != sp_now %} {#+++ на другой точке#}
рабочая смена на {{ sps[i.sale_point]['head'] }}
{% else %} {% if last_id != i.id %} {#
141++ {{ p }} / {{ last_id }} / {{ i.id }}#} {% set last_id = i.id %} {% if i.sale_point == '' or i.sale_point == get.sp %} {% set i2 = i %} {% endif %} {#{% set skip = skip|merge({ i['id'] }) %}#} {{ pa(i) }} {% include dir_mod_now_mod_ditpl~'body.2007.1sp.1worker.'~i.type~'.htm' %} {% endif %} {#{{ pa(i,2) }}#} {% endif %} {% endfor %} {% if i2 != 0 %} {% set auto_bonus = jobdesc__calcAutoBonus( db, get.sp, i2 ) %} {#{{ pa(auto_bonus) }}#} {#
155++#} {% include dir_mod_now_mod_ditpl~'body.2007.1sp.1worker.plus.auto.htm' %} {% set auto_bonus = [] %} {% endif %} {% for p, i in actions.data.actions if i.jobman == jobman_id and i.date == date and ( i.type == 'minus' or i.type == 'plus' or i.type == 'comment' ) %} {#
162++#} {% include dir_mod_now_mod_ditpl~'body.2007.1sp.1worker.'~i.type~'.htm' %} {% endfor %} {% endif %} {% endif %}
{% endif %} {% endfor %} {# версия для печати #} {% if get.type is defined and get.type == 'print' %} {% include '/vendor/didrive_mod/job_buh/1/didrive/tpl/body.2007.print.user_bottom_line.htm' %} {% else %} {% include '/vendor/didrive_mod/job_buh/1/didrive/tpl/body.2007.tables.user_bottom_line.htm' %} {% endif %} {% endspaceless %}