Subversion Repositories SmartDukaan

Rev

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

Rev 29421 Rev 29422
Line 222... Line 222...
222
 
222
 
223
		if (co.getShippingTimestamp() != null) {
223
		if (co.getShippingTimestamp() != null) {
224
			tm.setActualShipping(co.getShippingTimestamp());
224
			tm.setActualShipping(co.getShippingTimestamp());
225
			tm.setInTransitShipping(false);
225
			tm.setInTransitShipping(false);
226
		} else {
226
		} else {
-
 
227
			if (co.getBillingTimestamp() != null) {
-
 
228
				co.setExpectedShipping(co.getBillingTimestamp());
-
 
229
 
-
 
230
				if (LocalDate.now().isAfter(co.getExpectedShipping().toLocalDate())) {
-
 
231
					long noOfDaysBetween = ChronoUnit.DAYS.between(LocalDate.now().atStartOfDay(),
-
 
232
							co.getExpectedShipping());
-
 
233
					co.setExpectedDeliveryTime(co.getBillingTimestamp().plusDays(noOfDaysBetween));
-
 
234
				}
-
 
235
			}
227
			tm.setExpectedShipping(co.getExpectedShipping());
236
			tm.setExpectedShipping(co.getExpectedShipping());
228
			if (tm.isInTransitBilling()) {
237
			if (tm.isInTransitBilling()) {
229
				tm.setInTransitShipping(false);
238
				tm.setInTransitShipping(false);
230
			} else {
239
			} else {
231
				tm.setInTransitShipping(true);
240
				tm.setInTransitShipping(true);