Showing
1 changed file
with
11 additions
and
3 deletions
@@ -110,8 +110,10 @@ function stfcardid2login($stfcardid) { | @@ -110,8 +110,10 @@ function stfcardid2login($stfcardid) { | ||
110 | 110 | ||
111 | function considerAppointment($key, &$appointment) { | 111 | function considerAppointment($key, &$appointment) { |
112 | global $inflect; | 112 | global $inflect; |
113 | - $appointment_name = preg_replace('/ [0-9]*.[0-9]$/', '', $appointment->name); | 113 | + $appointment_name = preg_replace('/ [0-9]*.[0-9]$/', '', $appointment->name); |
114 | + $appointment_short = preg_replace('/ [0-9]\.[0-9]$/', '', trim($appointment->shortname)); | ||
114 | $appointments = $appointment_name.' '.mb_strtoupper($appointment->subdivision->shortname); | 115 | $appointments = $appointment_name.' '.mb_strtoupper($appointment->subdivision->shortname); |
116 | + $appointment_short_full = trim($appointment_short.' '.mb_strtoupper($appointment->subdivision->shortname)); | ||
115 | $appointment_ofsubdivfull = $inflect->getInflectNoun($appointment->subdivision->name, 0); | 117 | $appointment_ofsubdivfull = $inflect->getInflectNoun($appointment->subdivision->name, 0); |
116 | $appointment_name_words = explode(' ', $appointment_name); | 118 | $appointment_name_words = explode(' ', $appointment_name); |
117 | $appointment_ofsubdivfull_words = explode(' ', $appointment_ofsubdivfull); | 119 | $appointment_ofsubdivfull_words = explode(' ', $appointment_ofsubdivfull); |
@@ -133,8 +135,11 @@ function considerAppointment($key, &$appointment) { | @@ -133,8 +135,11 @@ function considerAppointment($key, &$appointment) { | ||
133 | $_GET[$key.'-name'] = mb_substr($fullname_words[1], 0, 1).'. '.mb_substr($fullname_words[2], 0, 1).'. '.$fullname_words[0]; | 135 | $_GET[$key.'-name'] = mb_substr($fullname_words[1], 0, 1).'. '.mb_substr($fullname_words[2], 0, 1).'. '.$fullname_words[0]; |
134 | $_GET[$key.'-appointment'] = $appointments_full; | 136 | $_GET[$key.'-appointment'] = $appointments_full; |
135 | $_GET[$key.'-appointment-wosubdiv'] = $appointments_wosubdiv; | 137 | $_GET[$key.'-appointment-wosubdiv'] = $appointments_wosubdiv; |
138 | + $_GET[$key.'-appointment-short'] = $appointment_short_full; | ||
139 | + $_GET[$key.'-appointment-short-wosubdiv'] = $appointment_short; | ||
136 | $_GET[$key.'-subdivs'] = $signer_subdivs; | 140 | $_GET[$key.'-subdivs'] = $signer_subdivs; |
137 | $_GET[$key.'-subdivs-full'] = $signer_subdivs_full; | 141 | $_GET[$key.'-subdivs-full'] = $signer_subdivs_full; |
142 | + //print_r($appointment); | ||
138 | } | 143 | } |
139 | 144 | ||
140 | 145 | ||
@@ -803,7 +808,9 @@ foreach ($files as $file) { | @@ -803,7 +808,9 @@ foreach ($files as $file) { | ||
803 | $memo_subject = 'Заявка на модернизацию ЛВС'; | 808 | $memo_subject = 'Заявка на модернизацию ЛВС'; |
804 | break; | 809 | break; |
805 | case 'request/custom': | 810 | case 'request/custom': |
806 | - //print_r($_GET);die(); | 811 | + if (!empty($_COOKIE['debug'])) { |
812 | + //print_r($_GET);die(); | ||
813 | + } | ||
807 | if ($_GET['user-appointment-id'] != $_GET['signer-appointment-id']) { | 814 | if ($_GET['user-appointment-id'] != $_GET['signer-appointment-id']) { |
808 | $project_id = 15971; | 815 | $project_id = 15971; |
809 | $_GET['recipient-redmine-id'] = redmine_login2id($_GET['recipient-login']); | 816 | $_GET['recipient-redmine-id'] = redmine_login2id($_GET['recipient-login']); |
@@ -1281,8 +1288,9 @@ foreach ($files as $file) { | @@ -1281,8 +1288,9 @@ foreach ($files as $file) { | ||
1281 | \begin{flushleft} | 1288 | \begin{flushleft} |
1282 | {\small | 1289 | {\small |
1283 | \begin{tabular}{ r l } | 1290 | \begin{tabular}{ r l } |
1284 | - \multicolumn{2}{ l }{ Подготовлено: } \\\\ | 1291 | + \multicolumn{2}{ l }{ Подготовлено: } \\\\ |
1285 | ФИО: & '.$_GET['signer-name'].' \\\\ | 1292 | ФИО: & '.$_GET['signer-name'].' \\\\ |
1293 | + Должн.: & '.$_GET['signer-appointment-short'].' \\\\ | ||
1286 | Тел.: & '.$_GET['signer-phonenumber'].' \\\\ | 1294 | Тел.: & '.$_GET['signer-phonenumber'].' \\\\ |
1287 | Email: & '.$_GET['signer-email'].' \\\\ | 1295 | Email: & '.$_GET['signer-email'].' \\\\ |
1288 | \end{tabular} | 1296 | \end{tabular} |
-
Please register or login to post a comment