1
Changeset ceadf4a – MultiMag

Changeset ceadf4a


Ignore:
Timestamp:
Jul 5, 2021, 5:52:16 AM (2 years ago)
Author:
BlackLight <blacklight@…>
Branches:
master
Parents:
cf85271
git-author:
BlackLight <blacklight@…> (01/07/21 04:30:28)
git-committer:
BlackLight <blacklight@…> (05/07/21 05:52:16)
Message:

Обновлена форма счёта-фактуры и УПД

File:
1 edited

Legend:

Unmodified
Added
Removed
  • web/include/doc/printforms/realizaciya/upd.php

    rcf85271 rceadf4a  
    7474    public function make() {
    7575        global $db;
     76        $t_width = array(24, 6, 36, 10, 21, 8, 14, 20, 10, 8, 13, 19, 23, 25, 22, 20);
     77        $t_ydelta = array(12, 12, 10, 12, 5, 8, 7, 5, 10, 8, 12, 8, 5, 4, 0, 4);
     78        $t3_text = array('А', 1, '1a', '1б', 2, '2a', 3, 4, 5, 6, 7, 8, 9, 10, '10a', 11, 12, '12а', 13);
     79        $aligns = array('L', 'R', 'L', 'C', 'C', 'L', 'R', 'R', 'R', 'C', 'C', 'R', 'R', 'R', 'L', 'R');
     80
     81        $t2_width = array(6.5, 14.5, 6.5, 16.5, 6.5, 15.5);
     82        $t2_start = array(4, 4, 12, 12, 14, 14);
     83        $t2_ydelta = array(2, 1, 2, 3, 2, 2);
     84        $t2_height = 14;
     85        $header_height = 31;
     86
     87        $divider_line_x = $t_width[0] + $this->pdf->lMargin;
    7688        $doc_id = $this->doc->getId();
    7789        $doc_data = $this->doc->getDocDataA();
     
    8395       
    8496        $this->pdf->SetLineWidth($this->line_bold_w);       
    85         $this->pdf->Line(40, 5, 40, 79);
     97        $this->pdf->Line($divider_line_x, 5, $divider_line_x, 99);
    8698       
    8799        $this->pdf->SetY($y);
    88100        $this->pdf->SetX($this->pdf->lMargin);
    89         $this->pdf->SetFont('', '', 10);
     101        $this->pdf->SetFont('', '', 8);
    90102        $str = 'Универсальный передаточный документ';
    91         $this->pdf->MultiCellIconv(30, 4, $str, 0, 'L');
     103        $this->pdf->MultiCellIconv($divider_line_x - $this->pdf->lMargin, 4, $str, 0, 'L');
    92104        $this->pdf->Ln(5);
    93105       
    94106        $this->pdf->SetFont('', '', 8);
    95107        $str = 'Статус: ';
    96         $this->pdf->CellIconv(15, 4, $str, 0, 0, 'R');
    97         $this->pdf->CellIconv(8, 4, '1', 1, 0, 'C');
     108        $this->pdf->CellIconv(12, 4, $str, 0, 0, 'R');
     109        $this->pdf->CellIconv(5, 4, '1', 1, 0, 'C');
    98110        $this->pdf->Ln(7);
    99111       
    100112        $this->pdf->SetFont('', '', 7);
    101113        $str = '1 - счет-фактура и передаточный документ (акт)';
    102         $this->pdf->MultiCellIconv(30, 3, $str, 0, 'L');
     114        $this->pdf->MultiCellIconv($divider_line_x - $this->pdf->lMargin, 3, $str, 0, 'L');
    103115        $this->pdf->Ln(2);
    104116        $str = '2 - передаточный документ (акт)';
    105         $this->pdf->MultiCellIconv(30, 3, $str, 0, 'L');
    106        
     117        $this->pdf->MultiCellIconv($divider_line_x - $this->pdf->lMargin, 3, $str, 0, 'L');
     118
    107119        $old_l_margin = $this->pdf->lMargin;
    108         $this->pdf->lMargin = 42;
     120        $this->pdf->lMargin = $divider_line_x + 2;
    109121        $this->pdf->SetY($y);               
    110122        $str = 'Приложение №1 к постановлению правительства РФ от 26 декабря 2011г N1137';
    111123        $this->pdf->CellIconv(0, 4, $str, 0, 1, 'R');
    112124        //$this->pdf->SetY($y);               
    113         $str = '(в ред. Постановления Правительства РФ от 19.08.2017 № 981)';
     125        $str = '(в ред. Постановления Правительства РФ от 2 апреля 2021г. № 534)';
    114126        $this->pdf->CellIconv(0, 4, $str, 0, 1, 'R');
    115127       
     
    179191        $t_all_offset = array();
    180192
    181         $this->pdf->SetLineWidth($this->line_normal_w);
    182         $t_width = array(10, 20, 48, 10, 22, 10, 15, 20, 10, 10, 16, 28, 26, 0);
    183         $t_ydelta = array(7, 7, 7, 7, 0.2, 5, 5, 0.5, 6, 6, 7, 3, 0.2, 1.5);
     193        $this->pdf->SetLineWidth($this->line_normal_w);
     194
    184195        $t_text = array(
     196            'Код товара/ работ, услуг',
    185197            'N п/п',
    186             'Код товара/ работ, услуг',           
    187198            'Наименование товара (описание выполненных работ, оказанных услуг), имущественного права',
    188199            'Код вида товара',
     
    192203            'Стоимость товаров (работ, услуг), имуществен- ных прав, всего без налога',
    193204            'В том числе акциз',
    194             'Нало- говая ставка',
     205            'Нало говая ставка',
    195206            'Сумма налога',
    196             'Стоимость товаров (работ, услуг), имущественных прав всего с учетом налога',
     207            'Стоимость товаров (работ, услуг), имущественных прав с налогом всего',
    197208            'Страна происхождения',
    198             'Регистрационный номер декларации на товары или регистрационный номер партии товара, подлежащего прослеживаемости');
     209            'Регистрационный номер декларации на товары или регистрационный номер партии товара, подлежащего прослеживаемости',
     210            'Количественная единица изме рения товара, используемая в целях прослежи ваемости',
     211            'Количество товара, подлежащего прослеживаемости, в количественной единице измерения товара');
    199212
    200213        foreach ($t_width as $w) {
    201             $this->pdf->Cell($w, 20, '', 1, 0, 'C', 0);
     214            $this->pdf->Cell($w, $header_height, '', 1, 0, 'C', 0);
    202215        }
    203216        $this->pdf->Ln();
     
    213226        }
    214227
    215         $t2_width = array(7, 15, 7, 19);
    216         $t2_start = array(4, 4, 12, 12);
    217         $t2_ydelta = array(2, 1, 2, 3);
    218228        $t2_text = array(
    219229            "к\nо\nд",
    220230            'условное обозначение (наци ональное)',
    221231            "к\nо\nд",
    222             'краткое наименование');
    223         $offset = 0;
     232            'краткое наименование',
     233            "к\nо\nд",
     234            'условное обозначение');
     235        $offset = $off2 = 0;
    224236        $c_id = 0;
    225237        $old_col = 0;
    226         $y+=6;
     238        $y += $header_height - $t2_height;
    227239
    228240        foreach ($t2_width as $i => $w2) {
     
    232244
    233245            if ($old_col == $t2_start[$i]) {
    234                 $off2+=$t2_width[$i - 1];
     246                $off2 += $t2_width[$i - 1];
    235247            } else {
    236248                $off2 = 0;
     
    240252            $this->pdf->SetY($y);
    241253            $this->pdf->SetX($offset + $off2 + $this->pdf->lMargin);
    242             $this->pdf->Cell($w2, 14, '', 1, 0, 'C', 0);
     254            $this->pdf->Cell($w2, $t2_height, '', 1, 0, 'C', 0);
    243255
    244256            $this->pdf->SetY($y + $t2_ydelta[$i]);
     
    247259        }
    248260
    249         $t3_text = array('А', 'Б', 1, '1a', 2, '2a', 3, 4, 5, 6, 7, 8, 9, 10, '10a', 11);
     261
    250262        $this->pdf->SetLineWidth($this->line_normal_w);
    251263        sort($t_all_offset, SORT_NUMERIC);
    252         $this->pdf->SetY($y + 14);
     264        $this->pdf->SetY($y + $t2_height);
    253265        $t_all_width = array();
    254266        $old_offset = 0;
     
    260272            $old_offset = $offset;
    261273        }
    262         $t_all_width[] = 32;
     274        $t_all_width[] = 20;
    263275        $i = 1;
    264276        foreach ($t_all_width as $w) {
     
    275287        $this->pdf->SetHeight(3.5);
    276288
    277         $aligns = array('R', 'C', 'L', 'C', 'C', 'L', 'R', 'R', 'R', 'C', 'C', 'R', 'R', 'R', 'L', 'R');
     289
    278290        $this->pdf->SetAligns($aligns);
    279         $this->pdf->SetY($y + 18);
     291        $this->pdf->SetY($y + $header_height - 13);
    280292        $this->pdf->SetFillColor(255, 255, 255);
    281293        $i = 1;
     
    293305            }
    294306            $row = array(
     307                $line['code'],
    295308                $i++,
    296                 $line['code'],
    297309                $line['name'],
    298310                '--',
     
    308320                $line['country_code'],
    309321                $line['country_name'],
    310                 $line['gtd']);
     322                $line['gtd'],
     323                '--',
     324                '--',
     325                '--');
    311326            $lsy = $this->pdf->GetY();
    312327            $this->pdf->RowIconv($row);
     
    315330                $lsy = $this->pdf->tMargin;
    316331            }
    317             $this->pdf->Line(40, $this->pdf->GetY() , 40, $lsy);
     332            $this->pdf->Line($divider_line_x, $this->pdf->GetY() , $divider_line_x, $lsy);
    318333            $this->pdf->SetLineWidth($this->line_normal_w);
    319334        }
     
    331346        $step = 4;
    332347        $lsy = $this->pdf->GetY();
    333         $this->pdf->SetFont('', '', 8);
     348        $this->pdf->SetFont('', '', 7);
    334349        $this->pdf->Cell($t_all_width[0], $step, '', 1, 0, 'R', 0);
    335350        $this->pdf->Cell($t_all_width[1], $step, '', 1, 0, 'R', 0);
     
    346361        $this->pdf->Cell($t_all_width[14], $step, '', 1, 0, 'R', 0);
    347362        $this->pdf->Cell($t_all_width[15], $step, '', 1, 0, 'R', 0);
     363        $this->pdf->Cell($t_all_width[16], $step, '', 1, 0, 'R', 0);
     364        $this->pdf->Cell($t_all_width[17], $step, '', 1, 0, 'R', 0);
     365        $this->pdf->Cell($t_all_width[18], $step, '', 1, 0, 'R', 0);
    348366        $this->pdf->ln();
    349367       
     
    355373        $this->pdf->Ln(2);
    356374        $this->pdf->AliasNbPages();
    357         $this->pdf->MultiCellIconv($t_all_width[0] + $t_all_width[1], 5, "Документ составлен на {nb} листах", 0, 'L');
     375        $this->pdf->MultiCellIconv($divider_line_x - $this->pdf->lMargin, 5, "Документ составлен на {nb} листах", 0, 'L');
    358376       
    359377        $p1_w = array(45, 35, 2, 40, 45, 35, 2, 40);
    360378       
    361379        $this->pdf->SetLineWidth($this->line_thin_w);
    362         $this->pdf->lMargin = 42;
     380        $this->pdf->lMargin = $divider_line_x + 2;
    363381        $this->pdf->SetY($y+2);
    364382        $this->pdf->SetX($this->pdf->lMargin);
     
    405423        $this->pdf->Ln(1);
    406424        $this->pdf->SetLineWidth($this->line_bold_w);
    407         $this->pdf->Line(40, $this->pdf->GetY() , 40, $lsy);
    408         $this->pdf->Line(40, $this->pdf->GetY() , $this->pdf->w - $this->pdf->rMargin , $this->pdf->GetY());
     425        $this->pdf->Line($divider_line_x, $this->pdf->GetY() , $divider_line_x, $lsy);
     426        $this->pdf->Line($divider_line_x, $this->pdf->GetY() , $this->pdf->w - $this->pdf->rMargin , $this->pdf->GetY());
    409427        $this->pdf->SetLineWidth($this->line_thin_w);
    410428       
Note: See TracChangeset for help on using the changeset viewer.