| Line 835... |
Line 835... |
| 835 |
|
835 |
|
| 836 |
if (partnerCollectionPlan.getCollectionPlan() != ptam.getCollectionTarget()) {
|
836 |
if (partnerCollectionPlan.getCollectionPlan() != ptam.getCollectionTarget()) {
|
| 837 |
float totalCollectionPlan = partnerCollectionPlan.getCollectionPlan() + 10000;
|
837 |
float totalCollectionPlan = partnerCollectionPlan.getCollectionPlan() + 10000;
|
| 838 |
if (authUser.getId() == partnerCollectionPlan.getAuthId()) {
|
838 |
if (authUser.getId() == partnerCollectionPlan.getAuthId()) {
|
| 839 |
|
839 |
|
| - |
|
840 |
if (authUser.getEmailId().equals("tarun.verma@smartdukaan.com")
|
| - |
|
841 |
|| authUser.getEmailId().equals("rakesh.sonawane@smartdukaan.com")
|
| 840 |
if (ptam.getCollectionTarget() >= totalCollectionPlan) {
|
842 |
|| ptam.getCollectionTarget() >= totalCollectionPlan) {
|
| 841 |
partnerCollectionPlan.setCollectionPlan(ptam.getCollectionTarget());
|
843 |
partnerCollectionPlan.setCollectionPlan(ptam.getCollectionTarget());
|
| 842 |
partnerCollectionPlan.setActive(true);
|
844 |
partnerCollectionPlan.setActive(true);
|
| 843 |
partnerCollectionPlan
|
845 |
partnerCollectionPlan
|
| 844 |
.setCommitedTimestamp(ptam.getCollectionCommitmentDate().atStartOfDay());
|
846 |
.setCommitedTimestamp(ptam.getCollectionCommitmentDate().atStartOfDay());
|
| 845 |
partnerCollectionPlan.setUpdatedTimestamp(LocalDateTime.now());
|
847 |
partnerCollectionPlan.setUpdatedTimestamp(LocalDateTime.now());
|
| Line 848... |
Line 850... |
| 848 |
"collection target should be more than " + totalCollectionPlan);
|
850 |
"collection target should be more than " + totalCollectionPlan);
|
| 849 |
}
|
851 |
}
|
| 850 |
|
852 |
|
| 851 |
} else {
|
853 |
} else {
|
| 852 |
|
854 |
|
| - |
|
855 |
if (authUser.getEmailId().equals("tarun.verma@smartdukaan.com")
|
| - |
|
856 |
|| authUser.getEmailId().equals("rakesh.sonawane@smartdukaan.com")
|
| 853 |
if (ptam.getCollectionTarget() >= totalCollectionPlan) {
|
857 |
|| ptam.getCollectionTarget() >= totalCollectionPlan) {
|
| 854 |
|
858 |
|
| 855 |
partnerCollectionPlan.setActive(false);
|
859 |
partnerCollectionPlan.setActive(false);
|
| 856 |
partnerCollectionPlan.setUpdatedTimestamp(LocalDateTime.now());
|
860 |
partnerCollectionPlan.setUpdatedTimestamp(LocalDateTime.now());
|
| 857 |
partnerCollectionPlan = new PartnerCollectionPlan();
|
861 |
partnerCollectionPlan = new PartnerCollectionPlan();
|
| 858 |
partnerCollectionPlan.setCreateTimestamp(LocalDateTime.now());
|
862 |
partnerCollectionPlan.setCreateTimestamp(LocalDateTime.now());
|
| Line 909... |
Line 913... |
| 909 |
|
913 |
|
| 910 |
} else {
|
914 |
} else {
|
| 911 |
if (plan.getTargetPlan() != psp.getSecondaryPlan()) {
|
915 |
if (plan.getTargetPlan() != psp.getSecondaryPlan()) {
|
| 912 |
float totalSecondaryPlan = psp.getSecondaryPlan() + 10000;
|
916 |
float totalSecondaryPlan = psp.getSecondaryPlan() + 10000;
|
| 913 |
if (authUser.getId() == plan.getAuthId()) {
|
917 |
if (authUser.getId() == plan.getAuthId()) {
|
| - |
|
918 |
if (authUser.getEmailId().equals("tarun.verma@smartdukaan.com")
|
| - |
|
919 |
|| authUser.getEmailId().equals("rakesh.sonawane@smartdukaan.com")
|
| 914 |
if (plan.getTargetPlan() >= totalSecondaryPlan) {
|
920 |
|| plan.getTargetPlan() >= totalSecondaryPlan) {
|
| 915 |
psp.setSecondaryPlan(pspm.getValue().getTargetPlan());
|
921 |
psp.setSecondaryPlan(pspm.getValue().getTargetPlan());
|
| 916 |
psp.setCommitedTimestamp(ptam.getSecondaryCommitmentDate().atStartOfDay());
|
922 |
psp.setCommitedTimestamp(ptam.getSecondaryCommitmentDate().atStartOfDay());
|
| 917 |
psp.setUpdatedTimestamp(LocalDateTime.now());
|
923 |
psp.setUpdatedTimestamp(LocalDateTime.now());
|
| 918 |
psp.setActive(true);
|
924 |
psp.setActive(true);
|
| 919 |
} else {
|
925 |
} else {
|
| Line 921... |
Line 927... |
| 921 |
"secondary target should be more than " + totalSecondaryPlan);
|
927 |
"secondary target should be more than " + totalSecondaryPlan);
|
| 922 |
}
|
928 |
}
|
| 923 |
|
929 |
|
| 924 |
} else {
|
930 |
} else {
|
| 925 |
|
931 |
|
| - |
|
932 |
if (authUser.getEmailId().equals("tarun.verma@smartdukaan.com")
|
| - |
|
933 |
|| authUser.getEmailId().equals("rakesh.sonawane@smartdukaan.com")
|
| 926 |
if (plan.getTargetPlan() >= totalSecondaryPlan) {
|
934 |
|| plan.getTargetPlan() >= totalSecondaryPlan) {
|
| 927 |
|
935 |
|
| 928 |
psp.setUpdatedTimestamp(LocalDateTime.now());
|
936 |
psp.setUpdatedTimestamp(LocalDateTime.now());
|
| 929 |
psp.setActive(false);
|
937 |
psp.setActive(false);
|
| 930 |
psp = new PartnerSecondaryPlan();
|
938 |
psp = new PartnerSecondaryPlan();
|
| 931 |
psp.setAuthId(authUser.getId());
|
939 |
psp.setAuthId(authUser.getId());
|