Our teacher, the Beit Yosef, wrote in section 5: One who digs a grave for a deceased person on the second day of Yom Tov—it is permitted for him to take payment. Thus far his words, and his reasoning is: since the sages treated it like a weekday—it is consequently permitted as on a weekday. But they wondered about him: for it is true that regarding the deceased they treated it like a weekday, but not for any other matter. Therefore, there is one who forbids even if he cannot obtain it for free—one should deceive him in this as in chalitzah (Magen Avraham, subsection 12 in the name of Yam Shel Shlomo). That is to say: to promise him payment, and not to give it to him, because it is forbidden for him to take payment for Yom Tov. And in my humble opinion, the words of our teacher, the Beit Yosef, appear correct, for if so, when a death occurs on another Yom Tov—one will not find anyone who will do it. And behold, this is the primary reason for the permission, in order to find someone who wants to profit, and he will take payment. For without payment, each one will say: "Why should I dig on Yom Tov? You dig!" And certainly in a place where there are known gravediggers—our teacher, the Beit Yosef, did not permit it, for it is incumbent upon them, and we compel them. Rather, in a place where there are no gravediggers—our teacher, the Beit Yosef, rightly permitted it. And also Yom Tov payment is not applicable here, for behold, it is permitted to take payment for a mitzvah even on Shabbat, as I wrote in siman 585 (Magen Avraham ibid.). And even the permanent gravediggers—it is the practice to pay them after Yom Tov, so as not to close the door in such a matter. However, with us, in any case, the grave is dug by a non-Jew, as has been explained. And it is simple that to buy tachrichin, if from a Jewish shopkeeper—one should take without measurement and without a total price. But if he is forced to take from a non-Jewish shopkeeper, and he will not agree in such a manner, that it is permitted and an obligation to buy from him with measurement, and a price, and payment of money, if it is impossible in another way, for the sages treated it like a weekday. And even on the first day of Yom Tov—it appears to me that it is permitted if the necessity is such, for shevutim were permitted even on the first day of Yom Tov for the sake of the deceased, as I wrote in section 3. And nevertheless, I am uncertain about this: for granted that they permitted the moving of a deceased person which is muktzeh, as I wrote there, nevertheless perhaps the shevut of buying and selling was not permitted. And it requires further study for the law. Therefore, it is better to give him a pledge, and after Yom Tov he shall pay him whatever he says. (And see Taz subsection 3, and it requires further study.)
כתב רבינו הבית יוסף בסעיף ה: החופר קבר למת ביום טוב שני – מותר לו ליטול שכר. עד כאן לשונו, וטעמו: דכיון דכחול שויוהו רבנן – ממילא דמותר כבחול. אבל תמהו עליו: דאמת דלגבי מת שויוהו כחול, אבל לא לעניין אחר. ולכן יש מי שאוסר ואפילו אם אינו יכול להשיג בחינם – מטעיהו בזה כמו בחליצה (מגן אברהם סעיף קטן יב בשם ים של שלמה). כלומר: להבטיחו שכר, ולא ליתן לו, כי אסור לו ליטול שכר יום טוב. ולעניות דעתי נראה כדברי רבינו הבית יוסף, דאם כן כשיתרמי מת ביום טוב אחר – לא ימצא מי שיעשה. והרי זהו טעם עיקר ההיתר, כדי למצא מי שירצה להרויח, ויטול שכר. דבלא שכר יאמר כל אחד: "למה לי לחפור ביום טוב? חפור אתה!"ובוודאי במקום שיש קברנים ידועים – לא התיר רבינו הבית יוסף, דעליהם מוטל, וכופין אותם. אלא במקום שאין קברנים – שפיר התיר רבינו הבית יוסף. וגם שכר יום טוב אינו כאן, דהא שכר מצוה מותר ליטול גם בשבת, כמו שכתבתי בסימן תקפה (מגן אברהם שם). ואפילו הקברנים הקבועים – דרך לשלם להם אחר יום טוב, כדי שלא לסגור הדלת בענין כזה. אך אצלנו בלאו הכי חופרים הקבר על ידי אינו יהודי, כמו שנתבאר. ופשוט הוא דלקנות תכריכין, אם מחנוני ישראל – יקח בלא מידה ובלא סכום מקח. אך אם מוכרח ליטול מחנוני אינו יהודי, ולא ירצה בכהאי גוונא, דמותר וחובה לקנות ממנו במידה, ומקח, ושילום מעות, אם אי אפשר בעניין אחר, דכחול שויוהו רבנן. ואפילו ביום טוב ראשון – נראה לי דמותר אם ההכרח כן, דשבותים התירו גם ביום טוב ראשון בשביל המת, כמו שכתבתי בסעיף ג. ומכל מקום אני מסתפק בזה: דנהי דהתירו טלטולו של מת שהוא מוקצה, כמו שכתבתי שם, מכל מקום אולי שבות דמקח וממכר לא התירו. וצריך עיון לדינא. ולכן טוב יותר ליתן לו משכון, ולאחר יום טוב כמה שיאמר ישלם לו. (ועיין ט"ז סעיף קטן ג, וצריך עיון.)