コード例 #1
0
 $current_product_attributes = $current_product['attributes'];
 $attributes = sizeof($current_product_attributes);
 if ($attributes) {
     //Break if article + attributes are too long
     if (($item_count + $attributes) % $invoice_items_per_page == 0) {
         new_page();
     }
 }
 $field = 0;
 $position = $i + 1;
 for ($item = 0; $item <= $invoice_items; $item++) {
     $is_product_field = $item == $products_field_item;
     if ($is_product_field) {
         $pdf->SetFont($pdf->font, BOLD, $pdf->invoice_font_size);
     }
     Make_Cell(${$x_content}[$field], $x_align[$field], $holds_price[$field], $check_size[$field], $attributes);
     if ($is_product_field) {
         $pdf->SetFont($pdf->font, NORMAL, $pdf->invoice_font_size);
     }
 }
 $Y_Table_Position += $pdf->lines_height;
 if ($attributes) {
     //Print attributes
     $pdf->SetFont($pdf->font, ITALIC, 9);
     $x = $x_pos[$products_field_item] + 2;
     $w = $products_field_width - 2;
     $y = $Y_Table_Position + $pdf->lines_height * 0.6;
     for ($a = 0, $m = $attributes - 1; $a <= $m; $a++) {
         $current_attribute = $current_product_attributes[$a];
         $txt = '- ' . $current_attribute['option'] . COLON_BLANK . $current_attribute['value'];
         $txt = fit_string($txt, $w);
コード例 #2
0
         }
         if (NOT_NO_TAX_RAISED) {
             Make_Cell($tax, RIGHT);
         }
         Make_Cell(olc_format_price($price, 1, 1, 0), RIGHT, true);
         Make_Cell(olc_format_price($final_price, 1, 1, 0), RIGHT, true);
     } else {
         for ($item = 1; $item < $invoice_items; $item++) {
             Make_Cell(${$x_content}[$field], LEFT, $holds_price[$field], $check_size[$field]);
             if ($item == $field_item) {
                 if ($attributes) {
                     $pdf->SetFont($pdf->font, ITALIC, 10);
                     for ($a = 0, $n = $attributes - 1; $a <= $n; $a++) {
                         $Y_Table_Position += $pdf->lines_height;
                         $current_attribute = $current_product_attributes[$a];
                         Make_Cell(TWO_BLANK . $current_attribute['option'] . ': ' . $current_attribute['value'], LEFT, false, true);
                     }
                     $pdf->SetFont($pdf->font, NO_FORMAT, 10);
                 }
             }
         }
     }
     $item_count++;
     //Check for products overflow (i.e.: more then one page required
     if ($item_count % $items_per_page == 0) {
         if ($i != $n) {
             //Overflow if more products to come!
             new_page();
         }
     }
 }