Items Add/Change items of invoice

You can easily set items in invoice using setInvoiceItems function. By default, default items are set in config. You can directly change default items in config also or You can use the setInvoiceItem to set items. You can also set items using the generic function setInvoiceData with parameter "items".

  
                            $xinvoice = new Xinvoice();
                            //Create items array with key and value to be used for item information section
                            $items[] = array("name"=>"Motherboard","desc"=>"motherboard of computer","qty"=>1,"rate"=>100,"total"=>100);
                            $items[] = array("name"=>"Ram","desc"=>"ram of computer","qty"=>2,"rate"=>100,"total"=>200);
                            // You can set invoice items using this function or can change directly in config file.
                            $xinvoice->setInvoiceItems($items);
                            echo $xinvoice->render();