"When eating, the sun shines outside the window, and the flowers bloom before the moon" comes from which poem?

The Water Margin?

Shi Naian in Water Margin

The sun shone through the window, and Huaying sat forward during the dinner.

I didn't go for a drink, but I told the order of Chen's cards again.

Translation:

The sunshine outside the window disappeared in a blink of an eye, and the shadow of flowers in the banquet hall gradually moved forward. Before a glass of wine was finished, a song had been sung, and the old card under the steps began to tell the time again.

Shi Naian: Han nationality, formerly known as Yan Duan, whose real name is Zhao Rui and Shonago An, and whose nickname is Naian. Xinghua, Jiangsu, was a famous writer in the late Yuan and early Ming Dynasties.

By Shi Naian. Its content tells the story of the chivalrous man headed by Song Jiang in Liangshan Park, Shandong Province in the Northern Song Dynasty, who was forced to become an outlaw, developed and expanded until he was recruited by the court and explored the East and the West. The Water Margin, also known as The Legend of the Loyalty of the Water Margin, was originally named The Legend of the Jianghu Hawk, generally referred to as The Water Margin. The book was finalized in the Ming Dynasty. It described the peasant uprising headed by Song Jiang at the end of the Northern Song Dynasty, created many heroes such as jy, Lin Chong and Lu, and exposed the cruelty and social contradictions of the feudal ruling class at that time.