Skip to content

Commit

Permalink
(#477) Hapus duplikat function bulan()
Browse files Browse the repository at this point in the history
  • Loading branch information
arifpriadi authored Oct 2, 2023
1 parent 3a3a62b commit 1f7c493
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 150 deletions.
4 changes: 2 additions & 2 deletions donjo-app/Controllers/Laporan.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public function cetak($lap = 0)
$data['config'] = $config->get_data(true);
$data['bulan'] = $_SESSION['bulanku'];
$data['tahun'] = $_SESSION['tahunku'];
$data['bln'] = $this->laporan_bulanan_model->bulan($data['bulan']);
$data['bln'] = getBulan($data['bulan']);
$data['penduduk_awal'] = $this->laporan_bulanan_model->penduduk_awal();
$data['penduduk_akhir'] = $this->laporan_bulanan_model->penduduk_akhir();
$data['kelahiran'] = $this->laporan_bulanan_model->kelahiran();
Expand All @@ -94,7 +94,7 @@ public function excel($lap = 0)
$data['config'] = $config->get_data(true);
$data['bulan'] = $_SESSION['bulanku'];
$data['tahun'] = $_SESSION['tahunku'];
$data['bln'] = $this->laporan_bulanan_model->bulan($data['bulan']);
$data['bln'] = getBulan($data['bulan']);
$data['penduduk_awal'] = $this->laporan_bulanan_model->penduduk_awal();
$data['penduduk_akhir'] = $this->laporan_bulanan_model->penduduk_akhir();
$data['kelahiran'] = $this->laporan_bulanan_model->kelahiran();
Expand Down
63 changes: 1 addition & 62 deletions donjo-app/Helpers/donjolib_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ function Rpt($str = 0)
function Parse_Data($data, $p1, $p2)
{
$data = ' ' . $data;
$hasil = '';
$awal = strpos($data, (string) $p1);
$akhir = strpos(strstr($data, (string) $p1), (string) $p2);

Expand Down Expand Up @@ -229,66 +228,6 @@ function ununderscore($str)
{
return str_replace('_', ' ', $str);
}
function bulan($bln)
{
$nm = '';

switch ($bln) {
case '1':
$nm = 'Januari';
break;

case '2':
$nm = 'Februari';
break;

case '3':
$nm = 'Maret';
break;

case '4':
$nm = 'April';
break;

case '5':
$nm = 'Mei';
break;

case '6':
$nm = 'Juni';
break;

case '7':
$nm = 'Juli';
break;

case '8':
$nm = 'Agustus';
break;

case '9':
$nm = 'September';
break;

case '10':
$nm = 'Oktober';
break;

case '11':
$nm = 'November';
break;

case '12':
$nm = 'Desember';
break;

default:
$nm = '';
break;
}

return $nm;
}

function tgl_indo2($tgl)
{
Expand Down Expand Up @@ -412,7 +351,7 @@ function mandiri_timer()
}
function mandiri_timeout()
{
if (! isset($_SESSION['mandiri_timeout'])) {
if (!isset($_SESSION['mandiri_timeout'])) {
$_SESSION['mandiri_timeout'] = time() - 1;
}

Expand Down
43 changes: 0 additions & 43 deletions donjo-app/Models/Laporan_bulanan_model.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,49 +91,6 @@ public function tahun_sql()
}
}

public function bulan($bulan)
{
switch ($bulan) {
case 1: $bulan = 'Januari';
break;

case 2: $bulan = 'Februari';
break;

case 3: $bulan = 'Maret';
break;

case 4: $bulan = 'April';
break;

case 5: $bulan = 'Mei';
break;

case 6: $bulan = 'Juni';
break;

case 7: $bulan = 'Juli';
break;

case 8: $bulan = 'Agustus';
break;

case 9: $bulan = 'September';
break;

case 10: $bulan = 'Oktober';
break;

case 11: $bulan = 'November';
break;

case 12: $bulan = 'Desember';
break;
}

return $bulan;
}

public function paging($lap = 0, $p = 1, $o = 0)
{
$paging = new Paging();
Expand Down
43 changes: 0 additions & 43 deletions donjo-app/Models/Laporan_perubahan_model.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,49 +4,6 @@

class Laporan_perubahan_model extends Model
{
public function bulan($bulan)
{
switch ($bulan) {
case 1: $bulan = 'Januari';
break;

case 2: $bulan = 'Februari';
break;

case 3: $bulan = 'Maret';
break;

case 4: $bulan = 'April';
break;

case 5: $bulan = 'Mei';
break;

case 6: $bulan = 'Juni';
break;

case 7: $bulan = 'Juli';
break;

case 8: $bulan = 'Agustus';
break;

case 9: $bulan = 'September';
break;

case 10: $bulan = 'Oktober';
break;

case 11: $bulan = 'November';
break;

case 12: $bulan = 'Desember';
break;
}

return $bulan;
}

public function list_data()
{
$sql = "SELECT x.dusun,
Expand Down

0 comments on commit 1f7c493

Please sign in to comment.