This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function getPersetujuanByKodeProgram($program_id) | |
{ | |
$persetujuan_by_program = Persetujuan::where('program_id',$program_id)->first(); | |
return compact('persetujuan_by_program'); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Route::group(['middleware'=>['auth', 'menu'], 'prefix'=> 'home', 'as'=> 'home.'], function(){ | |
/** | |
* this route used to get data persetujuan by kode program for negosiasi and realsisasi | |
*/ | |
Route::get('/persetujuan/get-persetujuan-by-kode-program/{program_id}', 'PersetujuanController@getPersetujuanByKodeProgram')->name('get-persetujuan-by-kode-program'); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function setDataPersetujuan() | |
{ | |
var selected_program_id = $('#program_id').val() | |
$.ajax({ | |
url : '/home/persetujuan/get-persetujuan-by-kode-program/' + selected_program_id, | |
type : "GET", | |
data : {}, | |
success : function(data) | |
{ | |
$("#nomor_ip").val(data.persetujuan_by_program.perihal); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ($request->status_negosiasi == 1 && $request->metode_pembayaran == 0) { | |
$persetujuan_id = Persetujuan::select('id')->where('program_tereksekusi_id',$request->program_tereksekusi_id)->where('devisi_id',2)->first(); | |
$persetujuan_brand_anggaran = PersetujuanBrand::select('anggaran')->where('persetujuan_id', $persetujuan_id->id)->get(); | |
$persetujuan_brand_id = PersetujuanBrand::select('brand_id')->where('persetujuan_id', $persetujuan_id->id)->get(); | |
foreach ($persetujuan_brand_anggaran as $key) { | |
$anggaran[] = $key->anggaran; | |
$total_anggaran_brand = array_sum($anggaran); | |
$persentase = ($key->anggaran*100)/$total_anggaran_brand; | |
$sisa = ($sisa_negosiasi*$persentase)/100; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
one = 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# variabel dengan tipe data string | |
name = "Abdullah Aaf" | |
# variabel dengan tipe data float | |
harga = 10,000 | |
# variabel dengan tipe data boolean | |
benar = True | |
salah = False |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (1 > 2): | |
print("1 lebih besar dari 2") | |
if (2 > 1): | |
print("2 lebih besar dari 1") | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (2 < 1): | |
print("2 lebih kecil dari 1") | |
else: | |
print("2 lebih besar dari 1") | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (2 < 1): | |
print("2 lebih kecil dari 1") | |
elif (2 > 1): | |
print("2 lebih besar dari 1") | |
else: | |
print("2 sama besar dengan 1") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
num = 1 | |
while (num <= 10): | |
print(num) | |
num+=1 |
OlderNewer