fix stok backdate

This commit is contained in:
hafifierahman
2022-07-28 01:00:44 +08:00
parent 55d6208568
commit d7d993fee7
2 changed files with 22 additions and 5 deletions
+3 -2
View File
@@ -757,8 +757,9 @@ class AkaunController extends Controller
$tarikh_cetak = $current->toDateString(); $tarikh_cetak = $current->toDateString();
$kodcaw = $request->kodcaw; $kodcaw = $request->kodcaw;
$split_date = explode('-',$request->datestokauditbackdate); $split_date = explode('-',$request->datestokauditbackdate);
$bulan = $split_date[1];
$tahun = $split_date[0]; $bulan = $split_date[0];
$tahun = $split_date[1];
if($bulan == 1){ if($bulan == 1){
$namabulan = 'Januari'; $namabulan = 'Januari';
+19 -3
View File
@@ -17,9 +17,10 @@
<input :value="$kodcaw" name="kodcaw" hidden/> <input :value="$kodcaw" name="kodcaw" hidden/>
<input :value="$hostname" name="hostname" hidden/> <input :value="$hostname" name="hostname" hidden/>
<input :value="jenisgenerate" type="hidden" name="jenis" /> <input :value="jenisgenerate" type="hidden" name="jenis" />
<input :value="mula" type="hidden" name="datestokauditbackdate"/>
<span style="background-color: #F9FAFB" class="text-gray-600 border border-2 rounded-l px-4 py-2 whitespace-no-wrap">Mula</span> <span style="background-color: #F9FAFB" class="text-gray-600 border border-2 rounded-l px-4 py-2 whitespace-no-wrap">Mula</span>
<input id="tarikhmula" name="datestokauditbackdate" class="border border-2 border-l-0 rounded-r px-4 py-2 w-80r mr-2" type="date" /> <!-- <input id="tarikhmula" name="datestokauditbackdate" class="border border-2 border-l-0 rounded-r px-4 py-2 w-80r mr-2" type="date" /> -->
<flat-pickr v-model="mula" :config="config" class="border border-2 rounded-r px-4 py-2 w-80r mr-2"></flat-pickr>
<!-- <button @click.prevent="generatepdf" class=" mr-2 border border-yellow-600 text-yellow-600 font-montserrat py-2 px-8 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300"><i class="fas fa-file-pdf mr-2"></i>PDF</button> --> <!-- <button @click.prevent="generatepdf" class=" mr-2 border border-yellow-600 text-yellow-600 font-montserrat py-2 px-8 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300"><i class="fas fa-file-pdf mr-2"></i>PDF</button> -->
<button @click.prevent="generateview" class="border border-yellow-600 text-yellow-600 font-montserrat py-2 px-8 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300"><i class="fas fa-eye mr-2"></i>View</button> <button @click.prevent="generateview" class="border border-yellow-600 text-yellow-600 font-montserrat py-2 px-8 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300"><i class="fas fa-eye mr-2"></i>View</button>
</div> </div>
@@ -32,12 +33,27 @@
</template> </template>
<script> <script>
import monthSelectPlugin from 'flatpickr/dist/plugins/monthSelect/index.js'
import 'flatpickr/dist/plugins/monthSelect/style.css'
export default { export default {
data(){ data(){
return{ return{
mula: null,
jenisgenerate:'none', jenisgenerate:'none',
kodcaw: '' kodcaw: '',
config: {
wrap: false, // set wrap to true only when using 'input-group'
maxDate: 'today',
plugins: [
new monthSelectPlugin({
shorthand: true, //defaults to false
dateFormat: "m-Y", //defaults to "F Y"
altFormat: "F Y", //defaults to "F Y"
})
]
},
} }
}, },
methods: { methods: {