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"){
$('.addcountry').click(function(){
var id = $('.id').val();
var name = $('.name').val();
var curr_name = $('.curr_name').val();
var curr_code = $('.curr_code').val();
$.ajax({
url: "routes",
type: 'GET',
async : false,
<select name="p_atc[]" class="form-control p_atc">
<option value="0" data-atcrate="0"></option>
<?php $bogart = []; ?>
@foreach(App\ActngAtcCode::all() as $atc)
<?php
$todate = date("Y-m-d");
$get_atc = App\ActngAtcCode::where('name',$atc->name)
->where('effective_date','<=',$todate)->orderBy('effective_date','desc')->first();
?>
@if(isset($type->atc_code_id))
/////////////// sugod /////////////////////////
var message = [];
$('table.maintable tbody.content tr a.posting-btn').each(function(){
var post_id = $(this).data('getid');
message.push(post_id);
});
///
$('.posting-btn').on('click',function(e){
var id = $(this).data('getid');
e.preventDefault();
<?php
$contracts =
PropertyUnit::with(['unit_types','check_unitx' => function ($q) use($date){
$q->with(['get_header' => function ($q2) use ($date){
$q2->where('start_date','<=',$date)
->with('getpartner')
->whereNotIn('status',['Void','Terminate']);
}]);
}])
$contracts = PropertyUnit::with(['unit_types','check_unitx' => function ($q) use($date){
$q->leftJoin('contract_headers','contract_headers.id','=','contract_details.header_id')
->whereNotIn('contract_headers.status',['Void','Terminate'])
->with(['get_header' => function ($q2) use ($date){
$q2->where('start_date','<=',$date)
->with('getpartner')
->whereNotIn('status',['Void','Terminate']);
}]);
}])
->where('asset_id',Input::get('asset'))
SELECT
partners.name as lessee_name,
property_units.unit_name as unit_id,
property_charges_types.charges_name as charge_type,
property_charges_details.description,
property_charges_details.start_date as start_date,
property_charges_details.end_date as end_date,
tax_types.name as tax_type,
property_charges_details.amount as amount
from property_charges_headers
<?php
namespace App\Http\Controllers\Accounting;
use App\Http\Controllers\Controller;
use Response;
use Session;
use Redirect;
use TCPDF;
use Input;
use DB;
<?php
namespace App\Http\Controllers\Accounting;
use App\Http\Controllers\Controller;
use Response;
use Session;
use Redirect;
use TCPDF;
use Input;
use DB;
<?php
namespace App\Http\Controllers\Accounting;
use App\Http\Controllers\Controller;
use Response;
use Session;
use Redirect;
use TCPDF;
use Input;
use DB;