Esempio n. 1
0
 public function update()
 {
     $appcodes = Appcodes::find(Input::get("id"));
     if (!$appcodes) {
         Session::flash('error', trans("appcodes.notifications.no_exists"));
         return Redirect::to("/appcodes/" . $appcodes->benefit_id);
     }
     $benefit_id = Input::has("benefit_id") ? Input::get("benefit_id") : "";
     $number = Input::has("number") ? Input::get("number") : "";
     $bar_code = "data:image/png;base64," . \DNS1D::getBarcodePNG($number, "C39+");
     $client = Input::has("client") ? Input::get("client") : "";
     $single_use = Input::has("single_use") ? Input::get("single_use") : "";
     if ($number == "" || $bar_code == "" || $client == "" || $benefit_id == "") {
         Session::flash("error", trans("appcodes.notifications.field_name_missing"));
         return Redirect::to("/appcodes/{$appcodes->id}/edit")->withInput();
     }
     $appcodes->benefit_id = $benefit_id;
     $appcodes->number = $number;
     $appcodes->bar_code = $bar_code;
     $appcodes->client = $client;
     $appcodes->single_use = $single_use;
     $appcodes->save();
     Session::flash('success', trans("appcodes.notifications.update_successful"));
     return Redirect::to("/appcodes/" . $benefit_id);
 }
Esempio n. 2
0
    // return Carbon::create(2015,2,3,0)->startOfDay();
    // return Carbon::create(2015-08-26 23:06:20)->endOfDay();
    // return $prod->getCurrentProduction()->toArray();
    return Auth::user()->role;
    if (Auth::attempt(array('password' => 'raymund123'))) {
        return 'true';
    } else {
        return 'false';
    }
    // return 10 + -10;
    // return Item::find(1)->cart;
    $temp = TempCart::all()->toArray();
    $item = Item::where('barcode', '=', '900110023')->get()->toArray();
    // return TempCart::all();
    return json_encode(array_merge($temp, $item));
    return DNS1D::getBarcodeHTML('123456789', "EAN13", 2, 60);
    $production = Production::find(2);
    return $production->items;
});
Route::get('test/{trans_id}', ['uses' => 'SalesController@printInvoice']);
Route::get('sample/{code}', ['uses' => 'SalesController@processOrder']);
Route::get('/item/findbyname/{name}', ['uses' => 'ItemsController@findByName']);
Route::group(array('before' => 'auth'), function () {
    Route::get('/', ['as' => 'home', 'uses' => 'BaseController@index']);
    // Route::get('/',function(){
    // 	return View::make('index')
    // 		->with('title',"Flibbys Point of Sale System");
    // });
    /* Inventory Routes */
    Route::get('/inventory/', ['uses' => 'InventoryController@index']);
    Route::get('/inventory/stocks/{stockid}/edit', ['as' => 'stock.edit', 'uses' => 'IngredientsController@edit']);
Esempio n. 3
0
 /**
  * printBarCode
  * it prints the barcode taking in account whether the barcode exists or not
  * @param  [object] $product contains the product info row
  * @return [html] a html label will be returned with the barcode information
  */
 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);
     }
 }
Esempio n. 4
0
echo '<img src="data:image/png;base64,' . DNS1D::getBarcodePNG("{$item->barcode}", "EAN13", 1, 33) . '" alt="barcode"   />';
?>
			<!-- {!! DNS1D::getBarcodeHTML("$item->barcode", "UPCA", 1, 33)!!} -->
			<a style="font-size: 10px;">{!! $item->barcode !!}</a	>
			<hr style="margin-top: 0px">
			<p style="font-size: 10px; margin-top: -7px; text-align: left">{!! 'Rp. '.number_format($item->selling_price,'2',',','.') !!}</p>
		 </td>
	</tr>	

</table>
</div></td>
<td><div class="barcode">
<table width="50">
	<tr>
		<td align="center">
			<?php 
echo '<img src="data:image/png;base64,' . DNS1D::getBarcodePNG("{$item->barcode}", "EAN13", 1, 33) . '" alt="barcode"   />';
?>
			<!-- {!! DNS1D::getBarcodeHTML("$item->barcode", "UPCA", 1, 33)!!} -->
			<a style="font-size: 10px;">{!! $item->barcode !!}</a	>
			<hr style="margin-top: 0px">
			<p style="font-size: 10px; margin-top: -7px; text-align: left">{!! 'Rp. '.number_format($item->selling_price,'2',',','.') !!}</p>
		 </td>
	</tr>	

</table>
</div></td>	
</tr>
</table>
<br />