PT. SENAMAS ENERGINDO MINERAL
WORK ORDER - NO: $no_O
$realdate
";
if ($deviceType != 1)
{
echo "
Workshop:
$namaworkshop_O
Mekanik:
";
$arraymek_O = explode('#',trim($namamekanik_O));
$num_mek_O = count($arraymek_O);
$counterlist_O = 0;
for ($j=0; $j < $nummekanik; $j++)
{
$temp = "$firstnameX[$j] $lastnameX[$j]";
$listmek = "#$idX[$j]#";
if (strpos($namamekanik_O, $listmek) !== false)
{
$counterlist_O = $counterlist_O + 1;
echo "$temp";
if ($num_mek_O > $counterlist_O) echo "
";
}
}
echo "
Kendaraan:
$nokendaraanS_O
Supir:
$namasupir_O
$costcenter_O
Urgensi
$urgensi_O
Estimasi:
$estimasiselesai_O
Status:
$statusrepair_O
";
}
else
{
echo "
Workshop:
$namaworkshop_O
Mekanik:
";
$arraymek_O = explode('#',trim($namamekanik_O));
$num_mek_O = count($arraymek_O);
$counterlist_O = 0;
for ($j=0; $j < $nummekanik; $j++)
{
$temp = "$firstnameX[$j] $lastnameX[$j]";
$listmek = "#$idX[$j]#";
if (strpos($namamekanik_O, $listmek) !== false)
{
$counterlist_O = $counterlist_O + 1;
echo "$temp";
if ($num_mek_O > $counterlist_O) echo "
";
}
}
echo "
Kendaraan:
$nokendaraanS_O
Estimasi:
$estimasiselesai_O
";
}
echo "
";
if ($deviceType != 1)
{
echo "
No.
Part Number / Name / Description
QTY
Unit Price
Total (Rp.)
";
}
else
{
echo "
Part Number / Name / Description
QTY
";
}
echo "
";
$listpartno = explode(' ',trim($partnumbers_O));
$listpartqty = explode(' ',trim($partqty_O));
$listpartprice = explode(' ',trim($partprice_O));
$totall = 0;
for ($j=0; $j < $numEntry; $j++)
{
$temp = $j + 1;
$subarray = "$j O";
if (!(is_numeric($listpartqty[$j])))
$listpartqty[$j] = 0;
if (!(is_numeric($listpartprice[$j])))
$listpartprice[$j] = 0;
$totprice = $listpartprice[$j] * $listpartqty[$j];
$totall = $totall + $totprice;
$listpartprice[$j] = number_format($listpartprice[$j]);
$totprice = number_format($totprice);
if ($listpartprice[$j] == 0) $listpartprice[$j] = '';
if ($totprice == 0) $totprice = '';
if ($listpartqty[$j] == 0) $listpartqty[$j] = '';
$tempXX = "$primarynoX[$j] $listpartno[$j]";
//if ($tempXX == ' ') $tempXX = "";
if ($deviceType != 1)
{
echo "
$temp
$tempXX $descriptionitem[$subarray]
$listpartqty[$j]
$listpartprice[$j]
$totprice
";
}
else
{
echo "
$tempXX $descriptionitem[$subarray]
$listpartqty[$j]
";
}
}
$totalsparepart = $totall;
$totall = number_format($totall);
if ($deviceType != 1)
{
echo "
TOTAL SPAREPART RP.
$totall
No.
Deskripsi Jasa/Service
Unit
Harga/ Unit
Total
";
}
else
{
echo "
TOTAL SPAREPART RP.
$totall
Deskripsi Jasa/Service
Unit
Harga/ Unit
";
}
$listjasa = explode('#',trim($jasalist_O));
$countjasa = intval(count($listjasa)/3);
$totjasa[$i]= 0; $numjasa = $countjasa + 1;
for ($j=0; $j < $numjasa; $j++)
{
$temp = $j + 1 + $numEntry;
$subX0 = $j * 3;
$subX1 = $subX0 + 1;
$subX2 = $subX0 + 2;
$a = $listjasa[$subX0];
$b = $listjasa[$subX1];
$c = $listjasa[$subX2];
$d = $b*$c;
$totjasa[$i] = $totjasa[$i] + $d;
$d = number_format($d);
if ($deviceType != 1)
{
echo "
";
}
else
{
echo "
";
}
}
$totalall = $totalsparepart + $totjasa[$i];
$totjasa[$i] = number_format($totjasa[$i]);
if ($deviceType != 1)
{
echo "
TOTAL JASA: RP.
$totjasa[$i]
";
}
else
{
echo "
TOTAL JASA: RP.
$totjasa[$i]
";
}
$totalall = number_format($totalall);
if ($deviceType != 1)
{
echo "
TOTAL SEMUA RP.
$totalall
";
}
else
{
echo "
TOTAL SEMUA: RP.
$totalall
";
}
echo "