diff --git a/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetModelLine_asCellRange.xml b/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetModelLine_asCellRange.xml
index eaeca08869627687ef0c15b33df4a06b775d5738..54f00e64681844b8f9c3c983badc1682df011545 100644
--- a/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetModelLine_asCellRange.xml
+++ b/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetModelLine_asCellRange.xml
@@ -86,6 +86,7 @@ cell_range = []\n
 if matrixbox :\n
   if resource is not None:\n
     base_category_list = resource.getVariationBaseCategoryList()\n
+    base_category_list.sort()\n
     for base_category in base_category_list:\n
       category_cell_range = []\n
       category_item_list = context.getVariationCategoryItemList(base_category_list = (base_category,),\n
diff --git a/bt5/erp5_payroll/bt/revision b/bt5/erp5_payroll/bt/revision
index e1170b6414efa1bb63c186ec4a9b5391653f5fa2..560731b56bf1c51dd98fee4303136e403d943dab 100644
--- a/bt5/erp5_payroll/bt/revision
+++ b/bt5/erp5_payroll/bt/revision
@@ -1 +1 @@
-489
\ No newline at end of file
+490
\ No newline at end of file