Skip to content

Commit

Permalink
refactor: Pass 0 as the required quantity to procure when no quantity…
Browse files Browse the repository at this point in the history
… is provided
  • Loading branch information
kaushiknsanji committed Nov 11, 2019
1 parent 8ace8ad commit a28a408
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package com.example.kaushiknsanji.storeapp.ui.inventory.procure;

import android.support.annotation.NonNull;
import android.text.TextUtils;

import com.example.kaushiknsanji.storeapp.R;
import com.example.kaushiknsanji.storeapp.data.DataRepository;
Expand Down Expand Up @@ -329,6 +330,11 @@ public void sendMailClicked(String requiredQuantityStr, ArrayList<SupplierContac
}
}

//Defaulting the required quantity to 0 when no quantity has been provided
if (TextUtils.isEmpty(requiredQuantityStr)) {
requiredQuantityStr = "0";
}

//Preparing the Subject Arguments
String[] subjectArgs = new String[3];
subjectArgs[0] = requiredQuantityStr;
Expand Down

0 comments on commit a28a408

Please sign in to comment.