Index: src/main/java/com/example/domify/jobs/PaymentScheduledJobs.java
===================================================================
--- src/main/java/com/example/domify/jobs/PaymentScheduledJobs.java	(revision 21c243cfe4bc2b2f134dbad321e0641d3d9c4bf2)
+++ src/main/java/com/example/domify/jobs/PaymentScheduledJobs.java	(revision 68a2c4234e0ec3e2718b43846d698eb832db3c34)
@@ -13,13 +13,13 @@
     private EntityManager entityManager;
 
-    @Scheduled(cron = "0 0 9 1-5 * *")
+    @Scheduled(cron = "0 0 15 3-5 * *")
     @Transactional
     public void callReminderProcedure() {
         entityManager
-                .createNativeQuery("CALL domify.send_monthly_payment_reminders()")
+                .createNativeQuery("CALL domify.send_monthly_payment_reminders2()")
                 .executeUpdate();
     }
 
-    @Scheduled(cron = "0 0 10 * * 1")
+    @Scheduled(cron = "0 0 18 * * *")
     @Transactional
     public void callUnresolvedServiceReminderProcedure() {
@@ -28,4 +28,18 @@
                 .executeUpdate();
     }
+    @Scheduled(cron = "0 0 12 * * *")
+    @Transactional
+    public void callOverdueMaintenanceFlagProcedure() {
+        entityManager
+                .createNativeQuery("CALL domify.flag_landlords_with_overdue_maintenance()")
+                .executeUpdate();
+    }
 
+    @Scheduled(cron = "0 0  * * *")
+    @Transactional
+    public void callUpdateListingStatusesProcedure() {
+        entityManager
+                .createNativeQuery("CALL domify.update_listing_statuses()")
+                .executeUpdate();
+    }
 }
Index: src/main/java/com/example/domify/service/LeaseService.java
===================================================================
--- src/main/java/com/example/domify/service/LeaseService.java	(revision 21c243cfe4bc2b2f134dbad321e0641d3d9c4bf2)
+++ src/main/java/com/example/domify/service/LeaseService.java	(revision 68a2c4234e0ec3e2718b43846d698eb832db3c34)
@@ -4,8 +4,16 @@
 import com.example.domify.model.Lease;
 
+import java.math.BigDecimal;
+import java.time.LocalDate;
 import java.util.List;
 
 public interface LeaseService {
-    Lease save(Lease lease);
+    Lease save(Long listingId,
+               Long tenantId,
+               Long landlordUserId,
+               LocalDate startDate,
+               LocalDate endDate,
+               BigDecimal rentAmount,
+               BigDecimal depositAmount);
     List<Lease> findByLandlord(Long landlordId);
     List<Lease> findByTenant(Long tenantId);
Index: src/main/java/com/example/domify/service/UserService.java
===================================================================
--- src/main/java/com/example/domify/service/UserService.java	(revision 21c243cfe4bc2b2f134dbad321e0641d3d9c4bf2)
+++ src/main/java/com/example/domify/service/UserService.java	(revision 68a2c4234e0ec3e2718b43846d698eb832db3c34)
@@ -24,3 +24,13 @@
     UserD findById(Long userId);
     void updateUserRating(Long userId, BigDecimal newRating);
+
+    UserD updateUserProfile(Long userId,
+                            String firstName,
+                            String lastName,
+                            String street,
+                            String number,
+                            String municipality,
+                            String city,
+                            String country,
+                            String bio);
 }
Index: src/main/java/com/example/domify/service/impl/LeaseServiceImpl.java
===================================================================
--- src/main/java/com/example/domify/service/impl/LeaseServiceImpl.java	(revision 21c243cfe4bc2b2f134dbad321e0641d3d9c4bf2)
+++ src/main/java/com/example/domify/service/impl/LeaseServiceImpl.java	(revision 68a2c4234e0ec3e2718b43846d698eb832db3c34)
@@ -1,15 +1,16 @@
 package com.example.domify.service.impl;
 
-import com.example.domify.model.Lease;
-import com.example.domify.model.UserD;
+import com.example.domify.model.*;
 import com.example.domify.repository.LeaseRepository;
-import com.example.domify.service.LeaseService;
-import com.example.domify.service.ListingService;
-import com.example.domify.service.UserService;
-import jakarta.transaction.Transactional;
+import com.example.domify.service.*;
+//import jakarta.transaction.Transactional;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Isolation;
 
 import java.math.BigDecimal;
+import java.time.LocalDate;
 import java.util.List;
+import org.springframework.transaction.annotation.Transactional;
+
 
 @Service
@@ -18,13 +19,67 @@
     private final ListingService listingService;
     private final UserService userService;
-    public LeaseServiceImpl(LeaseRepository leaseRepository, ListingService listingService, UserService userService) {
+    private final TenantProfileService tenantProfileService;
+    private final LandlordProfileService landlordProfileService;
+
+    public LeaseServiceImpl(LeaseRepository leaseRepository,
+                            ListingService listingService,
+                            UserService userService,
+                            TenantProfileService tenantProfileService,
+                            LandlordProfileService landlordProfileService) {
         this.leaseRepository = leaseRepository;
         this.listingService = listingService;
         this.userService = userService;
+        this.tenantProfileService = tenantProfileService;
+        this.landlordProfileService = landlordProfileService;
     }
 
-    @Transactional
-    public Lease save(Lease lease) {
-        return leaseRepository.save(lease);
+    @Transactional(rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED)
+    public Lease save(Long listingId,
+                                        Long tenantId,
+                                        Long landlordUserId,
+                                        LocalDate startDate,
+                                        LocalDate endDate,
+                                        BigDecimal rentAmount,
+                                        BigDecimal depositAmount) {
+        try {
+            System.out.println("=== ЗАПОЧНУВАЊЕ НА ТРАНСАКЦИЈА ЗА КРЕИРАЊЕ ДОГОВОР ===");
+            Listing listing = listingService.findById(listingId);
+
+            if (!"available".equals(listing.getStatus())) {
+                throw new IllegalStateException("Огласот не е достапен за изнајмување. Статус: " + listing.getStatus());
+            }
+
+            TenantProfile tenant = tenantProfileService.findByUserId(tenantId);
+            if (tenant == null) {
+                throw new IllegalArgumentException("Изнајмувачот не е пронајден со ID: " + tenantId);
+            }
+
+            LandlordProfile landlord = landlordProfileService.findByUserId(landlordUserId);
+            if (landlord == null) {
+                throw new IllegalArgumentException("Издавачот не е пронајден со ID: " + landlordUserId);
+            }
+
+            System.out.println("TENANT ID: " + tenant.getId());
+            System.out.println("LANDLORD ID: " + landlord.getId());
+
+            Lease lease = new Lease(
+                    startDate,
+                    endDate,
+                    rentAmount,
+                    depositAmount,
+                    listing,
+                    tenant,
+                    landlord
+            );
+
+            Lease savedLease = leaseRepository.save(lease);
+            listing.setStatus("изнајмено");
+            listingService.save(listing);
+            return savedLease;
+
+        } catch (Exception e) {
+            System.err.println("ГРЕШКА ВО ТРАНСАКЦИЈАТА: " + e.getMessage());
+            throw new RuntimeException("Грешка при креирање на договор за изнајмување: " + e.getMessage(), e);
+        }
     }
 
Index: src/main/java/com/example/domify/service/impl/PropertiesServiceImpl.java
===================================================================
--- src/main/java/com/example/domify/service/impl/PropertiesServiceImpl.java	(revision 21c243cfe4bc2b2f134dbad321e0641d3d9c4bf2)
+++ src/main/java/com/example/domify/service/impl/PropertiesServiceImpl.java	(revision 68a2c4234e0ec3e2718b43846d698eb832db3c34)
@@ -11,4 +11,6 @@
 import com.example.domify.repository.PropertyTypeRepository;
 import com.example.domify.service.PropertiesService;
+import org.springframework.transaction.annotation.Isolation;
+import org.springframework.transaction.annotation.Transactional;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
@@ -57,26 +59,34 @@
 
     @Override
+    @Transactional(rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED)
     public Property createPropertyWithImages(Long propertyTypeId, String name, String description,
                                              String street, String streetNumber, String municipality,
                                              String city, String country, MultipartFile[] images,
                                              UserD owner) throws IOException {
+        try {
+            System.out.println("=== ЗАПОЧНУВАЊЕ НА ТРАНСАКЦИЈА ЗА КРЕИРАЊЕ НА ИМОТ ===");
 
-        if (name == null || name.trim().isEmpty()) {
-            throw new IllegalArgumentException("Property name cannot be empty");
+            if (name == null || name.trim().isEmpty()) {
+                throw new IllegalArgumentException("Property name cannot be empty");
+            }
+
+            var propertyType = propertyTypeRepository.findById(propertyTypeId)
+                    .orElseThrow(() -> new RuntimeException("Property type not found with ID: " + propertyTypeId));
+
+            Address address = new Address(street, streetNumber, municipality, city, country);
+            address = addressRepository.save(address);
+
+            Property property = new Property(name, description, LocalDateTime.now(), owner, propertyType, address);
+            property = propertyRepository.save(property);
+
+            if (images != null && images.length > 0) {
+                processImageUploads(images, property);
+            }
+            return property;
+
+        } catch (Exception e) {
+            System.err.println("ГРЕШКА ВО ТРАНСАКЦИЈА ЗА КРЕИРАЊЕ НА ИМОТ: " + e.getMessage());
+            throw new RuntimeException("Грешка при креирање на имот со слики: " + e.getMessage(), e);
         }
-
-        var propertyType = propertyTypeRepository.findById(propertyTypeId)
-                .orElseThrow(() -> new RuntimeException("Property type not found with ID: " + propertyTypeId));
-
-        Address address = new Address(street, streetNumber, municipality, city, country);
-        address = addressRepository.save(address);
-
-        Property property = new Property(name, description, LocalDateTime.now(), owner, propertyType, address);
-        property = propertyRepository.save(property);
-
-        if (images != null && images.length > 0) {
-            processImageUploads(images, property);
-        }
-        return property;
     }
 
Index: src/main/java/com/example/domify/service/impl/UserServiceImpl.java
===================================================================
--- src/main/java/com/example/domify/service/impl/UserServiceImpl.java	(revision 21c243cfe4bc2b2f134dbad321e0641d3d9c4bf2)
+++ src/main/java/com/example/domify/service/impl/UserServiceImpl.java	(revision 68a2c4234e0ec3e2718b43846d698eb832db3c34)
@@ -6,7 +6,8 @@
 import com.example.domify.repository.*;
 import com.example.domify.service.UserService;
-import jakarta.transaction.Transactional;
+import org.springframework.transaction.annotation.Transactional;
 import org.springframework.security.crypto.password.PasswordEncoder;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Isolation;
 
 import java.math.BigDecimal;
@@ -96,5 +97,4 @@
                 .orElseThrow(() -> new IllegalArgumentException("User not found"));
 
-        // Calculate new average rating (you might want more sophisticated logic)
         if (user.getRating().compareTo(BigDecimal.ZERO) == 0) {
             user.setRating(newRating);
@@ -105,6 +105,45 @@
             user.setRating(average);
         }
-
         userRepository.save(user);
     }
+
+    @Transactional(rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED)
+    public UserD updateUserProfile(Long userId,
+                                   String firstName,
+                                   String lastName,
+                                   String street,
+                                   String number,
+                                   String municipality,
+                                   String city,
+                                   String country,
+                                   String bio) {
+        try {
+            System.out.println("=== ЗАПОЧНУВАЊЕ НА ТРАНСАКЦИЈА ЗА ПРОФИЛ ===");
+
+            UserD user = userRepository.findById(userId)
+                    .orElseThrow(() -> new IllegalArgumentException("Корисник не е пронајден со ID: " + userId));
+
+            user.setFirstName(firstName);
+            user.setLastName(lastName);
+            user.setBio(bio);
+
+            Address address = user.getAddress();
+            address.setStreet(street);
+            address.setNumber(number);
+            address.setMunicipality(municipality);
+            address.setCity(city);
+            address.setCountry(country);
+
+            addressRepository.save(address);
+            UserD savedUser = userRepository.save(user);
+
+            System.out.println("ПРОФИЛ АЖУРИРАН ЗА КОРИСНИК: " + firstName + " " + lastName);
+            return savedUser;
+
+        } catch (Exception e) {
+            System.err.println("ГРЕШКА ВО ТРАНСАКЦИЈА ЗА ПРОФИЛ: " + e.getMessage());
+            throw new RuntimeException("Грешка при ажурирање на профил: " + e.getMessage(), e);
+        }
+    }
+
 }
Index: src/main/java/com/example/domify/web/LeaseController.java
===================================================================
--- src/main/java/com/example/domify/web/LeaseController.java	(revision 21c243cfe4bc2b2f134dbad321e0641d3d9c4bf2)
+++ src/main/java/com/example/domify/web/LeaseController.java	(revision 68a2c4234e0ec3e2718b43846d698eb832db3c34)
@@ -59,30 +59,18 @@
             }
 
-            Listing listing = listingService.findById(listingId);
-
-            TenantProfile tenant = tenantProfileService.findByUserId(tenantId);
-            System.out.println("TENANT: " + tenant.getId());
-            System.out.println("LANDLORD: " + landlordUser.getId());
-            LandlordProfile landlord = landlordProfileService.findByUserId(landlordUser.getId());
-
-            Lease lease = new Lease(
+            leaseService.save(
+                    listingId,
+                    tenantId,
+                    landlordUser.getId(),
                     startDate,
                     endDate,
                     rentAmount,
-                    depositAmount,
-                    listing,
-                    tenant,
-                    landlord
+                    depositAmount
             );
-
-            leaseService.save(lease);
-
-            listing.setStatus("изнајмено");
-            listingService.save(listing);
 
             return "redirect:/lease";
 
         } catch (Exception e) {
-            return "redirect:/lease/create?listingId=" + listingId + "&tenantId=" + tenantId;
+            return "redirect:/lease/create?listingId=" + listingId + "&tenantId=" + tenantId + "&error=true";
         }
     }
