app\helpers\Utility::printBarCode PHP Method

printBarCode() public static method

printBarCode it prints the barcode taking in account whether the barcode exists or not.
public static printBarCode ( [object] $product = null, $type = 'EAN8' ) : [html]
$product [object]
return [html]
    public static function printBarCode($product = null, $type = 'EAN8')
    {
        if ($product == null || !$product) {
            return trans('globals.barcode_error_msg');
        } else {
            return \DNS1D::getBarcodeSVG(trim($product->bar_code) != '' ? $product->bar_code : $product->id, $type);
        }
    }