Skip to content

Instantly share code, notes, and snippets.

View worstn8mare's full-sized avatar

Ariel Pepito worstn8mare

View GitHub Profile
public function places(){
$user_id = Session::get('user');
$partnerstab = User::where('partner_id',$user_id)->with('m1p','m1s')->first();
$payment = PaymentTerm::where('status', 'Active')->orderby('id')->get();
$password = DB::table('users')->where('partner_id',$user_id)->first();
$user = User::where('partner_id',$user_id)->first();
if(Input::get('code')){
if(Input::get('reftype') == "province"){
// /**** sample *****/
function addition(first = 0, second = 0) {
var a = parseFloat(first);
var b = parseFloat(second);
var total = 0;
total = a + b;
return total;
}
/**** sample *****/
function addition(first = 0, second = 0) {
var a = parseFloat(first);
var b = parseFloat(second);
var total = 0;
total = a + b;
return total;
}
/**** sample *****/
function addition(first = 0, second = 0) {
var a = parseFloat(first);
var b = parseFloat(second);
var total = 0;
total = a + b;
return total;
}
<script type="text/javascript">
function plus(operator,value){
/* code here*/
return result;
}
function divide(operator,value){
/* code here*/
/*
ecompact ang input ug array $input_holder
*/
function bogart($input_holder){
$where = '';
if($date_from && $date_to){
$where += 'and sd_headers.dr_date >= '.$date_from.' and sd_headers.dr_date <= '.$date_to;
}
if($category_id){
$search = Partner::with(['memo' => function($query) use ($cb){
$q = $query->select('partner_id','db_total')->from(with(new CmHeader)->getTable())
->whereIn('status',['Approved','Printed'])
->where('balance', '>', 0)
->where('cb',$cb);
$query->select('partner_id','db_total')->from(with(new DmHeader)->getTable())
->whereIn('status',['Approved','Printed'])
->where('balance', '>', 0)
->where('cb',$cb)
//////////////////////
$cm_header = CmHeader::leftJoin('partners','cm_headers.partner_id','=','partners.id')
->select('cm_headers.partner_id as partner_id',DB::Raw('sum(cm_headers.db_total) as total'),'partners.name as partner_name')
->whereIn('cm_headers.status',['Approved','Printed'])
->where('cm_headers.balance','>', 0)
->where('cm_headers.cb',$cb)
->where('partners.name','like','%'.$p_name.'%');
->groupBy('cm_headers.partner_id');
->orderBy('partners.name','asc');
class ARoom extends Sugo
{
private protected $room_a;
public function __construct($jilly,$ariel) {
$this->jilly;
$this->ariel;
}
public function sex()
<?php
namespace App\Http\Controllers\Property;
use App\Http\Controllers\Controller;
use Session;
use App\PropertyAssets;
use Response;
use Input;
use App\UnitType;
use App\PropertyUnit;