td.addPhase(td.getRemainingQty(), currentBucket);
td.addPhase(td.getRemainingQty(currentBucket), currentBucket);
  private void fillDeficit(TaskDeficit td, int currentBucket, Inventory inv, LogisticsInventoryPG thePG){    // DEBUG            //String myOrgName = inventoryPlugin.getMyOrganization().getItemIdentificationPG().getItemIdentification();      //String myItemId = inv.getItemIdentificationPG().getItemIdentification();    Task task = td.getTask();    if (task.getVerb().equals(Constants.Verb.WITHDRAW)) {      // task is completed      if (td.getDeficitAllocationPhases().isEmpty()) {        createLateAllocation(task, thePG.convertBucketToTime(currentBucket), inv, thePG);      } else {        //BD added the td.addPhase line to make a phase to fill the deficit        td.addPhase(td.getRemainingQty(), currentBucket);        createPhasedAllocationResult(td, inv, thePG, true);      }    } else {      td.addPhase(td.getRemainingQty(), currentBucket);      if ((thePG.convertBucketToTime(currentBucket + 1) >=              (long)PluginHelper.getPreferenceBestValue(task, AspectType.END_TIME))) {	  //DEBUG	  //  if ((myOrgName.indexOf("592") >= 0) && (myItemId.indexOf("Level2Amm") >= 0)) {	  //  logger.debug("### fillDeficit : creating a phased allocation result for task: " + task.getUID() + " on the date of " + getTimeUtils().dateString(thePG.convertBucketToTime(currentBucket)));	  //}        createPhasedAllocationResult(td, inv, thePG, true);      }    }    trailingPointersRemove.add(td);  }