global class NFM112Batch implements Database.Batchable<SObject>,Database.AllowsCallouts{
    public String query;
    
    public NFM112Batch() {
        this.query = query;
    }
    // public static void sendToSAP(String qisId) {
	// 	BatchIF_Log__c iflog = new BatchIF_Log__c();
    //     iflog.Type__c = 'NFM112';
    //     iflog.Log__c  = 'callout start\n';
    //     insert iflog;
    //     iflog = [Select Id, Name from BatchIF_Log__c where Id = :iflog.Id];
    //     //System.debug(Logginglevel.DEBUG, 'NFM112_' + iflog.Name + ' start');                  
    //     NFM112Controller.executeNotFuture(iflog.Id, qisId);
	// }
    global Database.QueryLocator start(Database.BatchableContext bc) {
        Date SendDay = Date.newInstance(Date.today().year(),4,1);
        system.debug('SendDay               '+SendDay);
        return Database.getQueryLocator([select Id,Approved_Confirm_Date__c from Account where Need_Send__c = :SendDay]);
    }
    global void execute(Database.BatchableContext BC, list<Account> scope) {
        string tempId;
        for(Account temp : scope){
            tempId = temp.Id;
        }
        NFM112Controller.executeNotFuture(null,tempId);
    }

    global void finish(Database.BatchableContext BC) {
     
    }
}