Multi-national giant, Samsung have recorded record quarterly earnings, which takes the South Korean company over rival Apple, as the world’s most profitable tech firm. This is a welcome news for Samsung, after the bribery scandal and last year’s debacle for the company.

The South Korean giant revealed that huge sales of the new Samsung Galaxy S8 smartphone and demand for its memory chips had increased in April-June, and it forecasted another brilliant report for the current quarter which runs till September.

The firm revealed that it had an operating profit of 14.07 trillion won ($12.6 billion) which beat its’ forecast by 72.9% from the previous year. On the other hand, consensus forecasts of US giants Apple, is expected to be around $10.6 billion, with the official figure coming out next week.

Analysts, however, have argued that even though Samsung have overtaken Apple as the most profitable tech firm for the time being, the latter records consistent profits, while Samsung’s profit varies due to the prices of its memory chips.

The South Korean company has also revealed that their net profit increased by almost 90% to 11.05 trillion won, which was its best quarterly profit in the last five years.

The sale of S8 has helped Samsung get back onto its’ feet after the Note 7 debacle, where the company had a lot of losses due to the frequent problem of battery bursting in Note 7.

On the other hand, Samsung’s profit also comes from the memory chips and displays too, which complements its’ earning from the recently released Samsung Galaxy S8.

Exploding batteries of Galaxy Note 7 made the South Korean company look embarrassing, and the losses of billions of dollars led a big blow at the reputation of the tech giant.

Moreover, Samsung’s reputation dealt with another blow, when vice-chairman and heir Lee Jae-Yong’s name appeared in the corruption scandal in connection with the case that forced South Korean President Park Geun-Hye to step down.

Samsung’s semiconductor business had an operating profit of 8.03 trillion won in the 2nd quarter, which increased by upto 204% from last year. Moreover, Samsung provides its chips to other companies, including tech rivals Apple.

The strong memory chip demand for high-density DRAMs and SSDs for servers has been one of the major reasons behind the significant growth in earning for the South Korean company.

The firm also confirmed that it will invest 20.4 trillion won by 2021 for expansion and upgradation of its chip plant in Pyeongtaek and Hwaseong, two South Korean cities.

Pyeongtaek’s factory, which is located 70 kilo-metres south from Samsung’s base in Seoul, has started producing memory chips after the firm invested 15.6 trillion won in two years to build the world’s biggest memory chip plant.

Along with that, Samsung also plans to extend its operations in the Chinese city of Xian, where it wants to expand its NAND chip plant, to meet the increasing demand for its memory chips.

With forecasts revealing an increase in the demand for Samsung’s memory chips, analysts expect the tech giant to witness record profits in the third quarter as well, with figures rising upto 15 trillion won.

The South Korean giant is all set to reveal its new Note device next month in New York, after Note 7’s exploding battery forced Samsung to remove the set from shelves. That debacle, had a big blow on Samsung’s reputation, which will take Samsung some time to recover from it.

Vice-chairman Lee, meanwhile, is still in police custody along with key executives of the company, after being charged for bribing the now-disgraced South Korean President Park with millions of dollars to get favours from the government.

Lee had been governing the company along with his father, and has successfully been at the helm of the group since 2014, when his father suffered a heart attack.

The announcement of the bribery scandal in February sent serious shockwaves throughout the management of the South Korean company, with Samsung announcing a major reform in its’ management style.

Lee, who is still in custody, awaits the courts final verdict by the end of next month.