Subversion Repositories SmartDukaan

Rev

Rev 29927 | Rev 32603 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 29927 Rev 30958
Line 2... Line 2...
2
 
2
 
3
import com.spice.profitmandi.dao.convertor.LocalDateTimeAttributeConverter;
3
import com.spice.profitmandi.dao.convertor.LocalDateTimeAttributeConverter;
4
 
4
 
5
import javax.persistence.*;
5
import javax.persistence.*;
6
import java.io.Serializable;
6
import java.io.Serializable;
-
 
7
import java.time.LocalDate;
7
import java.time.LocalDateTime;
8
import java.time.LocalDateTime;
8
import java.time.format.DateTimeFormatter;
9
import java.time.format.DateTimeFormatter;
9
 
10
 
10
/**
11
/**
11
 * This class basically contains details
12
 * This class basically contains details
12
 * 
-
 
13
 * @author ashikali
-
 
14
 *
13
 *
-
 
14
 * @author ashikali
15
 */
15
 */
-
 
16
 
16
/**
17
/**
17
 * @author amit
18
 * @author amit
18
 *
19
 *
19
 */
20
 */
20
@Entity
21
@Entity
Line 130... Line 131...
130
 
131
 
131
	public void setNlc(float nlc) {
132
	public void setNlc(float nlc) {
132
		this.nlc = nlc;
133
		this.nlc = nlc;
133
	}
134
	}
134
 
135
 
135
	
136
 
136
	@Column(name = "credit_note_number")
137
	@Column(name = "credit_note_number")
137
	private String creditNoteNumber;
138
	private String creditNoteNumber;
138
 
139
 
139
	@Convert(converter = LocalDateTimeAttributeConverter.class)
140
	@Convert(converter = LocalDateTimeAttributeConverter.class)
140
	@Column(name = "process_timestamp")
141
	@Column(name = "process_timestamp")
Line 250... Line 251...
250
 
251
 
251
	public float getDropAmount() {
252
	public float getDropAmount() {
252
		return oldDp - newDp;
253
		return oldDp - newDp;
253
	}
254
	}
254
 
255
 
255
	public float getAutoPartnerPayout() {
256
	public float getAutoPartnerPayout(LocalDateTime creditDate) {
256
		if (this.getPartnerPayout() == 0) {
257
		if (creditDate.toLocalDate().isAfter(LocalDate.of(2022, 9, 15))) {
257
			return this.getDropAmount() / 1.18f;
258
			return this.getDropAmount();
258
		} else {
259
		} else {
-
 
260
			if (this.getPartnerPayout() == 0) {
-
 
261
				return this.getDropAmount() / 1.18f;
-
 
262
			} else {
259
			return this.getPartnerPayout();
263
				return this.getPartnerPayout();
-
 
264
			}
260
		}
265
		}
261
	}
266
	}
262
 
267
 
263
	public void setPartnerPayout(float partnerPayout) {
268
	public void setPartnerPayout(float partnerPayout) {
264
		this.partnerPayout = partnerPayout;
269
		this.partnerPayout = partnerPayout;