Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to print Batch Number On Tax Invoice
07-03-2014, 05:26 PM,
#1
How to print Batch Number On Tax Invoice
Hi

I using WebERP for a pharma company, and want to print batch No. on Invoice when i seal any product to our costumer. How I print it on Invoice. Please see the attached invoice sample that have no Batch No. Printed.


Thank You
Reply
07-03-2014, 11:30 PM,
#2
RE: How to print Batch Number On Tax Invoice
You need to modify PrintCustTras.php or PrintCustTransPortrait.php depending on if you print portrait or landscape.
Add "stockmaster.controlled," to the sql statements around lines 264 and 288.
then where you want to print the Lot or Serial# you can add code something like the below (Somewhere around line 368 after descriptions and translations have printed
if ($myrow2['controlled']==1){

$GetControlMovts = DB_query("SELECT moveqty,
serialno
FROM stockserialmoves
WHERE stockmoveno='" . $myrow2['stkmoveno'] . "'",$db);

if ($myrow2['serialised']==1){
while ($ControlledMovtRow = DB_fetch_array($GetControlMovts)){
$YPos -= (10*$lines);
$LeftOvers = $pdf->addTextWrap($Left_Margin+10,$YPos,71,$FontSize,_('Serial:'),'right');
$LeftOvers = $pdf->addTextWrap($Left_Margin+82,$YPos,100,$FontSize,$ControlledMovtRow['serialno'],'left');
if ($YPos-$line_height <= $Bottom_Margin){
/* head up a new invoice/credit note page */
/*draw the vertical column lines right to the bottom */
PrintLinesToBottom ();
include ('includes/PDFTransPageHeaderPortrait.inc');
} //end if need a new page headed up
}
} else {
while ($ControlledMovtRow = DB_fetch_array($GetControlMovts)){
$YPos -= (10*$lines);
$LeftOvers = $pdf->addTextWrap($Left_Margin+10,$YPos,71,$FontSize,_('Lot:'),'right');
$LeftOvers = $pdf->addTextWrap($Left_Margin+82,$YPos,100,$FontSize,(-$ControlledMovtRow['moveqty']) . ' x ' . $ControlledMovtRow['serialno'],'left');
if ($YPos-$line_height <= $Bottom_Margin){
/* head up a new invoice/credit note page */
/*draw the vertical column lines right to the bottom */
PrintLinesToBottom ();
include ('includes/PDFTransPageHeaderPortrait.inc');
} //end if need a new page headed up
}
}
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)