<?php
include "../../inc/inc.koneksi.php";

$tglawal	= $_POST['tglawal'];
$tglakhir	= $_POST['tglakhir'];

mysql_query("DELETE FROM faktur_pjt WHERE tanggal BETWEEN '$tglawal' AND '$tglakhir'");
mysql_query("INSERT INTO faktur_pjt SELECT * FROM faktur_pj WHERE faktur_pj.tanggal BETWEEN '$tglawal' AND '$tglakhir' AND faktur_pj.import='v' ");

echo "Data penjualan tanggal $tglawal sampai dengan $tglakhir sukses diimport.";
?>